Skip to content

Instantly share code, notes, and snippets.

View Electronza's full-sized avatar

Teodor Costachioiu Electronza

View GitHub Profile
@Electronza
Electronza / esp8266.ino
Created December 14, 2018 13:02
Air quality monitoring station
#include <ESP8266WiFi.h>
#include "ThingSpeak.h"
char ssid[] = "XXXX"; // your network SSID (name)
char pass[] = "XXXX"; // your network password
/*
*****************************************************************************************
**** Visit https://www.thingspeak.com to sign up for a free account and create
@Electronza
Electronza / h2s-sensor.ino
Created May 21, 2019 07:26
H2S sensor code
// ****************************************************************************
// * H2S GAS SENSOR WITH DATA UPLOADS TO Ubidots AND openSenseMap *
// * LOW POWER MODE, CAN RUN ON BATTERY *
// * Uses ESP8266 thing and DGS-H2S sensor from SPEC sensors *
// * https://www.sparkfun.com/products/13231 *
// * https://www.spec-sensors.com/product/digital-gas-sensor-h2s/ *
// * Wiring instructions *
// * https://electronza.com/ *
// * CHANGELOG *
// * v7 - first stable version *
@Electronza
Electronza / h2s-esp8266.ino
Last active September 18, 2019 08:11
H2S IoT node with ESP8266 and openSenseMap
// ****************************************************************************
// * H2S GAS SENSOR WITH DATA UPLOADS TO openSenseMap *
// * LOW POWER MODE, CAN RUN ON BATTERY *
// * Uses ESP8266 thing and DGS-H2S sensor from SPEC sensors *
// * https://www.sparkfun.com/products/13231 *
// * https://www.spec-sensors.com/product/digital-gas-sensor-h2s/ *
// * Wiring instructions *
// * https://electronza.com/ *
// * CHANGELOG *
// * v7 - first stable version *
/*
4-20mA Thermometer using Mikroe click boards
https://electronza.com/arduino-4-20ma-thermometer/
Part I - 4-20mA T click transmitter code
*/
#include <SPI.h>
// REQUIRES the following Arduino libraries:
// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library
@Electronza
Electronza / 4-20mA_receiver.ino
Last active December 5, 2019 09:03
4-20mA Thermometer - receiver code
/*
4-20mA Thermometer using Mikroe click boards
https://electronza.com/arduino-4-20ma-thermometer/
Part II - 4-20mA T click receiver code
*/
#include <SPI.h>
#include <MIKROE_LCDmini.h>
// Arduino UNO with Mikroe Arduino Uno Click shield
@Electronza
Electronza / HPMA115S0.ino
Created December 5, 2019 09:06
Arduino Due code for Honeywell HPMA115S0-XXX particle sensor
// Arduino Due code for Honeywell HPMA115S0-XXX particle sensor
// https://electronza.com/arduino-measuring-pm25-pm10-honeywell-hpma115s0/
bool my_status;
// IMPORTANT!!! We are working on an Arduino DUE,
// so int is 32 bit (-2,147,483,648 to 2,147,483,647)
// For Arduino Uno int size is 8 bit, that is -32,768 to 32,767
// Use long or float if working with an Uno or simmilar 8-bit board
int PM25;
@Electronza
Electronza / dgs-h2s_uno.ino
Last active December 7, 2019 12:47
Arduino Uno code for H2S sensor from SPEC Sensors
// SPEC H2S Sensor
// See https://electronza.com/h2s-sensing-revisited-tutorial-arduino-uno/
// Serial number of my sensor
// #define mysensor_serial_no 012017030207
// #define portOne_RX_BUFFER_SIZE 256
// #define portOne_TX_BUFFER_SIZE 256
// Sensor values
@Electronza
Electronza / aqs.ino
Last active December 10, 2019 10:59
ESP8266 code for the diy air quality monitoring station
/*******************************************************************
____ __ ____ ___ ____ ____ __ __ _ ____ __
( __)( ) ( __)/ __)(_ _)( _ \ / \ ( ( \(__ ) / _\
) _) / (_/\ ) _)( (__ )( ) /( O )/ / / _/ / \
(____)\____/(____)\___) (__) (__\_) \__/ \_)__)(____)\_/\_/
Project name: DIY Air Quality Monitoring Station
Project page: https://electronza.com/diy-air-quality-monitoring-station/
Description : Air quality station with Arduino Due & ESP8266
--- ESP8266 code ---
********************************************************************/
@Electronza
Electronza / flip-click-aqs.ino
Last active December 10, 2019 10:58
Flip & click code for the diy air quality monitoring station
/*******************************************************************
____ __ ____ ___ ____ ____ __ __ _ ____ __
( __)( ) ( __)/ __)(_ _)( _ \ / \ ( ( \(__ ) / _\
) _) / (_/\ ) _)( (__ )( ) /( O )/ / / _/ / \
(____)\____/(____)\___) (__) (__\_) \__/ \_)__)(____)\_/\_/
Project name: DIY Air Quality Monitoring Station
Project page: https://electronza.com/diy-air-quality-monitoring-station/
Description : Air quality station with Arduino Due & ESP8266
--- Flip & Click code ---
@Electronza
Electronza / c-meter.ino
Created December 7, 2019 09:11
Arduino code example for Mikroe C-meter click
// https://electronza.com/mikroe-2376-arduino-uno-capacitance/
// C-meter click is installed in socket #1
// of Arduino Uno click shield
// Pulses will be applied on pin D2
int pin = 2;
// We compute on float
float period;
float Cx;