This program is porting rosserial_arduino for mbed http://www.ros.org/wiki/rosserial_arduino This program supported the revision of 169 of rosserial.
Dependents: rosserial_mbed robot_S2
Revision 2:bb6bb835fde4, committed 2011-10-16
- Comitter:
- nucho
- Date:
- Sun Oct 16 09:35:11 2011 +0000
- Parent:
- 1:ff0ec969dad1
- Child:
- 3:1cf99502f396
- Commit message:
- This program is porting rosserial_arduino for mbed http://www.ros.org/wiki/rosserial_arduino
This program supported the revision of 143 of rosserial.
Changed in this revision
main.cpp | Show diff for this revision Revisions of this file |
mbed.bld | Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Oct 16 07:19:36 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* - * rosserial Publisher Example - * Prints "hello world!" - */ - -#include"mbed.h" -#include <ros.h> -#include <std_msgs/String.h> - -ros::NodeHandle nh; - -std_msgs::String str_msg; -ros::Publisher chatter("chatter", &str_msg); - -char hello[13] = "hello world!"; - -int main() { - nh.initNode(); - nh.advertise(chatter); - - while (1) { - str_msg.data = hello; - chatter.publish( &str_msg ); - nh.spinOnce(); - wait_ms(1000); - } -} \ No newline at end of file
--- a/mbed.bld Sun Oct 16 07:19:36 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912