Class 13: 2nd August – “SPY”-class #1
Raspberry Pi – video surveillance.
This class we will not even mention the word “GPIO”. Instead we will look at how Linux can get down and dirty with USB input devices. This is another game entirely! This week – webcam.
How can we capture camera images? Capture a whole video file? Analyse the video picture it to see if a burglar is moving in front of the camera? Maybe even stream it to the web?
Class 14: 16th August – “SPY” Class #2
Burglar alarm detector – PIR sensor.
We will use SCRATCH this week to sense our PIR sensor.
Documents used: scratchgpio-class14
Class 15: 23 August
Arduino – analog inputs – temperature & light-level.
(Your NTC thermistor may be green or blue.)
Depending on exact build of YOUR arduino, the numbers 1-30 shown here may not be quite what you see. What is important is the Gnd, D3, A1 and A3 labels.
HERE is another view of the schematic. Note YOU have “Light-dependent-resistor” and “Negative-temperature-coefficient” thermistor in your kits. Only I have a LM35 accurate temperature device shown in the extra diagram.
Class 16: 6th September
Proximity sensing with Arduino.
- TCRT5000L reflective infrared proximity sensor.
- Infrared optical slot interruptor.
Specs? – try HERE.
Class 17: 20th September
Sonar – distance measurement using sound echo. (Measures time for echo to return.)
On Raspberry Pi.
1. Can you make sense of the “timing diagram” for this device on the Bits&Gadgets page (click the HELP icon)?
2. This device is a 5V device:
- It needs 5V supply.
- Its “trigger” input pin expects 5V digital.
- Its “echo” output pin gives 5V digital.
Using with a 5V arduino would be easy (see right). But how can this device be made to work safely with the 3.3V Raspberry Pi for today’s class?
Once we get rPi & sonar correctly running this week, we will LEAVE IT ALL CONNECTED, for next class (PiScope).
Class 18: October 4
Special topic: PiScope. Using the Raspberry Pi as a signal analyser !!!
Analog inputs for Raspberry Pi – finally, the rPi can catch up to the tiny arduino!
This is a 3.3 volt device. It needs only 4 F-M wires to rPi:
- VCC to +3.3 on breadboard (the 3.3 red rail)
- GND to Gnd (blue rail) on breadboard
- SCL to SCL on cobbler
- SDA to SDA on cobbler
We need to talk about what SCL and SDA mean? These pins on rPi we have not used before.
There are 4 analog input pins (Ain0 – Ain3) and one analog output (Aout). Real analog (smooth), not tricked up PWM average.
When the respective jumpers are plugged in, three of the Ain get connected on the PCB to:
- Ain0 = Light detector
- Ain1 = Temp detector
- Ain2 = n/a
- Ain3 = Potentiometer knob
For OUR experiments we will put a F-F jumper wire from Aout to Ain2. (The voltage coming out of Aout we will put back into input Ain2, and we will see if they agree!). Scripts on the SCRIPTS page as usual.
Bring a TORCH & a HAIRDRYER. A voltmeter?
Class 20: November 1
more special topics:
- Networking on the Raspberry Pi.