From 0f5bddf43569268e56ca4cb24c490711cea3d12c Mon Sep 17 00:00:00 2001 From: rra Date: Wed, 18 Nov 2020 07:58:09 +0100 Subject: [PATCH] updated readme --- README.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a6658b..cbd64bc 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,52 @@ # pi_gpiozero_examples -A collection of examples for using the gpiozero library for reading sensors and activating actuators \ No newline at end of file +A collection of examples for using the gpiozero library for reading sensors and activating actuators + + +# First steps + +Install python3-gpiozero + +`$ sudo apt update && sudo apt install python3-gpiozero` + +##analogSensor.py + +How to read analog values using a MCP3008 ADC (analog to digital converter) + +##distanceSensor.py + +Using HC-SRO4 distance sensor + +Hardware required: + + * 330 & 470 ohm resistors + * HC-SRO4 Distance sensor + +##ldrLed.py + +Using an LDR to set the values of an LED, also smoothing and constraining sensor values in the process + +Hardware required: + * LDR + * LED + * 330 ohm resistor + +## servo.py + +Operate a servo + +## webLed.py + +Turn an LED on or off based on the input from a web page + +Requires `flask` (`$ sudo apt install python3-flask`) + +To change the look of the HTML page, have a look at the folder `template` + +## remoteGpioFromHome.py + +Interact with an LED using remote-gpio. + +## remoteGpioFromPi.py + +Read buttons on different Pis in the VPN to trigger an LED