contain lorawan with serial_rx enabled
Dependencies: pulga-lorawan-drv SPI_MX25R Si1133 BME280
Diff: main.cpp
- Revision:
- 65:4090220e19d2
- Parent:
- 64:ed68ddac6360
--- a/main.cpp Tue Mar 02 16:57:31 2021 +0000 +++ b/main.cpp Tue Mar 02 18:22:16 2021 +0000 @@ -110,8 +110,8 @@ * Entry point for application */ -//mbed::DigitalOut _alive_led(P1_13, 0); -//mbed::DigitalOut _actuated_led(P1_14,1); +mbed::DigitalOut _alive_led(P1_13, 0); +mbed::DigitalOut _actuated_led(P1_14,1); //int lat=0; //int lon=0; int latitude=0; @@ -323,7 +323,8 @@ pc.printf("\r\n Connection - In Progress ...\r\n"); - //_actuated_led =0; + _actuated_led =0; + // // make your event queue dispatching events forever ev_queue.dispatch_forever(); @@ -402,7 +403,7 @@ pc.printf("\r\n Connection - Successful \r\n"); if (MBED_CONF_LORA_DUTY_CYCLE_ON) { //send_message(); - lora_send_message((uint8_t*)"testeLora", (uint16_t)10); + //lora_send_message((uint8_t*)"testeLora", (uint16_t)10); } //else { //ev_queue.call_every(TX_TIMER, (void)lora_send_message((uint8_t*)"testeLoraEvery", (uint16_t)15)); //} @@ -415,7 +416,7 @@ case TX_DONE: // printf("\r\n Message Sent to Network Server \r\n"); if (MBED_CONF_LORA_DUTY_CYCLE_ON) { - lora_send_message((uint8_t*)"teste", (uint16_t)6); + //lora_send_message((uint8_t*)"teste", (uint16_t)6); } break; case TX_TIMEOUT: @@ -431,7 +432,7 @@ // printf("\r\n Transmission Error - EventCode = %d \r\n", event); // try again if (MBED_CONF_LORA_DUTY_CYCLE_ON) { - lora_send_message((uint8_t*)"teste2", (uint16_t)7); + //lora_send_message((uint8_t*)"teste2", (uint16_t)7); } break; case RX_DONE: @@ -450,7 +451,7 @@ case UPLINK_REQUIRED: // printf("\r\n Uplink required by NS \r\n"); if (MBED_CONF_LORA_DUTY_CYCLE_ON) { - lora_send_message((uint8_t*)"uplink", (uint16_t)7); + //lora_send_message((uint8_t*)"uplink", (uint16_t)7); } break; default: