After going through all the install steps for your OS, run these checks as simple tests to make sure everything is installed correctly. Go ahead and plug in your Pico to a USB port on your PC.

Most of these tests are done via the Python REPL, at the >>> prompt. To get there, simply launch Python:

$ python3
Python 3.6.9 (default, Nov  7 2019, 10:44:02) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
Make sure you've set the BLINKA_U2IF environment variable.

Check that hidapi is installed correctly

At the Python REPL, type:

import hid
hid.enumerate()

You should get a dump of everything attached to your USB ports.

Check that pySerial is installed correctly

At the Python REPL, type:

import serial.tools.list_ports as lp
lp.comports()

You should get a list of available COM ports.

Check that Pico can be found

At the Python REPL, type:

import hid
device = hid.device()
device.open(0xCAFE, 0x4005)

It should run without any errors:

If for some reason the Pico can not be found, you might see something like this:

Check your USB cable connection and double check that the u2if firmware is loaded.

If you want to continue testing in the same Python session, then make a quick call to close() to free up the device.

device.close()

Or, just exit the Python session.

Check environment variable within Python

At the Python REPL, type:

import os
os.environ["BLINKA_U2IF"]

If you get a KeyError it means you did not set the environment variable right:

If you have set it correctly, you'll get a value back:

Check Blinka is setup correctly

If all of the above checks pass, go ahead and try this as a quick sanity check that basic Blinka functionality is in place. At the Python REPL, type:

import board
dir(board)

You should not get any errors and the various pins available on the Pico should be shown.

This guide was first published on May 01, 2021. It was last updated on 2021-05-26 15:05:43 -0400.

This page (Post Install Checks) was last updated on Nov 22, 2021.

Text editor powered by tinymce.