- Code: Select all
Started plugin "arduino 0.0.1"
arduino ARDUINO --V 0.0.1 initializing might take some minutes depending on # of Ardunios
arduino device :dev007 in deviceStartComm
arduino device :deviceII in deviceStartComm
arduino ------------------------------------------------------------------------------
arduino init done ..
arduino -------------------------------------------------------------------------------
arduino check devices for updates:
arduino dev: dev007 ; id: 641526965; update freq: 10; last update: 0
arduino time to update: 49:26 https://192.168.1.77 -d "A1,AnalogIn=0"
arduino time to update: 49:26 https://192.168.1.77 -d "D1,DigitalOut=1"
arduino time to update: 49:26 https://192.168.1.77 -d "A9,AnalogOut=2"
arduino dev: deviceII ; id: 20703028; update freq: 20; last update: 0
arduino time to update: 49:26 https://192.168.1.77 -d "A4,AnalogIn=0"
arduino time to update: 49:26 https://192.168.1.77 -d "D3,DigitalIn=1"
arduino time to update: 49:26 https://192.168.1.77 -d "A3,AnalogIn=2"
arduino dev: dev007 ; id: 641526965; update freq: 10; last update: 1430884166.11
arduino dev: deviceII ; id: 20703028; update freq: 20; last update: 1430884166.11
arduino dev: dev007 ; id: 641526965; update freq: 10; last update: 1430884166.11
arduino time to update: 49:36 https://192.168.1.77 -d "A1,AnalogIn=0"
arduino time to update: 49:36 https://192.168.1.77 -d "D1,DigitalOut=1"
arduino time to update: 49:36 https://192.168.1.77 -d "A9,AnalogOut=2"
arduino dev: deviceII ; id: 20703028; update freq: 20; last update: 1430884166.11
arduino dev: dev007 ; id: 641526965; update freq: 10; last update: 1430884176.13
arduino dev: deviceII ; id: 20703028; update freq: 20; last update: 1430884166.11
arduino dev: dev007 ; id: 641526965; update freq: 10; last update: 1430884176.13
arduino time to update: 49:46 https://192.168.1.77 -d "A1,AnalogIn=0"
arduino time to update: 49:46 https://192.168.1.77 -d "D1,DigitalOut=1"
arduino time to update: 49:46 https://192.168.1.77 -d "A9,AnalogOut=2"
arduino dev: deviceII ; id: 20703028; update freq: 20; last update: 1430884166.11
arduino time to update: 49:46 https://192.168.1.77 -d "A4,AnalogIn=0"
arduino time to update: 49:46 https://192.168.1.77 -d "D3,DigitalIn=1"
arduino time to update: 49:46 https://192.168.1.77 -d "A3,AnalogIn=2"
arduino dev: dev007 ; id: 641526965; update freq: 10; last update: 1430884186.15
arduino dev: deviceII ; id: 20703028; update freq: 20; last update: 1430884186.15
arduino dev: dev007 ; id: 641526965; update freq: 10; last update: 1430884186.15
arduino time to update: 49:56 https://192.168.1.77 -d "A1,AnalogIn=0"
arduino time to update: 49:56 https://192.168.1.77 -d "D1,DigitalOut=1"
arduino time to update: 49:56 https://192.168.1.77 -d "A9,AnalogOut=2"
arduino dev: deviceII ; id: 20703028; update freq: 20; last update: 1430884186.15
here loop in the plugin checking 5 seconds if an update to / from arduino for the different devices is needed.
the device names and pins and modes are set in the device edit menus and the HTTP string is just a fake string to show what should happen there
Now the next question is
" which commands to send to the arduinos?".
The arduino language is pretty simple and there is e.g. no json.loads etc .. too little memory.
something like:
A5,R;D7,W=500;D8,R .. would be
pin analog 5 read
pin Digital7 write 500
pin Digital8 read
that should be easy to parse on the Arduino side (first the ";" then the "," ..)
We could also include programming of the pins:
A8,P=I would be analog pin8 program to be a INPUT pin
D9,P=W would be set pin Digital9 to write mode
";" = separate the pin command
"," = separate pin and command
"=" value if write to pin, or programming command
any comments or suggestions?
here the plugin, you could play around with. change the settings in the device settings and you will see different outputs generated.
https://www.dropbox.com/s/fgdbk0or0a35r9u/arduino.indigoPlugin-v-0-0-2.zip?dl=0The translation to actual HTTP code is the smallest step.
==> NEXT BIG thing we have to agree on is the syntax/grammar of commands to be send to the arduinos.
Karl