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).
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).