I'm still struggling away with my RunRev Arduino Microcontroller interface. Probably way over my head but too excited by the possibilities to give up. I've been struggling all day with something which doesn't make any sense to me. The microcontroller is set to send lines of data (Serial.Println()) to the serial port. The data reports on a potentiometer and reads from 0 to 1024.
I have the following code in RunRev to read the incomming numbers:
Code: Select all
on readPort
set the numberformat to "0000"
if the hilite of btn "Port open" = true then
put the label of btn "Port" into thePort
read from driver thePort until 100
if it is not empty then put it into recVar --and it is a number
put the number of lines in recVar into fld "recLines"
repeat with x=1 to the number of lines in recVar
put item 1 of line x of recVar & "," before line 1 of tList
put max (tList) into fld "AinFld0"
end repeat
send readPort to me in 50 milliseconds
end if
end readPort
Does any of this make sense because I'm at a complete loss:?
Any thoughts or advice much appreciated.
Jim H