This is a PI AI Robot
This version has been running on Arduino Nano (C), it use onboard neural network that accepted a pre-trained model to make simple decisions (i.e. blink, wonder eyes).
The v1 has been ported to python and runs on Raspberry/Orange/Banana PI m2 Zero. It also runs the on-board neural network (ported the same C library from v1), but it now checks if a model exists on start, and if not, trains a new model up to a threshold. Then the model accuracy, inactivity on sensors and even CPU temp were used as input paramters for the decision model, that besides making same simple decisions as v1, also occasionally ran another training epoch.
Moving away from (a bit useless and fragile) decision making model towards network connected assistant. Now robot connects to a remote ChatGPT 4 model. It will use pvrecorder/pvcobra/pvleopard stack to catch voice commands, process them and generate the voice reposnse with OpenAI API.
The eyes now would only rely on the state to indicate:
- idle state
- detecting prompt
- listening and parsing
- requesting API model
sudo apt install python3-pip python3-dev
sudo apt install libjpeg-dev zlib1g-dev
sudo apt install rpi.gpio-common
pip install --upgrade pip setuptools
pip install python-dotenv
pip install numpy
pip install spidev
pip install luma.core
pip install luma.led_matrix
pip install OPi.GPIO
pip install openai
sudo apt install rpi.gpio-common
sudo nano /boot/armbianEnv.txt
overlays=spi-spidev param_spidev_spi_bus=0
sudo groupadd spi
sudo usermod -aG spi pi
sudo usermod -aG dialout pi
sudo nano /etc/udev/rules.d/99-spi-permissions.rules
SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
sudo udevadm control --reload-rules
sudo reboot
sudo cp ./bin/robot.service /etc/systemd/system/robot.service
sudo systemctl daemon-reload
sudo systemctl enable robot.service
sudo systemctl status robot.service
sudo systemctl restart robot.service
- Enable git parallel index preload:
git config --global core.preloadindex true
- Minimize the number of files in .git folder:
git config --global gc.auto 256
- Run git garbage collector:
git gc
- Remove untracked files
git clean -xf
. Usegit clean -xfn
for a dry-run to check that everything is ok.