a micro display using a raspberry pi zero and mini PiTFT hat. testing out pulling this to the pi so maybe i can have them do automatic pulls...
- all in one package for hardware: Mini Color PiTFT Ad Blocking Pi-Hole Kit - No Soldering!
- raspberry pi zero wh: Raspberry Pi Zero WH (Zero W with Headers)
- raspberry pi zero wh: Adafruit Mini PiTFT - 135x240 Color TFT Add-on for Raspberry Pi
first run the raspberry pi config wizard and get everything setup so you can ssh into the pi and it's connected to your network. also make sure to enable the spi interface
sudo raspi-config
this is what i've used to setup a few raspberry pi zeros... slightly modified to install some different python libraries... it's kinda terrifying to run. here's hoping i didn't mess up the pi... lol well it seems to have crashed this time. i'll see if i can finish the setup and use the command log to update this setup.
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install apache2 -y && sudo a2enmod rewrite && sudo service apache2 restart && sudo apt-get install php -y && sudo apt-get install libapache2-mod-php -y && sudo apt-get install mariadb-server -y && sudo apt-get install php-mysql -y && sudo service apache2 restart && sudo apt-get install python -y && sudo apt-get install python-serial -y && sudo apt-get install python-serial -y && sudo ln -s /var/www/html www && sudo chown -R pi:pi /var/www/html && sudo chmod 777 /var/www/html && sudo apt-get install git -y && sudo apt-get install python-urllib3 -y
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install apache2 -y && sudo a2enmod rewrite && sudo service apache2 restart && sudo apt-get install php -y && sudo apt-get install libapache2-mod-php -y && sudo apt-get install mariadb-server -y && sudo apt-get install php-mysql -y && sudo service apache2 restart && sudo apt-get install python -y && sudo apt-get install python-serial -y && sudo apt-get install python-serial -y && sudo ln -s /var/www/html www && sudo chown -R pi:pi /var/www/html && sudo chmod 777 /var/www/html && sudo apt-get install git -y && sudo apt-get install python-urllib3 -y && sudo apt-get install python3-pip -y && sudo pip3 install adafruit-circuitpython-rgb-display && sudo pip3 install --upgrade --force-reinstall spidev && sudo apt-get install ttf-dejavu -y && sudo apt-get install python3-pil -y && sudo apt-get install python3-numpy -y && sudo pip3 install colour
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install apache2 -y && sudo a2enmod rewrite && sudo service apache2 restart && sudo apt-get install php -y && sudo apt-get install libapache2-mod-php -y && sudo apt-get install mariadb-server -y && sudo apt-get install php-mysql -y && sudo service apache2 restart && sudo apt-get install python -y && sudo apt-get install python-serial -y && sudo apt-get install python-serial -y && sudo ln -s /var/www/html www && sudo chown -R pi:pi /var/www/html && sudo chmod 777 /var/www/html && sudo apt-get install git -y && sudo apt-get install python-urllib3 -y && curl https://get.pimoroni.com/inkyphat | bash
for when you wanna take your time and not sit around worried about what's happening
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install apache2 -y
sudo a2enmod rewrite
sudo service apache2 restart
sudo apt-get install php -y
sudo apt-get install libapache2-mod-php -y
sudo apt-get install mariadb-server -y
sudo apt-get install php-mysql -y
sudo service apache2 restart
sudo apt-get install python -y
sudo apt-get install python-serial -y
sudo apt-get install python-pip -y
sudo ln -s /var/www/html www
sudo chown -R pi:pi /var/www/html
sudo chmod 777 /var/www/html
sudo apt-get install git -y
sudo apt-get install python-urllib3 -y
sudo mysql -u root
[MariaDB] use mysql;
[MariaDB] update user set plugin='' where User='root';
[MariaDB] flush privileges;
[MariaDB] \q
This needs to be followed by the following command:
mysql_secure_installation
this is going to be very slow and scary. just let it do its thing. the adafruit-circuitpython-rgb-dislay is the scariest and just kinda hangs. but it's ok. it's installing
sudo apt-get install python3-pip -y && sudo pip3 install adafruit-circuitpython-rgb-display && sudo pip3 install --upgrade --force-reinstall spidev && sudo apt-get install ttf-dejavu -y && sudo apt-get install python3-pil -y && sudo apt-get install python3-numpy -y
the adafruit-circuitpython-rgb-dislay is the scariest and just kinda hangs. but it's ok. it's installing. also make sure to turn on the spi interface in the raspi-config
sudo apt-get install python3-pip -y
sudo pip3 install adafruit-circuitpython-rgb-display
sudo pip3 install --upgrade --force-reinstall spidev
sudo apt-get install ttf-dejavu -y
sudo apt-get install python3-pil -y
sudo apt-get install python3-numpy -y
sudo pip3 install colour
see adafruit for examples and documentation of mini pitft
curl https://get.pimoroni.com/inkyphat | bash
see inky-phat for examples and documentation of inky phat
sudo crontab -e
1 * * * * sh /var/www/html/gitpull.sh
2 * * * * sh /var/www/html/plugins/NullSensors/gitpull.sh
3 * * * * sh /var/www/html/plugins/NullWeather/gitpull.sh
#4 * * * * sh /var/www/html/extensions/MealPlanner/gitpull.sh
5 * * * * wget -O/dev/null -q http://localhost/helpers/validate_models.php
* * * * * wget -O/dev/null -q http://localhost/services/every_minute.php
0 * * * * wget -O/dev/null -q http://localhost/services/every_hour.php
6 0 * * * wget -O/dev/null -q http://localhost/services/every_day.php
7 0 1 * * wget -O/dev/null -q http://localhost/services/every_month.php
8 0 1 1 * wget -O/dev/null -q http://localhost/services/every_year.php
9 0 * * 1 wget -O/dev/null -q http://localhost/services/every_week.php
crontab -e
@reboot sudo sh /var/www/html/python/pitft/screen.sh
crontab -e
* * * * * sh /var/www/html/python/eInk/refresh.sh
- required for weather data: NullWeather
- required for room temperature data: NullSensors
- required for eInk display: MealPlanner