Button status to a variable?

If doesn't fit into any other category ....
Post Reply
Zim
Posts: 280
Joined: Mon Feb 08, 2021 9:15 pm
Has thanked: 253 times
Been thanked: 128 times

Button status to a variable?

Post by Zim »

Hi All
Is there a way to put this example into a auto refreshing variable without using " i = 0 to 5000". I would like to monitor the button presses.

Thanks
Zim


2022-09-30 18_53_25-Window.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
cicciocb
Site Admin
Posts: 1899
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 407 times
Been thanked: 1269 times
Contact:

Re: Button status to a variable?

Post by cicciocb »

use a timer and get the value inside a variable

example

Code: [Local Link Removed for Guests]

tm1638.setup 4, 5, 15
tm = tm1638.buttons
timer0 200, gettm1638
wait

gettm1638:
tm = tm1638.buttons
return
Post Reply