Hello,
I was wondering if anybody could help me with button high and lows...
I have got a chip that I have programmed that lights up my name in LED’s and has several modes using setint and an interrupt. To switch modes I am using a bog standard push to make SPST switch.
What I want to do is integrate my little circuit that flashes my name in LED’s into an old toy robot. I have already hooked power from the robots 4.5v supply to my 08m chip and I also want to use the robots small push to make button to cycle through the modes however its harder than I expected.
The small switch inside the robot has 3 legs. I have tested how the switch works by using a multimeter to measure voltage. Without the switch being closed there is a constant 4.5v running through it and when the switch is pressed there is no volts, this leads me to think that the switch is a push to break switch.
My current code is this:
This does not seem right as pin 3 always equals 1 if the switch is a push to
make.
Could i get away with a code like this?
Thank’s.
Prototype
I was wondering if anybody could help me with button high and lows...
I have got a chip that I have programmed that lights up my name in LED’s and has several modes using setint and an interrupt. To switch modes I am using a bog standard push to make SPST switch.
What I want to do is integrate my little circuit that flashes my name in LED’s into an old toy robot. I have already hooked power from the robots 4.5v supply to my 08m chip and I also want to use the robots small push to make button to cycle through the modes however its harder than I expected.
The small switch inside the robot has 3 legs. I have tested how the switch works by using a multimeter to measure voltage. Without the switch being closed there is a constant 4.5v running through it and when the switch is pressed there is no volts, this leads me to think that the switch is a push to break switch.
My current code is this:
Code:
do loop while Pin3 = 1
make.
Could i get away with a code like this?
Code:
do loop while Pin3 = 0
Prototype