Shop OBEX P1 Docs P2 Docs Learn Events
4-channel R/C — Parallax Forums

4-channel R/C

FREDDYFREDDY Posts: 5
edited 2006-05-30 02:04 in Robotics
Does anyone have some sample code for a 4-channel R/C? This is what I have but is still acting up.

' ==============================================================================
'
' File......
' Purpose...RC CONTROL OF Unmanned Search And Rescue Vehicle (USARV)
'
' {$STAMP BS2}
' {$PBASIC 2.5}
'
' ==============================================================================


'
' Program Description
'

'Control USARV using 4-Channel R/C
'
'
' I/O Definitions
'
Ch1 PIN 12 ' Channel used to receive up
Ch2 PIN 1 ' Channel used to drive forward
Ch3 PIN 13 ' Channel used to recieve back
Ch4 PIN 2 ' Channel used to drive reverse1
Ch5 PIN 14 ' Channel used to receive LT
Ch6 PIN 3 ' Channel used to steer left
Ch7 PIN 15 ' Cannel used to receive RT
Ch8 PIN 4 ' Channel used to steer right
'
' Program Code|
'
begin:
DO
INPUT Ch1
IF Ch1 THEN OUTPUT Ch2 ELSE LOW Ch2
INPUT Ch3
IF Ch3 THEN OUTPUT Ch4 ELSE LOW Ch4
INPUT Ch5
IF Ch5 THEN OUTPUT Ch6 ELSE LOW Ch6
INPUT Ch7
IF Ch7 THEN OUTPUT Ch8 ELSE LOW Ch8
PAUSE 10
LOOP

Comments

  • CheetoCheeto Posts: 19
    edited 2006-05-30 02:04
    How do you go up and not forward ? Does this fly ? What do the wheels look like on this bad boy.

    I assume you are just using the 5V out on the board to power straight to a motor ? That seems like you might overpower the regulator on the board
Sign In or Register to comment.