PhArt – The Photo to Art App
Process
When you have finished assembling the hardware, you can start the machine, and if everything is in order, the following will happen:
- Photo
- Pulse() RED light
- Blink flash light 3 times short
- Take a photo with long flash light
- Turn off flash light
- Solid RED light
- Converting
- Pulse() YELLOW light
- Convert it into paths
- Solid YELLOW light
- Draw it
- Pulse() GREEN light
- Draw it with the plotter
- Solid GREEN light
Hardware assembling
Hardware requirements
- Raspberry PI (minimum rpi B+)
- SD card (minimum 8GB capacity)
- 3 9g servos
- 3d printer with filament
- Wires
- A pen
- 3 * colourful 3.3v LEDs with 200ohm resitors for the status
- 4 * bright 3.3v LEDs with 50ohm resitors for the flash light
- RaspberryPI camera module
- Micro USB power supply
pibrella shield pinout https://de.pinout.xyz/pinout/pibrella
Software Installation
Raspberry PI with Docker
- If you not allready installed Docker on your raspberry pi os of your your choice I suggest to download the hypriot os for raspberry pi and follow the instructions. It is based on raspbian and comes with Docker preinstalled.
- Use the belana etcher or the command line too
df
to burn the image on a SD card as described. - Put the SD card in you RPI and connect it to your network with a LAN cable.
Network
- Scan your network and find out on which IP your RPI is adressed. You can also use app like fing on your mobile.
nmap -sP 192.168.1.0/24
Connect
- If you have a fritzbox with DNS activated, your should be ablue to use the hostname to connect to your RPI. The address is like so black-pearl.fritz.box otherwise you have to take the IP address.
ssh pirate@black-pearl.fritz.box # password: hypriot
Test application
docker run -d -p 80:80 hypriot/rpi-busybox-httpd
open http://black-pearl.fritz.box/
You can see a test application in your browser? Than you`re good to go, if not go back to start without getting 400 € from the bank.
Start PhArt
docker run -d --restart unless-stopped --privileged --name phart vergissberlin/phart
If you like to have a bin more fancy, you can use docker-compose too:
version: '3.5'
services:
phart:
image: vergissberlin/phart
container_name: phart
privileged: true
environment:
- PIN_LIGHT_GREEN=4
- PIN_LIGHT_YELLOW=17
- PIN_LIGHT_RED=21
- PIN_INPUT_A=9
- PIN_INPUT_B=7
- PIN_INPUT_C=8
- PIN_INPUT_D=10
- PIN_OUTPUT_A=22
- PIN_OUTPUT_B=23
- PIN_OUTPUT_C=24
- PIN_OUTPUT_D=25
- PIN_BUTTON=11
- PIN_BUZZER=18
volumes:
- ./data/images:/app/images
restart: unless-stopped
Debug
docker exec phart bash