Trinket Mo Beginner

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rbdopp
 
Posts: 14
Joined: Mon Mar 12, 2018 12:06 am

Trinket Mo Beginner

Post by rbdopp »

I have used the "Playground" and most recently several programs for the Raspberry Pi Pico (what a great board that is!). One is running a stepping motor very nicely. It uses only one digital output! So i want to miniaturize my system, so have a "Trinket MO" that is lighting an on-board LED in many colors (it came this way). I have no idea how to program it. Do I use Aduino? How can i see the resident program to give me a lesson as to writing my own?
Hope the question is not too naive.
Thanks,
Bob

User avatar
dastels
 
Posts: 15659
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket Mo Beginner

Post by dastels »

You can use either Arduino/C++, Makecode, or CircuitPython to program it (and others, but those are the main ones). See https://learn.adafruit.com/adafruit-tri ... on-arduino for the details.

When you plug in the USB cable, does a CIRCUITPY drive pop up on your computer? If so look in there for a file named code.py. That's the CircuitPython program that's running.

Dave

User avatar
rbdopp
 
Posts: 14
Joined: Mon Mar 12, 2018 12:06 am

Re: Trinket Mo Beginner

Post by rbdopp »

Thank you! Yes, the Trinket is in the Finder and I am moving forward!

User avatar
rbdopp
 
Posts: 14
Joined: Mon Mar 12, 2018 12:06 am

Re: Trinket Mo Beginner

Post by rbdopp »

My first trinket worked great controlling my stepping motor. Then i powered it on 12 volts (to pin "Bat") and it gave a puff of smoke and died. Oh well, so I bought two more. When I usb either of them into my iMac, the "CIRCUITPY drive" does not appear - in brand new Trinkets! In both, the green LED comes on and the red for a few seconds very dimly. Is there some sort of activation or bundle loading I need to do? I wonder why the first one behaved the way you suggested it should (with the drive appearing)?

As a side note, to make the stepping motor (on 16x mode, so 3200 poles) run at exactly 1 rpm (on a 24 hour test) required a 1.2% delay added to the sleep portion. It makes sense since the clock aint an atomic clock!

User avatar
dastels
 
Posts: 15659
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket Mo Beginner

Post by dastels »

Yes. From the pinouts section of the guide:
BAT - This is a voltage INPUT pin, you can use it to connect a battery or other external power to the Trinket. It has a Schottkey protection diode so it is completely separate from the USB power input/output. You can put 3V-6V into this pin and it will be regulated down by the 3V regulator
First, confirm that your USB cable is data and not just a charge/power cable.

Then try upgrading the bootloaders (See https://learn.adafruit.com/adafruit-tri ... 2929771-34) with the latest version from https://github.com/adafruit/uf2-samdx1/ ... ag/v3.13.0. Currently that will be bootloader-trinket_m0-v3.13.0.bin.

Dave

User avatar
rbdopp
 
Posts: 14
Joined: Mon Mar 12, 2018 12:06 am

Re: Trinket Mo Beginner

Post by rbdopp »

Dear Dave,

I REALLY appreciate you helping me on this.

In the 80’s and 90’s I was a high-powered programmer in Assembly, Pascal and then in Basic structured like Pascal with subroutines in Machine language for voltages, times and curser locations at RAYOVAC in Madison WI. Then I stopped programming.... I am getting back into it and loving it (and frustrates by it). We are two old-farts with 7 Macs and 2 Windows machines (for the Lab, which needs Windows for the equipment). This new hobby of Trinkets, Pico’s and the like is very exciting and also somewhat frustrating. I will let you know how it goes.

Appreciatively,
Bob

User avatar
rbdopp
 
Posts: 14
Joined: Mon Mar 12, 2018 12:06 am

Re: Trinket Mo Beginner

Post by rbdopp »

Evening Dave,

I checked my USB’s and they are data ready. I used my Kindle and could see the directory in it from the cable.

I tried the link, but without “seeing” the device, no new upgrade could be loaded.

Since the first Trinket worked as you told me to see the drive on my finder, I wonder if these two are somehow faulty. When I plug them in, the green LED light goes on immediately, the red LED is dim for about half a second, then there are 23 bright red LED blinks. After that, only the green Led is lighted. Is that a clue?
Perhaps these are defective Trinkets. Who knows who I purchased them from on Amazon.

The clock runs perfectly! Is a bit noisy, but so cool.

Smiling,
Bob

User avatar
rbdopp
 
Posts: 14
Joined: Mon Mar 12, 2018 12:06 am

Re: Trinket Mo Beginner

Post by rbdopp »

I hate to be a pest... but i just can not figure out how to load the “USBtinyISP” on my trinket. In Arduino, it is not listed in the "tools/board" set. I know know what the flashing means (slapping my forehead) so can get in boot loading mode, but is there another way to load the USBtinyISP?

User avatar
rbdopp
 
Posts: 14
Joined: Mon Mar 12, 2018 12:06 am

Re: Trinket Mo Beginner

Post by rbdopp »

Problem understood. Item is obsolete since 2014. Ain't ever gonna work. Loved the tiny size. Shoot.

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

Return to “Trinket ATTiny, Trinket M0”