Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: UM12.h
- Revision:
- 0:18297993986b
- Child:
- 2:f2cf3a42e690
- Child:
- 3:22a375fbcb3a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/UM12.h Tue Jul 19 17:09:58 2011 +0000 @@ -0,0 +1,29 @@ +#ifndef RADIO + + #include "mbed.h" + + class UM12 : private Serial + { + DigitalOut *sleepPin, *resetPin; + + public: + + UM12( PinName tx, PinName rx, PinName slp = LED1, PinName rst = LED2); + virtual ~UM12(); + + void sleep(); // Send UM12 to sleep + void wake(); // Wake UM12 from sleep + void reset(); // Reset UM12 + + void send(char msg); // Send a single char + void send(int msg); // Send a four byte integer + void send(float msg); // Send a four byte floating point number + + char receive(char &msg); // Receive a single char + int receive(int &msg); // Receive a four byte integer + float receive(float &msg); // Receive a four byte floating point number + + + }; + #define RADIO 1 +#endif \ No newline at end of file