--- /dev/null
+include common.mk
+
+all: compile
+
+# To run Particle, we need to install Particle CLI
+# Please see:
+# https://docs.particle.io/guide/getting-started/connect/photon/#install-the-particle-cli
+monitor:
+ sudo chmod 666 /dev/ttyACM0
+ particle serial monitor
+
+compile:
+ rm -f *.bin
+ #particle compile photon
+ particle compile raspberry-pi
+
+flash:
+ particle flash Pi-1 raspberry-pi*.bin
+
+flash0:
+ particle flash IoT-0 photon*.bin
+
+flash1:
+ particle flash IoT-1 photon*.bin
+
+PHONY += clean
+clean:
+ rm -f *.bin
+
+PHONY += mrclean
+mrclean: clean
+ rm -rf ../docs
+
+tabbing:
+ uncrustify -c C.cfg --no-backup *.cpp
+ uncrustify -c C.cfg --no-backup *.h
+
+wc:
+ wc *.cpp *.h
+
+.PHONY: $(PHONY)
--- /dev/null
+# A few common Makefile items
+
+CC := gcc
+CXX := g++
+
+UNAME := $(shell uname)
+
+LIB_NAME := iotcloud
+LIB_SO := lib_$(LIB_NAME).so
+
+CPPFLAGS += -Wall -g -O0
+
+# Mac OSX options
+ifeq ($(UNAME), Darwin)
+CPPFLAGS += -D_XOPEN_SOURCE -DMAC
+endif
--- /dev/null
+// ------------------------------------------------
+// Test on function subscriptions
+// @author Rahmadi Trimananda - UC Irvine
+// ------------------------------------------------
+
+// Setting up pins for input
+void setup() {
+
+ Particle.function("12345678901",functionOne);
+ Particle.function("123456789012", functionTwo);
+ Particle.function("123", functionThree);
+ Particle.function("1234", functionFour);
+ Particle.function("12345", functionFive);
+}
+
+void loop() {
+
+ // Do nothing
+}
+
+
+int functionOne(String integer) {
+
+ return 1234;
+}
+
+int functionTwo(String command) {
+
+ return 1234;
+}
+
+int functionThree(String command) {
+
+ return 1234;
+}
+
+int functionFour(String command) {
+
+ return 12345678;
+}
+
+int functionFive(String command) {
+
+ return 1234567812345678;
+}
+