Pico help config


Author Message
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1527
Posted: 08:09am 22 Oct 2021      

If anyone reads this (dont really want to start a new thread for this)

Is there a way to make a pin low by a button press and then keep it low unless the button is pressed again?

I'm thinking something like
setpin GP14, DOUT
PIN(GP14) = 1

IF GP14 =0 Then
change speed calculation from mph to kph
IF GP14 goes low again it then switches back

The button pulls GP14 low momentarily and the program will change what it's doing until the button is pulled low again

I know I could use a latch button to keep the pin low but I'd like to avoid that if possible
Edited 2021-10-22 18:21 by lew247