Connecting to CodeBug Connect¶
CodeBug Connect has 1MB of inbuilt storage for programs and data. You can access these files to add or update your programs or access data you’ve collected:
over USB, with CodeBug Connect appearing as a removable disk drive
with a direct connection to your CodeBug Connect with your web browser over WiFi (Internet connection not required)
over USB as a virtual serial port
Connecting using WiFi¶
Using CodeBug Connect with WiFi also lets you interact with your programs; so you can print messages, see errors or provide data by typing in. It does mean your CodeBug has to be connected to WiFi, and your computer will need to be able to connect to it. For maximum flexibility, there are a number of ways you can connect.
Using an existing Access point¶
This is probably the most common use case, your CodeBug connect will connect to a WiFi access point, such as your home, school or office router, or tether to a mobile phone. This means CodeBug Connect can access to the Internet. It also usually means other computers connected to the same access point will be able to connect to the CodeBug Connect.
CodeBug Connect’s Built in access point¶
CodeBug Connect can host its own access point for you to connect your computer. This setup is great if you’re somewhere without WiFi, or for before you’ve added the username and password of the access point you want CodeBug to connect to.
If your computer is usually connected to the Internet over WiFi, when it connects to CodeBug’s access point, neither your computer nor CodeBug will be able to access the Internet.
Read more about using accessing CodeBug Connect over WiFi On-board IDE.
Connect as USB disk¶
To make CodeBug Connect appear as a USB drive, press and hold the centre of
Joytick A while plugging CodeBug Connect in. Transfer or edit your files like you would any other on your computer.
To avoid corrupting the files, never unplug CodeBug connect without first chosing eject or equivalent in your operating system.
While in USB mode, CodeBug will not run your program until it reboots into Run mode. This is to remove the risk of filesystem corruption if it were to be accessed by both your programs and via USB at the same time. As such, after transferring files you must safely eject and then unplug and replug your CodeBug Connect for it to run your program.
CodeBug Connect can hold many files and programs, so needs to be told which one to run at boot. See Boot process for more information.
Connect as USB serial port¶
Whenever CodeBug Connect is plugged into a USB port it appears as a virtual serial port. This allows you to use the Python REPL to see debug messages and interactively run Python.
It is hoped that a plugin will be developed for thonny IDE https://github.com/thonny/thonny/wiki/Plugins or Visual Studio Code.
On Linux (including Raspberry Pi) CodeBug Connect Virtual Serial will typically appear as
dmesg in a terminal or
lsusb before and after plugging in your CodeBug Connect may show logging information that helps identify it.
You can use any terminal program to connect to the serial port. For example to use
minicom, you can install it by typing into a terminal:
$ sudo apt install minicom
and then to use it to connect, type:
$ minicom -b 115200 -o -D /dev/ttyACM0
Exit minicom by typing
CTRL-A followed by
On Windows CodeBug Connect Virtual Serial will appear as a COM port. Use Tera Term or PuTTY and connect with the approriate COM port with a baud rate of 115200, 8-bits of data, no Parity, 1 stop bit and no flow control.