MAX326xxFTHR LoRa PingPong

Dependencies:   BufferedSerial SX1276GenericLib max32630fthr USBDeviceHT

Revision:
21:933a9409c7a0
Parent:
19:9f035b9e65ec
--- a/main.cpp	Mon Jun 04 21:05:02 2018 +0000
+++ b/main.cpp	Wed Dec 29 06:56:13 2021 +0000
@@ -12,13 +12,29 @@
 
 DigitalOut myled(LED);
 
+//    I2C i2c(P3_4, P3_5); // SDA, SCL
+
+// Hardware serial port over DAPLink
+    Serial daplink(P2_1, P2_0);
+
+// Virtual serial port over USB
+//    USBSerial microUSB;
+DigitalOut bLED(LED3);
+DigitalOut rLED(LED1);
+
 
 int main() {
-#ifdef HELTEC_STM32L4
-    DigitalOut vext(POWER_VEXT);
-    vext = POWER_VEXT_ON;
-#endif    
-
+//#ifdef HELTEC_STM32L4
+//    DigitalOut vext(POWER_VEXT);
+//    vext = POWER_VEXT_ON;
+//#endif    
+    
+    //bLED = !bLED;
+//    wait(5);
+//    printf("Hello world! \n");
+//    wait(5);
+//    daplink.printf("Hello world! \n");
+//    bLED = !bLED;
 
     /*
      * inits the Serial or USBSerial when available (230400 baud).
@@ -26,9 +42,17 @@
      * blinking LED means USBSerial detected, waiting for a connect.
      * It waits up to 30 seconds for a USB terminal connections 
      */
-    InitSerial(30*1000, &myled);
-    dprintf("Welcome to the SX1276GenericLib");
-  
-    dprintf("Starting a simple LoRa PingPong");
-    SX1276PingPong();
+//    InitSerial(30*1000, &myled);
+    
+    
+//    rLED = !rLED;
+    
+//    dprintf("Welcome to the SX1276GenericLib");
+    printf("Welcome to the SX1276GenericLib");
+    wait(3);
+//    dprintf("Starting a simple LoRa PingPong");
+    printf("Starting a simple LoRa PingPong");
+    wait(3);
+    bLED = 1;
+//    SX1276PingPong();
 }