Skip to content

Instantly share code, notes, and snippets.

View remisarrailh's full-sized avatar

Rémi Sarrailh remisarrailh

View GitHub Profile
//Wrmhl
//PortName: COM21
//Baud Rate: 250000
//Read Timeout: -1
//Queue lenght: 10
//v2.0
//16 Circle Neopixel
//I2C LCD 16x2
//Slide Pot (Robotale)
@remisarrailh
remisarrailh / serial_gateway_esp8266.ino
Created January 11, 2019 12:00
esp8266_serial_gateway
//Wifi
#include <ESP8266WiFi.h>
#ifndef STASSID
#define STASSID ""
#define STAPSK ""
#endif
const char* ssid = STASSID;
const char* password = STAPSK;
char* netbios_name = "RFLINK";
@remisarrailh
remisarrailh / mqtt_weather.ino
Created January 11, 2019 11:50
ESP32 MQTT SSL Weather sensor (BME280 / TSL2561)
//Wifi
#include <WiFi.h>
#include <WiFiClientSecure.h>
#include <ESPmDNS.h>
const char* SSID = "";
const char* PASSWORD = "";
const char* NAME = "sensor1";
//MQTT
#include "Adafruit_MQTT.h"
@remisarrailh
remisarrailh / ble_midi_8b.ino
Last active January 11, 2019 12:28
Add led blink when not connected
/*
BLE Midi 8 Buttons
by Rémi Sarrailh
by Olivier Sarrailh
Based on BLE_MIDI Example by neilbags
https://github.com/neilbags/arduino-esp32-BLE-MIDI
Based on BLE_notify example by Evandro Copercini.
Creates a BLE MIDI service and characteristic.
/*
BLE Midi 8 Buttons
by Rémi Sarrailh
by Olivier Sarrailh
Based on BLE_MIDI Example by neilbags
https://github.com/neilbags/arduino-esp32-BLE-MIDI
Based on BLE_notify example by Evandro Copercini.
Creates a BLE MIDI service and characteristic.
@remisarrailh
remisarrailh / ble_midi_4b.ino
Created December 11, 2018 18:26
ble_midi_4b.ino
/*
BLE Midi 4 Buttons by Rémi Sarrailh
Based on BLE_MIDI Example by neilbags
https://github.com/neilbags/arduino-esp32-BLE-MIDI
Based on BLE_notify example by Evandro Copercini.
#define MY_NODE_ID 4 // Static ID
#define MY_PARENT_NODE_ID 1 // Static ID
#define CHILD_PIR 1
int battery_Value;
// Enable and select radio type attached
#define MY_RADIO_RFM95
#define MY_RFM95_ENABLE_ENCRYPTION
#define MY_RFM95_IRQ_PIN (2)
#define MY_RFM95_IRQ_NUM digitalPinToInterrupt(2)
#define MY_RFM95_CS_PIN 6
#include <SPI.h>
#include "nRF24L01.h"
#include <RF24.h>
#include "printf.h"
// SETTINGS
#define CE_PIN 9
#define CSN_PIN 10
RF24 radio(CE_PIN, CSN_PIN);
/**
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <[email protected]>
* Copyright (C) 2013-2015 Sensnology AB
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
/**
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <[email protected]>
* Copyright (C) 2013-2015 Sensnology AB
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors