New user help with Trinket M0 project problems

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
Oup
 
Posts: 5
Joined: Sat Apr 17, 2021 9:03 am

New user help with Trinket M0 project problems

Post by Oup »

I am following the Guardian sword build project from https://learn.adafruit.com/breath-of-th ... d/overview and am using Trinket M0 with it. It is my first time using any of the components and my biggest 3D project so far.

I followed the guide to my best skills and the result is that I'm not able to get the NeoPixel to light up. It is my first time soldering in 15 years, so the result is not clean, but should be ok. Below are some points that my untrained eye can pick up in my setup.
  • The switch works and I get power to Trinket M0, thus I expect the Lipoly backpack to work ok too.
    Voltmeter shows current in the NeoPixel pads, so wiring should be ok to at least some extent
    I was not able to update CircuitPython to Trinket M0 as the .UF2 file size is 362MB and the M0 can hold onlt 7th the size of that. What am I missing there?
    I tried to use the demo code that was in Trinket M0 by default, but was not able to get response in NeoPixel. I would assume the demo not to need any setup changes in M0
Where should I look for mistakes next? Would that be the wiring and soldering as the demo code didn't work? Or am I missing something on the code side?

Any help is appreciated! If I posted this in the wrong site, please direct me to a more suitable location!

Thanks for your time to read this!

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

Re: New user help with Trinket M0 project problems

Post by dastels »

The TrinketM0 build of CircuitPython works fine. The UF2 is 362KB, not MB, and not all of that gets loaded into flash. Double-reset and copy the UF2 (from https://circuitpython.org/board/trinket_m0/) to TRINKETBOOT. CIRCUITPY should have about 45K left on it for your code.

It sounds like you have a connection problem, or the NeoPixels are connected to the wrong pin (i.e. not the one used in the software).

Can you post a clear photo of your soldering/connections?

Dave

User avatar
Oup
 
Posts: 5
Joined: Sat Apr 17, 2021 9:03 am

Re: New user help with Trinket M0 project problems

Post by Oup »

Thank you for your answer!

Ah yes, you are correct that the UF2 is KB, not MB, but it looks to me that the CIRCUITPY has only 59KB maximum capacity, so the 362KB is still too much for it. I feel like I am missing something big and obvious here..

Attached are pictures as I am able to share them
The connections
The connections
270969bd-92a6-4307-a2b2-f209e3ebcd09.jpg (181 KiB) Viewed 332 times
Soldering part 1
Soldering part 1
30ae9eae-f340-4a69-9924-845cae7b1811.jpg (170.94 KiB) Viewed 332 times
Soldering part 2
Soldering part 2
f21302eb-9308-4492-9c7e-7517856e3498.jpg (210.35 KiB) Viewed 332 times
Additional one coming in the next reply

User avatar
Oup
 
Posts: 5
Joined: Sat Apr 17, 2021 9:03 am

Re: New user help with Trinket M0 project problems

Post by Oup »

In the connections picture we tried to color code the connections a bit to clarify which goes where. The white wire is not the clearest one in this case

Also, the last soldering picture:
65c5547c-0637-4c4e-a559-6ca67bd94e14.jpg
65c5547c-0637-4c4e-a559-6ca67bd94e14.jpg (135.66 KiB) Viewed 332 times
Thank you for your time and help on this matter!

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

Re: New user help with Trinket M0 project problems

Post by dastels »

The soldering look ok.

You should power the NeoPixels from the 3v pin, not Bat, which is for power input.

Dave

User avatar
Oup
 
Posts: 5
Joined: Sat Apr 17, 2021 9:03 am

Re: New user help with Trinket M0 project problems

Post by Oup »

Thank you for your answer!

We changed the the connection as per your suggestion, but still get no activity from the NeoPixels. Voltmeter shows current in it correctly.

Any other suggestions for what to look for?

Br. Oup

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

Re: New user help with Trinket M0 project problems

Post by dastels »

Next step is to have a look at the code. Can you post it?

Dave

User avatar
Oup
 
Posts: 5
Joined: Sat Apr 17, 2021 9:03 am

Re: New user help with Trinket M0 project problems

Post by Oup »

The code I have in Main.py is from the guide:

# 3D_Printed_Guardian_Sword
# https://learn.adafruit.com/breath-of-th ... 3d-printed

import time

import board
import neopixel

pin = board.D4 # DIGITAL IO pin for NeoPixel OUTPUT from GEMMA
pixel_count = 93 # number of neopixels
delayval = .01 # 10 ms delay

APIXELS = 14 # number of first orange pixels
BPIXELS = 84 # number of blue pixels
CPIXELS = 93 # second orange pixels

# initialize neopixels
pixels = neopixel.NeoPixel(pin, pixel_count, brightness=1, auto_write=False)

while True:

# For the first 14 pixels, make them orange,
# starting from pixel number 0.
for i in range(0, APIXELS):
# Set Pixels to Orange Color
pixels = (255, 50, 0)
# This sends the updated pixel color to the hardware.
pixels.write()
# Delay for a period of time (in milliseconds).
time.sleep(delayval)

# Fill up 84 pixels with blue,
# starting with pixel number 14.
for i in range(APIXELS, BPIXELS):
# Set Pixels to Orange Color
pixels = (0, 250, 200)
# This sends the updated pixel color to the hardware.
pixels.write()
# Delay for a period of time (in milliseconds).
time.sleep(delayval)

# Fill up 9 pixels with orange,
# starting from pixel number 84.
for i in range(BPIXELS, CPIXELS):
# Set Pixels to Orange Color
pixels = (250, 50, 0)
# This sends the updated pixel color to the hardware.
pixels.write()
# Delay for a period of time (in milliseconds).
time.sleep(delayval)

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

Return to “Trinket ATTiny, Trinket M0”