Your Coral dev board comes blank, and will need to be flashed in order to load the firmware on. The process involves flashing a runtime image onto an SD card and once it boots, the runtime flashes the board with a system image.
The Coral Getting Started guide will show you the process. It's not pleasant unless you happen to have all the right cables and software already, it should take you around 15 minutes.
You'll need USB C cables and adapters!

When connecting HATs or Bonnets, the tall heatsink of the Coral can interfere with attaching it - be sure to pick up some 2x20 GPIO Lifters or Stacking headers!


Once you've got the Coral flashed, you will be able to set up and test WiFi:
Verify you have a WiFi connection with sudo ping 8.8.8.8
The good news about the mendel distribution is it already has Python3 installed by default
sudo apt-get install libgpiod2
After installation you should be able to import gpiod
from within Python3
sudo apt-get update sudo apt-get upgrade
and
sudo pip3 install --upgrade setuptools
Check UART, I2C and SPI
A vast number of our CircuitPython drivers use UART, I2C and SPI for interfacing. Luckily, they're already enabled. Check by running ls /dev/i2c* /dev/spi*
Install the support software with
sudo apt-get install -y python3-smbus python3-dev i2c-tools sudo adduser mendel i2c
You can get info about the I2C interfaces with sudo i2cdetect -l
You can test to see what I2C addresses are connected by running sudo i2cdetect -y 0
(internal I2C) or sudo i2cdetect -y 1
(pins #3 and #5) and sudo i2cdetect -y 1
(pins #27 and #28)
You'll note there looks like an RTC on address 0x68 (a common RTC address). Some addresses are pre-allocated by the kernel (unavailable UU)
For the GPIO interface chips, you can check with sudo gpiodetect and sudo gpioinfoto see the 5 32-pin busses
To enable UART1, you can use the following command:
systemctl stop [email protected]
Install Python libraries
Now you're ready to install all the python support
Run the following command to install adafruit_blinka
pip3 install adafruit-blinka
The computer will install a few different libraries such as adafruit-pureio
(our ioctl-only i2c library), spidev
(for SPI interfacing), Adafruit-GPIO
(for detecting your board) and of course adafruit-blinka
That's pretty much it! You're now ready to test.
Create a new file called blinkatest.py with nano or your favorite text editor and put the following in:
import board import digitalio import busio print("Hello blinka!") # Try to great a Digital input pin = digitalio.DigitalInOut(board.GPIO_P13) print("Digital IO ok!") # Try to create an I2C device i2c = busio.I2C(board.SCL, board.SDA) print("I2C ok!") # Try to create an SPI device spi = busio.SPI(board.SCLK, board.MOSI, board.MISO) print("SPI ok!") print("done!")
Save it and run at the command line with
sudo python3 blinkatest.py
You should see the following, indicating digital i/o, I2C and SPI all worked
Page last edited March 08, 2024
Text editor powered by tinymce.