4X4 Keypad and data
Archiver
Posts: 46,084
In a message dated 6/25/2004 9:57:38 AM Eastern Daylight Time,
CHRIS@R... writes:
> I have a questions about storing numbers. I have the 4X4 keypad
> with the memkey. What I would like to do is have the BS2 wait until
> it gets 4 or 5 numbers and then when it does process this
> accordingly. I can make it process the commands but I can't get the
> BS2 to wait for 4 numbers. Any ideas?
>
> Chris
>
Just write serin pin, baud, [noparse][[/noparse]dec4]
That's it!
Sid
[noparse][[/noparse]Non-text portions of this message have been removed]
CHRIS@R... writes:
> I have a questions about storing numbers. I have the 4X4 keypad
> with the memkey. What I would like to do is have the BS2 wait until
> it gets 4 or 5 numbers and then when it does process this
> accordingly. I can make it process the commands but I can't get the
> BS2 to wait for 4 numbers. Any ideas?
>
> Chris
>
Just write serin pin, baud, [noparse][[/noparse]dec4]
That's it!
Sid
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
I have a questions about storing numbers. I have the 4X4 keypad
with the memkey. What I would like to do is have the BS2 wait until
it gets 4 or 5 numbers and then when it does process this
accordingly. I can make it process the commands but I can't get the
BS2 to wait for 4 numbers. Any ideas?
Chris
In reference to your solution to getting 4 numbers "serin pin,baud
[noparse][[/noparse]dec4]", I would like to know how to assign a word to this value.
In other words I would like to do something like this:
If (dec4 or whatever it will be)=1234 then opendoor
can I do something like dec4=pin_number?
Thanks,
Chris
--- In basicstamps@yahoogroups.com, Newzed@a... wrote:
> In a message dated 6/25/2004 9:57:38 AM Eastern Daylight Time,
> CHRIS@R... writes:
>
>
> > I have a questions about storing numbers. I have the 4X4 keypad
> > with the memkey. What I would like to do is have the BS2 wait
until
> > it gets 4 or 5 numbers and then when it does process this
> > accordingly. I can make it process the commands but I can't get
the
> > BS2 to wait for 4 numbers. Any ideas?
> >
> > Chris
> >
>
> Just write serin pin, baud, [noparse][[/noparse]dec4]
>
> That's it!
>
> Sid
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>Sid,
>
>In reference to your solution to getting 4 numbers "serin pin,baud
>[noparse][[/noparse]dec4]", I would like to know how to assign a word to this value.
>In other words I would like to do something like this:
>
>If (dec4 or whatever it will be)=1234 then opendoor
>
>can I do something like dec4=pin_number?
>
>Thanks,
>
>Chris
Chris -
If you haven't done so already, it might be wise to download the PBASIC Stamp Manual from the Parallax web site: http://www.parallax.com as the answer to this question and many other can easily be found there.
number VAR WORD
SERIN pinno, baud, [noparse][[/noparse]dec 4 number]
IF number = 1234 then FOUND
Remember to assign values to pinno and baud.
Regards,
Bruce Bates
("0" - "9") and covert from characters to a numeric value.
SERIN pin, buad, [noparse][[/noparse]DEC4 myValue]
In this case, myValue is a Word variable.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: christopher41877 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=DKfE-MV4DbhkmcAPPfDE7hZqF97XFmdhd2pSRm_L-jwWjx52nh0pl9b7Uq81IaNYUvXE-e2r9XdKkLkN76JTwWswDJfHYVE]CHRIS@R...[/url
Sent: Tuesday, June 29, 2004 9:20 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Re: 4X4 Keypad and data
Sid,
In reference to your solution to getting 4 numbers "serin pin,baud
[noparse][[/noparse]dec4]", I would like to know how to assign a word to this value.
In other words I would like to do something like this:
If (dec4 or whatever it will be)=1234 then opendoor
can I do something like dec4=pin_number?
Thanks,
Chris
--- In basicstamps@yahoogroups.com, Newzed@a... wrote:
> In a message dated 6/25/2004 9:57:38 AM Eastern Daylight Time,
> CHRIS@R... writes:
>
>
> > I have a questions about storing numbers. I have the 4X4 keypad
> > with the memkey. What I would like to do is have the BS2 wait
until
> > it gets 4 or 5 numbers and then when it does process this
> > accordingly. I can make it process the commands but I can't get
the
> > BS2 to wait for 4 numbers. Any ideas?
> >
> > Chris
> >
>
> Just write serin pin, baud, [noparse][[/noparse]dec4]
>
> That's it!
>
> Sid
I am using the memkey with the grayhill keypad. I adjusted the
program so that when key 1 is pressed then I get a 1 and 2 is 2 and
so on. So what I did was I inserted this code "serin 15,396,[noparse][[/noparse]dec2
myvalue] and it still does not work. I am just looking for myvalue
to become 12. The problem occurs when I insert the "DEC" part of
the command. I can get one digit to display and then the unit
freezes. Does anyone see anything wrong with this. I inserted this
into the program listed on the memkey program code for a BS2.
Thanks in advance for the help.
Chris
--- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
wrote:
> DEC4 is a SERIN modifier; it will only accept four decimal
characters
> ("0" - "9") and covert from characters to a numeric value.
>
> SERIN pin, buad, [noparse][[/noparse]DEC4 myValue]
>
> In this case, myValue is a Word variable.
>
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
>
>
>
Original Message
> From: christopher41877 [noparse][[/noparse]mailto:CHRIS@R...]
> Sent: Tuesday, June 29, 2004 9:20 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Re: 4X4 Keypad and data
>
>
> Sid,
>
> In reference to your solution to getting 4 numbers "serin pin,baud
> [noparse][[/noparse]dec4]", I would like to know how to assign a word to this value.
> In other words I would like to do something like this:
>
> If (dec4 or whatever it will be)=1234 then opendoor
>
> can I do something like dec4=pin_number?
>
> Thanks,
>
> Chris
>
>
>
> --- In basicstamps@yahoogroups.com, Newzed@a... wrote:
> > In a message dated 6/25/2004 9:57:38 AM Eastern Daylight Time,
> > CHRIS@R... writes:
> >
> >
> > > I have a questions about storing numbers. I have the 4X4
keypad
> > > with the memkey. What I would like to do is have the BS2 wait
> until
> > > it gets 4 or 5 numbers and then when it does process this
> > > accordingly. I can make it process the commands but I can't
get
> the
> > > BS2 to wait for 4 numbers. Any ideas?
> > >
> > > Chris
> > >
> >
> > Just write serin pin, baud, [noparse][[/noparse]dec4]
> >
> > That's it!
> >
> > Sid
I am using the memkey with the grayhill keypad. I adjusted the
program so that when key 1 is pressed then I get a 1 and 2 is 2 and
so on. So what I did was I inserted this code "serin 15,396,[noparse][[/noparse]dec2
myvalue] and it still does not work. I am just looking for myvalue
to become 12. The problem occurs when I insert the "DEC" part of
the command. I can get one digit to display and then the unit
freezes. Does anyone see anything wrong with this. I inserted this
into the program listed on the memkey program code for a BS2.
Thanks in advance for the help.
Chris
--- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
wrote:
> DEC4 is a SERIN modifier; it will only accept four decimal
characters
> ("0" - "9") and covert from characters to a numeric value.
>
> SERIN pin, buad, [noparse][[/noparse]DEC4 myValue]
>
> In this case, myValue is a Word variable.
>
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
>
>
>
Original Message
> From: christopher41877 [noparse][[/noparse]mailto:CHRIS@R...]
> Sent: Tuesday, June 29, 2004 9:20 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Re: 4X4 Keypad and data
>
>
> Sid,
>
> In reference to your solution to getting 4 numbers "serin pin,baud
> [noparse][[/noparse]dec4]", I would like to know how to assign a word to this value.
> In other words I would like to do something like this:
>
> If (dec4 or whatever it will be)=1234 then opendoor
>
> can I do something like dec4=pin_number?
>
> Thanks,
>
> Chris
>
>
>
> --- In basicstamps@yahoogroups.com, Newzed@a... wrote:
> > In a message dated 6/25/2004 9:57:38 AM Eastern Daylight Time,
> > CHRIS@R... writes:
> >
> >
> > > I have a questions about storing numbers. I have the 4X4
keypad
> > > with the memkey. What I would like to do is have the BS2 wait
> until
> > > it gets 4 or 5 numbers and then when it does process this
> > > accordingly. I can make it process the commands but I can't
get
> the
> > > BS2 to wait for 4 numbers. Any ideas?
> > >
> > > Chris
> > >
> >
> > Just write serin pin, baud, [noparse][[/noparse]dec4]
> >
> > That's it!
> >
> > Sid