1/32 Diecast car to Bluetooth RC car | Part 1

Поділитися
Вставка
  • Опубліковано 27 жов 2024

КОМЕНТАРІ • 39

  • @rcart-cb
    @rcart-cb 4 роки тому +5

    I love your custom builds! You are a arduino genius 👍🏼

    • @TheHLab
      @TheHLab  4 роки тому

      Thanks for watching :)

  • @TheHLab
    @TheHLab  5 років тому +7

    Arduino code:
    #include
    #include
    SoftwareSerial BTserial(4, 5); // RX | TX
    #define TURN_PIN 2
    #define GO_PIN 3
    #define MIN_TURN 700
    #define MAX_TURN 2000
    #define STOP_SPEED 1500
    #define MAX_SPEED_GO 2000
    #define MAX_SPEED_BACK 1000
    Servo turn;
    Servo sgo;
    char command;
    String string;
    int svangle = 0;
    int slideBarValue = 50;
    int index = 0;
    String aCmd;
    int speeds = STOP_SPEED;
    int gear = 0;
    void carGo(int st){
    sgo.writeMicroseconds(st);
    delay(10);
    }
    void setup()
    {
    //Serial.begin( 9600 );//115200
    BTserial.begin( 38400 );
    pinMode(LED_BUILTIN, OUTPUT);
    turn.attach(TURN_PIN);
    svangle = map(slideBarValue, 0, 100, MIN_TURN, MAX_TURN);
    turn.writeMicroseconds(svangle);
    sgo.attach(GO_PIN);
    sgo.writeMicroseconds(speeds);
    //Serial.println("Setup done!");
    }
    void loop()
    {
    string = "";
    while(BTserial.available() > 0)
    {
    command = ((byte)BTserial.read());
    if(command == ':')
    {
    break;
    }
    else
    {
    string += command;
    }
    delay(1);
    }
    //if(string != "") Serial.println(string);

    while( string.length() >= 3 ){
    aCmd = string.substring(0, 3);
    string = string.substring(3);
    //Serial.println(" " + aCmd);
    index = aCmd.lastIndexOf("T");
    if( aCmd == "GOO" ){
    // Move the car
    carGo(MAX_SPEED_GO);
    } else if( aCmd == "STG" ){
    carGo(STOP_SPEED);
    // Stop the car
    } else if( aCmd == "BAC" ){
    // Move the car back
    carGo(MAX_SPEED_BACK);
    } else if( aCmd == "STB" ){
    // Stop the car
    carGo(STOP_SPEED);
    } else if( index == 0 ){
    // Turn left/right: cmd = "T"
    slideBarValue = aCmd.substring(index+1).toInt();
    //Serial.println(slideBarValue );
    if( slideBarValue > 0 ){
    //turn.attach(TURN_PIN);
    svangle = map(slideBarValue, 0, 100, MIN_TURN, MAX_TURN);
    turn.writeMicroseconds(svangle);
    }
    } else if ( aCmd.lastIndexOf("S") == 0 ){
    speeds = aCmd.substring(1).toInt();
    if( speeds > 0 ){
    speeds -= 15;
    if( gear == 3 ){
    sgo.writeMicroseconds( map(speeds, 0, 100, STOP_SPEED, MAX_SPEED_GO) );
    } else if( gear == 1 ){
    sgo.writeMicroseconds( map(speeds, 0, 100, STOP_SPEED, MAX_SPEED_BACK) );
    }
    delay(10);
    }
    } else if ( aCmd.lastIndexOf("G") == 0 ){
    gear = aCmd.substring(1).toInt();
    }
    }
    }

  • @howtomake7527
    @howtomake7527 4 роки тому +2

    Can this handle 15 volts.. i mean 4s ? What changes we can do so that it can work with above 12 volts or 12 volts..

  • @veliylmaz8587
    @veliylmaz8587 5 років тому +2

    Nice

  • @mudung85
    @mudung85 3 роки тому

    Awesome bro👍👍

  • @Ezio470
    @Ezio470 4 роки тому +1

    can it be done with smaller arduino? cause i wanna fit all components inside a 1/32 porsche 918

    • @TheHLab
      @TheHLab  4 роки тому +2

      You can try with a ATmega IC instead of Arduino break board and burn Arduino core into it.

  • @aatirhussain4386
    @aatirhussain4386 3 роки тому

    Am I Allowed to use this video will be awaiting for your answer

  • @jonathanardon3784
    @jonathanardon3784 3 роки тому

    Wow

  • @howtomake7527
    @howtomake7527 4 роки тому

    which software to open. fzz file... i cant open it.. and the final build is working great

    • @TheHLab
      @TheHLab  4 роки тому +2

      You can open *.fzz file with Fritzing

  • @howtomake7527
    @howtomake7527 4 роки тому

    Can u plz make me a program so that i can control a single bldc motor which is powered by 4 li-ion cells

    • @TheHLab
      @TheHLab  4 роки тому +1

      You can refer to my brushed esc: ua-cam.com/video/hYDtW29BTBY/v-deo.html

    • @howtomake7527
      @howtomake7527 4 роки тому

      @@TheHLab but i am using sensorless brushless motor..will need bldc controller

  • @sakshamgaming192
    @sakshamgaming192 4 роки тому +1

    Ye car kahan se kharidi

    • @TheHLab
      @TheHLab  4 роки тому

      I bought this car from online shopee.com

  • @noname-sk8ts
    @noname-sk8ts 5 років тому

    nice car

    • @TheHLab
      @TheHLab  5 років тому

      Thank for watching!

  • @r.ballinonechannel
    @r.ballinonechannel 2 роки тому

    Not working

  • @AnandKumar-zx4wi
    @AnandKumar-zx4wi 3 роки тому

    Car rate bro

  • @gorleshanmukh3976
    @gorleshanmukh3976 3 роки тому

    Just bought a 1:32 nissan gtr.

    • @TheHLab
      @TheHLab  3 роки тому

      Let's convert it to RC :)

  • @කෝසලමධුසංඛ
    @කෝසලමධුසංඛ 3 роки тому

    place Adruino brode bay the link i,am sri lanka

  • @sunilminz591
    @sunilminz591 Рік тому

    Pelesae give me full scahmatic diagram

  • @jahangirjahangir3884
    @jahangirjahangir3884 3 роки тому

    Gadi kaise banate Ho

  • @ganishchanwariya4777
    @ganishchanwariya4777 3 роки тому

    Mujhe leni hai aaesi caar

  • @GF-mf7ml
    @GF-mf7ml 2 роки тому

    This is easier, my one is BMW M2

  • @ganishchanwariya4777
    @ganishchanwariya4777 3 роки тому

    Mne dede yrr

  • @svenboden68
    @svenboden68 4 роки тому

    Nice job....SUV's should be made illegal as they are using far more Unsustainable Materials, use far more Fuel,are more expensive to buy and run,give a erroneous feel of safety for the Driver/Owner,perform and Handle much worse then the Sedan it is based on,block the view for ppl behind in anythi g but a suv,truck,bus,if diesel engined the lethal exhaust produced is 200times worth the that of Petrol etc,etc,

    • @John-mf6ky
      @John-mf6ky 3 роки тому +1

      Lol Illegal? Somebody's never had to drive off road or very badly built/maintained roads. Maybe we should outlaw LiPo batteries too because of the rare earth minerals that are extracted to make them lmao.

  • @ahmadmhmmad3970
    @ahmadmhmmad3970 5 років тому

    شو اسم البرنامج

    • @TheHLab
      @TheHLab  5 років тому

      Thank for watching.

  • @1234Rinku
    @1234Rinku 2 роки тому

    Not working