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
'device' in dir(hid)

The enumerate() command should dump a listing of everything attached to your USB ports. The last command is a test of the actual hid module imported and should return True.

If the 'device' check returned False, make sure the library installed is hidapi. There is a separate library named hid which should NOT be installed.

Check that pySerial is installed correctly

At the Python REPL, type:

import as lp

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(), 0x4005)
See the "Other RP2040 Boards" section for USB VID and PID to use with open() for non-Pico boards.

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.


Or, just exit the Python session.

Check environment variable within Python

At the Python REPL, type:

import os

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

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 Mar 08, 2024.

This page (Post Install Checks) was last updated on Mar 08, 2024.

Text editor powered by tinymce.