Quantitative Test Raspbian Jessie Setup - notalentgeek/pedge GitHub Wiki
Prevent screen saver
/etc/kbd/config
Configure Command level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste these commands.
sudo sed -ie "s/BLANK_TIME=30/BLANK_TIME=0/g" /etc/kbd/config &&
sudo sed -ie "s/POWERDOWN_TIME=30/POWERDOWN_TIME=0/g" /etc/kbd/config
- Stop and report to the patron.
Software level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal run
sudo nano /etc/kbd/config
. - Search for
BLANK_TIME=0
. - Search for
POWERDOWN_TIME=0
. - Stop and report to the patron.
/etc/xdg/lxsession/LXDE/autostart
Configure LXSession in Command level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
sudo /bin/sh -c 'printf "\n@xset s noblank\n@xset s off\n@xset -dpms" >> /etc/xdg/lxsession/LXDE/autostart'
- Stop and report to the patron.
Software level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal run
sudo nano /etc/xdg/lxsession/LXDE/autostart
. - Add these lines.
@xset s noblank
@xset s off
@xset -dpms
- Stop and report to the patron.
Setup LIRC
Install packages
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
yes | sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install lirc liblircclient-dev
- Stop and report to the patron.
Configure boot setup
Command level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
sudo /bin/sh -c 'printf "\ndtoverlay=lirc-rpi,gpio_in_pin=23,gpio_out_pin=22" >> /boot/config.txt'
- Stop and report to the patron.
Software level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal run
sudo nano /boot/config.txt
. - Add this line.
dtoverlay=lirc-rpi,gpio_in_pin=23,gpio_out_pin=22
- Stop and report to the patron.
Configure GPIO for IR transceiver
Command level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
sudo /bin/sh -c 'printf ""\nlirc_dev\nlirc_rpi gpio_in_pin=23 gpio_out_pin=22"" >> /etc/modules'
- Stop and report to the patron.
Software level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal run
sudo nano /etc/modules
. - Add these lines.
lirc_dev
lirc_rpi gpio_in_pin=23 gpio_out_pin=22
- Stop and report to the patron.
Create local LIRC run commands
Command level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
sudo /bin/sh -c 'printf "\nbegin\n button = KEY_1\n config = KEY_1\n prog = pysoc\nend\nbegin\n button = KEY_2\n config = KEY_2\n prog = pysoc\nend\nbegin\n button = KEY_3\n config = KEY_3\n prog = pysoc\nend" > /home/pi/.lircrc'
- Stop and report to the patron.
Software level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal run
sudo nano /home/pi/.lircrc
. - Add these lines.
begin
button = KEY_1
config = KEY_1
prog = pysoc
end
begin
button = KEY_2
config = KEY_2
prog = pysoc
end
begin
button = KEY_3
config = KEY_3
prog = pysoc
end
- Stop and report to the patron.
Create system - wide LIRC run commands
Command level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
sudo /bin/sh -c 'printf "\nbegin\n button = KEY_1\n config = KEY_1\n prog = pysoc\nend\nbegin\n button = KEY_2\n config = KEY_2\n prog = pysoc\nend\nbegin\n button = KEY_3\n config = KEY_3\n prog = pysoc\nend" > /etc/lirc/lircrc'
- Stop and report to the patron.
Software level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal run
sudo nano /etc/lirc/lircrc
. - Add these lines.
begin
button = KEY_1
config = KEY_1
prog = pysoc
end
begin
button = KEY_2
config = KEY_2
prog = pysoc
end
begin
button = KEY_3
config = KEY_3
prog = pysoc
end
- Stop and report to the patron.
Delete hardware configuration
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
sudo rm /etc/lirc/hardware.conf
- CTRL + C.
Create hardware configuration
Command level instruction
- In terminal copy-paste this command.
sudo /bin/sh -c 'printf "\n########################################################\n# /etc/lirc/hardware.conf\n#\n# Arguments which will be used when launching lircd\nLIRCD_ARGS=\"--uinput\"\n\n# Do not start lircmd even if there seems to be a good config file\n# START_LIRCMD=false\n\n# Do not start irexec, even if a good config file seems to exist.\n# START_IREXEC=false\n\n# Try to load appropriate kernel modules\nLOAD_MODULES=true\n\n# Run \"lircd --driver=help\" for a list of supported drivers.\nDRIVER=\"default\"\n# usually /dev/lirc0 is the correct setting for systems using udev\nDEVICE=\"/dev/lirc0\"\nMODULES=\"lirc_rpi\"\n\n# Default configuration files for your hardware if any\nLIRCD_CONF=\"\"\nLIRCMD_CONF=\"\"\n########################################################" > /etc/lirc/hardware.conf'
- Stop and report to the patron.
Software level instruction
- In terminal run
sudo nano /etc/lirc/hardware.conf
. - Add these lines.
########################################################
# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS=\"--uinput\"
# Do not start lircmd even if there seems to be a good config file
# START_LIRCMD=false
# Do not start irexec, even if a good config file seems to exist.
# START_IREXEC=false
# Try to load appropriate kernel modules
LOAD_MODULES=true
# Run \"lircd --driver=help\" for a list of supported drivers.
DRIVER=\"default\"
# usually /dev/lirc0 is the correct setting for systems using udev
DEVICE=\"/dev/lirc0\"
MODULES=\"lirc_rpi\"
# Default configuration files for your hardware if any
LIRCD_CONF=\"\"
LIRCMD_CONF=\"\"
########################################################
- Stop and report to the patron.
Delete IR dictionary
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
sudo rm /etc/lirc/lircd.conf
- CTRL +C.
Create IR dictionary
Command level instruction
- In terminal copy-paste this command.
sudo /bin/sh -c 'printf "\n# Please make this file available to others\n# by sending it to <[email protected]>\n#\n# this config file was automatically generated\n# using lirc-0.9.0-pre1(default) on Sat Jan 7 22:45:56 2017\n#\n# contributed by \n#\n# brand: /home/pi/lircd.conf\n# model no. of remote control: \n# devices being controlled by this remote:\n#\nbegin remote\n name pysoc\n bits 13\n flags RC5|CONST_LENGTH\n eps 30\n aeps 100\n one 924 840\n zero 924 840\n plead 970\n gap 113287\n toggle_bit_mask 0x0\n begin codes\n KEY_1 0x1001\n KEY_2 0x1002\n KEY_3 0x1003\n end codes\nend remote" > /etc/lirc/lircd.conf'
- Stop and report to the patron.
Software level instruction
- In terminal run
sudo nano /etc/lirc/lircd.conf
. - Add these lines.
# Please make this file available to others
# by sending it to <[email protected]>
#
# this config file was automatically generated
# using lirc-0.9.0-pre1(default) on Sat Jan 7 22:45:56 2017
#
# contributed by
#
# brand: /home/pi/lircd.conf
# model no. of remote control:
# devices being controlled by this remote:
#
begin remote
name pysoc
bits 13
flags RC5|CONST_LENGTH
eps 30
aeps 100
one 924 840
zero 924 840
plead 970
gap 113287
toggle_bit_mask 0x0
begin codes
KEY_1 0x1001
KEY_2 0x1002
KEY_3 0x1003
end codes
end remote
- Stop and report to the patron.
Stop LIRC service
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
sudo /etc/init.d/lirc stop
Start LIRC service
- In terminal copy-paste this command.
sudo /etc/init.d/lirc start
- Stop and report to the patron.
Setup PICamera
Configure boot setup
Command level instruction
- In terminal copy-paste these commands.
sudo sed -ie "/start_x=0/d" /boot/config.txt
sudo /bin/sh -c 'printf "\nstart_x=1\ngpu_mem=128" >> /boot/config.txt'
Software level instruction
- In terminal run
sudo nano /boot/config.txt
. - Remove this line.
start_x=0
- Add these lines.
start_x=1
gpu_mem=128
- Stop and report to the patron.
Setup PyAudio
Install packages
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
yes | sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install python-dev python-pip python3-dev python3-pip
- Stop and report to the patron.
Download PortAudio Stable version 19 source codes
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
wget http://www.portaudio.com/archives/pa_stable_v19_20140130.tgz -P /home/pi
- CTRL + C.
Extract PortAudio Stable version 19 source codes
- In terminal copy-paste this command.
tar xf /home/pi/pa_stable_v19_20140130.tgz -C /home/pi
- Stop and report to the patron.
Change directory to `/home/pi/portaudio
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
cd /home/pi/portaudio
- Stop and report to the patron.
Configure PortAudio Stable version 19
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
./configure
- Stop and report to the patron.
Compile PortAudio Stable version 19
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
make
- Stop and report to the patron.
Install PortAudio Stable version 19
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
sudo make install
- Stop and report to the patron.
/home/pi
Change directory to - Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
cd /home/pi
- Stop and report to the patron.
/home/pi/.bashrc
for PortAudio Stable version 19
Configure Command level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
sudo /bin/sh -c 'printf "\nLD_LIBRARY_PATH=\"/usr/local/lib\"\nexport LD_LIBRARY_PATH\nLD_RUN_PATH=\"/usr/local/lib\"\nexport LD_RUN_PATH\nPATH=$PATH:/usr/local/lib/\nexport PATH" >> /home/pi/.bashrc'
- Stop and report to the patron.
Software level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal run
sudo nano /home/pi/.bashrc
. - Add these lines.
LD_LIBRARY_PATH=\"/usr/local/lib\"
export LD_LIBRARY_PATH
LD_RUN_PATH=\"/usr/local/lib\"
export LD_RUN_PATH
PATH=$PATH:/usr/local/lib/
export PATH
- Stop and report to the patron.
pip
Install PyAudio package from - Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
sudo pip install pyaudio
Setup USB audio driver
Create Alsa run command for system - wide USB audio driver
Command level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
sudo /bin/sh -c 'printf "\npcm.!default{\n type hw card 1\n}\nctl.!default{\n type hw card 1\n}" > /etc/asound.conf'
- Stop and report to the patron.
Software level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal run
sudo nano /etc/asound.conf
. - Add these lines.
pcm.!default{
type hw card 1
}
ctl.!default{
type hw card 1
}
- Stop and report to the patron.
Create Alsa run command for local USB audio driver
Command level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste this command.
sudo /bin/sh -c 'printf "\npcm.!default{\n type hw card 1\n}\nctl.!default{\n type hw card 1\n}" > /home/pi/.asoundrc'
- Stop and report to the patron.
Software level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal run
sudo nano /home/pi/.asoundrc
. - Add these lines.
pcm.!default{
type hw card 1
}
ctl.!default{
type hw card 1
}
- Stop and report to the patron.
Configure Alsa for USB audio driver
Command level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal copy-paste these commands.
sudo sed -ie "s/defaults.ctl.card 0/defaults.ctl.card 1/g" /usr/share/alsa/alsa.conf &&
sudo sed -ie "s/defaults.pcm.card 0/defaults.pcm.card 1/g" /usr/share/alsa/alsa.conf &&
sudo sed -ie "s/defaults.pcm.device 0/defaults.pcm.device 1/g" /usr/share/alsa/alsa.conf &&
sudo sed -ie "s/defaults.pcm.subdevice 0/defaults.pcm.subdevice -1/g" /usr/share/alsa/alsa.conf &&
sudo sed -ie "s/defaults.pcm.subdevice 1/defaults.pcm.subdevice -1/g" /usr/share/alsa/alsa.conf
- Stop and report to the patron.
Software level instruction
- Look at the instructions.
- Tell the patron if you are ready.
- In terminal run
sudo nano /usr/share/alsa/alsa.conf
. - Search for
defaults.ctl.card 1
. - Search for
defaults.pcm.card 1
. - Search for
defaults.pcm.device 1
. - Search for
defaults.pcm.subdevice -1
. - Search for
defaults.pcm.subdevice -1
. - Stop and report to the patron.