![](/media/cache/profiles/7c39a5f991bef4a1e34187677a65871d.jpg.50x50_q85.jpg)
Manchester transmitter demo.
Dependencies: Manchester mbed CRC16 ManchesterMsg
main.cpp
- Committer:
- hudakz
- Date:
- 2017-05-17
- Revision:
- 0:f58990cef4fe
- Child:
- 1:cc6d7d370126
File content as of revision 0:f58990cef4fe:
#include "mbed.h" #include "Manchester.h" DigitalOut led(LED1); Manchester man(p11, p12, 9600); // Tx pin, Rx pin, speed [bps] ManchesterMsg msg(255); // Message container (max bytes) int main(void) { while(1) { msg.clear(); // Clear message msg << "Hello World!" << 0xfa74c309; // Add data to message man.transmit(msg); // Transmit message wait_ms(1000); led = !led; } }