This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <MQTTClient.h> | |
#include <Adafruit_NeoPixel.h> | |
#include <DHT.h> | |
#define STRIP_PIN 4 | |
#define DHT_TYPE DHT11 // DHT11 or DHT22 | |
#define DHT_PIN 2 | |
// Parameter 1 = number of pixels in strip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <MQTTClient.h> | |
#include <Adafruit_NeoPixel.h> | |
#define STRIP_PIN 4 | |
// Parameter 1 = number of pixels in strip | |
// Parameter 2 = Arduino pin number (most are valid) | |
// Parameter 3 = pixel type flags, add together as needed: | |
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Accessory = require('../').Accessory; | |
var Service = require('../').Service; | |
var Characteristic = require('../').Characteristic; | |
var uuid = require('../').uuid; | |
var SENSOR = { | |
currentTemperature: 25, | |
currentHumidity: 50, | |
getTemperature: function() { | |
console.log("Getting the current temperature!"); |