Shop OBEX P1 Docs P2 Docs Learn Events
Question of home work — Parallax Forums

Question of home work

HEIMDAL13HEIMDAL13 Posts: 3
edited 2009-01-12 12:53 in Learn with BlocklyProp
Is it normal that if I listen p15 with this code, in the computer screen appears 1? with anything conected in the board?

Code:

`{ $STAMP BS2 }
`{ $PBASIC 2.5 }
x Var Bit
DO
x = IN15
DEBUG? x
pause 50
LOOP

Thanks.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-01-11 20:31
    That will depend on how you have pin 15 configured. It is recommended to use a resistor to the power or ground depending on whether you want the default to be 0 or 1. Read 'what is a microcontroller for basic info on how to use the stamps.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • HEIMDAL13HEIMDAL13 Posts: 3
    edited 2009-01-12 12:53
    Thanks
Sign In or Register to comment.