This file contains hidden or 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 datetime | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from astral import LocationInfo | |
from astral.sun import sun | |
from dateutil import tz | |
# | |
# Inspired by: https://daylight.franzai.com/ | |
# |
This file contains hidden or 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
/* | |
Basic ESP32 MQTT Analog Sensor Publisher | |
*/ | |
#define BUILTIN_LED 2 | |
#define DHTTYPE DHT11 // DHT 11 | |
#define DHTPIN 15 // Digital pin connected to the DHT sensor | |
#define uS_TO_S_FACTOR 1000000ULL /* Conversion factor for micro seconds to seconds */ | |
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */ |
This file contains hidden or 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
{ | |
"flowContents": { | |
"identifier": "21cdd1dd-d4cb-3bb9-872f-e66cdbcf8738", | |
"name": "NiFi Flow", | |
"comments": "", | |
"position": { | |
"x": 0.0, | |
"y": 0.0 | |
}, | |
"processGroups": [], |
This file contains hidden or 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
#!/usr/bin/env python | |
# Based on https://github.com/smartfog/fogflow/tree/master/application/device | |
# Note: Uses psutil! https://psutil.readthedocs.io | |
import json | |
import psutil | |
import requests | |
import signal | |
import sys | |
import time |
This file contains hidden or 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
// This example was created for Wemos D1 Rev.1 | |
// Using a HC-SR501 PIR MOTION DETECTOR as the sensor. | |
// Using MQTT library by Joël Gähwiler | |
// https://github.com/256dpi/arduino-mqtt | |
#include <ESP8266WiFi.h> | |
#include <MQTT.h> | |
const char ssid[] = "xxxxxxxxx"; |
This file contains hidden or 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 <TinkerKit.h> // For simple Celsius conversion | |
#include <SPI.h> | |
#include <Ethernet.h> | |
#include <PubSubClient.h> | |
// MQTT | |
IPAddress server(192,168,0,101); | |
char topic[] = "arduino/temp/thermistor"; | |
String str; | |
char charVal[4]; |