CoralAI Hardware Device

Table of contents

  1. Prerequisite: ($110)
  2. Setup: Hardware - Coral AI device

Setting up hardware

Prerequisite: ($110)

  1. Dev Board Micro ($80)
  2. Wireless/Bluetooth Add-on ($20)
  3. A case (Optional, 10$)
  4. Either an OpenAI key, or a Ollama server running somewhere you can reach via internet

Note: We are working on a version of this working with Raspberry PI Zero W, which will cost ~$20, stay tuned

Setup: Hardware - Coral AI device

First, to learn more about the device, it is good to check out the official docs. Our project is using out-of-tree setup with a Wireless Add-on.

Here is quick video showing how to “connect” the hardware pieces together, and install the software:

set up device video

In the root folder of this repository, run the following commands, (which will download the Coral AI Micro Dev dependencies to your computer - note that it might take a few minutes):

git submodule add  https://github.com/google-coral/coralmicro devices/coralai/coralmicro
git submodule update --init --recursive

Then, when it is finished, CD to the devices/coralai folder:

cd devices/coralai

And run the setup script, which will make sure your computer can compile the code and pass it on to the device:

Note that if you’re using Apple Silicon Mac, you might need to change the coralmicro/scripts/requirements.txt file, making the version of the package hidapi==0.14.0 (see issue)

bash coralmicro/setup.sh
export SUPABASE_URL"<YOUR_SUPABASE_URL"

Note: Security RLS best practices is still WOP! (see ticket #3)

Once the setup has finished running, you can connect your device via a USB-C, and run the following to create a build:

cmake -B out -S .
make -C out -j4

And then, flash it to your device with WIFI_NAME and WIFI_PASSWORD: (Bluetooth pairing is coming soon, see ticket

python3 coralmicro/scripts/flashtool.py --build_dir out --elf_path out/coralmicro-app --wifi_ssid "<WIFI_NAME>" --wifi_psk "<WIFI_PASSWORD>"

To debug the device, you can connect to it serial-y via the USB-C.

First, find the serial id On Linux:

ls /dev/ttyACM*

On Mac:

ls /dev/cu.usbmodem*

Then run the checkOutput.py script:

python3 checkOutput.py --device "/dev/cu.usbmodem101"

(replace the /dev/cu.usbmodem* with whatever you got in the ls command)

Note: It might fail for the first few CURL requests, until it resolves the DNS