Addressing Your CodeBugs

The CodeBug tether library has a default address for CodeBug. In most cases this will work, however if you have multiple CodeBugs connected you may need to change the address you’re using.

To do this, first open a Terminal and type the commands:

ls /dev/tty*

Plug the CodeBug back into your computer’s USB port and wait a couple of seconds. Then type the command:

ls /dev/tty*

See what address has been added to the list (you should see something like ttyACM0 for Raspberry Pi or tty.usbmodemfd141 for Mac). You may find it easier if you unplug your other USB devices first.

When you initiliase CodeBug in your Python programs, you must pass it the address you have found.

e.g.

cb = codebug_tether.CodeBug('/dev/tty.usbmodemfa141')

Activities with this step

Back to top