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 <Wire.h> | |
#include <i2cdetect.h> | |
void setup() { | |
// The Oled screen won't be visible unless we set the RESET line on the screen high | |
pinMode (16, OUTPUT); | |
digitalWrite (16, HIGH); // while OLED is running, GPIO16 must go high | |
// Rather than | |
Wire.begin(4, 15); |
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> | |
#define SCK 5 // GPIO5 -- SX1278's SCK | |
#define MISO 19 // GPIO19 -- SX1278's MISO | |
#define MOSI 27 // GPIO27 -- SX1278's MOSI | |
#define SS 18 // GPIO18 -- SX1278's CS | |
#define RST 14 // GPIO14 -- SX1278's RESET | |
#define DI0 26 // GPIO26 -- SX1278's IRQ(Interrupt Request) |
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> | |
int counter = 0; | |
#define SCK 5 // GPIO5 -- SX1278's SCK | |
#define MISO 19 // GPIO19 -- SX1278's MISO | |
#define MOSI 27 // GPIO27 -- SX1278's MOSI | |
#define SS 18 // GPIO18 -- SX1278's CS |
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> | |
#define SCK 5 // GPIO5 -- SX1278's SCK | |
#define MISO 19 // GPIO19 -- SX1278's MISO | |
#define MOSI 27 // GPIO27 -- SX1278's MOSI | |
#define SS 18 // GPIO18 -- SX1278's CS | |
#define RST 14 // GPIO14 -- SX1278's RESET | |
#define DI0 26 // GPIO26 -- SX1278's IRQ(Interrupt Request) |
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
/* | |
LoRa Duplex communication | |
Sends a message every half second, and polls continually | |
for new incoming messages. Implements a one-byte addressing scheme, | |
with 0xFF as the broadcast address. | |
Uses readString() from Stream class to read payload. The Stream class' | |
timeout may affect other functuons, like the radio's callback. For an |
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
signed long int myNum = -1701543; | |
void setup() { | |
Serial.begin(9600); | |
delay(2000); | |
Serial.print(myNum); | |
char buff[14]; | |
int bufferLength = parseNumberToString( buff, myNum ); | |
Serial.print(":"); | |
Serial.println(buff); |
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
var mqtt = require('mqtt'); //https://www.npmjs.com/package/mqtt | |
var Topic = '#'; //subscribe to all topics | |
var Broker_URL = 'mqtt://localhost'; | |
var Database_URL = 'localhost'; | |
var options = { | |
clientId: 'MyMQTT'+Math.random()*64545353, | |
port: 1883, | |
username: 'MyUsername', | |
password: 'MyPassword', |
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
/* | |
* Very basic Arduino example for testing the HiGrow board based on ESP32, DHT11 and a capacitive moisture sensor | |
* | |
* Details on the hardware and how to use it can be found on: | |
* http://flashgamer.com/blog/comments/higrow-esp32-moisture-and-temperature-sensor#capacitive | |
*/ | |
#include "DHT.h" | |
#define DHTTYPE DHT11 |
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 <SoftwareSerial.h> | |
SoftwareSerial mySerial(8, 9); | |
void setup() | |
{ | |
delay(500); | |
Serial.begin(115200); | |
mySerial.begin(115200); // use this line on a new module using 115200 baud by default | |
//mySerial.begin(19200); // after setting the baud rate to 19200, we use this speed for mySerial | |
pinMode(13, OUTPUT); |
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
#ifndef FLATBUFFERS_BASE_H_ | |
#define FLATBUFFERS_BASE_H_ | |
// clang-format off | |
// If activate should be declared and included first. | |
#if defined(FLATBUFFERS_MEMORY_LEAK_TRACKING) && \ | |
defined(_MSC_VER) && defined(_DEBUG) | |
// The _CRTDBG_MAP_ALLOC inside <crtdbg.h> will replace | |
// calloc/free (etc) to its debug version using #define directives. |