Tutorial  Updated

How To Flash The Trinket M0 Using Arduino

Arduino Setup For Use With The Trinket M0 Switch D-I-Y Dongle..

Step 1)

Install The Arduino-1.8.5 Software & Adafruit_Drivers_2.2.0.0

Step 2)

Once Both Are Installed Run The Arduino Software & Goto Flies,Scroll Down To Preferences Tab, Settings Pops Up Go Down To Additional Boards Manager URLs And Click The Box On The Right Of The Blank Space.

1.jpg
2.jpg
boards manager url.jpg


Step 3)

The Additional Boards Manager URL Box Will Pop Up, Now Copy & Paste This URL Into The Box, (CTRL+V) To Paste https://adafruit.github.io/arduino-board-index/package_adafruit_index.json Into The Box Then Press Ok & Ok Again.

4.jpg
3.jpg


Step 4)

Now Goto The Tools Tab & Scroll to Board & Select Board Manager Once The Board Manager Pops Up, Type Trinket In The Search Bar Then Click On Adafruit SAMD Boards by Adafruit & Click On Install, Once The Install Has Completed Then Click On The Close Tab.

tools.jpg

board manager.jpg

type trinket.jpg

install trinket.jpg
installed.jpg


Step 5)

Now Close Arduino Software & Goto C:\Program Files (x86)\Arduino\examples Folder & Place The 12.Nintendo_Switch_Fusee_Launcher Folder Into The Examples Folder,Once Thats Done You Can Close Everything.

examples folder.jpg
flash files.jpg


Step 6)
Now Your All Set To Flash Any One Of The Payloads To The Trinket M0 Dongle, So Restart The Arduino Software & Goto Tools Then Scroll Down To Board & Locate The Adafruit Trinket M0 Board & Select It, You Should See Adafruit Trinket M0 on Com4 or A Different Number Com Port In Bottom Right Corner.

tools.jpg
select trinket M0.jpg


Step 7)
Now Plug In Your Trinket M0 Then Goto Tools Again & Scroll Down To Port & Select The Port That The Trinket M0 Is Contected To, If Unsure Then Goto Device Manager Then Ports(COM & LPT) & It'll Show The Trinket M0 & COM Number It's Connected To.

select port.jpg


Step 8)
Now Goto File & Scroll Down To Examples Then Scroll To 12.Nintendo_Switch_Fusee_Launcher & Select One Of The Payloads You Want To Flash To The Trinket.

select the flash file.jpg


Step 9)
Now The Payload Of Your Choice Pops Up & Your Ready To Go.

loaded flash.jpg


Step 10)
You Want To Compile The Sketch Ready To Flash & Make Sure No Issues Before You Flash, Just Click On The Tick.

verify.jpg


Step 11)
Now Compiling Is Done Your Ready To Flash To The Trinket M0, So Click On The Arrow Tab To Upload To The Trinket & Wait For The Flash To Complete, You Should See Upload Done Message Once That Is Shown Then You Can Remove The Trinket From Your Pc Or Laptop.

done compiling.jpg
upload.jpg


Final Step)
If All Went Well Then Your Ready To Use Your New D-I-Y Trinket M0 Dongle.
Make Sure You Have The Correct Sd Card Files For The Payload That You Flashed To The Trinket.


If You Get This Error When Trying To Upload Your Payload File.

java.io.IOException: Cannot run program "{runtime.tools.bossac-1.7.0.path}/bossac": CreateProcess error=2, The system cannot find the file specified

Then This Is The Fix For The Error
Goto Tools Scroll To Boards Then Select Board Manager And Type Arduino SAMD Into The Search Bar.

error.jpg


Then Once Installed Click The Close Tab,Now You Can Upload Your Payload File.

Think That Covers Everythig.

Edit..

Updated Payload INO Files These Are Now All In One, So You Enable The Payload You WantTo Use, And Disable The 3 You Don't Want To Use.

the only UF2 d&d files are for the multi payload gemma/trinket and itsybitsy UF2 File has not been tested as of yet as I don't have one to hand.

gemma/trinket and itsybitsy files are for dongle only at moment as.

pad A0 = payload change on gemma and itsybitsy.

pad 1 = payload change on the trinket.

the multi can only have 3 payloads enabled due to flash on the trinket/gemma & itsybitsy flash not being big enough.

red = sxos
white = hekate
blue = ReiNX

demo of the multi payload on my trinket.



demo if multi payload working.




ReiNX
RajNX
SXOS
Hekate 4.0

have revamped ino to all in one code

just enable the payload you wish to use. and disable the other 3.

like in the image sx os is enabled and the others are disabled.


Trinket All In One.jpg
 

Attachments

  • all in one payload ino files.zip
    1.7 MB · Views: 709
Last edited by M-O-B, , Reason: Updated Files.

DollyWhipDoll

Royalty & Unbothered. LMFAO!!! ;)
Member
Joined
May 18, 2018
Messages
451
Trophies
0
XP
991
Country
United States

So, with your tutorial in the OP, all I need is a Trinket M0 and a USB battery? I see those CR2032 Lily pad things on eBay for around $1, but I'm going to wait on the soldering.

Trying to decide between a WiFi 3G dongle or the Trinket.

Which do you think is quicker? I think I'll get both, eventually.
 

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
So, with your tutorial in the OP, all I need is a Trinket M0 and a USB battery? I see those CR2032 Lily pad things on eBay for around $1, but I'm going to wait on the soldering.

Trying to decide between a WiFi 3G dongle or the Trinket.

Which do you think is quicker? I think I'll get both, eventually.

