0

Web USB on Trinket
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Web USB on Trinket

by tinkeringtech on Tue Feb 13, 2018 12:23 am

Hi,

Is there a special bootloader that's needed to play around with web USB (i.e with the web USB descriptor exposed) on the Trinket M0?
Or is this something with the .uf2?

Thanks.

tinkeringtech
 
Posts: 77
Joined: Wed Nov 23, 2011 10:08 pm

Re: Web USB on Trinket

by danhalbert on Sat Feb 17, 2018 12:26 pm

(Answered in chat)

danhalbert
 
Posts: 997
Joined: Tue Aug 08, 2017 12:37 pm

Re: Web USB on Trinket

by tinkeringtech on Sun Feb 18, 2018 10:48 pm

Hi,

Thanks to Dan's assistance, I managed to get the Trinket M0 to work with webusb on makecode.

I re-built the Trinket M0 bootloader that has webusb support by cloning https://github.com/adafruit/uf2-samd21 and do make BOARD=trinket_m0
Then just drag the generated update-bootloader-trinket_m0-v1.23.1-adafruit.2-22-gae5806e.uf2 to the Trinket M0 in windows (via USB) and that updated the bootloader.

I then went to the Beta makecode webpage and paired the board.
trinket_paired.JPG
trinket_paired.JPG (51.88 KiB) Viewed 126 times

https://makecode.adafruit.com/beta?webusb=1#editor

Ran a test sketch with a 12 neopixel ring and it worked!
The pin mapping needs to be adjusted slightly as pin A2 on CPX = A4 on Trinket M0
makecode_trinketm0.JPG
makecode_trinketm0.JPG (62.73 KiB) Viewed 126 times


Pretty cool to see other boards coming into the webusb fold.

tinkeringtech
 
Posts: 77
Joined: Wed Nov 23, 2011 10:08 pm

Please be positive and constructive with your questions and comments.