Skip to content

Instantly share code, notes, and snippets.

Jens Chr Brynildsen jenschr

Block or report user

Report or block jenschr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View LoRaDuplexClient
/*
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
@jenschr
jenschr / SimpleLoraSender.ino
Created Sep 10, 2019
Very simple LoRa client for TTGO 1.0 boards
View SimpleLoraSender.ino
#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
@jenschr
jenschr / SimpleLoraReciever.ino
Last active Sep 10, 2019
Very simple LoRa 'server' for TTGO 1.0 boards
View SimpleLoraReciever.ino
#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)
@jenschr
jenschr / SimpleLoraReciever
Created Sep 10, 2019
Very simple LoRa server for TTGO 1.0 boards
View SimpleLoraReciever
#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)
@jenschr
jenschr / TTGO_LORA32_BATT_OLED.ino
Created Aug 10, 2019
Battery monitor example for the Banggood version of TTGO LoRa32
View TTGO_LORA32_BATT_OLED.ino
const uint8_t blue = 2;
const uint8_t vbatPin = 35;
#include <Wire.h> // Only needed for Arduino 1.6.5 and earlier
#include "SSD1306.h" // alias for `#include "SSD1306Wire.h"`
float VBAT; // battery voltage from ESP32 ADC read
SSD1306 display(0x3c, 4, 15);
void setup()
{
Serial.begin(115200);
pinMode(blue, OUTPUT);
@jenschr
jenschr / i2cDetect_example_for_esp32.ino
Created Aug 10, 2019
i2cDetect script for the Banggood version of TTGO LoRa32
View i2cDetect_example_for_esp32.ino
#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);
@jenschr
jenschr / HiGrow_Thingspeak.ino
Last active Jul 22, 2019
Simple example showcasing how to publish data from the HiGrow board to Thingspeak
View HiGrow_Thingspeak.ino
/*
* Simple example showcasing how to publish data from the HiGrow board to Thingspeak
* For this to work, you'll need to create a file called "secrets.h" that holds the
* credentials you find on Thingspeak. These 4 lines are what is required in secrets.h
*
* #define SECRET_CH_ID 1234
* #define SECRET_WRITE_APIKEY "KLLJNKLJHGI"
* #define SECRET_SSID "yourssid"
* #define SECRET_PASS "yourpasswd"
*
@jenschr
jenschr / HiGrow_server.ino
Last active Jul 22, 2019
Arduino example for using the HiGrow board based on ESP32 as a server, so you can check in on your plant to see how it's doing
View HiGrow_server.ino
/*
* Arduino example for using the HiGrow board based on ESP32 as a server, so you can check in on your plant to see how it's doing
*
* 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"
#include <WiFi.h>
@jenschr
jenschr / HiGrow_basics.ino
Last active Jul 22, 2019
Very basic Arduino example for testing the HiGrow board based on ESP32, DHT11 and a capacitive moisture sensor
View HiGrow_basics.ino
/*
* 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
View DS18S20.ino
#include <OneWire.h>
int DS18S20_Pin = 2; //DS18S20 Signal pin on digital 2
//Temperature chip i/o
OneWire ds(DS18S20_Pin); // on digital pin 2
void setup(void) {
Serial.begin(9600);
}
You can’t perform that action at this time.