Skip to content

Instantly share code, notes, and snippets.

View YongHuax's full-sized avatar

hooi yong hua YongHuax

View GitHub Profile
@YongHuax
YongHuax / Lora_Receiver_LG01_P_Mqtt_var.ino
Created February 10, 2018 20:20
Final_Fyp_LoRa_Receiver_LG01_P_Mqtt_var
#include <SPI.h>
#include <LoRa.h>
#include <Console.h>
#include <Process.h>
#define PABOOST true
#define BAND 433E6
void uploadData();
@YongHuax
YongHuax / testmqttvar
Last active February 10, 2018 20:28
Shell script for testing mqtt with data sent from ESP32 LoRa to LG01-P
#!/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
@YongHuax
YongHuax / LG01-P_AWS.ino
Created February 10, 2018 20:57
LG01-P Send data from ESP32 LoRa to AWSIot
#include <SPI.h>
#include <LoRa.h>
#include <Console.h>
#include <Process.h>
#define PABOOST true
#define BAND 433E6
void uploadData();
@YongHuax
YongHuax / LG01_P_JSON_AWSIOT.ino
Last active February 28, 2018 14:48
LG01_P_JSON_AWSIOT
//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>