diff --git a/libraries/MySensors/examples/CO2Sensor/AirQualityCO2 b/libraries/MySensors/examples/CO2Sensor/CO2Sensor.ino similarity index 100% rename from libraries/MySensors/examples/CO2Sensor/AirQualityCO2 rename to libraries/MySensors/examples/CO2Sensor/CO2Sensor.ino diff --git a/libraries/MySensors/examples/DustSensorDSM/DustDSM501Sensor.ino b/libraries/MySensors/examples/DustSensorDSM/DustSensorDSM.ino similarity index 100% rename from libraries/MySensors/examples/DustSensorDSM/DustDSM501Sensor.ino rename to libraries/MySensors/examples/DustSensorDSM/DustSensorDSM.ino diff --git a/libraries/MySensors/examples/ParkingSensor/ParkingSensor.ino b/libraries/MySensors/examples/ParkingSensor/ParkingSensor.ino index d54e599..f8ad6de 100644 --- a/libraries/MySensors/examples/ParkingSensor/ParkingSensor.ino +++ b/libraries/MySensors/examples/ParkingSensor/ParkingSensor.ino @@ -68,16 +68,16 @@ NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and MySensor gw; MyMessage msg(CHILD_ID,V_TRIPPED); int oldParkedStatus=-1; -int sendInterval = 5000; // Send park status at maximum every 5 second. +unsigned long sendInterval = 5000; // Send park status at maximum every 5 second. unsigned long lastSend; #endif -int blinkInterval = 100; // blink interval (milliseconds) +unsigned long blinkInterval = 100; // blink interval (milliseconds) unsigned long lastBlinkPeriod; bool blinkColor = true; // To make a fading motion on the led ring/tape we only move one pixel/distDebounce time -int distDebounce = 30; +unsigned long distDebounce = 30; unsigned long lastDebouncePeriod; int numLightPixels=0; int skipZero=0; @@ -161,4 +161,4 @@ void loop() { } pixels.show(); // This sends the updated pixel color to the hardware. } -} +} \ No newline at end of file diff --git a/libraries/MySensors/examples/RGB-3D/RGB-3D.ino b/libraries/MySensors/examples/RGB-3D/RGB-3D.ino index 5697a0a..1862c53 100644 --- a/libraries/MySensors/examples/RGB-3D/RGB-3D.ino +++ b/libraries/MySensors/examples/RGB-3D/RGB-3D.ino @@ -78,9 +78,9 @@ void setup() pinMode(BLUE_PIN, OUTPUT); // Correct saved RGB value for first start - gw.saveState(RED_PIN, constrain(gw.loadState(RED_PIN), 0, 100)); - gw.saveState(GREEN_PIN, constrain(gw.loadState(GREEN_PIN), 0, 100)); - gw.saveState(BLUE_PIN, constrain(gw.loadState(BLUE_PIN), 0, 100)); + gw.saveState(RED_PIN, constrain((int8_t)gw.loadState(RED_PIN), 0, 100)); + gw.saveState(GREEN_PIN, constrain((int8_t)gw.loadState(GREEN_PIN), 0, 100)); + gw.saveState(BLUE_PIN, constrain((int8_t)gw.loadState(BLUE_PIN), 0, 100)); // Get value from eeprom and write to output analogWrite(RED_PIN, 255 * gw.loadState(RED_PIN) / 100); @@ -105,7 +105,7 @@ void setup() gw.send( BlueStatus.set(gw.loadState(BLUE_PIN)), false ); // Correct RGB show state for first start and load it (set to 'On' at first start) - gw.saveState(0, constrain(gw.loadState(0), 0, 1)); + gw.saveState(0, constrain((int8_t)gw.loadState(0), 0, 1)); isShow=gw.loadState(0); // Send RGB show state to controler (request ack back: true/false) @@ -189,7 +189,7 @@ void incomingMessage(const MyMessage &message) // Save old value to eeprom if it'was not zero if ( gw.loadState(message.sensor) != 0 ) { - gw.saveState(10*message.sensor, constrain(gw.loadState(message.sensor), 0, 100)); + gw.saveState(10*message.sensor, constrain((int8_t)gw.loadState(message.sensor), 0, 100)); } // Save new value to eeprom gw.saveState(message.sensor, 0); @@ -212,7 +212,7 @@ void incomingMessage(const MyMessage &message) { uint8_t incomingDimmerStatus = message.getByte(); // limits range of sensor values to between 0 and 100 - incomingDimmerStatus = constrain(incomingDimmerStatus, 0, 100); + incomingDimmerStatus = constrain((int8_t)incomingDimmerStatus, 0, 100); // Change Dimmer level analogWrite(message.sensor, 255 * incomingDimmerStatus / 100); //Save value to eeprom