Raspberry Pi Computing: Analog Measurement by Malcolm Maclean

Raspberry Pi Computing: Analog Measurement by Malcolm Maclean

Author:Malcolm Maclean [Malcolm Maclean]
Language: eng
Format: epub, pdf
Publisher: leanpub.com
Published: 2018-04-15T00:00:00+00:00


We can save this file as light.php and have it in the /var/www/html directory on our Pi (light.php can be found in the code sample extras that can be downloaded with this book).

How we can put in the IP address of our Pi to our browser along with our distance php file (http://10.1.1.120/light.php) and we should get something like the following appear in the browser;

{"dtg":"2020-07-19 10:30:01","ldr":"11936"}

What good will getting this data be? Well……. I’m a bit of a believer that the information that gets captured by the Pi shouldn’t ultimately reside on the device in the long term. In the perfect world I would see it being requested by an external service that was checking a range of data points that would exist around the home (pressure, temperature inside / outside, CO2 levels, is the car parked in the garage, that sort of thing) so this is more of an enabling device than a ‘let’s display stuff’ deal. But I hear what you’re saying. “That’s lame. How can I impress people with that?”. Fair point. To deal with that problem let’s make a simple graph.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.