- RaspberryPi
- Ps3eye cam
- Pico Projector
- Pi Cobbler breakout
- MCP3008
- Ambient Light Sensor
- Panel Mount USB Cable
- Power Supply
- Preinstall SD Card
In order to have a correctly look and feel we can simulate the real behavior by taking using a disk. This could be simulated using the crank
app inside this repository
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git-core binutils git libnss-mdns
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
sudo rpi-update
sudo reboot
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
cd ~
git clone https://github.com/openFrameworks-RaspberryPi/openFrameworks/
cd openFrameworks/scripts/linux/debian_armv6l
sudo ./install_codecs.sh
sudo ./install_dependencies.sh
cd ~/openFrameworks/libs/openFrameworksCompiled/project
make
cd ~/openFrameworks/scripts/linux/template/linuxarmv6l
cp Makefile ~/
cd ~/openFrameworks/apps/devApps/raspberrypi_hello_world
cp ~/Makefile ./
make clean
make
Well, I put the wiringPi libraries pre-compiled together with the headers and .c files. So in theory we don't need an installation of the libraries.
But it seam that we need to white list them by:
sudo nano /etc/modprobe.d/raspi-blacklist.conf
- comment with # (or remove) those lines
- reboot the pi
Using wiringPi libraries require the app to be run as super-user.
For this project we need to switches that will trigger << and >> directions of the crank on Digital Pin #17
and #22
of the GPIOs and a AnalogIn for the photocell that will detect if the lantern is ON or OFF.
RaspberryPi don't have analog-in like Arduino. That's why we are going to use MCP3008 to transform the resistance of the photocell into pulse frequency.
Everything is almost like this tutorial except that we are not using #23
, #24
and #25
instead we are using SPI just like Jason Van Cleave and Andreas Muller did in this example. Off course instead of using a potentiometer we are going to use a photocell.
Back and Forth switches are more simple and you can do:
bla bla bla
make
sudo bin/.lumiereCam