ただのシリアルです

Dependencies:   mbed ros_lib_kinetic

Files at this revision

API Documentation at this revision

Comitter:
yuto17320508
Date:
Tue Mar 06 16:49:27 2018 +0000
Commit message:
a;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
ros_lib_kinetic.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 728f686a985b main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 06 16:49:27 2018 +0000
@@ -0,0 +1,29 @@
+/*
+   2  * rosserial Publisher Example
+   3  * Prints "hello world!"
+   4  */
+#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!";
+
+DigitalOut led = LED1;
+
+ int main() {
+     nh.initNode();
+     nh.advertise(chatter);
+      
+           while (1) {
+         led = !led;
+         str_msg.data = hello;
+         chatter.publish( &str_msg );
+         nh.spinOnce();
+         wait_ms(1000);
+     }
+ }
\ No newline at end of file
diff -r 000000000000 -r 728f686a985b mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Mar 06 16:49:27 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/aa5281ff4a02
\ No newline at end of file
diff -r 000000000000 -r 728f686a985b ros_lib_kinetic.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ros_lib_kinetic.lib	Tue Mar 06 16:49:27 2018 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/garyservin/code/ros_lib_kinetic/#a849bf78d77f