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.
Revision 0:7b15c9c0a329, committed 2018-01-22
- Comitter:
- fadhlika
- Date:
- Mon Jan 22 22:22:19 2018 +0000
- Commit message:
- sending test;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Jan 22 22:22:19 2018 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+#include "LoRa.h"
+
+Serial serial(PA_9, PA_10);
+
+int counter = 0;
+
+int main(void) {
+ serial.baud(115200);
+ if (!LoRa.begin(433E6)) {
+ serial.printf("Starting LoRa failed!\r\n");
+ } else {
+ serial.printf("Starting LoRa success!\r\n");
+ }
+ while (true){
+ serial.printf("Sending packet: %d\r\n", counter);
+
+ // send packet
+ LoRa.beginPacket();
+ LoRa.printf("hello %d", counter);
+ LoRa.endPacket();
+
+ counter++;
+
+ wait(5);
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-LoRa.lib Mon Jan 22 22:22:19 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/fadhlika/code/mbed-LoRa/#c28964675044
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Mon Jan 22 22:22:19 2018 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#96d9a00d0a1d25095b330095fa81c40f7741777c