servo motor solar tracker with lcd display

Hi guys, im currently using an arduino pro mini 328 5v 16mhz. i’m making my two servo motor will auto turn to the sunlight when it detect maximum sunlight energy. the problem is my manual control cannot display on the LCD. im using labview interface to choose the manual mode. auto is working fine. anyone can help me look the code? whenever i choose auto mode my lcd will display the voltage etc. but when i choose manual mode, the lcd wont show anything…

thanks for your time! :slight_smile:

Correct arduino code.txt (9.8 KB)

I downloaded your code.
I have no idea how you can make any sense of it because there is no attempt at formatting it. If you are using the Arduino IDE use the Auto-Format option.

Even after I formatted it I can't make any sense of it because there is so much code in loop() and some of the IF statements span two or three pages of my text editor.

Look at how the code is organized into small functions in planning and implementing a program. That allows you to verify each part separately. And see how liitle code there is in loop() and how, on its own, it give a quick overview of the whole program.

On top of all that, you don't seem to have posted the code you are having a problem with - so how can we help?

...R

zackhl:
you see this code i attach on this post.

You have made no attempt to deal with my comments about your formatting.

I simply cannot make sense of your code the way it is written.

...R