i like the trinket it's small but the soldering maybe a bit tricky for some, so the WiFi dongle would be best for some, it's really down to the individual tbh.
 
  • Like
Reactions: DollyWhipDoll

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
updated op with files that work on the dongle and install method, only hekate ctcaer 3.0 & SXSO as that's probably all that's needed really.
 

link42586

Well-Known Member
Member
Joined
May 9, 2018
Messages
321
Trophies
0
Age
38
XP
1,184
Country
United States
I like your implimentation of this with the colors telling you what's going on as it's happening...But it takes A second or two to launch the payloads...Is it possible to lower the timings of the delivery to near instant like this guys but with all the colors still. I wouldn't go back and redo the ones u already have or anything like that...but maybe if u feel like it or something shorten the time it takes in the future like this other one. Stupid request but THE COLORS!!

guy with really short timings.
https://gbatemp.net/threads/trinket-m0-sx-loader.508068/
 

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
I like your implimentation of this with the colors telling you what's going on as it's happening...But it takes A second or two to launch the payloads...Is it possible to lower the timings of the delivery to near instant like this guys but with all the colors still. I wouldn't go back and redo the ones u already have or anything like that...but maybe if u feel like it or something shorten the time it takes in the future like this other one. Stupid request but THE COLORS!!

guy with really short timings.
https://gbatemp.net/threads/trinket-m0-sx-loader.508068/

couple of videos in the thread ave a look and see if they boot to how you like.

do what you like with the codes, they ain't mine they come from the same source really, just the compiling of them is all I did.

https://gbatemp.net/threads/trinket-internal-install.509633/page-7
 

link42586

Well-Known Member
Member
Joined
May 9, 2018
Messages
321
Trophies
0
Age
38
XP
1,184
Country
United States
I was thinking about compiling it myself but man idk..i tried using python to convert stuff over to .h to compile and flash but it's too much to learn if someone already provides builds of it u know. but yeah either way I like yours the other guys is near instant but no colors to show u what's going on. but in a way with the instant-ness of his the colors are kinda pointless i guess. Either way pls keep updating the builds as I gave up A few hours into trying to figure out how to use python to convert the stuff for compiling with this...it's crazy
 

link42586

Well-Known Member
Member
Joined
May 9, 2018
Messages
321
Trophies
0
Age
38
XP
1,184
Country
United States
I went with A dongle as idk if my soldering skill is up to par with internal. I just soldered two header pins onto it to disconnect the battery when needed and have A short 6in usb-c to micro-b cable and A small drone battery I had layin around for power. Works great but the battery needs something to keep it in place but even if it flops around what's it matter i guess. internal/external either way I like the m0 trinket. Also so my brother can use it as well & not just me. But either way thx for the updated payload.
 

link42586

Well-Known Member
Member
Joined
May 9, 2018
Messages
321
Trophies
0
Age
38
XP
1,184
Country
United States
If I put an on/off switch onto the trinket does it need more code for that to work? Or can I put it in between the battery so it just cuts the battery on/off. Not sure how that all works.
 

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
If I put an on/off switch onto the trinket does it need more code for that to work? Or can I put it in between the battery so it just cuts the battery on/off. Not sure how that all works.

put a tactile switch between the gnd on the trinket and gnd wire on the battery then you can press to activate the trinket when you want to send the payload. then release once in rcm mode.

nothing needs to be done with the code for that
 

Cosmic_Link

Well-Known Member
Member
Joined
Jun 9, 2010
Messages
113
Trophies
0
Age
34
XP
1,676
Country
United Kingdom
Thanks for the tutorial. Please can you advise what to do when met with this error. I have followed everything to the T up until compiling and I get this error. It's a clean install of Arduino. Using Arduino 1.8.5 on Windows 10 64-bit. Have also tried on Ubuntu and get the same error. :S Thanks in advance for your help. :)

10oh45j.jpg
 
Last edited by Cosmic_Link,

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
Thanks for the tutorial. Please can you advise what to do when met with this error. I have followed everything to the T up until compiling and I get this error. It's a clean install of Arduino. Using Arduino 1.8.5 on Windows 10 64-bit. Have also tried on Ubuntu and get the same error. :S Thanks in advance for your help. :)

10oh45j.jpg

yeah you need the adafruit dotstar folder in your arduino libraries.

I'll upload it for you and add it to this post shortly

EDIT

ok extract the adafruit dotstar folder to
documents\arduino\libraries

then start the arduino software again then try and it should be fine
 

Attachments

  • Adafruit_DotStar.zip
    24.9 KB · Views: 1
Last edited by M-O-B,
  • Like
Reactions: Cosmic_Link

Cosmic_Link

Well-Known Member
Member
Joined
Jun 9, 2010
Messages
113
Trophies
0
Age
34
XP
1,676
Country
United Kingdom
yeah you need the adafruit dotstar folder in your arduino libraries.

I'll upload it for you and add it to this post shortly

EDIT

ok extract the adafruit dotstar folder to
documents\arduino\libraries

then start the arduino software again then try and it should be fine

Nice one mate. :) Worked a treat. Thank you very much for your help and prompt reply. :yay:
 
  • Like
Reactions: M-O-B

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
Can we update the payload after install inside the switch?

yes you can update with a different payload once installed into the switch.

double press the reset button then either use the arduino software to upload a new payload sketch, or drag and drop the CURRENT.UF2 file onto the root of trinketboot once it pops up on screen.

drag and drop is the easiest way as you only need to install the drivers for the trinket.
 
  • Like
Reactions: Thetoto

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Veho @ Veho: https://i.imgur.com/bG1pQld.mp4 +1