CircuitPython on the Seeeduino XIAO--working!

Nice board. Remember to get a USB-C cable if you don’t have one already.



Support was just added (2020-01-15) to CircuitPython for this board–you’ll have to build from the source, though, until they post the pre-built uf2 file. (Or see below.)



If you can’t wait, you can use the uf2 for the SAMD 21 Mini in the meantime, but the pinouts will be mixed up, probably as follows: 1=A0, 2=A3, 3=D1, 4=D0, 5=D4, 6=D3, 7=A1, 8=A2, 9=D9, 10=x, 11=D8, and the LED is on the same D13.



Note that the recommended Mu editor won’t recognize the XIAO for serial communication yet unless you add the USB VID (0x2886) and PID (0x002f) to the Mu code (see circuitpython.py or adafruit.py in the Mu app), but works fine for writing/saving programs to it. The most recent (alpha) version of Mu may work if you used the SAMD21 Mini uf2, but you may need to add the VID/PID to the current stable version of Mu.



(I have attached a uf2 for the XIAO based on the circuitpython codebase as of 2020-01-15. Please go to the circuitpython website to get the most current version once they start listing it.)

1 Like

Thanks for sharing, and the CircuitPython is super awesome.

1 Like

Update: as of 1/17/2020, uf2 files are now available for the Seeeduino Xiao.

I see the pre-built UF2 file is available now. How do you get it to the XIAO device? Is there an arduino UF2 bootloader available or something similar?
Thanks all

@dgrover Thanks to sharing, CircuitPython is a great software.

1 Like

Thanks for sharing! Looking forward to more interesting discovery on Xiao~

Since nobody answered (and this forum seems to be the only source of reliable information), I thought I would share my experience after spending a couple of hours figuring this out.

You have to reset the board using the two pad reset button (as detailed on the wiki page), Then you download the UF2 file from Circuitpython.org and drag it onto the drive that appears on your computer (called “Arduino”).

Reset the board again and you should have a “CircuitPy” drive appear. Create a “main.py” file on there and you’re good to go!

2 Likes

Hey folks, since I couldn’t seem to find a basic and clear tutorial about installing CircuitPython on the seeeduino Xiao I wrote up a little guide for people that discover this little board in the future (and for me because I’ll probably forget).

Check out the guide to installing Circuit Python on Seeeduino Xiao here

3 Likes

Great stuff! Could you show circuit Python is use with various grove modules ?

Unfortunately, I don’t have any grove modules so I can’t really help with that!

Very much appreciated dgrover, this is just what I needed!

My work around to being able to use REPL on the Seeeduino XIAO has been to 1.) compile CircuitPython for the board with one modification, that of borrowing the USB_VID and USB_PID values from the SAMD 21 Mini (sparkfun_samd21_mini) board, and 2.) using the alpha version of Mu. I do note that the SAMD 21 Mini firmware works great although as mentioned the pins change order.

Specifically, I copy circuitpython\ports\atmel-samd\boards\seeeduino_xiao to another directory and compile that after changing the first two lines of ‘mpconfigboard.mk’ to that of the SAMD 21 Mini:
USB_VID = 0x1B4F
USB_PID = 0x8D22

If anyone was having trouble with @dgrover 's fix for Mu:

  • In the Mu application folder is the modes folder, containing the python files for each mode. If you can’t see it (such as the Windows installer version) try C:\Program Files\Mu\pkgs\mu\modes
  • Make a backup copy then edit the circuitpython.py file in your prefered text edit.
    • It might also be called adafruit.py depending on your installation version.
  • You will see a table of recognized devices. Copy an existing line and edit the description and Device ID.
    • If you are still new to Python, be cautious because the indent(spacing) starting each line is important.

There is a pull request to add this in Mu going forward.

This really was the thread that started it all wasn’t it?

I’m having one of those problems that usually means my problem is unique, my search terms are wrong, or I’m far less competent then I need to be.

So guys… I get what I’m supposed to do but I can’t ever see a drive letter in windows. This is on 3x XIAO boards and 3x Wio Lite MG126 Boards.

I’ve… posted in a few places today about this on threads that might be related but I can’t be sure…

Hi Criticalpoint,
I read your post but wasn’t sure what you were having trouble with. I think it’s easier to give advice if you post the problem in a concise and technical term.
What troubles are you having and what error messages are you getting when you do what on your Windows 10 and XIAO?