ros_serial, arduino, lights on/off with variable delay
Hi, I was wondering about a project that I wanted to use ROS in a dispensing setup. I have a Python code setup running the pocketsphinx for voice recognition. Everything is working there, I am publishing command words. I know the next step is to create a python code that monitors the command topic and then publishes that to the arduino over ros_serial. I may have over looked it, but I haven't seen much on that step.
In relative terms this seems pretty easy. I just want to be able to turn a 5v solenoid on for a variable amount of time. I say what solenoid and then the amount of time. Then that info is sent to the arduino. So I was thinking it sounded a lot like the blinking light on the ros_serial tutorial as I was going through it. The thing that got me was how to load a variable number into a variable delay timer. I want the solenoid to stay on, not blink. Where would I set the delay, right after each callback or in void_loop? I thought that I could give each CallBack its own identifier and thats how I would identify the solenoids, I don't know if thats right or not.
If anybody knows a direction to look, that would be great.