Public projects 2

Cockroach Laser Killer

Project showcase by NerdFatherRJ

  • 6,947 views
  • 4 comments
  • 12 respects

Speeduino - Speed Tracker

Project showcase by NerdFatherRJ

  • 6,594 views
  • 16 comments
  • 46 respects

Toolbox 3


Replicated projects 0

 NerdFatherRJ hasn't replicated any projects yet.

Leap Motion Laser Tanks!

Project tutorial by Sean McCormick

  • 8,386 views
  • 5 comments
  • 47 respects

Automated NERF Gun Shooting Gallery

Project showcase by Keegan Neave

  • 2,893 views
  • 1 comment
  • 13 respects

Simple Arduino Based Lego Power Function Receiver

Project tutorial by Arduino_Scuola

  • 4,144 views
  • 1 comment
  • 7 respects

  • Speeduino - Speed Tracker about 1 month ago

    Hello,

    I did some improvements on Code, following Lcbarcellos and RaphaelM inputs.

    I Let de Serial and LCD printing being displayed only after the main instructions and the program work better.

    I also tried substitute "If" statements for "while" statements as suggested. After doing some tests I feel the "ifs" more consistent. I do not know why due to my total dumbness in the deep realms of programming and eletronics...:/

    Here is the code with "while" statements for comparison:

    void setup()
    {
    pinMode(irPinA, INPUT);
    pinMode(irPinB, INPUT);
    pinMode(ledPin, OUTPUT);
    //Serial.begin(9600); Keep off if not needed

    //Inicializa o LCD e o backlight
    lcd.init();
    lcd.backlight();
    configLCD();
    digitalWrite(ledPin, HIGH);

    }//end setup

    void loop()
    {
    //Wait first pin to become low
    while (digitalRead(irPinA) != LOW);
    timeA = millis();
    digitalWrite(ledPin, LOW);
    delay(50);

    while (digitalRead(irPinB) != LOW);
    timeB = millis();
    diff = timeB-timeA;
    vel = 453.6 / diff;//calcula a velocidade em km/h 126mm

     /*
    use only for debugging
    Serial.print("TimeA: ");
    Serial.println(timeA);
    Serial.print("TimeB: ");
    Serial.println(timeB);
    Serial.print("Diff: ");
    Serial.println(diff);
    Serial.print("Vel: ");
    Serial.println(vel);
    */
    lcd.setCursor(6, 1);
    lcd.print(timeA);
    lcd.setCursor(6, 2);
    lcd.print(timeB); 
    lcd.setCursor(6,3);
    lcd.print(vel);
    lcd.print("km/h");
     delay(5000);  
     lcd.clear();
      configLCD();
    digitalWrite(ledPin, HIGH);
    

    }//end Loop

    So, thanks again for the inputs.

  • Speeduino - Speed Tracker about 1 month ago

    Thank again for all of you! I certanly will work on inputs You brought.

  • Cockroach Laser Killer about 1 month ago

    A few issues fixed:

    The "creeck" sound was due to incorrect servo angles. Now it works fine.

    Code published.

    Problem:
    Sometimes, without a noticeable "pattern" the program stops work. I don't know what is the cause. I turn it off, disconecting the 9V battery, wait a few minutes and turn it on again, the project star to work fine. Is the LDR ? Is some kind of buffer problem? I thank you for any help.

Add projectSign up / Login