Shop OBEX P1 Docs P2 Docs Learn Events
Sample code for "418 Mhz Receiver-Keychain" — Parallax Forums

Sample code for "418 Mhz Receiver-Keychain"

viktor18viktor18 Posts: 2
edited 2005-07-30 14:57 in BASIC Stamp
I'm looking for a sample code to use the keychain and the receiver (with a bs2) . Is there someone who kindly helps me ?

Thanks a lot !
Viktor18

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-07-29 12:17
    There's nothing to it: When you press a button on the fob the corresponding output on the receiver goes high.· If you connect the outputs to P0..P4 you could use this bit of code to monitor the buttons:

    btnStatus··· VAR··· Byte

    Main:
    · btnStatus = INL & %00011111
    · DEBUG BIN5 btnStatus, CR
    · PAUSE 100
    · GOTO Main

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • viktor18viktor18 Posts: 2
    edited 2005-07-29 12:38
    Thank you. i understand it's a simple thing but i'm a newbie about this topic and when i bought the keychain and the receiver there wasn't any instruction with them.
    So , thanks again !
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-07-30 06:14
    I wanted to latch the recieved outputs so that they are independent of each other.

    As it is, the received high signal is only one of four, One goes high and three go low.·

    If you want to retain previous high signals rather than reset, you have to do that in your software as toggles·or insert a 74HC112 as four independent toggles.· Either way, they would toggle on the high signal.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
  • dandreaedandreae Posts: 1,375
    edited 2005-07-30 14:57
    Hi Viktor,

    I have some more examples at work, send me an e-mail at dandreae@parallax.com and I will send you some sample programs.

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com

    ·
Sign In or Register to comment.