Flash Edge Impulse Firmware to Arduino#
On your Raspberry Pi we will install edge-impulse-cli and arduino-cli.
Before doing anything, let’s update the installed software.
sudo apt update && sudo apt upgrade -y
Edge Impulse CLI#
Now do the relevant portions from the Linux installation docs.
Specifically,
Install node
Verify node version and path
Install
edge-impulse-cli
After installing you need to exit
that terminal and open a new one.
Then verify it installed:
edge-impulse-daemon --version
Arduino CLI#
Install arduino-cli
according to the docs
First, ensure ~/.local/bin
is on your PATH.
The environment variable $PATH
is a list of directories that the OS will search for executables, in order.
# This shows your home directory, which uses the ~ symbol for short
# We expect it to be /home/pi/ by default, but it can be whatever!
echo $HOME
# This will print your current path.
# We expect to see ~/.local/bin/ towards the end,
# but instead of ~ it will be the result from the previous command
echo $PATH
We want to install the Arduino CLI to somewhere on our path. If we do ~/.local/bin
we don’t need sudo
.
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/.local/bin sh
Verify installation
arduino-cli version
Dialout Group#
Lastly, we need to add your user to the Linux dialout group.
Note
It took Capt Yarbrough two entire afternoons to figure out that this needs to be done 🫠
The dialout group grants users permissions to access serial ports and modems. Our Arduino board and daemon will connect to the serial port in such a way that we’ll need this.
sudo usermod -aG dialout $USER
Then reboot.
sudo reboot
Once logged back in, user pi
(or whoever you are) should be in dialout group.
grep dialout /etc/group
Arduino Firmware#
Follow the instructions to connect edge impulse to the Arduino Nano 33 BLE Sense.
Specifically, you need to connect the board and update firmware. You don’t strictly need to do the “setting keys” part, but it might be helpful.
If successful you should see a message like
Flashed your Arduino Nano 33 BLE development board.
Tip
You can do all of this on Raspberry Pi or you can do all of this on Windows. But I’ve found that:
Installing node and these things on Windows is a bad idea.
Folks like to be able to take their board and laptop out of the lab and still do work.