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-devsudo apt install libjpeg-dev zlib1g-devsudo apt install rpi.gpio-commonsudo apt install sqlite3pip install --upgrade pip setuptoolspip install python-dotenvpip install numpypip install spidevpip install luma.corepip install luma.led_matrixpip install OPi.GPIOpip install openai
sudo apt install rpi.gpio-commonsudo nano /boot/armbianEnv.txtoverlays=spi-spidev param_spidev_spi_bus=0
sudo groupadd spisudo usermod -aG spi pisudo usermod -aG dialout pisudo nano /etc/udev/rules.d/99-spi-permissions.rulesSUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
sudo udevadm control --reload-rulessudo reboot
sudo cp ./bin/robot.service /etc/systemd/system/robot.servicesudo systemctl daemon-reloadsudo systemctl enable robot.servicesudo systemctl status robot.servicesudo 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 -xfnfor a dry-run to check that everything is ok.