Arduino topics vs services vs actionlib actions?
Say you are connecting via Serial (or Bluetooth or anything really) to an Arduino running some program and you want it to use it to execute commands - for example, Requesting values for certain Variables, Blinking an LED, or sending a move order.
My understanding is that were everything local to one machine ala TurtleSim, a variable request would be a service, blinking an LED could be a service or a topic subscription depending on implementation, and a joystick or controller would publish to a topic.
However, the Arduino tutorials perform all of the above with Topic, with no mention of services.
- What's best practice when using topics vs services vs actions on Arduino/Serial?
- When should each type be used. i.e. Does this hold, or does Arduino/Serial communication have its own considerations?
- If so, What are they?
If there is a Service tutorial for Arduino that I missed, links to same would also be appreciated.
EDIT: There is a ServiceServer.pde in the ros_lib examples that looks about right. Looking into it