Trinket M0 MakeCode Console

This is a special forum devoted to educators using Adafruit and Arduino products for teaching.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
_david_f
 
Posts: 11
Joined: Sun Aug 14, 2022 12:05 pm

Trinket M0 MakeCode Console

Post by _david_f »

Hi there,

I am preparing a workshop for the local university and am planning to use the Trinket M0 with maker.makecode.com.
In my test I couldn't get the "show data device" option, which opens the console, reliably.
Sometimes it would appear, but most of the times it wouldn't.
The webUSB connection works in so far, that I can pair the device and transfer the file directly to it without any problems.

I tried it with a PC (Windows 10, newest chrome browser) and a MacBook (also with the newest chrome browser).
I followed the instructions here, including updating the bootloader: learn.adafruit.com/makecode/webusb

Since the students will have to work with different sensor, it is quite essential to have a working console...
Is there anything I can try to make it work?

Best wishes,
David

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Trinket M0 MakeCode Console

Post by mikeysklar »

David,

Have you tried using a powered USB 2.x hub? I know you have a working USB connection, but we have had threads in the forums about different configurations to bring up a reliable console. Some USB 3 configurations or under powered USB ports seemed problematic.

User avatar
_david_f
 
Posts: 11
Joined: Sun Aug 14, 2022 12:05 pm

Re: Trinket M0 MakeCode Console

Post by _david_f »

Hi mikeysklar,

thank you for your help.
On Windows I figured out how to get it working:

1. Connect and pair USB device
2. Upload code that prints to console
3. Connect and pair again (there is a new USB device showing up)
4. Now the “show data device” option shows up

On Mac I haven’t found a solution and would be very happy for any help!

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Trinket M0 MakeCode Console

Post by mikeysklar »

There is a little comment on a BBC:microbit MakeCode page that might be relevant to try on MacOS:
You can also try reseting the connection in MakeCode by removing the pairing in the browser and reloading the page. You will then need to pair again using the Download button
https://support.microbit.org/support/so ... leshooting

User avatar
_david_f
 
Posts: 11
Joined: Sun Aug 14, 2022 12:05 pm

Re: Trinket M0 MakeCode Console

Post by _david_f »

Unfortunately this didn't work either :(

As a workaround I wanted to use the terminal to print out the console, but the serial port only appears in bootloader mode.
When the code is running the serial port disappears.
This seems related to this viewtopic.php?p=855981&hilit=console#p855981

Is there no way of using the usb serial connection with makecode?

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Trinket M0 MakeCode Console

Post by mikeysklar »

It might be necessary to create a new issue that is MacOS specific.

It looks like the changes suggested in this issue on the pxt-adafruit github repo have been incorporated, but maybe it will be of some value to try the suggestions if they are still valid:

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

After you get to that URL page then click IMPORT and put in this URL share link: https://makecode.com/_4dER7s9CcT9s

Then plug in your CPX and click the gear icon upper right and click "Pair device" and see if that consistently shows the console device output to your computer screen. Let me know if it does not work for you.
https://github.com/microsoft/pxt-adafruit/issues/991

User avatar
_david_f
 
Posts: 11
Joined: Sun Aug 14, 2022 12:05 pm

Re: Trinket M0 MakeCode Console

Post by _david_f »

Thanks mikeysklar, in the end I just bought a couple of USB-TTL converters.
A bit more to setup, but it is working reliably.

Cheers, David

Locked
Please be positive and constructive with your questions and comments.

Return to “For Educators”