This program is porting rosserial_arduino for mbed http://www.ros.org/wiki/rosserial_arduino This program supported the revision of 169 of rosserial. This program contains an example.
Dependencies: rosserial_mbed_lib mbed Servo
Diff: MbedHardware.h
- Revision:
- 1:098e75fd5ad2
- Parent:
- 0:06fc856e99ca
- Child:
- 3:dff241b66f84
--- a/MbedHardware.h Fri Aug 19 09:06:16 2011 +0000 +++ b/MbedHardware.h Sun Oct 16 07:17:43 2011 +0000 @@ -9,10 +9,12 @@ #define MBEDHARDWARE_H_ #include"mbed.h" +#include"MODSERIAL.h" + class MbedHardware { public: - MbedHardware(Serial* io , long baud= 57600) + MbedHardware(MODSERIAL* io , int baud= 57600) :iostream(*io){ baud_ = baud; t.start(); @@ -29,7 +31,7 @@ t.start(); } - void setBaud(long baud) { + void setBaud(int baud) { this->baud_= baud; } @@ -57,8 +59,8 @@ } protected: - long baud_; - Serial iostream; + int baud_; + MODSERIAL iostream; Timer t; };