acastro 6 years ago
commit f74753239b

@ -1,9 +1,9 @@
###### WELCOME TO THE README PAGE of # IRIS 0.5 # ###### # WELCOME TO THE README PAGE of # IRIS
Iris 0.5 is a smart machine that interacts with you via audio, camera and visual effects. It aims to be installed in a workplace environment. Iris has 3 characters: guru, pirate and announcer. The files follow this nomination. Iris is a smart machine that interacts with you via audio, camera and visual effects. It aims to be installed in a workplace environment. Iris has 3 characters: guru, pirate and announcer. The files follow this nomination.
## THE FILES ## ## THE FILES
* The .json files (“guru.json”, “rebel.json” and “announcer.json”) are the files where all the sentences the characters say are stored. * The .json files (“guru.json”, “rebel.json” and “announcer.json”) are the files where all the sentences the characters say are stored.
* The script “guru-pirate.py” is the script that combines content of guru and pirate (from json files) to play their messages. It also integrates LEDs when the characters speak. When characters speak the LEDs light up and perform effects. This script runs when the camera detects motion. * The script “guru-pirate.py” is the script that combines content of guru and pirate (from json files) to play their messages. It also integrates LEDs when the characters speak. When characters speak the LEDs light up and perform effects. This script runs when the camera detects motion.
@ -14,7 +14,7 @@ Iris 0.5 is a smart machine that interacts with you via audio, camera and visual
## INSTALL INDEPENDENCIES ## ## INSTALL DEPENDENCIES
* 2018-12-12 * 2018-12-12
* Performed in linux Debian * Performed in linux Debian
@ -22,38 +22,38 @@ Iris 0.5 is a smart machine that interacts with you via audio, camera and visual
* Pi Camera v2.1 * Pi Camera v2.1
* LEDs — WS2801B RGB LED Streifen Farbeffekte * LEDs — WS2801B RGB LED Streifen Farbeffekte
# 1 Install Pip # — Install Pip
sudo apt-get update sudo apt-get update
sudo apt-get install python-pip sudo apt-get install python-pip
# 2 Check python2 version # — Check python2 version
python --version python --version
# 3 Check pip version # — Check pip version
pip --version pip --version
# 4 Properly install Setuptools module # — Properly install Setuptools module
sudo apt-get install python-dev python-setuptools sudo apt-get install python-dev python-setuptools
# 5 Install opencv dependencies with pip # — Install opencv dependencies with pip
sudo pip install opencv-python sudo pip install opencv-python
# 6 Install imutils dependencies with pip # — Install imutils dependencies with pip
sudo pip install imutils sudo pip install imutils
# 7 Install Pillow dependencies with pip # — Install Pillow dependencies with pip
sudo pip install Pillow sudo pip install Pillow
# 8 Install espeak (to play the pirate) # — Install espeak (to play the pirate)
sudo apt-get install espeak sudo apt-get install espeak
# 9 Install aplay (to play the colophon) # — Install aplay (to play the colophon)
sudo apt-get install aplay sudo apt-get install aplay
# 10 Install sox (to play the colophon) # — Install sox (to play the colophon)
sudo apt-get install sox sudo apt-get install sox
## RUN THE PROGRAM ON RASPBERRY PI AT STARTUP ## ## RUN THE PROGRAM ON RASPBERRY PI AT STARTUP
Tutorial on how to run a program on your Raspberry Pi at startup: Tutorial on how to run a program on your Raspberry Pi at startup:
https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/ https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/
@ -76,11 +76,13 @@ The fourth method to run a program on your Raspberry Pi at startup is to use t
You should save and exit the nano editor. You should save and exit the nano editor.
This defines a new service called “Sample Service” and we are requesting that it is launched once the multi-user environment is available. The “ExecStart” parameter is used to specify the command we want to run. The “Type” is set to “idle” to ensure that the ExecStart command is run only when everything else has loaded. Note that the paths are absolute and define the complete location of Python as well as the location of our Python script. This defines a new service called “Sample Service” and we are requesting that it is launched once the multi-user environment is available. The “ExecStart” parameter is used to specify the command we want to run. The “Type” is set to “idle” to ensure that the ExecStart command is run only when everything else has loaded. Note that the paths are absolute and define the complete location of Python as well as the location of our Python script.
In order to store the scripts text output in a log file you can change the ExecStart line to: In order to store the scripts text output in a log file you can change the ExecStart line to:
ExecStart=/usr/bin/python /home/pi/sample.py > /home/pi/sample.log 2>&1 ExecStart=/usr/bin/python /home/pi/sample.py > /home/pi/sample.log 2>&1
The permission on the unit file needs to be set to 644: The permission on the unit file needs to be set to 644:
sudo chmod 644 /lib/systemd/system/sample.service sudo chmod 644 /lib/systemd/system/sample.service
— Step 2: Configure systemd — Step 2: Configure systemd
Now the unit file has been defined we can tell systemd to start it during the boot sequence: Now the unit file has been defined we can tell systemd to start it during the boot sequence:
sudo systemctl daemon-reload sudo systemctl daemon-reload
@ -92,11 +94,6 @@ Reboot the Pi and your custom service should run:
* scripts locations /var/www/html/lifeHackAgent * scripts locations /var/www/html/lifeHackAgent
* audio recording script /var/www/html/lifeHackAgent/Audio_recordings * audio recording script /var/www/html/lifeHackAgent/Audio_recordings
## ORIGINAL FILE
* guru-pirate: /var/www/html/lifeHackAgent/guru-pirate.py
* /var/www/html/lifeHackAgent/announcer.py
* colophon: /var/www/html/lifeHackAgent/colophon/
## TEST SYSTEM: ## TEST SYSTEM:
* `./motion.sh` * `./motion.sh`
@ -112,10 +109,10 @@ runs announcements.py
* stop: sudo systemctl stop lifehack.service * stop: sudo systemctl stop lifehack.service
#################################################################################################### ################################################################################################
# Iris Version 0.5 Contributors: Gill Baldwin, Simon Browne, Tancredi Di Giovanni, Paloma García, Rita Graça, Artemis Gryllaki, Pedro Sá Couto, Biyi Wen, Bohye Woo, Silvio Lorusso, Aymeric Mansoux, André Castro, Steve Rushton, Michael Murtaugh, Leslie Robbins. Produced and published by the Experimental Publishing (XPUB) program of the Piet Zwart Institute, Rotterdam, December 2018. A collaboration between the Research Department of Het Nieuwe Instituut and XPUB. Iris Version 0.5 Contributors: Gill Baldwin, Simon Browne, Tancredi Di Giovanni, Paloma García, Rita Graça, Artemis Gryllaki, Pedro Sá Couto, Biyi Wen, Bohye Woo, Silvio Lorusso, Aymeric Mansoux, André Castro, Steve Rushton, Michael Murtaugh, Leslie Robbins. Produced and published by the Experimental Publishing (XPUB) program of the Piet Zwart Institute, Rotterdam, December 2018. A collaboration between the Research Department of Het Nieuwe Instituut and XPUB.
# You can find IRIS launching:https://burnout.hetnieuweinstituut.nl/en/activities/life-hacks-introducing-iris You can find IRIS launching:https://burnout.hetnieuweinstituut.nl/en/activities/life-hacks-introducing-iris
#################################################################################################### ################################################################################################

Loading…
Cancel
Save