Skip to content

Instantly share code, notes, and snippets.

View structure7's full-sized avatar
☀️

structure7 structure7

☀️
View GitHub Profile
@structure7
structure7 / core-temp-blynk.sh
Created February 20, 2019 23:32
Send Raspi core temp to Blynk vpin
#!/bin/bash
# Logs processor temperature to Blynk
coretemp=$(vcgencmd measure_temp | egrep -o '[0-9]*\.[0-9]*')
# echo $temp
curl -f http://blynk-cloud.com/AUTH-TOKEN/update/VPIN?value=$coretemp
@structure7
structure7 / fishFeeder.ino
Created June 19, 2017 15:51
Feeds a little betta fish! Pics at http://imgur.com/a/3TzZ8
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <BlynkSimpleEsp8266.h>
const char* auth = "fromBlynkApp";
const char* ssid = "ssid";
const char* pw = "pw";
#define IN1 5 // Motor board brown to WeMos pin D1
#define IN2 4 // Motor board red to WeMos pin D2
#define IN3 14 // Motor board orange to WeMos pin D5
#include <SimpleTimer.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
extern "C" {
uint16 readvdd33(void);
}
const char* ssid = "ssid";
const char* password = "pw";
@structure7
structure7 / mailboxWatcher.ino
Last active November 18, 2020 11:09
Blynk mailbox sensor (mosfet + reed switch + WeMos)
#include <SimpleTimer.h>
//#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <BlynkSimpleEsp8266.h>
extern "C" {
uint16 readvdd33(void);
}
char auth[] = "fromBlynkApp";
const char* ssid = "ssid";
@structure7
structure7 / blynkMultipleDS18B20.ico
Last active January 22, 2023 09:57
Using Blynk for more than one DS18B20 sensor
#include <SimpleTimer.h>
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <BlynkSimpleEsp8266.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 2 // This is the ESP8266 pin
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
@structure7
structure7 / blynkDS18B20.ico
Last active September 29, 2023 16:01
Simple sketch for using the DS18B20 temp sensor on an ESP8266 with Blynk
#include <SimpleTimer.h> // Allows us to call functions without putting them in loop()
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <BlynkSimpleEsp8266.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 2 // Your ESP8266 pin (ESP8266 GPIO 2 = WeMos D1 Mini pin D4)
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
//
// FILE: oneWireSearch.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.02
// PURPOSE: scan for 1-Wire devices + code snippet generator
// DATE: 2015-june-30
// URL: http://forum.arduino.cc/index.php?topic=333923
//
// inspired by http://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html
//