trouble subscribing to custom messages
First ROS script, jumping into the deep end. I have an Arduino publishing data (it's working fine) to a topic called Adc. I'm trying to write a Subscriber to read that data and eventually write it to a CSV file.
It compiles ok with no errors but shows nothing. The data types that are published are 5 different uint16s but when I tried "from std_msgs.msg import uint16) and then use uint16 below I get an error so I went back to String in the sample code.
Am I on the right track here?
#!/usr/bin/env python
import roslib; roslib.load_manifest('sensorcsv')
import rospy
from std_msgs.msg import String
def callback(data):
rospy.loginfo(rospy.get_name()+"I heard %s",data.data)
print rospy.get_name()+"I heard %s",data.data
def listener():
rospy.init_node('listener', anonymous=True)
rospy.Subscriber("Adc", String, callback)
rospy.spin()
if __name__ == '__main__':<br>
listener()