After integrating ROS and SparkV robot, its very easy to control the SparkV robot using Android phone's accelerometer. The prerequisite for this tutorial is basic understanding of ROS and my previous tutorial of integrating ROS and SparkV.
Package summary :
First install the ROS android sensor driver app from android market.
After that you have to connect your phone and computer to same network. For this you can check this tutorial. OR simply you can start a portable WiFi hotspot from your android device and connect your laptop to that network. After that open a new terminal and write
You will see your IP address in wlan tab as
Now enter this IP address as http://YOUR-IP:11311/ in the app and start the app.
To verify the topics, try
roscore rostopic list
rostopic echo /android/imu
Sends velocity commands to SparkV robot.**Subscribed topics:** android/imu ([sensor_msgs/Imu](http://www.ros.org/doc/api/sensor_msgs/html/msg/Imu.html))
accelerometer data is published on this topic.### Usage: After connecting the android device and sparkV robot run
roscore rosrun rosserial_python serial_node.py /dev/ttyUSB0 rosrun sparkV_android android
More on PlaywithRobots
- Introduction to AVR microcontrollers
- Basic hardware and software required for AVR
- AVR fuse bits
- Input/Output Concept