Getting Started
Adafruit Playground is a wonderful and safe place to share your interests with Adafruit's vibrant community of makers and doers. Have a cool project you are working on? Have a bit of code that you think others will find useful? Want to show off your electronics workbench? You have come to the right place.
The goal of Adafruit Playground is to make it as simple as possible to share your work. On the Adafruit Playground users can create Notes. A note is a single-page space where you can document your topic using Adafruit's easy-to-use editor. Notes are like Guides on the Adafruit Learning System but guides are high-fidelity content curated and maintained by Adafuit. Notes are whatever you want them to be. Have fun and be kind.
Click here to learn more about Adafruit Playground and how to get started.
-
Google Coral USB Accelerator on Raspberry Pi Bookworm
Google Coral's USB Accelerator (https://coral.ai/docs/accelerator/get-started) currently doesn't work on the Raspberry Pi OS Bookworm. In order to get the USB Accelerator to work we need to do a few extra things like install Python 3.9 and create a python virtual environment.
Install dependencies
sudo apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-devBuild Python from scratch
wget https://www.python.org/ftp/python/3.9.18/Python-3.9.18.tar.xztar xf Python-3.9.18.tar.xzcd Python-3.9.18./configure --enable-optimizationssudo make altinstallMake a virtual environment
Python-3.9.18/python -m venv --system-site-packages tfNext we can install Pycoral
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install libedgetpu1-std -y
sudo usermod -aG plugdevsudo ./tf/bin/pip3 install --extra-index-url https://google-coral.github.io/py-repo/ pycoralInstall any extra python libraries
sudo ./tf/bin/pip3 install opencv-pythonsudo apt install libcap-dev libcamera-devsudo ./tf/bin/pip3 install rpi-libcamerasudo ./tf/bin/pip3 install rpi-kmssudo ./tf/bin/pip3 install picamera2Note: rpi-libcamera and rpi-kms may need to be updated if your system package is updated.
As of 2/21/2024, If your are installing rpi-libcamera 0.1a2 and have updated to libcamera0.2, you will need to run the following:
cd /usr/lib/aarch64-linux-gnusudo ln -s /usr/lib/aarch64-linux-gnu/libcamera-base.so.0.2.0 libcamera-base.so.0.1sudo ln -s /usr/lib/aarch64-linux-gnu/libcamera.so.0.2.0 libcamera.so.0.1Run the python virtual environment
source ./tf/bin/activateAt this point you should be able to use the USB Accelerator against the pycoral repo: https://github.com/google-coral/pycoral.git
-
Raspberry Pi Stats Display
The 3D printed insert can be found here: https://www.printables.com/model/710601-pi-5-official-case-active-cooler-insert-small-came
To get the display to show stats, first install blinka by following the guide here: https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi
Assuming you created a python virtual environment in /home/pi/env path, run the following commands:
cd ~source ./env/bin/activatepip install adafruit-circuitpython-ssd1306Now create your python file called stats_display.py in the /home/pi directory.
Please try running the command:
vcgencmd measure_clock armIf your output does not start with frequency(0)= then you will need to change the line:
Freq = Freq.replace('frequency(0)=', '')to match the start of your output in the code file above.
Now try to run the code by calling:
python ./stats_display.pyIf the display is working, we can now run this as a service at start up.