Pages: [1]   Go Down
Author Topic: HC-SR04-LCD  (Read 636 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 38
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Heey,

Is it possible to with the HC-SR04 to develop a system that allows you as the distance e.g.. lower than 40 cm you can control a lcd screen for a certain time?

Cekstuffertz
Logged

Less is more!

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is it possible to with the HC-SR04 to develop a system that allows you as the distance e.g.. lower than 40 cm you can control a lcd screen for a certain time?
It is possible to use a HC-SR04 to measure distances. It is possible to display that distance on an LCD screen. It would be helpful if you explained the "control a lcd screen" part. Usually, LCD screens are not unruly devices that need controlling. But, when they are, controlling them only for a certain time is not a good idea.
Logged

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

Quote
Is it possible to with the HC-SR04 to develop a system that allows you as the distance e.g.. lower than 40 cm you can control a lcd screen for a certain time?
It is possible to use a HC-SR04 to measure distances. It is possible to display that distance on an LCD screen. It would be helpful if you explained the "control a lcd screen" part. Usually, LCD screens are not unruly devices that need controlling. But, when they are, controlling them only for a certain time is not a good idea.
When the distance is lower then e.g.. 40 the lcd screen have to show a text for 30 seconds like:"Good job!"
Logged

Less is more!

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 109
Posts: 4054
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, perfectly possible.
Have you tried it ?
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

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

No because i don't control the c++ language yet. Can you help my with the code?

Cekstuffertz
Logged

Less is more!

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 109
Posts: 4054
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are going to have to put some effort in.
Do you have the hardware ?

HC-SR04 ?
LCD ?
Arduino ?
Power supply ?
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

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

Yes!
Logged

Less is more!

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 109
Posts: 4054
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good news !

What example sketches have to tried ?

I assume that you have at least mad an LED blink
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

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

Yes that worked.
Logged

Less is more!

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25752
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

And using the range finder and displaying the range on the serial monitor?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 109
Posts: 4054
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

And displaying fixed text on the LCD

You can see which way this is going, can't you.
Baby steps maybe but remember "A journey of a thousand miles begins with a single step"
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 109
Posts: 4054
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Things for you to do.

1. Get the Sensors/Ping example program working if you have not done so already.  Output goes to the serial monitor
2. Get the Liquid Crystal/Hello World program working if you have not already done so
3. Combine the 2 so that the Ping output goes to the LCD

Ask questions if you get stuck nut please post your code to help get answers

4. Change the program to put a different message on the screen when the ping distance is less than 40cm
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Pages: [1]   Go Up
Jump to: