Update light_fast.ino
shuld work
This commit is contained in:
parent
b37183d1dd
commit
7b989cea31
|
@ -55,13 +55,16 @@ void movement(){
|
|||
else{
|
||||
movement_threshold = 80;
|
||||
}
|
||||
if (movement_threshold-25 > 0){
|
||||
mySerial.write(movement_threshold-25);
|
||||
Serial.print("Msg Send:");
|
||||
Serial.println(movement_threshold-25);
|
||||
}
|
||||
sendnetsteck(-25);
|
||||
}
|
||||
|
||||
void sendnetsteck(int8_t livx){
|
||||
if (movement_threshold-livx > 0){
|
||||
mySerial.write(movement_threshold-livx);
|
||||
Serial.print("Msg Send:");
|
||||
Serial.println(movement_threshold-livx);
|
||||
}
|
||||
}
|
||||
void setup() {
|
||||
delay(random(0, 20));
|
||||
pinMode(Move_sensor,INPUT);
|
||||
|
@ -120,7 +123,10 @@ void loop() {
|
|||
uint8_t msg = mySerial.read();
|
||||
Serial.println(msg);
|
||||
if (msg < 101){
|
||||
if ( msg >= movement_threshold ) movement_threshold= msg;
|
||||
if ( msg >= movement_threshold ){
|
||||
movement_threshold= msg;
|
||||
sendnetsteck(-25);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue