Pages: [1]   Go Down
Author Topic: How do i get a Message sent to a LCD from a Analog pin condition?  (Read 219 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
  
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34518
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34518
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I was hoping that would be enough for you to lookup the commands yourself, it is the best way to learn.
However
Code:
val = analogRead(0);
    if(val > 500) {
    lcd.print("your message");
}
Start with the LCD example in the IDE for the rest of the code.
« Last Edit: October 11, 2013, 02:21:48 am by Grumpy_Mike » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow that was quick!
Many Thanks Mike!
Logged

Pages: [1]   Go Up
Jump to: