Skip to content

Instantly share code, notes, and snippets.

View uherting's full-sized avatar
💭
You never can tell with bees.

Uwe Herting uherting

💭
You never can tell with bees.
View GitHub Profile
@ItKindaWorks
ItKindaWorks / dustSensorDemo.ino
Created July 19, 2018 00:49
Demo code for using a waveshare/sharp dust sensor with an ESP8266
/*
dustSensorDemo.ino
Copyright (c) 2018 ItKindaWorks All right reserved.
github.com/ItKindaWorks
dustSensorDemo.ino is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@jindrichsirucek
jindrichsirucek / try connect to one of wifi saved networks.ino
Last active May 8, 2018 11:05
ESP8266 - There is list of saved wifi credentials, it tries to connect one by one to them until success - on next boot it remembers last network and try to connect first to it.. if unsucsefull look throw all list of saved networks
struct WiFiCredential{
const char *ssid;
const char *pass;
};
bool wifiConnect()
{
if(isWifiConnected())
return true;
WiFi.mode(WIFI_STA);
@balloob
balloob / MQTT_ESP8266_temperature_humidity.ino
Created June 20, 2016 04:11
Sketch for the ESP8266 to publish temperature and humidity values received from a DHT22 to MQTT
// Get ESP8266 going with Arduino IDE
// - https://github.com/esp8266/Arduino#installing-with-boards-manager
// Required libraries (sketch -> include library -> manage libraries)
// - PubSubClient by Nick ‘O Leary
// - DHT sensor library by Adafruit
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <DHT.h>
#include <ESP8266WiFi.h>
#include <Wire.h>
#include <PubSubClient.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#define wifi_ssid "YOUR_WIFI_SSID"
#define wifi_password "YOUR_WIFI_PASSWORD"
#define mqtt_server "YOUR_MQTT_SERVER_HOST"
@teos0009
teos0009 / ds18b20-nodemcu-v1.0-esp8266-arduino-ide.cpp
Last active November 25, 2019 19: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
@erikpena
erikpena / main.ino
Last active July 21, 2023 05:27
A simple hardware button debouncer using ESP8266 libraries within the Arduino IDE.
// pin is 2.
const int multiButton = 2;
void setup() {
// Configure the pin mode as an input.
pinMode(multiButton, INPUT);
// Attach an interrupt to the pin, assign the onChange function as a handler and trigger on changes (LOW or HIGH).
attachInterrupt(multiButton, onChange, CHANGE);