Kill this terrifying bug at any distance with a laser ray! (Or dream about it...)
Project showcase by NerdFatherRJ
Get the speed of your die-cast toy car!
Use the Leap Motion to control tanks armed with Infrared LEDs and Infrared Sensors to do battle.
Project tutorial by Sean McCormick
Version 1 of an automated NERF gun shooting gallery, the targets automatically reset and your score is tracked too!
Project showcase by Keegan Neave
This lesson aims to show how to make a very simple Lego Power Function Receiver.
Project tutorial by Arduino_Scuola
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:
//Serial.begin(9600); Keep off if not needed
//Inicializa o LCD e o backlight
//Wait first pin to become low
while (digitalRead(irPinA) != LOW);
timeA = millis();
while (digitalRead(irPinB) != LOW);
timeB = millis();
diff = timeB-timeA;
vel = 453.6 / diff;//calcula a velocidade em km/h 126mm
use only for debugging
So, thanks again for the inputs.
Thank again for all of you! I certanly will work on inputs You brought.
A few issues fixed:
The "creeck" sound was due to incorrect servo angles. Now it works fine.
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.
Or connect with your social account:
New here? Create an account