Remote Control BI-Bot

Uploaded

Submitted by: tesladude Project Website: N/A

Description

Uses a 14m2 for the receiver and another for the transmitter, I set up a joystick module controlling both wheels in both directions, the Picaxe even converts the voltage read from the module to PWM signals I can send via the 8byte control signal in order to change motor speed. Also if you push in the joy stick then a buzzer on the car goes off simulating a kind of horn...lol
Print Page

Share

Comments

  • Posted by teddy7

    Where's the schematic and code?

  • Posted by tesladude

    Here is the code, I don't have a schematic but it was mostly just processing so besides leds,resistors, joy stick, and ASK transmitters there were no real components, the l293d was not strong enough so I used a l298 module.

    Reciever

    [code]

    symbol fleft=c.2

    symbol bleft=c.0

    symbol fright=b.2

    symbol bright=b.4

    symbol FRsig=w5

    symbol BRsig=w6

    symbol FLsig=w7

    symbol BLsig=w8

    symbol keysig=b4

    symbol horn=b.3

    symbol led=b.5

    symbol sigtrig=c.4

    symbol waterswch=c.1

    symbol marinesig=b5

    setfreq m32

    start0:

    pwmout fleft,150,FLsig ; motor data pin setup

    pwmout fright,150,FRsig

    pwmout bright,150,BRsig

    pwmout bleft,150,BLsig

    main:

    high led

    low sigtrig

    rfin b.1,b0,b1,b2,b3,b4,b5,b6,b7 ; recieve data

    high sigtrig

    if marinesig=1 then ;switch to propellers

    high waterswch

    else

    low waterswch

    endif

    if keysig=1 then ; play horn

    high horn

    else

    low horn

    endif

    let w5=b0*4 ; speed setup

    let w6=b1*4

    let w7=b2*4

    let w8=b3*4

    low led

    pwmduty fleft,FLsig

    pwmduty fright,FRsig

    pwmduty bright,BRsig

    pwmduty bleft,BLsig

    goto main

    [/code]

    Transmitter

    [code]

    symbol led=b.0

    symbol V=b.1

    symbol H=b.2

    symbol key=pinb.3

    symbol FLsig=b2

    symbol FRsig=b0

    symbol BLsig=b3

    symbol BRsig=b1

    symbol keysig=b4

    symbol marineswch=pinc.3

    symbol marineled=b.5

    setfreq m32

    main:

    high led

    if b9=0 then

    if marineswch=1 and b5=0 then

    high marineled

    let b5=1

    let b9=5

    endif

    endif

    if b9=0 then

    if marineswch=1 and b5=1 then

    low marineled

    let b5=0

    let b9=5

    endif

    endif

    if key=0 then ; read horn

    let keysig=1

    else

    let keysig=0

    endif

    readadc V,FLsig

    readadc H,FRsig

    ;000000000000000000000000000000000000let them =0

    let BLsig=FLsig

    let BRsig=FRsig

    if FLsig<129 then

    let FLsig=0

    endif

    if FRsig<129 then

    let FRsig=0

    endif

    if BRsig>127 then

    let BRsig=200

    endif

    if BLsig>127 then

    let BLsig=200

    endif

    ;0000000000000000000000000000000forward sig

    if FLsig>128 then

    let FLsig=FLsig-128

    let FLsig=FLsig*2

    endif

    if FRsig>128 then

    let FRsig=FRsig-128

    let FRsig=FRsig*2

    endif

    ;0000000000000000000000000000000backwar sig

    if brsig != 200 then

    let BRsig=BRsig*2

    let BRsig=255-BRsig

    else

    let BRsig=0

    endif

    if BLsig != 200 then

    let BLsig=BLsig*2

    let BLsig=255-BLsig

    else

    let BLsig=0

    endif

    if b9>0 then

    dec b9

    endif

    low led

    rfout b.4,(b0,b1,b2,b3,b4,b5,b6,b7)

    goto main[/code]

  • Login to leave a comment.