
In the mbed documentation LPC1768 there are many examples of serial communication implemented in a structured and disorganized way. So, I decided to make it very practical and reusable for other users who need to use this feature. For this, I created my own library based on the OO paradigm.
In the mbed documentation LPC1768 there are many examples of serial communication implemented in a structured and disorganized way. So, I decided to make it very practical and reusable for other users who need to use this feature. For this, I created my own library based on the OO paradigm.
main.cpp
- Committer:
- waspSalander
- Date:
- 2017-09-05
- Revision:
- 0:78c623c147d2
File content as of revision 0:78c623c147d2:
#include "mbed.h" #include "SerialCommunication.h" DigitalOut myled(LED1); SerialCommunication *serialCommunication = new SerialCommunication(p9,p10,115200); int main() { int commandReceived = 0; while(1){ commandReceived = serialCommunication->ReceiveCommand(); if (commandReceived == 1){ // informação correta recebida myled = 1; break; } } }