Ask Your Question
1

arduino analog read

asked 2012-10-30 04:49:30 -0500

joseescobar60 gravatar image

updated 2014-01-28 17:14:06 -0500

ngrennan gravatar image

Hello everybody!

i'm trying to read an analog port from my arduino mega 2560 (Flex Sensor), but i don't know how to read and print the value of my sensor with a publisher in ros.

Can You HELP ME!!!

Thank you everybody

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-11-04 07:16:47 -0500

Atom gravatar image

You might try looking at RosSerial..

http://www.ros.org/wiki/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup

Or you can have a look here for some code utilizing Arduino and ROS.

https://code.launchpad.net/~fuzzgun/buttonui-ros-pkg/trunk

edit flag offensive delete link more
0

answered 2012-11-04 09:42:12 -0500

davinci gravatar image

updated 2012-11-04 09:46:23 -0500

That is all covered in this tutorial: http://www.ros.org/wiki/rosserial_arduino/Tutorials/Arduino%20Oscilloscope It even visualizes your measurements!

edit flag offensive delete link more

Comments

Thank you, I got it. Is it possible to add two different sensors in one Arduino and publish two messages (each for one sensor) in a single publisher node?

Kishore Kumar gravatar imageKishore Kumar ( 2015-01-20 06:29:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-10-30 04:49:30 -0500

Seen: 430 times

Last updated: Nov 04 '12