Stamp I/O Problems
Archiver
Posts: 46,084
Not sure if you mean the LED keeps blinking or stays on solidly.
If the former, likely cause is I/O 1 is floating (not connected to
anything when the switch is open). The latter probably happens about
half the time--read the description of TOGGLE again, carefully and
consider what would happen if the latest TOGGLE set I/O 7 low.
Regards,
Steve
On 25 Jul 01 at 20:59, mhr_54@h... wrote:
> Dear Stampers,
>
> I'm using the following code to allow me to turn a blinking LED on
> and off with a switch:
>
> again:
> if in0 = 1 then again
> toggle 7
> pause 200
> goto again
>
> But when I ran the program, even if the switch was in the off
> position the LED was still lit...
If the former, likely cause is I/O 1 is floating (not connected to
anything when the switch is open). The latter probably happens about
half the time--read the description of TOGGLE again, carefully and
consider what would happen if the latest TOGGLE set I/O 7 low.
Regards,
Steve
On 25 Jul 01 at 20:59, mhr_54@h... wrote:
> Dear Stampers,
>
> I'm using the following code to allow me to turn a blinking LED on
> and off with a switch:
>
> again:
> if in0 = 1 then again
> toggle 7
> pause 200
> goto again
>
> But when I ran the program, even if the switch was in the off
> position the LED was still lit...
Comments
I'm using the following code to allow me to turn a blinking LED on
and off with a switch:
again:
if in0 = 1 then again
toggle 7
pause 200
goto again
But when I ran the program, even if the switch was in the off
position the LED was still lit. I tested the switch and it was fine.
The only explanation I have is that the Stamp is grounding the LED
with out being told to do so.
I've added the schematic I used in the files archive on this mailing
list.
Please help.
Thanks,
mhr_54
Original Message
> I'm using the following code to allow me to turn a blinking LED on
> and off with a switch:
>
> again:
> if in0 = 1 then again
> toggle 7
> pause 200
> goto again
>
> But when I ran the program, even if the switch was in the off
> position the LED was still lit. I tested the switch and it was fine.
> The only explanation I have is that the Stamp is grounding the LED
> with out being told to do so.