My previous posts are wrong !
This is what work good for me ( about 10 seconds) :
Code:
btn1: 'actionare buton up
if but1=1 and rel2=0 then
high rel1
TMR1ON = 1
pause 20
while but1=1
t1Count=T1Count+1
call check
wend
IF LongPress THEN Stop_UP
T1Count = 0
pause 20
while but1 = 0 and but2 = 0
t1Count=T1Count+1
call check
if rel1=0 then
GOTO Btn1PressDone
endif
wend
Stop_UP:
idem for btn2
and :
Code:
if vt > 270 o then
u=u+1
if u > 5 or T1Count > 100 then
gpio.0=0
gpio.5=0
endif
pause 50
goto check
else
u=0
It's correct what I do ? Thanks !
Bookmarks