Skip to content

Instantly share code, notes, and snippets.

@pudelosha
pudelosha / MeteoStation.ino
Created November 27, 2018 20:18
Arduino meteo station with ESP8266WebServer
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <Wire.h>
#include <BH1750.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP085.h>
#include <ClosedCube_HDC1080.h>
#include <SDS011.h>
@pudelosha
pudelosha / ArduinoWaterPump.ino
Created November 27, 2018 20:09
Plant Watering Machine
#include <SimpleDHT.h>
#define readingInterval 1000 // change this later
#define readingLimit 10 // change later
int pinMoistureSensor1 = A0;
int pinMoistureSensor2 = A1;
int pinPump = 7;
int pinDHT22 = 6;
@pudelosha
pudelosha / MeteoStation.ino
Created November 30, 2017 15:58
Wemos D1 R2 MySQL database meto station
#include <MySQL_Connection.h>
#include <MySQL_Cursor.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <Wire.h>
#include <BH1750.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP085.h>
#include <ClosedCube_HDC1080.h>
@pudelosha
pudelosha / ArduinoAndroid.ino
Created June 26, 2017 18:50
Wemos D1 R2 WiFi directly controlled from Android application
// based on YouTube tutorial posted by Youtechnoid
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
const char *ssid = "ArduinoGreen";
const char *pass = "LGBTQWERTY";
String command;
ESP8266WebServer server(80);
@pudelosha
pudelosha / CD74HC4067 Multiplexers.ino
Created May 23, 2017 18:00
Two multiplexers CD74HC4067 analog digital control
//Multiplexer control pins
#define s0 D0
#define s1 D1
#define s2 D2
#define s3 D3
#define s4 D4
#define s5 D5
#define s6 D6
#define s7 D7
#define analog_pin 0
@pudelosha
pudelosha / kaka.ino
Last active April 3, 2017 17:22
kaka.ino
#include <Wire.h>
#include <UnoWiFiDevEd.h>
#include <DHT.h>
DHT dht(DHT11, 0);
void setup() {
Serial.begin(9600);
dht.begin();
@pudelosha
pudelosha / PlantMoistureSensor.ino
Last active March 14, 2023 12:06
Arduino ESP8266 WiFi MySQL database connection with INSERT SQL command
//#include <DHT.h>
#include <MySQL_Connection.h>
#include <MySQL_Cursor.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#define sensorPin1 0
//#define sensorPin2 D2
//#define typeDHT DHT11
@pudelosha
pudelosha / ISOweeks.bas
Last active January 25, 2017 13:46
VBA ISO week handling
Option Explicit
Function FirstWeekOfYear(lngYear As Long) As Date
Dim datDate As Date
Dim bytDayNumber As Byte
'Get the date that represents the fourth day of January for the given year.
datDate = DateSerial(lngYear, 1, 4)
'A week starts with Monday (day 1) and ends with Sunday (day 7).
@pudelosha
pudelosha / FlexGrid .cls
Last active January 4, 2024 06:38
VBA FlexGrid control coding for fun
Option Explicit
Option Base 1
Private WithEvents flx As MSFlexGrid
Private strFlexGridName As String
Private frmParent As UserForm
Private frmChild As UserForm
Private enItemClick As OnItemClick
Private strToOpenOnClick As String
@pudelosha
pudelosha / ListView.cls
Last active January 27, 2017 15:40
VBA ListView coding for fun
Option Explicit
Private strLVControlName As String
Private WithEvents lv As ListView
Private frm As UserForm
Private strToOpenOnClick As String
Private enItemClick As OnItemClick
Private frmForm As UserForm
Private Enum OnItemClick