Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Basic stamp 2

Status
Not open for further replies.

Zainab123

New Member
I have boe bot with basic stamp 2 I programmed it but all what I get it is the boe bot going round
I NEED the boe bot going far wad, backward , left and right

With the ir remote

Please I need help any one can help me

Thanks
 
Well that's about less then the time it took you to write your post you could be running your bot around the room. Down load this all about
using the boebot.
https://www.electro-tech-online.com/custompdfs/2013/04/Roboticsv2_2.pdf

And have a good look over here **broken link removed**

You'll want this one too this is all about using IR to controll the boebot.

https://www.electro-tech-online.com/custompdfs/2013/04/WebIR-20v11.pdf
https://www.electro-tech-online.com/custompdfs/2013/04/IRremoteAppKit.pdf
 
If you read the book and used the code in it and your having a problem. Why not post the problem there no way anyone can help you going by your first post.

You have first get the remote working which is in the book. Then you have to set the boebot up like in the book and copy code from the book load it and it will work.
If code from the book doesn't work you did something wrong with your hardware.

So then you would post some good pictures to show how you wired it up and post the code you have loaded.

Then we may beable to help you get it to work.
 
This is my boe bot it's moving with the remote but the wrong is its moving round not moving forward , backward , left and right I need when I press in the remote like 6 going right 0 going backward all
 

Attachments

  • image.jpg
    image.jpg
    1.8 MB · Views: 181
Post the code your using.

Try this code
Code:
' SONY VCR IR remote constants 
' IMPORTANT: Before you can make use of these constants, you must 
' also follow the universal remote instructions to set your remote 
' to control a SONY VCR. Not all remote codes work, so you may have to 
' test several. 
VcrStop CON 24 
VcrPause CON 25 
VcrPlay CON 26 
VcrRewind CON 27 
VcrFastForward CON 28 
VcrRecord CON 29 
' Function keys 
FnSleep CON 54 
FnMenu CON 96 
' -----[ Variables ]------------------------------------------------------- 
' SONY TV IR remote variables 
irPulse VAR Word ' Stores pulse widths 
remoteCode VAR Byte ' Stores remote code 
' -----[ Initialization ]-------------------------------------------------- 
DEBUG "Press/release remote buttons..." 
' -----[ Main Routine ]---------------------------------------------------- 
' Replace this button testing DO...LOOP with your own code. 
DO 
 GOSUB Get_Ir_Remote_Code 
 SELECT remoteCode 
 CASE 2, ChUp ' Forward 
 PULSOUT 13, 850 
 PULSOUT 12, 650 
 CASE 4, VolDn ' Rotate Left
PULSOUT 13, 650 
 PULSOUT 12, 650 
 CASE 6, VolUp ' Rotate Right 
 PULSOUT 13, 850 
 PULSOUT 12, 850 
 CASE 8, ChDn ' Backward 
 PULSOUT 13, 650 
 PULSOUT 12, 850 
 CASE 1 ' Pivot Fwd-left 
 PULSOUT 13, 750 
 PULSOUT 12, 650 
 CASE 3 ' Pivot Fwd-right 
 PULSOUT 13, 850 
 PULSOUT 12, 750 
 CASE 7 ' Pivot back-left 
 PULSOUT 13, 750 
 PULSOUT 12, 850 
 CASE 9 ' Pivot back-right 
 PULSOUT 13, 650 
 PULSOUT 12, 750 
 CASE ELSE ' Hold position 
 PULSOUT 13, 750 
 PULSOUT 12, 750 
 ENDSELECT 
LOOP  
' -----[ Subroutine - Get_Ir_Remote_Code ]--------------------------------- 
' SONY TV IR remote subroutine loads the remote code into the 
' remoteCode variable. 
Get_Ir_Remote_Code: 
 remoteCode = 0 
 #SELECT $stamp 
 #CASE BS2, BS2E, BS2PE 
 DO ' Wait for end of resting state. 
 RCTIME IrDet, 1, irPulse 
 LOOP UNTIL irPulse > ThresholdStart 
 PULSIN IrDet, 0, irPulse ' Get data pulses. 
 IF irPulse > ThresholdPulse THEN remoteCode.BIT0 = 1 
 RCTIME IrDet, 0, irPulse 
 IF irPulse > ThresholdEdge THEN remoteCode.BIT1 = 1 
 RCTIME IrDet, 0, irPulse 
 IF irPulse > ThresholdEdge THEN remoteCode.BIT2 = 1 
 RCTIME IrDet, 0, irPulse 
 IF irPulse > ThresholdEdge THEN remoteCode.BIT3 = 1 
 RCTIME IrDet, 0, irPulse 
 IF irPulse > ThresholdEdge THEN remoteCode.BIT4 = 1 
 RCTIME IrDet, 0, irPulse 
 IF irPulse > ThresholdEdge THEN remoteCode.BIT5 = 1 
 RCTIME IrDet, 0, irPulse 
 IF irPulse > ThresholdEdge THEN remoteCode.BIT6 = 1 
 #CASE BS2SX, BS2P 
 DO ' Wait for start pulse. 
 PULSIN IrDet, 0, irPulse 
 LOOP UNTIL irPulse > ThresholdStart 
PULSIN IrDet, 0, irPulse ' Get data pulses. 
 IF irPulse > ThresholdPulse THEN remoteCode.BIT0 = 1 
 PULSIN IrDet, 0, irPulse 
 IF irPulse > ThresholdPulse THEN remoteCode.BIT1 = 1 
 PULSIN IrDet, 0, irPulse 
 IF irPulse > ThresholdPulse THEN remoteCode.BIT2 = 1 
 PULSIN IrDet, 0, irPulse 
 IF irPulse > ThresholdPulse THEN remoteCode.BIT3 = 1 
 PULSIN IrDet, 0, irPulse 
 IF irPulse > ThresholdPulse THEN remoteCode.BIT4 = 1 
 PULSIN IrDet, 0, irPulse 
 IF irPulse > ThresholdPulse THEN remoteCode.BIT5 = 1 
 PULSIN IrDet, 0, irPulse 
 IF irPulse > ThresholdPulse THEN remoteCode.BIT6 = 1 
 #CASE #ELSE 
 #ERROR "BASIC Stamp version not supported by this program." 
 #ENDSELECT 
 ' Map digit keys to actual values. 
 IF (remoteCode < 10) THEN remoteCode = remoteCode + 1 
 IF (remoteCode = 10) THEN remoteCode = 0 
 RETURN
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top