diff --git a/libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino b/libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino index 24ce5ce..8c10883 100644 --- a/libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino +++ b/libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino @@ -12,6 +12,8 @@ #include #include #include +//#include + // Define a static node address, remove if you want auto address assignment //#define NODE_ADDRESS 3 @@ -23,8 +25,8 @@ //Pin definitions #define TEST_PIN A0 -#define RESET_CFG_PIN A1 #define LED_PIN A2 +#define ATSHA204_PIN 17 // A3 #define MEASURE_INTERVAL 60000 @@ -56,13 +58,9 @@ void setup() { digitalWrite(LED_PIN, LOW); // First check if we should boot into clear eeprom mode - pinMode(RESET_CFG_PIN, INPUT); pinMode(TEST_PIN,INPUT); - digitalWrite(RESET_CFG_PIN, HIGH); // Enable pullup digitalWrite(TEST_PIN, HIGH); if (!digitalRead(TEST_PIN)) testMode(); - if (!digitalRead(RESET_CFG_PIN)) resetEEP(); - digitalWrite(RESET_CFG_PIN, LOW); digitalWrite(TEST_PIN,LOW); digitalWrite(LED_PIN, HIGH); @@ -82,7 +80,7 @@ void setup() { gw.present(CHILD_ID_HUM,S_HUM); gw.present(CHILD_ID_BATT, S_POWER); - switchClock(1< Si7021 FAILED!"); + } + if (flash.initialize()) { - while (1) + Serial.println("flash OK!"); + tests ++; + } + else + { + Serial.println("---> flash failed!"); + } + + Serial.println("Test finished"); + + if (tests == 2) + { + Serial.println("Selftest ok!"); + while (1) // Blink OK pattern! { digitalWrite(LED_PIN, HIGH); delay(800); @@ -219,7 +230,8 @@ void testMode() } else { - while (1) + Serial.println("----> Selftest failed!"); + while (1) // Blink FAILED pattern! Rappidly blinking.. { digitalWrite(LED_PIN, HIGH); delay(200);