Go Down

Topic: How do i get a Message sent to a LCD from a Analog pin condition? (Read 251 times) previous topic - next topic

NBS-ONE

Hello, any help with setting me off in the right direction will be greatly appreciated!

It seams simple enough, but i just cant seam to grasp how to start, or find similar code to manipulate into what i need.

My problem:

I need to get a predefined message 'printed' to my lcd display
When a specific threshold 'voltage/value' is meet from a analog pin.

Thats it, simple right?

Cheers again
Nick
 

Grumpy_Mike

Quote
Thats it, simple right?

Yes read the analogue pin into a variable.
Then test the variable to see if it is greater tha. Your threshold with an if statement.
Then in the body of the if statement print to your LCD.

NBS-ONE

Thank You Mike,  I dont want to be ask, ask, ask. But...
What would that look like code wise? Im quite fresh at arduino =)

Grumpy_Mike

#3
Oct 11, 2013, 09:17 am Last Edit: Oct 11, 2013, 09:21 am by Grumpy_Mike Reason: 1
I was hoping that would be enough for you to lookup the commands yourself, it is the best way to learn.
However
Code: [Select]

val = analogRead(0);
    if(val > 500) {
   lcd.print("your message");
}

Start with the LCD example in the IDE for the rest of the code.


Go Up