Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: DISCO-L072CZ-LRWAN1_LoRa_node EIoT_LoRa_node_1 EIoT_LoRa_node_2 EIoT_LoRa_node_3
Fork of SX1276GenericLib by
Diff: Arduino-mbed-APIs/examples/TimerTest/TimerTest.ino
- Revision:
- 99:0e85871f676a
- Parent:
- 75:7330dd86cdea
- Child:
- 100:c80d1416bdf6
--- a/Arduino-mbed-APIs/examples/TimerTest/TimerTest.ino Sat Nov 18 13:54:38 2017 +0100
+++ b/Arduino-mbed-APIs/examples/TimerTest/TimerTest.ino Sat Nov 18 13:55:54 2017 +0100
@@ -7,9 +7,15 @@
void TestTimeoutFunc1m(void);
void SwitchInput(void);
+#ifdef ARDUINO_ARCH_ESP32
+#define SW0 0
+#define LED 2
+#define MYSERIAL Serial
+#else
#define SW0 3 // switch needs pullup
#define LED LED_BUILTIN
#define MYSERIAL Serial
+#endif
DigitalOut led(LED);
InterruptIn intr(SW0);
@@ -20,7 +26,7 @@
void setup() {
MYSERIAL.begin(230400);
- InitSerial(&MYSERIAL);
+ InitSerial(&MYSERIAL, 5000, &led, true);
ser->println("TimerTest");
@@ -34,7 +40,7 @@
}
void loop() {
- led = !led;
+ // led = !led;
sleep(); // or deepsleep()
}
