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
void RtcSetup () | |
{ | |
Serial.print("compiled: "); | |
Serial.print(__DATE__); | |
Serial.println(__TIME__); | |
Rtc.Begin(21, 23); | |
RtcDateTime compiled = RtcDateTime(__DATE__, __TIME__); | |
printDateTime(compiled); | |
Serial.println(); |
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 <mySD.h> | |
#define LED_BUILTIN 22 //Blink pin | |
File root; | |
void setup() | |
{ | |
Serial.begin(115200); | |
pinMode(LED_BUILTIN, OUTPUT); | |
Serial.print("Initializing SD card..."); |
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> | |
void setup() | |
{ | |
Serial.begin (115200); | |
//Wire.begin(19, 26); | |
} | |
void Scanner () | |
{ |
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
/* | |
Video: https://www.youtube.com/watch?v=oCMOYS71NIU | |
Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleNotify.cpp | |
Ported to Arduino ESP32 by Evandro Copercini | |
Create a BLE server that, once we receive a connection, will send periodic notifications. | |
The service advertises itself as: 6E400001-B5A3-F393-E0A9-E50E24DCCA9E | |
Has a characteristic of: 6E400002-B5A3-F393-E0A9-E50E24DCCA9E - used for receiving data with "WRITE" | |
Has a characteristic of: 6E400003-B5A3-F393-E0A9-E50E24DCCA9E - used to send data with "NOTIFY" |
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 <Arduino.h> | |
#include <BLEServer.h> | |
#include <BLEDevice.h> | |
#include <BLEUtils.h> | |
#include <BLE2902.h> | |
// Device Name: Maximum 30 bytes | |
#define DEVICE_NAME "LINE Things Trial ESP32" |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEEWoUO8Nwv3mBS0KM5ZPipJiyU5Oc5SEIA1Yh/FzWnHgt7Y7yeujRGeVqsE1yylBZ0ChQPPx7rT61Ga1v1tpKrhR0DEg3vWGo5YuaNw1lUzRdFvdWodOGvtBeO9J9+AJ10b2LZD/uLc/QG5jHjc6kxPf1CF2Sc57CfDCNjbDF0RevYglaER11OmJe7qt/PEPZK3u+AtBm4+7k4PjI5tmS0tTdPKTx2unthd6SNBWwraoqkuEdgps4vdtW7tz+AguO+ibKq+Qeod96jE81m3hTeE0qShJz4Iu7k9com+1vnTExtnubS7AR0+nJmMxnePtSzVfXugesrN6NWjpBqKit [email protected] |
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
import multiprocessing | |
# split a list into evenly sized chunks | |
def chunks(l, n): | |
return [l[i:i+n] for i in range(0, len(l), n)] | |
def do_job(job_id, data_slice): | |
for item in data_slice: | |
print "job", job_id, item |
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
reporting-disabled = false | |
bind-address = "127.0.0.1:8088" | |
[meta] | |
dir = "/var/lib/influxdb/meta" | |
retention-autocreate = true | |
logging-enabled = true | |
[data] | |
dir = "/var/lib/influxdb/data" |
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
curl --header "Content-Type: application/json" \ | |
--request POST -v \ | |
--data-binary '{"sta_ssid":"xyz","sta_password":"xyz"}' \ | |
http://192.168.4.1/api/wifi/sta | |
curl -X POST -d "sta_ssid=weerawan&sta_password=87654321" http://192.168.4.1/api/wifi/sta | |
curl -X POST -d "sta_ssid=ampere&sta_password=espertap" http://192.168.4.1/api/wifi/sta |
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
import ipywidgets as widgets | |
from IPython.display import Javascript | |
h = widgets.HTML(value='<div id="myref"></div>') | |
xd = [ | |
{ | |
'name': 'ID-002', | |
'data': d2_x, |