Shop OBEX P1 Docs P2 Docs Learn Events
PENGUIN ROBOT Remote Controller - the Code is Here! — Parallax Forums

PENGUIN ROBOT Remote Controller - the Code is Here!

HumanoidoHumanoido Posts: 5,770
edited 2008-04-17 15:43 in Robotics
PENGUIN ROBOT Remote Controller - the Code

This is a new master drop in code to enable use
of a Parallax hand held remote controller for
a Penguin robot program.

Anytime you want to add the hand held remote
function to your program, this is the code to use.

humanoido

penguin_remote_controller.bpx
humanoido said...
USING THE REMOTE
This is so simple. With the remote, just point and press. The
name of the key pressed will appear on the debug screen. It's
a simple matter to replace the code subroutines with your own
Penguin robot functions!
' This program can also be used to determine the IR range, determine
' which keys equal which code, confirm the operation of SONY
' standard remotes, confirm the operation of Penguins' infrared
' receiver, adjust the infrared receiver, test bank switching
' in remotes, troubleshoot off brand remotes, check the functions
' of a Parallax remote, confirm remote battery conditions and add
' remote function to your own Penguin robot programs.

Comments

  • InteractInteract Posts: 79
    edited 2007-09-18 05:01
    Thank you, I will try to sneak some time at work and try this out!
    Man! you can realy write comments.
    When I was an engineer, I never liked wrighting coments becus I was afrade uv misspilling sumthing.
    So I became a pro bicycle racer, learned french, and now I have an excuse!
  • GrievousfishGrievousfish Posts: 54
    edited 2007-09-18 05:15
    Wow and woe! Wow - I can't believe how quickly you churn these codes out. Woe - I am leaving town for a week and won't get a chance to try this out until I get back. I haven't even had a chance to play soccer with my Penguin yet! :-(

    Many thanks you for your generous contributions!!
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-09-18 08:02
    Excellent. Quite useful. I was just beginning to understand that RCtime could be used to capture IR input timing.

    I guess I just was misled by the function's name. It could be just as easily be called Capture-Input-Timing.

    Thanks,



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 9/18/2007 8:11:26 AM GMT
  • twizartwizar Posts: 3
    edited 2008-03-20 15:03
    How can I switch between two programs using the remote if the programs contain loops? When I try to get the new code from the remote using "GOSUB Get_remote_code" the loop stops even if I don't press any key on the remote. I'm trying to switch between morse code tapper and sound compass using penguin remote controller. The loop inside sound compass is my problem. I can't read a new code from the remote without stopping the loop. (excuse my english and thank you)
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-03-23 16:46
    twizar said...
    How can I switch between two programs using the remote if the programs contain loops? When I try to get the new code from the remote using "GOSUB Get_remote_code" the loop stops even if I don't press any key on the remote. I'm trying to switch between morse code tapper and sound compass using penguin remote controller. The loop inside sound compass is my problem. I can't read a new code from the remote without stopping the loop.
    The Penguin Robot programs are built around the extended features of the Basic Stamp 2px, and are loop sensitive to timing. To accomplish running multiple loop sensitive programs using the remote code, place multiple programs into memory and treat as subroutines (some slight modifications may be required). Then, call the appropriated subroutine based on the controller button, and have the program subroutine run a specific time period (out of the IR loop), and then return out of its loop, thus returning control to the IR hand held controller's remote loop. It's left up to you to decide the length of run time alloted to each loop program. Using this technique and the abundance of program pages in the microcontroller, you can fit and control substantial programs with or without loop code. For some ideas on setting the time period on looping subroutine code, take a look at the Penguin Robot Virtual Radio.

    http://forums.parallax.com/showthread.php?p=698975

    humanoido

    Post Edited (humanoido) : 3/23/2008 4:59:25 PM GMT
  • twizartwizar Posts: 3
    edited 2008-04-17 07:41
    Thank you humanoido [noparse]:)[/noparse] Now I have another problem. My remote (BR100P) does not seem to work at all. I needed to change the batteries. Does this remote need reprograming? I don't have the codes for the remote [noparse]:([/noparse]( If it needs reprograming I need the SONY TV code. Please help me [noparse]:([/noparse]
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-04-17 14:21
    How To RESET the Parallax Remote and Install the SONY Codes
    If you have the parallax remote, after replacing batteries, it may need resetting. Push and hold the reset button until a steady red LED light appears, then release, and enter in 605 for the SONY code. The LED will go out and the process is complete. You could follow this in the instruction sheet that came with the remote. Now you can test the remote on your Penguin Robot or a SONY TV.

    [i]More good news about testing the remote. 
    The following code will be posted soon:
    penguin_ir_analyzer.bpx
    This Penguin Robot program will detect and
    analyze the infrared sent out by a remote,
    or other Penguins and other robots. It works
    for infrared sources, and it will confirm the
    remote is sending out a pulse.[/i]
    


    humanoido
  • twizartwizar Posts: 3
    edited 2008-04-17 15:43
    Thank you for the quick answer, but my remote does not seem to have a reset button [noparse]:([/noparse] It's the one with a lot of silver in the part where the buttons are. I only have "SET-UP", "CC", "POWER", "ENTER", "PREV CH". I don't have the instruction sheet from the remote [noparse]:([/noparse]


    LE: problem solved [noparse]:)[/noparse] "SET-UP"="reset" on my remote
    Thank you humanoido and keep·up the good work [noparse]:)[/noparse]

    Post Edited (twizar) : 4/17/2008 3:56:59 PM GMT
    700 x 582 - 58K
Sign In or Register to comment.