Defective or Working BASIC Stamp
Fwiss
Posts: 13
I was using the Board of Education, (So I don't know if this is the right place to post) and used the following code to see how it got input:s
' {$STAMP BS2}
' {$PBASIC 2.5}
DO
DEBUG CRSRXY, 0, 3,
BIN1 IN6, BIN1 IN5, BIN1 IN7, BIN1 IN4
PAUSE 100
LOOP
(Just something I got from the BOE-Bot Book)
I had nothing plugged in, and sometimes it gave 1101, others it gave 1111 another 0000, but nothing plugged in. When I removed it from the wooden table, (It had rubber legs so it didn't even contact the table) The voltage input data changed. Is this defective or normal?
' {$STAMP BS2}
' {$PBASIC 2.5}
DO
DEBUG CRSRXY, 0, 3,
BIN1 IN6, BIN1 IN5, BIN1 IN7, BIN1 IN4
PAUSE 100
LOOP
(Just something I got from the BOE-Bot Book)
I had nothing plugged in, and sometimes it gave 1101, others it gave 1111 another 0000, but nothing plugged in. When I removed it from the wooden table, (It had rubber legs so it didn't even contact the table) The voltage input data changed. Is this defective or normal?
Comments
This is why people use 10K ohm pull-up, (or pull-down) resistors to give a definite 'default' value on input pins, even when the driver is disconnected. I say "driver", because USUALLY when you're reading an input pin, you expect it to be 'driven' by some driver output somewhere -- otherwise you wouldn't be reading it.