This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Password for keypad!
#8
Thank so much ! Everyone ! Smile
But I want an address to reset. For example, the address 1/1/1 1byte (it's from 0-255). I want if in 10s it has no activity, it will reset 1/1/1 = 0, and if less than 10s it has an impact then it will count from the last impact. Like the sensor, it turns off every 10 seconds if there is no motion.
---------------
(In other words I mean)
Alternatively, my Delay command (os.delay) is repeated every time I change the value. I don't want that, I just want the Delay command to work for the first time.
For example:
grp.write ('1/1/1', true)
os.sleep (10)
grp.write ('1/1/1', false)
----------------
Then in about 10 seconds, I press the address 1/1/1 4 times, then my Delay command was repeated 4 times, and it made the value of 1/1/1 = fasle repeat 4 times. I don't want that, I just need it to work for the first time(1/1/1 = fasle repeat 0 times).
I was thinking Delay just paused the command line to execute. It then executes again after the set number of seconds. Leads to 1/1/1 = false repetition. I tried os.kill and return. but not work.
Thanks everyone !
thank all!
Reply


Messages In This Thread
Password for keypad! - by phongvucba - 11.06.2020, 08:54
RE: Password for keypad! - by admin - 11.06.2020, 08:54
RE: Password for keypad! - by phongvucba - 11.06.2020, 15:26
RE: Password for keypad! - by Daniel - 11.06.2020, 15:37
RE: Password for keypad! - by phongvucba - 11.06.2020, 16:06
RE: Password for keypad! - by Daniel - 12.06.2020, 07:37
RE: Password for keypad! - by phongvucba - 13.06.2020, 02:45
RE: Password for keypad! - by Daniel - 15.06.2020, 08:06
RE: Password for keypad! - by phongvucba - 15.06.2020, 16:59

Forum Jump: