UofSSpaceTeam / rover-embedded

A place to work on embedded microcontroller software for the USST Rover Project
0 stars 0 forks source link

Embedded device integration with robocluster #20

Closed ottopasuuna closed 6 years ago

ottopasuuna commented 6 years ago

We'll need a way for embedded microprocessors to easily talk to robocluster. Probably using JSON for object transport. Simple way to do this is have a hash table of callback functions that are indexed base on the "key" or "event" part of the JSON message (assuming messages are of the form: {'event': 'test_event', 'data': 'data_one'}) Assign an interupt to fire on Serial events, and call the necessary callback. Have a function for subscribing (add callback for an event), and publishing (pack data into JSON and send).