Shop OBEX P1 Docs P2 Docs Learn Events
Assigning Input pins to Variables — Parallax Forums

Assigning Input pins to Variables

ArchiverArchiver Posts: 46,084
edited 2001-09-10 21:13 in General Discussion
>
> > The Stamp does not have an IN(x) function for reading
> > a single input directly based on a variable I/O pin,
> > so let's create the function. Taking your convention
> > of numbering AUXIO pins on the BS2p40 as 16 to 31,
> >


***************************************************

I regularly use the following to read an Input pin.

'Variable Declarations

go_button var IN1
stop_button var IN2

'Program Code

If go_button = 1 then x_label

If stop_button = 1 the y_label


Perhaps this will help in coding.

Ron
Sign In or Register to comment.