contain lorawan with serial_rx enabled
Dependencies: pulga-lorawan-drv SPI_MX25R Si1133 BME280
Diff: serial_cmds.cpp
- Revision:
- 64:ed68ddac6360
- Parent:
- 63:4ec1808fb547
- Child:
- 65:4090220e19d2
--- a/serial_cmds.cpp Fri Feb 26 18:11:06 2021 +0000 +++ b/serial_cmds.cpp Tue Mar 02 16:57:31 2021 +0000 @@ -1,5 +1,6 @@ #include "serial.h" + bool SerialCommandRun(const char *msg) { char Option = msg[1]; /// recebo opcao @@ -13,10 +14,19 @@ //get_latitude pc.printf("<g%d,%d\n>", get_latitude(), get_longitude()); break; + + case CMD_SEND_HELLO: + pc.printf("<hHELLOANTONIO>"); + char hello[100] = "Ola Antonio!\n"; + int ret; + ret = lora_send_message((uint8_t*)hello, (uint16_t)sizeof(hello)); + if(ret > 0) + pc.printf("Send OK\n"); + else + pc.printf("Fail to Send\n"); + + break; - - default: - break; } return true;