Offline
Newbie
Karma: 0
Posts: 23
|
 |
« on: January 29, 2013, 11:34:23 am » |
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
Online
Brattain Member
Karma: 316
Posts: 35538
Seattle, WA USA
|
 |
« Reply #1 on: January 29, 2013, 11:44:56 am » |
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
Newbie
Karma: 0
Posts: 23
|
 |
« Reply #2 on: January 29, 2013, 11:46:48 am » |
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)
Online
Edison Member
Karma: 48
Posts: 1431
May all of your blinks be without delay
|
 |
« Reply #3 on: January 29, 2013, 11:50:16 am » |
Yes, perfectly possible. Have you tried it ?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 23
|
 |
« Reply #4 on: January 29, 2013, 11:51:48 am » |
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)
Online
Edison Member
Karma: 48
Posts: 1431
May all of your blinks be without delay
|
 |
« Reply #5 on: January 29, 2013, 11:59:48 am » |
You are going to have to put some effort in. Do you have the hardware ?
HC-SR04 ? LCD ? Arduino ? Power supply ?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 23
|
 |
« Reply #6 on: January 29, 2013, 12:01:26 pm » |
Yes!
|
|
|
|
|
Logged
|
Less is more!
|
|
|
|
East Anglia (UK)
Online
Edison Member
Karma: 48
Posts: 1431
May all of your blinks be without delay
|
 |
« Reply #7 on: January 29, 2013, 12:05:11 pm » |
Good news !
What example sketches have to tried ?
I assume that you have at least mad an LED blink
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 23
|
 |
« Reply #8 on: January 29, 2013, 12:05:39 pm » |
Yes that worked.
|
|
|
|
|
Logged
|
Less is more!
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #9 on: January 29, 2013, 12:43:38 pm » |
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.
|
|
|
|
East Anglia (UK)
Online
Edison Member
Karma: 48
Posts: 1431
May all of your blinks be without delay
|
 |
« Reply #10 on: January 29, 2013, 02:03:47 pm » |
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
|
|
|
|
|
East Anglia (UK)
Online
Edison Member
Karma: 48
Posts: 1431
May all of your blinks be without delay
|
 |
« Reply #11 on: January 29, 2013, 03:15:30 pm » |
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
|
|
|
|
|
|