This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//References | |
//https://jsonlint.com/ | |
//https://forums.aws.amazon.com/thread.jspa?threadID=239208 | |
//https://arduinojson.org/assistant/ | |
//https://arduinojson.org/faq/how-to-reuse-a-jsonbuffer/?utm_source=github&utm_medium=issues | |
//https://github.com/bblanchon/ArduinoJson/issues/508 | |
//https://github.com/bblanchon/ArduinoJson/blob/master/examples/StringExample/StringExample.ino | |
//https://github.com/bblanchon/ArduinoJson/tree/master/examples/JsonGeneratorExample | |
#include <ArduinoJson.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <LoRa.h> | |
#include <Console.h> | |
#include <Process.h> | |
#define PABOOST true | |
#define BAND 433E6 | |
void uploadData(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#The following code demonstrates a sending mqtt messages with data variables | |
# publish to topic yhtest with message data from LoRa | |
#$1 refers to the first data sent from the arduino MCU to the Linux module in the LG01-P ( data sent from ESP32 LoRa ) | |
DATA=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <LoRa.h> | |
#include <Console.h> | |
#include <Process.h> | |
#define PABOOST true | |
#define BAND 433E6 | |
void uploadData(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#The following code demonstrates a basic command using mosquitto client to connect to public broker hivemq using port 1883 | |
# publish to topic yhtest with message "ok" | |
#it is possible to copy and paste the following line of code to Dragino Linux cli to run command . | |
mosquitto_pub -h broker.hivemq.com -p 1883 -t yhtest -m "ok" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <LoRa.h> | |
#include <Console.h> | |
#include <Process.h> | |
#define PABOOST true | |
#define BAND 433E6 | |
void uploadData(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#when connecting to AWSIOT , a cert , privatekey and certificate authority file is required . | |
#after downloading the cert files when creating a thing , it is possible rename the files so that it is easier to | |
#call the file when writing the script and cli | |
#also note that aws things shadow update requires message to be in json to update | |
#to catch messages sent to things but are rejected due to improper json format , subscribe to things shadow update through mqtt. | |
# do remember to check the activity page for the AWsiot " thing" u have created to see whether the message is accepted or rejected | |
HOST="a1k3lzqvylq236.iot.ap-southeast-1.amazonaws.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is a simple example show the LoRa sended data in OLED. | |
The onboard OLED display is SSD1306 driver and I2C interface. In order to make the | |
OLED correctly operation, you should output a high-low-high(1-0-1) signal by soft- | |
ware to OLED's reset pin, the low-level signal at least 5ms. | |
OLED pins to ESP32 GPIOs via this connecthin: | |
OLED_SDA -- GPIO4 | |
OLED_SCL -- GPIO15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is a simple example show the LoRa sended data in OLED. | |
The onboard OLED display is SSD1306 driver and I2C interface. In order to make the | |
OLED correctly operation, you should output a high-low-high(1-0-1) signal by soft- | |
ware to OLED's reset pin, the low-level signal at least 5ms. | |
OLED pins to ESP32 GPIOs via this connecthin: | |
OLED_SDA -- GPIO4 | |
OLED_SCL -- GPIO15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is a simple example show the LoRa sended data in OLED. | |
The onboard OLED display is SSD1306 driver and I2C interface. In order to make the | |
OLED correctly operation, you should output a high-low-high(1-0-1) signal by soft- | |
ware to OLED's reset pin, the low-level signal at least 5ms. | |
OLED pins to ESP32 GPIOs via this connecthin: | |
OLED_SDA -- GPIO4 | |
OLED_SCL -- GPIO15 |
NewerOlder