Go Down

Topic: [SOLVED] - BugBot not responding + LCD issue (Read 2088 times) previous topic - next topic


Mar 07, 2012, 08:40 pm Last Edit: Mar 13, 2012, 06:55 pm by tuliobaars Reason: 1
Howdy fellows,

As my first project, after 3 weeks of Arduino I decided to assembly one "BugBot", very simple indeed. It's so simple that there's only two 9g servos (these generic w/ their torque going from 1kgcm [13.8oz in] to 3kgcm [41 oz in] and sorry, i'm using Metric, not SI) and one 4-pined HC-SR04 ultrassonic sensor, w/ jumpers going to the board, in this very case, an Rev3 Uno.

Then, I want to make it more portable. I started a simple controller.
Simplifying: The LCD used in the "controller" for displaying the distance (in centimeters) measured by the ultrassonic got it right (first i was getting some eletronic noise coming up from the eletric motor of the servo. I attached an 10nF ceramic capacitor in both contats of the servo and it worked. If it's physically correct, i don't know, besides it just worked fine.) but the LCD won't erase in each change. So, if i measure an 345cm distance and them a 50cm, the display will show 505, because the last digit stays. SO i got to reset the board and start it all over again... That bastard is giving me some headaches!

There's a photo of this error plus the full controller and BugBot. Note that the display shows "Distancia" in the first line, that means distance (kinda obvious  :P :P):

But, still the major problem goes with the 4 pushbuttons I attached to the controlled! Theoretically, I was supposed to work (how many times you guys may have heard this one) and each one call a function, for walking forward, left, right... But no sucess at all.

There's the buttons, for you look up for any misconnecting of the jumpers:

And the code is in PasteBin, as I don't want to flood this wonderful and huge forum  :D :smiley-mr-green:


As you'll see, the comments are in portuguese and I'm Brazillian. As english is not my first language, I'll be grateful for any correction of my grammar, if needed.

Thanks in advance,

KISS! Keep it simple, Stupid!



I finally managed on how to make the pushbutton work. I've connected the wrong button pins and, somehow, it didn't work!

As Cesar Osaka (from Laboratorio de Garagem, a Brazilian DIY/Arduino forum) corrected my circuit, the following images are credited to him.

Button layout (simple):

Code used for correcting the LCD issue:

Code: [Select]

lcd.setCursor(0, 1);
lcd.print(" ");
lcd.setCursor(0, 1);

Simulation using Simulino, Osaka's project for simulating Arduino under Proteus platform:

Thank you all,

KISS! Keep it simple, Stupid!

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131