flavio-fernandes / imalive

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

imAlive

MQTT based watcher for esp-12f which publishes on a topic to indicate liveliness. The purpose of this project is to set a well known MQTT topic to value on as long as IOT device is powered on. Another app can periodically ping the IOT via MQTT and detect that it is no longer responsive, hopefully because it has been powered off.

Used with cheap esp8266 from dx extreme.

Reference links:

Settings in Arduino IDE for upload to board:

Board: ESP-12F IOT + (Generic ESP8266 Module)
SKU: 425111

Generic esp8266 module

1. Flash Mode = QIO
2. Flash Frequency = 40MHz
3. CPU Frequency = 80MHz
4. Flash Size = 4M 1M SPIFFS
5. Reset Method = nodemcu
6. Upload Speed = 115200

Pin assignments:

const int analogInPin = A0; // Analog input pin that the potentiometer is attached to
const int analogOutPinGREEN = 12; // Analog output pin that the LED is attached to
const int analogOutPinBLUE = 13; // Analog output pin that the LED is attached to
const int analogOutPinRED = 15; // Analog output pin that the LED is attached to
const int buttonPin = 4; // push button

About

License:MIT License


Languages

Language:C++ 92.0%Language:C 8.0%