ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

what is adc_timer

asked 2012-07-12 12:51:38 -0600

magdes gravatar image

updated 2012-07-12 13:13:24 -0600

Eric Perko gravatar image

In the rosserial_arduino oscilloscope example there is the following line: long adc_timer;

does anyone know what adc_timer is or how it's being used?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-07-13 19:07:39 -0600


I've done this tutorial as well, and I don't see any use for that line in the code. I am certain if you comment it out (go ahead and try) that it will compile just fine.

The best reason I could see for something like this is to put a timestamp on the message, but you don't need a separate variable to keep track of that value, since you can simply use the nodehandle timestamp call :;

If you're interesting in adding a time stamp, you want to modify your message with a header. I had written up a similar thing on my blog that outputs the oscilloscope/ADC values in volts instead of counts, and includes the time stamp. If you're interested you can check it out here : Custom ROS Messages with rosserial_arduino.


edit flag offensive delete link more

Question Tools


Asked: 2012-07-12 12:51:38 -0600

Seen: 210 times

Last updated: Jul 13 '12