Skip to content

Instantly share code, notes, and snippets.

//Single Appreciation Day (SAD)
//auto hot dater powered by arduino
#include <Servo.h>
Servo myservo;
int pos = 0; // variable to store the servo position
long rndMatch;
int swipeCount = 0;
void setup()
{
@teos0009
teos0009 / ds18b20-nodemcu-v1.0-esp8266-arduino-ide.cpp
Last active August 29, 2025 14:03
DS18B20 nodeMCU v1.0 with ESP8266 arduino IDE stream data to thingspeak
//nodeMCU v1.0 (black) with Arduino IDE
//stream temperature data DS18B20 with 1wire on ESP8266 ESP12-E (nodeMCU v1.0)
//shin-ajaran.blogspot.com
//nodemcu pinout https://github.com/esp8266/Arduino/issues/584
#include <ESP8266WiFi.h>
#include <OneWire.h>
#include <DallasTemperature.h>
//Def
#define myPeriodic 15 //in sec | Thingspeak pub is 15sec
//ESP8266 (ESP01) with ESP01 BoB
//stream temperature data DS18B20 with 1wire on ESP8266 ESP01 and then turn load on/off. perfect for sous vide over the internet.
//shin-ajaran.blogspot.com
#include <ESP8266WiFi.h>
#include <OneWire.h>
#include <DallasTemperature.h>
//Def
#define myPeriodic 15 //in sec | Thingspeak pub is 15sec
#define ONE_WIRE_BUS 2 // DS18B20 on GPIO2
//ESP8266 (ESP01) with ESP01 BoB
//MQTT stream temperature data DS18B20 with 1wire on ESP8266 ESP01 and then turn load on/off. perfect for sous vide over the internet.
//shin-ajaran.blogspot.com
#include <ESP8266WiFi.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <MQTT.h> //// https://github.com/Imroy/pubsubclient
#include <PubSubClient.h> //requires a broker that supports version 3.1.1 of the MQTT standard
//Def
#define myPeriodic 15 //in sec | Thingspeak pub is 15sec
//ESP8266 (ESP01) with ESP01 BoB
//MQTT stream temperature data DS18B20 with 1wire on ESP8266 ESP01 and then turn load on/off. perfect for sous vide over the internet.
//shin-ajaran.blogspot.com
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <OneWire.h>
#include <DallasTemperature.h>
const char *ssid = "SSID_here"; // cannot be longer than 32 characters!
##nodered ip 192.168.13.129:1880
nodered ip 192.168.1.104:1880
#chk for node installed
dpkg --get-selections | grep node
#uninstall
sudo apt-get remove --purge node
#include <Servo.h>
Servo myservo1; // create servo object to control a servo
Servo myservo2; // twelve servo objects can be created on most boards
Servo myservo3;
int pos = 0; // variable to store the servo position
void setup()
{
install.packages("RWeka")
install.packages("rJava")
install.packages("Snowball")
library(RXKCD)
library(XML)
library(tm)
library(wordcloud)
library(RColorBrewer)
library(rJava)
library(tm)
library(RXKCD)
library(XML)
library(tm)
library(wordcloud)
library(RColorBrewer)
library(rJava)
library(RWeka)
library(Snowball)
library(stringr)
#include <DHT.h> // DHT.h library from adafruit
#include <ESP8266WiFi.h> // ESP8266WiFi.h library
#define DHTPIN 4 //GPIO4 = D2
#define DHTTYPE DHT22
const char* ssid = "SSID";
const char* password = "PASSWORD";
const char* host = "api.thingspeak.com";
const char* writeAPIKey = "API_KEY";