EIoT LoRa node 3 - Working ok
Dependencies: BufferedSerial SX1276GenericLib-node1 mbed
Fork of DISCO-L072CZ-LRWAN1_LoRa_node by
Diff: main.cpp
- Revision:
- 12:a6a37ba1feff
- Parent:
- 10:f84959c2e044
- Child:
- 13:671d602e700e
--- a/main.cpp Fri Aug 18 07:45:44 2017 +0000 +++ b/main.cpp Wed Aug 08 22:33:19 2018 +0000 @@ -3,19 +3,21 @@ * 30826 Garbsen (Hannover) Germany * Licensed under the Apache License, Version 2.0); */ - #include "main.h" - +#include "main.h" +//#include "mbed_events.h" +#define MAX_NUMBER_OF_EVENTS 10 DigitalOut myled(LED1); BufferedSerial *ser; +InterruptIn btn(USER_BUTTON); -int main() { +int main() +{ SystemClock_Config(); ser = new BufferedSerial(USBTX, USBRX); - ser->baud(115200*2); + ser->baud(115200); ser->format(8); - ser->printf("Hello World\n\r"); myled = 1; - + btn.fall(&onButtonEvent); SX1276PingPong(); } @@ -25,7 +27,7 @@ void SystemClock_Config(void) { #ifdef B_L072Z_LRWAN1_LORA - /* + /* * The L072Z_LRWAN1_LORA clock setup is somewhat differnt from the Nucleo board. * It has no LSE. */