esp + rgb led strip (addresable) + hcsr04
Posted: 06 Nov 2019, 15:55
Hello All!
Im loking for kind of advice, direction how to, or maybe better idea than mine.
from begining i want to put led rgb strip on stairs , but not on each steps just along entire lenght of the stairs(300 cm), hscr04 on top of the stairs which will measure distance between person on stairs and sensor and lit up part of strip where person actually is with of course one step backward and forward, in total one step with brightness to 100% and backward and forward step with brightness of 50%. i want to put it in rules to make it working , but found out couple issue which i couldnt resolve with my current expierence... so i add device (hcsr04) named numerLED in values puted %value%/1.67 (1.67cm is the distance between two led on strip) , this is bringing me value which led need to be lit up, i used command into rules neopixel[numerLED#distance],255,255,255 which works fine . my question is i want add now another command neopixelLine which will turn on for example 5leds backward and forward , should i add another device hcsr04 and put in values %values%/1.67+5 %values%/1.67-5 ? i try to use dummy device , but it is not accepting symbols like -+/. another question turning it on looks quite easy to do, but i struggle how to turn it off when you already passed couple steps ...
apreccicate for any comment and help
Im loking for kind of advice, direction how to, or maybe better idea than mine.
from begining i want to put led rgb strip on stairs , but not on each steps just along entire lenght of the stairs(300 cm), hscr04 on top of the stairs which will measure distance between person on stairs and sensor and lit up part of strip where person actually is with of course one step backward and forward, in total one step with brightness to 100% and backward and forward step with brightness of 50%. i want to put it in rules to make it working , but found out couple issue which i couldnt resolve with my current expierence... so i add device (hcsr04) named numerLED in values puted %value%/1.67 (1.67cm is the distance between two led on strip) , this is bringing me value which led need to be lit up, i used command into rules neopixel[numerLED#distance],255,255,255 which works fine . my question is i want add now another command neopixelLine which will turn on for example 5leds backward and forward , should i add another device hcsr04 and put in values %values%/1.67+5 %values%/1.67-5 ? i try to use dummy device , but it is not accepting symbols like -+/. another question turning it on looks quite easy to do, but i struggle how to turn it off when you already passed couple steps ...
apreccicate for any comment and help