1
0
Fork 0
Browse Source

add images for readme.

pull/1/head
Craig Oates 4 years ago
parent
commit
9ccdc91778
  1. 7
      README.md
  2. BIN
      attachments/hardware-layout.jpg
  3. BIN
      attachments/light-meter-extension.jpg
  4. BIN
      attachments/light-meter-logo.png
  5. BIN
      attachments/rtrp-logo.png

7
README.md

@ -57,6 +57,7 @@ The full list of parts required for this project is as follows:
- [Raspbian](https://www.raspberrypi.org/downloads/raspbian/) (You can use the G.U.I. or "headless" version)
- [Raspberry Pi 4](https://www.raspberrypi.org/products/raspberry-pi-4-model-b/) (I am assuming you have the appropriate power cable, S.D. cards Etc.)
- [Light Sensor] (https://www.amazon.co.uk/s/ref=as_li_ss_tl?url=search-alias=aps&field-keywords=LDR&linkCode=ll2&tag=pimylifeup-21&linkId=8662811b5623ce86540420c7e8ce0268&language=en_GB) (I tend to use "light sensor" and "light meter" interchangeably -- sorry if confusing)
- [2 x 1kΩ Resistor](https://www.amazon.co.uk/1K-Resistors-50-Pack-Electronics/dp/B00JGUE0L0)
- [330nF Capacitor](https://www.alibaba.com/product-detail/ODOELEC-334-0-33uf-330nf-50v_60626664828.html)
- [Breadboard](https://thepihut.com/products/raspberry-pi-breadboard-half-size) (Optional but recommended if you do not know how-to solder or you don't feel comfortable doing it)
@ -86,11 +87,11 @@ The easiest way to do this is via the "raspi-config" file/command. You can acces
The light-meter is a custom addition to the Raspberry Pi which is built using the Pi's general-purpose input and output (G.P.I.O.) pins. You can see the layout of the components connected to the Pi in the diagram below.
![hardware-layout](attachments/hardware-layout.png)
![hardware-layout](attachments/hardware-layout.jpg)
Depending on the type of enclosure you use, you might find it more convenient to have the actual light-meter (component) connected to the breadboard with a pair of jumper wires. To help explain the point, please see the image below.
![light-meter-extension](attachments/light-meter-extension.png)
![light-meter-extension](attachments/light-meter-extension.jpg)
#### Power Supply
@ -135,6 +136,6 @@ When you are ready to run this project as intended, you can set-up a cron-job fo
00 18 * * * /home/rtrp/repos/light-meter/shutdown.sh
```
These tasks make the Raspberry Pi send a message to the sever to indicate the status ("on" or "off") and makes the "cli_meter.py" script run. At this point, you should be able to walk away and let the Pi do its thing. This is assuming the server is up and running and the Pi is connected to the world-wide-web. If all is successful, you will notice the Pi will turn itself off at 18:00 (6 p.m.) and will start sending light reading when you turn it on without any input from you. Unfortunately, the Pi can only manage the shutdown procedure on its own. You will need to turn it on. (This has been accounted whilst the exhibition is open.)
These tasks make the Raspberry Pi send a message to the sever to indicate its/their status ("on" or "off") and makes the "cli_meter.py" script run. At this point, you should be able to walk away and let the Pi do its thing. This is assuming the server is up and running and the Pi is connected to the world-wide-web. If all is successful, you will notice the Pi will turn itself off at 18:00 (6 p.m.) and will start sending light reading when you turn it on without any input from you. Unfortunately, the Pi can only manage the shutdown procedure on its own. You will need to turn it on. (This has been accounted whilst the exhibition is open.)
To make sure the Pi sends a "powering down" message to the server, I tend you create an alias called `powerdown`. When you type this into the console, it runs the "shutdown.sh" script -- which has the shutdown command within it. To make the alias permanent, enter `alias='~/repos/light-meter/shutdown.sh'` into `~/.bashrc`. This is easier to test the bespoke shutdown procedure is working as intended. You can, also, adjust the time in the crontab or run the script by running the script like you normally would but I find them to be frustrating to do in this instance.

BIN
attachments/hardware-layout.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

BIN
attachments/light-meter-extension.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

BIN
attachments/light-meter-logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
attachments/rtrp-logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB