Talk:MicroTrac Controller v17.10/Code: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
(→‎controller loops: new section)
Line 12: Line 12:
**onboard could resond "¿" when ready
**onboard could resond "¿" when ready
**remote will pause stream, onboard will broadcast gps, then continue.
**remote will pause stream, onboard will broadcast gps, then continue.
== controller loops ==
:loop
::read pin for LF (left track forward)
:::if HIGH
::::print "A" to serial
:::otherwise print "a"
::...
::print n
::n++

Revision as of 23:10, 28 October 2017

Code Examples

ideas

  • use capital letter for relay ON and lower case letter for OFF.
  • transmit continuous stream of current switch settings
  • shut down if stream times out
  • remote box could request gps coordinates by sending a "?"
    • onboard could resond "¿" when ready
    • remote will pause stream, onboard will broadcast gps, then continue.

controller loops

loop
read pin for LF (left track forward)
if HIGH
print "A" to serial
otherwise print "a"
...
print n
n++