#input on 14-M

MORA99

Senior Member
Not sure if this is a bug, or just me not using inputs like I should, in the simulator the code below works fine with the 5input buttons, but on the real picaxe (Tried 3chips) inputs 0,1,2 is always 0.

I tried tieing all inputs directly to supply (5Vdc), and only input 3 and 4 becomes 1.

Seems I havent had the use for inputs before, now I need 2 simple push-to-make buttons, and it wont work (I have soldered it to pin 1 and 4).


#picaxe 14m
do
SerTxd("0 ",#input0,CR,LF )
SerTxd("1 ",#input1,CR,LF )
SerTxd("2 ",#input2,CR,LF )
SerTxd("3 ",#input3,CR,LF )
SerTxd("4 ",#input4,CR,LF )
pause 2000
loop

Edited by - MORA99 on 21/06/2007 00:51:47
 

MORA99

Senior Member
I solved it using if inputx is on.
Maybe it was not intended to be used as I tried, but the simulator and chip should agree then :)
 
Top