Forum >Replies by apriansyahrizal
userhead apriansyahrizal
Replies (11)
  • You Reply: thanks for your help :))

    emm Hector i've problem with this program
    why the command "turn left" is not working altought compiling successed

    const int sensorPin = 2;   
    const int ledPin =  13;   
    const int sensorpin = 3;
    int E1 = 5;
    int E2 = 6;
    int M1 = 4;
    int M2 = 7;

    // variables will change:
    int sensorValuee = 0;        // variable for reading the pushbutton status
    int sensorValue = 0;
    void setup() {
      // initialize the LED pin as an output:
      pinMode(ledPin, OUTPUT);     
      // initialize the sensor pin as an input:
      pinMode(sensorPin, INPUT);
      pinMode(sensorpin, INPUT);
      // initialize the motor pin as an output:
      pinMode(E1, OUTPUT);
      pinMode(E2, OUTPUT);
      pinMode(M2, OUTPUT);
      pinMode(M1, OUTPUT);
    }

    void loop(){
      // read the state of the sensor value:
      sensorValue = digitalRead(sensorPin);
      sensorValuee = digitalRead(sensorpin);


      [glow=red,2,300]if (sensorValue == HIGH && sensorValuee == LOW) {   
        // turn left robot:   
        digitalWrite(ledPin, HIGH);
        digitalWrite(E1, HIGH);
        digitalWrite(E2,HIGH);
        digitalWrite(M2,HIGH);
        digitalWrite(M1,HIGH);[/glow]
     
      }
     

      if (sensorValue == HIGH && sensorValuee == HIGH) {   
        // move forward :   
        digitalWrite(ledPin, HIGH);
        digitalWrite(E1, HIGH);
        digitalWrite(E2,HIGH);
        digitalWrite(M2,LOW);
        digitalWrite(M1,HIGH);
     
      }
      else {
        // motor off:
        digitalWrite(ledPin, LOW);
        digitalWrite(E1,LOW);
        digitalWrite(E2,LOW);

    }
    }

  • You Reply: thanks for your help :))

    emm Hector i've problem with this program
    why the command "turn left" is not working altought compiling successed

    const int sensorPin = 2;   
    const int ledPin =  13;   
    const int sensorpin = 3;
    int E1 = 5;
    int E2 = 6;
    int M1 = 4;
    int M2 = 7;

    // variables will change:
    int sensorValuee = 0;        // variable for reading the pushbutton status
    int sensorValue = 0;
    void setup() {
      // initialize the LED pin as an output:
      pinMode(ledPin, OUTPUT);     
      // initialize the sensor pin as an input:
      pinMode(sensorPin, INPUT);
      pinMode(sensorpin, INPUT);
      // initialize the motor pin as an output:
      pinMode(E1, OUTPUT);
      pinMode(E2, OUTPUT);
      pinMode(M2, OUTPUT);
      pinMode(M1, OUTPUT);
    }

    void loop(){
      // read the state of the sensor value:
      sensorValue = digitalRead(sensorPin);
      sensorValuee = digitalRead(sensorpin);


      [glow=red,2,300]if (sensorValue == HIGH && sensorValuee == LOW) {   
        // turn left robot:   
        digitalWrite(ledPin, HIGH);
        digitalWrite(E1, HIGH);
        digitalWrite(E2,HIGH);
        digitalWrite(M2,HIGH);
        digitalWrite(M1,HIGH);[/glow]
     
      }
     

      if (sensorValue == HIGH && sensorValuee == HIGH) {   
        // move forward :   
        digitalWrite(ledPin, HIGH);
        digitalWrite(E1, HIGH);
        digitalWrite(E2,HIGH);
        digitalWrite(M2,LOW);
        digitalWrite(M1,HIGH);
     
      }
      else {
        // motor off:
        digitalWrite(ledPin, LOW);
        digitalWrite(E1,LOW);
        digitalWrite(E2,LOW);

    }
    }

  • You Reply: oh i've replacing it and fix it,, thank you hector :)

    by the way
    could you help me
    i want to create some simply line follower robot,, using 2 linetracker sensor and 1 arduino romeo
    are there enough to create the robot?
    what i must prepare ?

    [i]sorry for my english[/i]
  • You Reply: oh i've replacing it and fix it,, thank you hector :)

    by the way
    could you help me
    i want to create some simply line follower robot,, using 2 linetracker sensor and 1 arduino romeo
    are there enough to create the robot?
    what i must prepare ?

    [i]sorry for my english[/i]
  • You Reply: [quote="Hector"]
    Hi Nicolas,

    I think the best solution would be to replace the voltage regulator. But if you choose to, you can short the 5V to Vin in the picture below. You can do this to test it, and if it works you can decide to replace the regulator.
    The regulator model no. is: LM2940

    A word of caution: Make sure not to supply more than 5V as this could permanently damage your Romeo.

    [img]https://www.dfrobot.com/image/data/DFR0004/Romeo_remark.PNG[/img]

    Also, you do this at your own risk.
    [/quote]
    ohh
    i supply the romeo from the RC battery pack 7.4 V 1400mAh

    what component i must change ?
    capacitor?
  • You Reply: [quote="Hector"]
    Hi Nicolas,

    I think the best solution would be to replace the voltage regulator. But if you choose to, you can short the 5V to Vin in the picture below. You can do this to test it, and if it works you can decide to replace the regulator.
    The regulator model no. is: LM2940

    A word of caution: Make sure not to supply more than 5V as this could permanently damage your Romeo.

    [img]https://www.dfrobot.com/image/data/DFR0004/Romeo_remark.PNG[/img]

    Also, you do this at your own risk.
    [/quote]
    ohh
    i supply the romeo from the RC battery pack 7.4 V 1400mAh

    what component i must change ?
    capacitor?
  • You Reply: after I upload the program, the 2WD robot to shake Suddenly,, and then I immediately disconnect power

    then after that I tried to connect the power again it can not be ON

    ussually PWR LED is lights when i connect the power supply from the M_VIN

    what should i do hector T.T
    now i just can powered my arduino from the usb ??
    anything can i do to repair my arduino??

    int pin = 13;
    int E1 = 5;
    int E2 = 6;
    int M1 = 4;
    int M2 = 7;

    void setup()
    {
      pinMode(pin, OUTPUT);
      pinMode(E1, OUTPUT);
      pinMode(E2, OUTPUT);
      pinMode(M1, OUTPUT);
      pinMode(M2, OUTPUT);
    }

    void loop()
    {
      dot(); dot(); dot();
      dash(); dash(); dash();
      dot(); dot(); dot();
      delay(3000);
    }

    void dot()
    {
      digitalWrite(pin, HIGH);
      delay(250);
      digitalWrite(pin, LOW);
      delay(250);
      digitalWrite(E1, HIGH);
      digitalWrite(E2, HIGH);
      digitalWrite(M1, LOW);
      digitalWrite(M2, HIGH);
      delay(250);

    }

    void dash()
    {
      digitalWrite(pin, HIGH);
      delay(1000);
      digitalWrite(pin, LOW);
      delay(250);
      digitalWrite(E1, HIGH);
      digitalWrite(E2, HIGH);
      digitalWrite(M1, HIGH);
      digitalWrite(M2, LOW);
      delay(250); 
    }
  • You Reply: after I upload the program, the 2WD robot to shake Suddenly,, and then I immediately disconnect power

    then after that I tried to connect the power again it can not be ON

    ussually PWR LED is lights when i connect the power supply from the M_VIN

    what should i do hector T.T
    now i just can powered my arduino from the usb ??
    anything can i do to repair my arduino??

    int pin = 13;
    int E1 = 5;
    int E2 = 6;
    int M1 = 4;
    int M2 = 7;

    void setup()
    {
      pinMode(pin, OUTPUT);
      pinMode(E1, OUTPUT);
      pinMode(E2, OUTPUT);
      pinMode(M1, OUTPUT);
      pinMode(M2, OUTPUT);
    }

    void loop()
    {
      dot(); dot(); dot();
      dash(); dash(); dash();
      dot(); dot(); dot();
      delay(3000);
    }

    void dot()
    {
      digitalWrite(pin, HIGH);
      delay(250);
      digitalWrite(pin, LOW);
      delay(250);
      digitalWrite(E1, HIGH);
      digitalWrite(E2, HIGH);
      digitalWrite(M1, LOW);
      digitalWrite(M2, HIGH);
      delay(250);

    }

    void dash()
    {
      digitalWrite(pin, HIGH);
      delay(1000);
      digitalWrite(pin, LOW);
      delay(250);
      digitalWrite(E1, HIGH);
      digitalWrite(E2, HIGH);
      digitalWrite(M1, HIGH);
      digitalWrite(M2, LOW);
      delay(250); 
    }
  • You Reply: [i]sory for my english[/i]
  • You Reply: [i]sory for my english[/i]
  • You Reply: dear admin
    please help me
    i have bought DFRduino Romeo V1.0
    i can run all program with my motor DC in the beginning, but now i dont know why my arduino romeo could not get the power from the battey pack, (jumper VIN=M_VIN ON both OFF)

    what should i do please