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

Revision history [back]

click to hide/show revision 1
initial version

Figured it out. For those that might run into this to.

This video helped explain it to me.

import roslib; roslib.load_manifest('sensorcsv')
import rospy
 # from rosserial_arduino import adc
from std_msgs.msg import UInt16
from rosserial_arduino.msg import Adc

def callback(data):
    print "Callback"
    print data.adc0, data.adc1, data.adc2, data.adc3, data.adc4, data.adc5
#    print rospy.get_name()+': ' + str(

def listener():
    print "listener"
    rospy.Subscriber("adc", Adc, callback)
    print "rospy.subscriber"
    print "rospy.spin()"

if __name__ == '__main__':
    print "Main"