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

Include rosserial_arduino_demos/Adc.h

asked 2011-10-06 18:39:06 -0500

Chrimo gravatar image

Hi, I'm using ros-electric and try to compile rosserial_arduino_demos/sketches/ADC... Problem: missing header file

rosserial_arduino_demos/Adc.h

Where can I find this include file ?

Thanks in advance Cheers Christian

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
0

answered 2011-10-07 07:23:45 -0500

fergs gravatar image

updated 2011-10-07 07:23:59 -0500

Our docs are ahead of our release in debs (this will be fixed very shortly). In 0.1.0, this message was in the rosserial_arduino_demo package.

You can certainly do a:

rosrun rosserial_arduino make_library.py <sketchbook> rosserial_arduino_demo

But I would really recommend you upgrade to the latest (soon to be 0.2.0) code by doing a source checkout:

cd <some directory on your ROS_PACKAGE_PATH>
hg clone https://kforge.ros.org/rosserial/hg
rosmake rosserial
edit flag offensive delete link more
1

answered 2011-10-07 06:14:02 -0500

Chrimo gravatar image

You find the very interesting but outdated tutorial for this demo at: http://www.ros.org/wiki/rosserial_arduino/Tutorials/Arduino%20Oscilloscope

edit flag offensive delete link more
0

answered 2011-10-09 19:35:45 -0500

Chrimo gravatar image

Hi, first solution works out of the box ! I try source checkout after some more tests with current version.

BTW: For stress tests of the Arduino, I've added more functionality into the code...

Now, I have some questions about ADC handling. To use TWI/I2C for magnetic compass and 3D-accelerator sensors, I cannot use all ADC-channels. Currently the sources for ADC are hardcoded for all 6 channels, but where should I change it to use 4 channels only ? Do I have to modify Adc.h ?

Thanks for some ideas Cheers Christian

edit flag offensive delete link more

Comments

You could change the ADC message, but I would suggest instead defining either your own message type, or just not filling in the last 2 fields of the message. Either way, you will want to publish the compass/etc data as a new topic.
fergs gravatar image fergs  ( 2011-10-09 21:12:20 -0500 )edit

Question Tools

Stats

Asked: 2011-10-06 18:39:06 -0500

Seen: 465 times

Last updated: Oct 09 '11