Change firmware to use D7 instead of D4 for anemometer

This commit is contained in:
Thomas Kopp 2017-12-30 20:06:18 +01:00
parent e8d39bbf40
commit d5aee1ca54
2 changed files with 6 additions and 6 deletions

4
firmware/config.h Executable file → Normal file
View file

@ -9,7 +9,7 @@
#define UPDATE_INTERVAL 4
#define STATUS_LED_PIN BUILTIN_LED
#define ANEMOMETER_PIN D4
#define ANEMOMETER_PIN D7
#define BME_SCK 13
#define BME_MISO 12
@ -26,4 +26,4 @@ const char *INFLUXDB_DB = "weatherstation";
const char *INFLUXDB_USER = "oko";
const char *INFLUXDB_PASS = "de1873a0d2f8f21f17cf4d8db4f65c59";
String DEVICE_NAME = "aaron";
String DEVICE_NAME = "mannimmond";

8
firmware/firmware.ino Executable file → Normal file
View file

@ -26,7 +26,7 @@
* - https://github.com/marvinroger/homie-esp8266
*/
float currentSensorData[4] = {0.0, 0.0, 0.0, 0.0};
float currentSensorData[5] = {0.0, 0.0, 0.0, 0.0, 0.0};
WiFiManager wifiManager;
@ -41,7 +41,7 @@ void setup() {
// Pin settings
pinMode(STATUS_LED_PIN, OUTPUT);
pinMode(ANEMOMETER_PIN, INPUT_PULLUP);
//pinMode(ANEMOMETER_PIN, INPUT_PULLUP);
// Establish WiFi connection
String wifiName = "oko-weather-" + String(ESP.getChipId());
@ -85,7 +85,7 @@ void loop() {
Serial.print("*");
currentSensorData[SENSOR_HUMIDITY] = fetchHumidity();
Serial.print("*");
//currentSensorData[SENSOR_LIGHT] = fetchLight();
currentSensorData[SENSOR_LIGHT] = fetchLight();
Serial.print("*");
currentSensorData[SENSOR_WINDSPEED] = fetchWindspeed();
Serial.print("*");
@ -105,4 +105,4 @@ void loop() {
pushToInfluxDB(DEVICE_NAME, currentSensorData);
delay(UPDATE_INTERVAL*1000);
}
}