#circuitpython-dev

1 messages Β· Page 119 of 1

tidal kiln
#

that code shouldn't break the world

idle owl
#

Right?

tidal kiln
#

@idle owl let's make sure all else is same. what cp version? what bootloader version (in case that matters)? anything else, like bundle details?

idle owl
#

I used the neopixel.py that you guys linked yesterday (after trying the .mpy). CP: Adafruit CircuitPython 3.0.0-alpha.0-153-gb6587b3 on 2017-11-01; Metro M4 Express with samd51j19. Bootloader: UF2 Bootloader v1.23.0-14-g3db9182 SFHR

#

That's the CP build that Scott posted yesterday.

#

I built one myself as well, tried it, same issues. (Should have been the same build anyway, but it was worth trying)

tidal kiln
#

k. that's all same for me.

idle owl
#

Ok nice

tidal kiln
#

renamed to main.py. copied over. soft reboot from repl. got blue neopixel.

slender iron
#

@tulip sleet your log looks like msc is messing up too

#

endpoints 3 and 4 are mass storage

tulip sleet
#

I think the msc problems are causing the cdc problems. If I turn off msc, it's ok.

slender iron
#

yup, I agree

#

I'm checking clocks now

tidal kiln
#

ctrl-c gets me to repl. ctrl-d to soft reboot and back to blue neo. can repeat this many times. @idle owl is there something i should do to break it?

idle owl
#

I made it my main.py, I ejected and reset the board, plugged it back in and it broke. What OS are you on and what USB type?

tidal kiln
#

linux, 2.0

idle owl
#

Because Windows USB2 would finally work. But MacOS USB3 and Windows USB3 refused.

#

USB2.0 played nice.

tidal kiln
#

but then you had a 2.0 issue? (reading scroll back)

idle owl
#

I have an old Thinkpad running Linux here somewhere. I should spin it up. No idea when I last did that, so there'll be a bunch to update there. I only have Pi0Ws, so no way I'm going to try to use RPi.

#

Yeah that was a first. Took resetting a few times, then it was fine.

tidal kiln
#

hmm. i ejected / reconnected. got blue neo. dmesg all looks good. a serial term was created and i can attach via screen. but i can't ctrl-c to stop main.py.

#

i think this is something known?

idle owl
#

I thought so yes, I also thought it had been addressed. I still run into it intermittently though.

#

But with this issue, if it connected via serial, I could interact with it.

tidal kiln
#

hmmm. yeah. it's not happy now.

idle owl
#

It just didn't stay connected for very long, regardless of whether it was running main.py or in the REPL

tidal kiln
#

you had a time.sleep() in your blinky?

idle owl
#

Yes.

#

Want me to post that file?

tidal kiln
#

could be the no delay infinite loop

idle owl
#

Um... no I don't actually. I had it in blinky, yes

#

But I took it out of the combined code because the rainbow animation slowed blinky down considerably.

#

time.sleep is commented out.

#

So there's no delay in the combined code.

tidal kiln
#

yah, post that code

idle owl
tidal kiln
#

meanwhile....folder showed up, tried to delete main.py. didn't work. got this in dmesg:

[1288442.325489] FAT-fs (sdb): unable to read boot sector to mark fs as dirty
slender iron
#

anybody try it without -flto as a compilation option?

idle owl
#

When I was running it, I had a NeoPixel RGB strip plugged into D12, the ground above D13, and the 5V on the opposite side.

#

@slender iron I don't know what you're referring to.

#

If that question was aimed at me anyway.

slender iron
#

-flto is an option we turn on for non-debug builds

#

did you do DEBUG=1 when you built it yourself?

idle owl
#

I did yes.

slender iron
#

ah interesting

#

so the problem exists there too

idle owl
#

But I'm currently running the build you posted yesterday.

#

Both my debug build and the one you posted had the same issue.

tidal kiln
#

getting various message about the fs not being happy

[1288813.162825] sd 6:0:0:0: [sdb] Asking for cache data failed
[1288813.162832] sd 6:0:0:0: [sdb] Assuming drive cache: write through
#

but still getting a blue led each time

slender iron
#

thats normal

tidal kiln
#

it does mount a CIRCUITPY folder on reset, but it's not responsive

#

still can't ctril-c the repl

idle owl
#

So.... The take away from this is I should definitely file an issue?

slender iron
#

nah, I'm on it

#

I suspect the clock

idle owl
#

Ah. Even better.

slender iron
#

its definitely not you πŸ˜ƒ

idle owl
#

Excellent! πŸ˜„

tidal kiln
#

@slender iron jump in if you want me try something specific

slender iron
#

I think we're having varied success due to our different hardware

tidal kiln
#

so...@idle owl , how do i recover?

manic glacierBOT
idle owl
#

@tidal kiln I plugged it into a USB2 port on my Windows machine, CIRCUITPY came up, I renamed the main.py to something else through Explorer, and it was fine.

#

That's the only way I recovered from it.

#

I don't have Linux up to test if it would also have come up there for renaming.

tidal kiln
#

plugged into a 2nd linux box. took several seconds for CIRCUITPY to show up. when it did, it's unresponsive.

idle owl
#

That's what I was worried would happen. I could get to the bootloader fine, but reflashing CP did nothing to change the behavior. If it hadn't worked on Windows, I think my only option was to reflash the bootloader completely to erase it.

tulip sleet
#

@tidal kiln I find that if I click CIRCUITPY in the Nautilus (or other file manager) window, things wake up sometimes. Or at least CIRCUITPY shows up in /media/<user>/CIRCUITPY

idle owl
#

But it looks like there'll be a new version of CP here in a minute, so maybe wait and try to flash that?

slender iron
#

I don't think the usb clock recovery is being set up on the 51

tidal kiln
#

@tulip sleet yep. been trying that in the gui file manager. no luck. haven't tried via cli yet.

#

ohhhh. part of the crystal-less operation?

slender iron
#

yup

tidal kiln
#

hmmm

#

no problem getting back to bootloader though

idle owl
#

Same for me.

tulip sleet
#

maybe on 21 too?? or my probs are different? Similar symptoms. All my work has been on 21

slender iron
#

may be the same

tidal kiln
#

could try. doesn't need to be a metro, right? just an m0

manic glacierBOT
#

I think then you start thinking about watchpoints, tracing, single stepping, and the like. And that will need far more invasive changes. Certainly doable, but might not be in line with a simple, educational environment.

My goal is to be able to drop in a debugger() or breakpoint() (Smalltalk used halt() ) function call and let you poke around the local environment, possibly peek into different frames on the stack. I'd also like to support passing an boolean expression to debugger() (or ...

tidal kiln
#

hmmm. can i bossac -e this thing?

slender iron
#

@idle owl are you using the UF2 bootloader?

idle owl
#

@slender iron Yes

tulip sleet
#

@tidal kiln you can build it for non-metro-M0

tidal kiln
#

@tulip sleet build bossac?

tulip sleet
#

@tidal kiln I don't see why need a new bossac for non-m4

#

do you mean you need to build it? You can swipe it out of arduino tree

tidal kiln
#

what were you asking about building?

tulip sleet
#

your 6:06pm msg: I thought you were asking if you could test 3.0 on non-metro.

tidal kiln
#

oh. no. was wondering if kattni's main.py would cause same issue on M0's.

tulip sleet
#

ok - i was out of the loop on that! was associating it with the conv scott and I were having

tidal kiln
#

ha! maybe i was out of loop also.

tulip sleet
#

➿ β™» 😁

slender iron
#

I remember how I tested the clocks! pwm

tulip sleet
#

raise NotImplementedError

#

off for dinner!

idle owl
#

@tulip sleet Have a tasty one!

slender iron
#

bye @tulip sleet

#

I fixed the clocks for realz last time when could hear the difference in a buzzer

idle owl
#

You know it's legit when there's a z involved.

slender iron
#

πŸ˜‰

idle owl
#

@slender iron Let me know when you have a build to test since I have a consistent way to break it.

slender iron
#

you are optimistic on the timeline

idle owl
#

Fair enough. I never know when you're going to make tiny tweaks that need testing along the way.

formal plover
#

Wait, is 3.0 done?

slender iron
#

yeah, I was hoping it was like that but I'm gonna get a timer going to pwm out

#

(β•―Β°β–‘Β°οΌ‰β•―οΈ΅ ┻━┻

formal plover
#

Lolololol

#

Hahaha sorry @slender iron I had to

slender iron
#

no problem πŸ˜ƒ

#

not often I have to power cycle the jlink

manic glacierBOT
slender iron
#

loading new bins when the cpu is 32khz is sllloooooowwww

idle owl
#

For sure

tidal kiln
#

well, jlink can't halt the cpu

idle owl
#

Hmm. I haven't run into that in a while. Though I haven't tried since we got the last bootloader going.

slender iron
#

I believe I just fixed that

#

where you can only connect jlink during the bootloader

tidal kiln
#

does going into bootloader require a data usb connection?

idle owl
#

Doesn't for me...

#

I have it plugged in only to a wall plug and it went into the bootloader.

tidal kiln
#

red neopixel?

idle owl
#

Yeah because the bootloader doesn't have a USB connection. Turns green when it is connected to computer.

tidal kiln
#

yep

#

was jlink also connected?

idle owl
#

No. Should I try that?

tidal kiln
#

no. that's what i'm trying though.

idle owl
#

Ok

tidal kiln
#

trying to recover 😰

#

seemed to matter.

#

couldn't double reset into bootloader with jlink connected

idle owl
#

Oh... yeah, no... Jlink hates doubletap reset apparently. I forgot about that.

#

But did you try it connected but unplugged from USB?

tidal kiln
#

yeah

#

unplug jlink

#

double reset. red neo. connect jlink. all good.

#

erase!

idle owl
#

Ooh!

tidal kiln
#

sorry, felt like the only way to get rid of your blue neopixel program of pwn-age was to nuke from orbit.

idle owl
#

I'm pretty sure you're right.

#

I was certain that was the next step for me too, but I didn't want to nuke it until Scott said he didn't need it tested anymore.

tidal kiln
#

and i'm back.

idle owl
#

Yay!

tidal kiln
#

can probably recreate all this though.

#

i'm back to where i was and all i did was run your program from here

#

so allthelights.py doesn't create the issue?

idle owl
#

Nope.

manic glacierBOT
#

I'll probably explicitly NOT support using def in the debug repl. Expressions, yes. Assignment to in-scope variables, yes with a warning that it might mess things up. I'd like to support looking at variables in prior stack frames. I'm not sure how that would look yet... but that's not for a while. The next step is just to get local variable (and parameter) references working.

idle owl
#

Didn't for me anyway. Once I had to reset a couple of times to get it to mount, but that was it. And I kept removing it and plugging it back in to be sure. Both with 9V power connected and without it.

tidal kiln
#

maybe the additional math and what not prevent it from totally locking up

#

pixel.show() doesn't do much but call neopixel_write(), which is low-level

idle owl
#

Which isn't needed anyway because it defaults to auto_write or whatever it's called

#

Commented both out and it still works.

tidal kiln
#

good point. so you were doubly calling it.

#

oh. you're in allthelights

idle owl
#

Yes.

tidal kiln
#

the other one is essentially calling neopixel_write() as fast as possible, forever

idle owl
#

So I took out pixels.show and the while loop, and it hasn't locked up, but it's also not running. Pixel is pulsing green.

#

Adding pixels.show back didn't make it work.

#

So I guess it needs the loop?

tidal kiln
#

which program?

idle owl
#

The single neopixel one. np0.py renamed to main.py

#

About to save it again with the loop

tidal kiln
#

shouldn't need loop

idle owl
#

Blue.

#

Only works with the loop.

#

And it's not mounting. πŸ˜ƒ

tidal kiln
#

hmmm. just tested in repl.

#

without loop

#
Adafruit CircuitPython 3.0.0-alpha.0-153-gb6587b3 on 2017-11-01; Metro M4 Express with samd51j19
>>> import neopixel
>>> import board
>>> pixels = neopixel.NeoPixel(board.NEOPIXEL, 1)
>>> pixels[0] = (0,0,50)
>>>
#

get blue neopixel

idle owl
#

I got it back up, changed the file to not have the loop, it mounts fine, but it's not running.

tidal kiln
#

try repl?

idle owl
#

Works.

#

Also how do you tell the markdown what kind of code you have so it colors it?

tidal kiln
#

add it after the first set of ticks

idle owl
#

Ahh ok

#

Thanks

slender iron
#

@idle owl or @tidal kiln do you have saleae or oscilloscope?

tidal kiln
#

both

slender iron
#

k what format do you need to flash a test build?

idle owl
#

I don't know, I don't think so. There might be one here that I don't know about though.

manic glacierBOT
slender iron
#

we'll see what carter gets first

tidal kiln
#

you'd probably know if you had a scope, the saleae is a tiny little black brick that can easily be overlooked

idle owl
#

Agreed about knowing if we had a scope.

tidal kiln
#

@slender iron i've been using jlink and .bin for bootloader, the uf2 after that

slender iron
#

can you measure the frequency on D7 with that?

#

I'm using my saleae

tidal kiln
#

i'll use same, easier for something like that

slender iron
#

yup

tidal kiln
#

what is that file?

slender iron
#

metro m4 express test build

#

uf2

tidal kiln
#

can just drag it over?

slender iron
#

outputs a pwm signal on D7

#

to the bootloader yes

tidal kiln
#

like with the cp uf2's

slender iron
#

yeah, its circuitpython

#

with the D7 output

tidal kiln
#

ah. ok. getting my nomenclature in order.
bootloader = bootloader
firmware = whatever after that (ex: circuitpython)

idle owl
#

We do not have a saleae.

tidal kiln
#

(edit) oh. you said not. sorry.

slender iron
#

get it going?

tidal kiln
#

still setting up....

slender iron
#

kk

tidal kiln
#

oh yeah, gray is gnd.

idle owl
#

Wow. No wonder we don't have one sitting around. Looked up pricing, heh. OH... I just realised why it seemed familiar. My friend brought one home from work a few times.

tidal kiln
#

and still getting used to newew interface

#

242.4 kHz

slender iron
#

ah interesting

#

mines 239.2 - 239.8

tidal kiln
#

how'd you measure the small variance?

slender iron
#

just scanned across the waveform

#

with my mouse

tidal kiln
#

did same, not finding any variance here

slender iron
#

my guess is that dan and kattni's is further off

#

kk

tidal kiln
#

what version of logic sw are you using?

slender iron
#

now I want to get the same thing going on the m0

#

1.2.10

tidal kiln
#

i just installed latest (1.2.14) on this machine recently

#

was using something some years older prior

manic glacierBOT
tidal kiln
#

they really buried stuff in the interface, i can't even figure out how to change the sample settings

slender iron
#

I'll update mine

tidal kiln
#

or not

#

oh. there it is. really? it's the weird scroll bar like button next to start.

#

ok. was at 16 MS/s. good enough for these frequencies.

slender iron
#

πŸ‘ now I wanna check my M0

tidal kiln
#

@idle owl yeah, the current line up of saleae look spendy 😒 didn't realize they had gotten so $$. pretty sure my logic 8 was around $100 when i got it several years ago.

idle owl
#

@tidal kiln That makes sense.

tidal kiln
#

it maxes out at 24 MS/s, but never had an issue with that.

#

pretty sure i've used more than 4 channels a few times though

idle owl
#

First glance, logic 8 is 219$ now. Logic 4 is 109. Oi. Pretty big difference from yours.

tidal kiln
#

yeah, that's an evil price point on that logic 8

idle owl
#

Yeah that's the first thing that came up when I searched for it.

slender iron
#

I was thinking about getting a pro....

tidal kiln
#

need the speed?

slender iron
#

yeah, thinking so

#

ok so the M0 clock looks ok

#

it was ~235k until I turned on USB and then it was ~240khz

tidal kiln
#

@slender iron i did find a few 238.8 kHz pulses

slender iron
#

k, just realized I have a second m4 too

#

gonna test it now

#

m0 hardfaulted...

tidal kiln
#

is there any kind of analyzer that will provide the range of freq in the sample?

slender iron
#

not that I know of. saleae is scriptable though

tidal kiln
slender iron
#

my second m4 is 239.8khz

tidal kiln
#

does pulse width, not freq

slender iron
#

I see average frequency

tidal kiln
#

yep.

#

but figured you'd be more interested in min/max

slender iron
#

I'll take what I can get

tidal kiln
#

my sample has 2us - 2.125us

slender iron
#

I'm looking for something like the m0 where its 235 on average

#

ok, this works

#

my first m4 that occasionally has trouble is 239.3 on average

#

whats your frequency average carter?

tidal kiln
#

my avg freq is 240

slender iron
#

hrm

#

and have you reproed the issue?

tidal kiln
#

what're you using for sample rate and duration?

slender iron
#

100MS/s and 1 second

tidal kiln
#

100? 😒

slender iron
#

yeah, the pro is 500

tidal kiln
#

i'll set mine to 24 at least....

slender iron
#

it shouldn't matter if its detecting edges anyway right?

tidal kiln
#

yeah. and i think we're well above any nyquist issue

#

yep. still 240 kHz avg.

slender iron
#

is usb plugged in?

tidal kiln
#

it is

#

has been all along

slender iron
#

mines 239.5 with usb

tidal kiln
#

want me to test some other way?

slender iron
#

nah, I don't think yours is set up to try and adjust to the usb clock

tidal kiln
#

k. later.

slender iron
#

thanks for the help!

idle owl
#

@slender iron Great work!

tidal kiln
#

np. ping me when you want to continue, if you need testers.

idle owl
#

Same if it's not Saleae stuff.

slender iron
#

thanks!

idle owl
#

@tidal kiln Thanks for testing my death code.

tidal kiln
#

ha. np. thanks for writing it.

tidal kiln
#

@slender iron yes. recreated the issue. (didn't see the question previously)
unplugging USB and plugging it back in seems to be key
when main.py (containing code of death) is first dragged over, get blue neopixel, REPL continues to behave, all seems normal, etc.
unplug / replug USB, get blue neopixel, and unhappy everything from there on out.

#

and now i get to jlink this thing again...

idle owl
#

Oh no.... lol

tidal kiln
#

iz good practice πŸ˜ƒ

idle owl
#

Valid πŸ˜„

tidal kiln
#

see. quicker the second time. already done.

idle owl
#

Nice!

#

I think the reason it works in the REPL without the loop is that it's sending the one piece of information and the NeoPixel isn't changing. Without the loop in the main.py, it turns blue for the duration of running the entire main.py once, so it flashes blue really fast, and then goes to happy pulsing green.

#

The program deinits the pin, but the REPL doesn't until it's reset.

#

Or something like that. I don't know that my terminology is correct.

#

But the concept is correct. I tested it with a finite for loop. It turns blue for the duration of the loop.

tidal kiln
#

i think you are correct

#

i tested it by adding a time.sleep(1) as the last line

#

1 second of blue, then pulsing green

idle owl
#

Yep

#

Nice πŸ˜ƒ

formal plover
#

@river quest yassss

idle owl
#

@river quest Ahh so cool!!

formal plover
#

And thank you @river quest!

river quest
#

from we are told so far from hackaday and MAKE, the ads are doing better then ads usually do

#

don't worry, we'll be doing reports too

idle owl
#

Excellent!

formal plover
#

Naturally πŸ€“

river quest
#

-AND- sharing the results... HERE

idle owl
#

It's so exciting!

formal plover
#

Super pumped!

tidal kiln
#

awesome! (sorry got distracted by the combo square)

tulip sleet
#

@slender iron tried check_usb_clocks on my M0: 239.8 kHz plugged into USB; 234.8, then 234.7 a few times unplugged

#

so it looks like it is locked to USB

tidal kiln
#

this does NOT seem to create issue:

import neopixel
import board

pixels = neopixel.NeoPixel(board.NEOPIXEL, 1)
pixels[0] = (0, 0, 50)
pixels.show()
while True:
    pass
idle owl
#

It's not causing any issues for me either.

#

However, at a request, placing the pixels[0] = (0, 0, 50) inside the while loop with the pass, does cause the same issues.

#

I have it much easier getting it back than you do, @tidal kiln

#

I had to screen to the serial connection and reload it after renaming np0.py back to main.py to get the fixed main.py to run again, but then it does and it stays blue.

tidal kiln
#

try changing to this line:

pixels = neopixel.NeoPixel(board.NEOPIXEL, 1, auto_write=False)
#

but with pixels[] = still in loop, and .show() outside

#

get issue?

idle owl
#

It's not blue. Let me disconnect it though to see what I get.

tidal kiln
#

yah, neopixel color shouldn't update anymore, expected

idle owl
#

And it required physical removal to eject it, and on plugging it back in, it's not mounting.

tidal kiln
#
import neopixel
import board

pixels = neopixel.NeoPixel(board.NEOPIXEL, 1, auto_write=False)
pixels[0] = (0, 0, 50)
pixels.show()
while True:
    pixels[0] = (0, 0, 50)
#

that's what i meant (short enough code to just show)

idle owl
#

Pasting as is.

tidal kiln
#

should get blue with that

idle owl
#

Yep, I got blue. Disconnecting.

#

Again wouldn't fully eject until I physically reset it. And it's not mounting following reset.

#

Renamed, reconnected successfully.

tidal kiln
#

ok. bricked mine also.

#

i'm done breaking things. food time.

idle owl
#

later!

pastel panther
#

@slender iron you previously mentioned that the bootloader you gave me would require some manual intervention to get the jlink to work. I have my jlink now so do you have details for me or somewhere where I could look to find them?

tulip sleet
#

@slender iron I got everything to compile, and I2C.scan() detected a device at the right address (woo hoo!). I'll quit while I'm ahead and test some more in the morning.

idle owl
#

@tulip sleet Nice work!

tulip sleet
#

tnx - still amazed

slender iron
#

@tulip sleet when you have a chance, try the clock thing on your m4

pastel panther
#

@slender iron Sorry if I'm a bit out of the loop but is master borked?

slender iron
#

its got usb gremlins

#

give it a shot and let me know how well it works for you

#

it should build ok

pastel panther
#

if it's fresh as of an hour ago, my CIRCUITPY shows up but doesn't like being asked questions

#

Wait, it's live again.

slender iron
#

yup sounds about right

pastel panther
#

unplugging and pluggin in again reproduces it

slender iron
#

if you have an oscilloscope or saleae you can check D7 for the clock frequency

pastel panther
#

the REPL works though

#

I've got my saleae plugged into D7 on my metro m0; should I be seeing something?

#

or should I load that uf2 you posted earlier on my M4?

slender iron
#

ah right, its not in master

pastel panther
#

if I'm reading my saleae right it's 239.8khz

slender iron
#

on m0 with usb connected?

pastel panther
#

no, m4

#

with usb connected

#

I can check the m0 if you like

slender iron
#

ah, right around what mine is

#

but you have mass storage issues still?

#

theres gotta be some other bug

pastel panther
#

Does that signal have something to do with the USB clock?

slender iron
#

yeah, its 48 mhz / 200

#

using a timer

pastel panther
#

This build (the uf2 you posted previously) does not have mass storage (msc?) issues

slender iron
#

that one doesn't have the neopixel support right?

pastel panther
#

Not sure, I didn't check the context of the post all that much. I can test it if you want

slender iron
#

the repl should tell you

pastel panther
#

The neopixel is going green yellow blueblueblue

slender iron
#

ok, that means the support is there then

#

(and that there is an error)

pastel panther
#

import neopixel doesn't work. Does that mean anything?

slender iron
#

but the neopixel on board changes colors?

pastel panther
#

yea

slender iron
#

hmm weird

pastel panther
#

Or it was before I went into the repl

slender iron
#

it should be white in repl

pastel panther
#

Off white but yes

#

resetting goes to the color cycling I mentioned

#

Looks like it's complaining of no busio, probably from when I was trying to see if SPI worked

slender iron
#

ah neopixel is the library

#

neopixel_write should work

#

ok, I gotta stop working. thanks for the help @pastel panther !

pastel panther
#

@slender iron go play some PUBG! neopixel_write works as expected

manic glacierBOT
#

Workaround str(binary_data, 'ascii') works. Thanks!

As for disabling in the larger build... I'm in favor of that when reasonable workarounds exist (as in this case). The fewer behavior differences between different circuitpython builds the better; though I could just as easily argue the other way with regards to being compatible with Micropython on larger microcontrollers.

vernal cosmos
#

@tulip sleet Grr. I had to create a new account on Windows (long story) and I'm trying to re-build my toolchain. What was the PPA for the arm embedded toolchain again? I can't seem to find it in my notes....

stuck elbow
vernal cosmos
#

Yes, the embedded ARM gcc toolchain....

solar whale
#

@tulip sleet @slender iron I tried the new 2.x build and the I2C Drivers are working but I am still having trouble with the SPI rgb_display driver. ```Adafruit CircuitPython 2.1.0-5-gc066e4d on 2017-11-03; Hacked Feather M0 Express with 8Mbyte SPI flash with samd21g18

import tft_test
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "tft_test.py", line 25, in <module>
File "libraries/drivers/rgb-display/adafruit_rgb_display/rgb.py", line 93, in fill
File "libraries/drivers/rgb-display/adafruit_rgb_display/rgb.py", line 82, in fill_rectangle
File "libraries/drivers/rgb-display/adafruit_rgb_display/rgb.py", line 54, in _block
File "libraries/drivers/rgb-display/adafruit_rgb_display/rgb.py", line 131, in _write
File "libraries/drivers/rgb-display/adafruit_rgb_display/rgb.py", line 131, in _write
ValueError: Buffer must be at least length 1

stuck elbow
#

I think I know what the issue is

#

the last line of "fill_rectangle" should have an if rest: there on it

#

because sometimes rest is 0, if the size of the rectangle divides evenly into size of the buffer

tulip sleet
#

@solar whale @stuck elbow I only allow a buffer or slice of zero length for I2C writes, not for SPI writes. It seems like a zero length SPI write should do absolutely nothing or complain (right now it complains). We might go with what the Arduino SPI library does.

#

Is there a use case for zero-length SPI writes (I guess it might toggle CS)

solar whale
#

the problem is caused byt this line ( line 82 of rgb.py self._block(x, y, x + w - 1, y + h - 1, b'')

#

it is not a problem for other SPI devices - I can mount an SDCARD just fine.

manic glacierBOT
solar whale
#

@stuck elbow I'm trying your fix now

tulip sleet
#

@solar whale @stuck elbow I think there are two cases, the if rest and also the line 82 above.

In the Arduino SPI library, there is transfer(buf, length). If length is zero nothing actually happens.

solar whale
#

just adding the if rest: causes the board to just hang - even control c won't work ??? Have to reset to get it back....

#

perhaps I did this wrong def fill_rectangle(self, x, y, width, height, color): """Draw a filled rectangle.""" x = min(self.width - 1, max(0, x)) y = min(self.height - 1, max(0, y)) w = min(self.width - x, max(1, width)) h = min(self.height - y, max(1, height)) self._block(x, y, x + w - 1, y + h - 1, b'') chunks, rest = divmod(w * h, 512) pixel = self._encode_pixel(color) if chunks: data = pixel * 512 for count in range(chunks): self._write(None, data) if rest: self._write(None, pixel * rest)

vernal cosmos
#

Hmmmm. Any thoughts on what I've done wrong? python3 tools/gen_usb_descriptor.py
--manufacturer "Adafruit Industries LLC"
--product "Metro M4 Express"
--vid 0x239A
--pid 0x8021
build-metro_m4_express/autogen_usb_descriptor.c
Traceback (most recent call last):
File "tools/gen_usb_descriptor.py", line 9, in <module>
from adafruit_usb_descriptor import cdc, standard, util
ImportError: No module named 'adafruit_usb_descriptor'
Makefile:363: recipe for target 'build-metro_m4_express/autogen_usb_descriptor.c' failed
make: *** [build-metro_m4_express/autogen_usb_descriptor.c] Error 1

tulip sleet
#

@drowsy geyser do git submodule update --init --recursive. There are new and updated submodules

vernal cosmos
#

Hmmm. I did. Will re-run. Thanks!

tulip sleet
#

the plain directory usb-descriptor was replaced by a submodule reference. You might need to remove the directory and re-run the git submodule update.

stuck elbow
#

@tulip sleet I agree that moving that check inside the library call would simplify user code

vernal cosmos
#

@tulip sleet Huh. I removed tools/usb_descriptor, did a git pull and a git submodule update --init --recursive, then make , and I get the same error....

solar whale
#

@tulip sleet @stuck elbow hmm - it is this line that is hanging the board now - with the if rest: from adafruit_rgb_display import color565

stuck elbow
#

are you sure?

manic glacierBOT
#

As discovered by @jerryneedell and @deshipu, https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display expects to be able to pass zero-length SPI buffers (and have nothing happen). Perhaps we should just handle this edge case and do nothing. The Arduino SPI library will take a zero-length buffer and do absolutely nothing.

Forbidding zero-length SPI reads may still make sense. As noted above, zero-length I2C reads exercise a bug, and don't have a use case, I think.

tulip sleet
#

@drowsy geyser Are you working in a clone of adafruit/circuitpython, or a fork? What's the top commit in git log? Which directory are you building in and what's the make command you're giving?

vernal cosmos
#

Clone, (commit log next), building in "ports/atmel-samd", and "make BOARD=metro_m4_express DEBUG=1"

#

Merge: e267b2c c90a2d9
Author: Dan Halbert halbert@halwitz.org
Date: Thu Nov 2 17:56:34 2017 -0400

Merge pull request #403 from tannewt/fix_swclk51

atmel-samd: Fix SAMD51 SWCLK reset so we can connect the JLink
solar whale
#

@stuck elbow yes - just entering from adafruit_rgb_display import color565 causes the board to hang - -- perhaps I have another problem - let me try a different board.

tulip sleet
#

@drowsy geyser could you do ls -a in adafruit/circuitpython/tools/usb_descriptor ?

#

and do git status in that directory

vernal cosmos
#

Yup!

#

prm@vortex2:/mnt/c/Users/Phil/src/Python/CircuitPython/circuitpython$ ls -a tools/usb_descriptor
. adafruit_usb_descriptor CODE_OF_CONDUCT.md .git LICENSE readthedocs.yml .travis.yml
.. api.rst conf.py .gitignore README.rst requirements.txt
prm@vortex2:/mnt/c/Users/Phil/src/Python/CircuitPython/circuitpython$ cd !$
cd tools/usb_descriptor
prm@vortex2:/mnt/c/Users/Phil/src/Python/CircuitPython/circuitpython/tools/usb_descriptor$ git status
HEAD detached at a043411
nothing to commit, working directory clean
prm@vortex2:/mnt/c/Users/Phil/src/Python/CircuitPython/circuitpython/tools/usb_descriptor$

tulip sleet
#

python3 --version result?

vernal cosmos
#

3.5.2

tulip sleet
#

those are all the same as me, and it's working for me (on Ubuntu, not WSL). But I don't think WSL is likely to be the issue.

vernal cosmos
#

Ok, thank you, Dan! I'll keep noodling on it. It's almost time for me to go to work, though. I'll try to work on this some more over lunch. πŸ˜ƒ

solar whale
#

@stuck elbow @tulip sleet OK - teh hang problem is resolved - must have corrupted the file - now it imports OK but I still get teh error on line 82 - is tehre somethig other than b'' the woudl work. I'm not sure what it is doing.

tulip sleet
#

@drowsy geyser atmel-samd/tools/gen_usb_decriptor.py does this

# path hacking
sys.path.append("../../tools/usb_descriptor")

to find circuitpython/tools/usb_descriptor

that appears not to be working, not sure why

vernal cosmos
#

@tulip sleet Ahhh, here's a clue.... prm@vortex2:/mnt/c/Users/Phil/src/Python/CircuitPython/circuitpython/ports/atmel-samd$ make BOARD=metro_m4_express DEBUG=1 V=2 python ../../py/makeversionhdr.py build-metro_m4_express/genhdr/mpversion.h make: python: Command not found ../../py/py.mk:272: recipe for target 'build-metro_m4_express/genhdr/mpversion.h' failed make: *** [build-metro_m4_express/genhdr/mpversion.h] Error 127

tulip sleet
#

@drowsy geyser ! which python

vernal cosmos
#

Yep, that gives me nothing. My python install is broken in the new account. I'll go fix that.

tulip sleet
#

@solar whale at line 54, add if data: before that, to skip the self._write() if the buffer is empty

vernal cosmos
#

Doh! Working now (after reinstalling python). Sorry to burn your time....

tulip sleet
#

@drowsy geyser that's fine! divide and conquer

vernal cosmos
#

Aye!

stuck elbow
#

@solar whale replace the b'' on that line with None

solar whale
#

@tulip sleet well - witht hat , it does not crash, but it does not draw anything either πŸ˜‰

tulip sleet
#

@stuck elbow if you use None, then it will execute lines 51-53 in rgb.py; not sure that's what you want ?

solar whale
#

@stuck elbow that results in ```>>> import tft_m0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "tft_m0.py", line 32, in <module>
File "rgb.py", line 94, in fill
File "rgb.py", line 82, in fill_rectangle
File "rgb.py", line 53, in _block
File "rgb.py", line 141, in _read
File "rgb.py", line 140, in _read
AttributeError: 'SPI' object has no attribute 'read'

manic glacierBOT
#

This morning's build (Adafruit CircuitPython 3.0.0-alpha.0-1143-ge7d6df7-dirty on 2017-11-03; Metro M4 Express with samd51j19) exhibits the same behavior, but I have some additional details.

  • Flashing the new firmware results in a solid white Neopixel and a REPL that won't exit.
  • There is no D:\CIRCUITPY (I'm on Windows) when the board is in that state.
  • Pressing reset once gives me a pulsating green NeoPixel and a working REPL.
  • Once I've done the above, the REPL works as expected ...
tulip sleet
#

I'm off for a bit for grocery shopping, etc.

solar whale
#

@tulip sleet Have fun!

stuck elbow
#

@solar whale why would an spi object lack the "read" method? is that the m4? maybe it's not implemented yet?

solar whale
#

this is an M0

stuck elbow
#

how did you create the spi object?

#

@tulip sleet you are right, that's wrong, I didn't look

#

let me fix that file myself

manic glacierBOT
solar whale
#

@stuck elbow here is the code I am trying to run ```
import time

import busio
import digitalio
from board import *

from adafruit_rgb_display import color565
import adafruit_rgb_display.ili9341 as ili9341

Configuratoin for CS and DC pins (these are FeatherWing defaults on ESP8266):

CS_PIN = D9
DC_PIN = D10

Config for display baudrate (default is 32mhz, about as fast as the ESP supports):

#BAUDRATE = 1000000

Setup SPI bus using hardware SPI:

spi = busio.SPI(clock=SCK, MOSI=MOSI, MISO=MISO)

Create the ILI9341 display:

#display = ili9341.ILI9341(spi, cs=digitalio.DigitalInOut(CS_PIN),

dc=digitalio.DigitalInOut(DC_PIN), baudrate=BAUDRATE)

display = ili9341.ILI9341(spi, cs=digitalio.DigitalInOut(CS_PIN),dc=digitalio.DigitalInOut(DC_PIN))

Main loop:

while True:
# Clear the display
display.fill(0)
# Draw a red pixel in the center.
display.pixel(120, 160, color565(255, 0, 0))
# Pause 2 seconds.
time.sleep(2)
# Clear the screen blue.
display.fill(color565(0,0,255))
# Pause 2 seconds.
time.sleep(2)

stuck elbow
#

ah, I see, there is no "read" anymore, there is only "readinto"

#

that's a separate issue, thanks for finding it

solar whale
#

@stuck elbow tahsnks - I'll give that a try - will takke a little while - 'm trying to swap baords as well.

stuck elbow
#

seems like nobody used that library seriously before πŸ˜ƒ

solar whale
#

@stuck elbow not surprised - not much memory left but it wasa test case I have been using.

stuck elbow
#

we could use a smaller buffer of fill

#

it uses 1024 bytes now, we could use 512 β€” the size of the DMA buffer

solar whale
#

any reduction would help

stuck elbow
cunning crypt
#

Looks like my Circuit Playground Express will be delivered today. Will probably be a while before I can really get started on the examples I want to, but it brings me a step closer

stuck elbow
#

Hehe, my j-link should arrive today too, and my gf is leaving for a week tomorrow πŸ˜ƒ

#

I guess my sleep schedule will completely annihilate itself.

solar whale
#

@stuck elbow did you withdraw the first pull request?

stuck elbow
#

I did, I'm making a pull request for 2.x that will allow empty reads/writes

solar whale
#

ok

manic glacierBOT
stuck elbow
#

I also updated bitbangio to make it consistent

#

because it wasn't

fading solstice
#

question regarding github and circuitpython build. when is a tag assigned to project and who assigns it? I noticed that if a project does not have a tag, changes are not included in a release.

stuck elbow
#

usually you create a tag when you make the release

#

it's like a bookmark, so that you know what code is released in a particular version

fading solstice
#

so you means me does it. or like dan or scott does it.

stuck elbow
#

no idea who does the releases, I think it's documented on the readthedocs somewhere

#

I guess I'm wrong, can't find it

#

@tulip sleet @slender iron can you clarify?

solar whale
#

@stuck elbow thanks - I'll test it out once it gets merged and committed.

#

I tried implementing the changes locally, but clearly messed it up... easier to wait.

#

@stuck elbow I tried my local implentation , but the change to in rgb.py to _read results in```>>> import tft_m0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "tft_m0.py", line 32, in <module>
File "rgb.py", line 94, in fill
File "rgb.py", line 82, in fill_rectangle
File "rgb.py", line 53, in _block
File "rgb.py", line 135, in _read
MemoryError: memory allocation failed, allocating 230400 bytes

#
        data = bytearray(count)
        self.dc.value = 0
        with self.spi_device as spi:
            if command is not None:
                spi.write(bytearray([command]))
            if count:
                spi.readinto(data)
        return data

stuck elbow
#

@wanton heart that advice I gave you about replacing b'' with None was wrong

#

and yes, if you try to read too much, you won't have enough memory to hold it

#

can't be helped

#

So i have the j-link now, and I tried loading the bootloader into the metro m4:

~$ arm-none-eabi-gdb /home/sheep/dev/circuitpython/uf2-samd/build/metro_m4/update-bootloader.elf 
GNU gdb (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 7.12.1.20170417-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/sheep/dev/circuitpython/uf2-samd/build/metro_m4/update-bootloader.elf...done.
(gdb) target remote localhost:2331
Remote debugging using localhost:2331
0xfffffffe in ?? ()
(gdb) monitor reset
Resetting target
(gdb) load
Loading section .text, size 0x4a1c lma 0x4000
Loading section .relocate, size 0x4 lma 0x8a1c
Start address 0x4000, load size 18976
Transfer rate: 71 KB/sec, 6325 bytes/write.
(gdb) compare-sections 
Section .text, range 0x4000 -- 0x8a1c: MIS-MATCHED!
Section .relocate, range 0x8a1c -- 0x8a20: MIS-MATCHED!
warning: One or more sections of the target image does not match
the loaded file

It seems the load command does nothing. What am I doing wrong?

#

I started the gdb server with JLinkGDBServer -device Cortex-M4 -speed auto -if SWD

#

not sure if that's correct?

#

should I specify SAMD51something?

tulip sleet
#

@fading solstice @stuck elbow A release on github requires a tag (I think you may know this already). When you create a release there, it asks for an existing tag or a new tag name. Random commits don't get a tag or force a release -- it has to be done by hand. @slender iron and I don't keep track necessarily of all the library changes, but whoever accepts the pull request should probably make a new release.

You can create a tag locally in git and push it up, but you have to do git push --tags or else it doesn't show up.

@meager fog has asked if we can do that automatically on a commit, as part of the .travis.yml script. It's possible to have travis do stuff in github.

stuck elbow
#

that kinda defeats the purpose of a release though

#

unless we want continuous delivery πŸ˜ƒ

solar whale
#

@stuck elbow - implented your PRs locally and it all works great!! - thank you!

#

I did not test bitbangio

stuck elbow
#

ahh, specifying the device as ATSAMD51G18 made it work

tulip sleet
#

I'm misremembering: now I remember she wanted the .mpy to be generated and commited automatically. We might have talked about releases too, but I don't remember if that's true. We could auto-generate a new release if there's a new tag. But I don't think this is going to happen soon.

solar whale
#

@stuck elbow isn't it ATSAMD51J18 ? for the M4

stuck elbow
#

it is the m4

solar whale
#

metroM4

stuck elbow
#

yes

solar whale
#

I thik it is J18 not G18

stuck elbow
#

ok

tulip sleet
#

J19

solar whale
#

oops - sorry -

#

small print on that chip πŸ˜‰

tidal kiln
#

J/G = pin count, 18/19 = flash size

sick creek
#

does it have ar things in it?

stuck elbow
#

got the bootload in \o/

#

bootloader

#

now, that's out of the way, I'm going to go back to my work, and will continue this in the evening

#

thank you for help everyone

solar whale
#

@stuck elbow thansk for all your help!

tidal kiln
#

later @stuck elbow

manic glacierBOT
tulip sleet
#

@stuck elbow can you do bitbangio/I2C.c too?

stuck elbow
#

I think I did

#

ah, i2c

#

sorry

#

on it

tulip sleet
#

I'm trying to put the latest uf2 bootloader on my M4's. I have the original factory bootloader on it. JLinkExe cannot halt the CPU. Tried unplugging and resetting a few times. Any suggestions?

stuck elbow
#

done

pastel panther
#

@tulip sleet I don't have a fix but I can confirm that I had the same issue the other day of not being able to halt, but I'm using the self-updating firmware that @slender iron gave me last week

tidal kiln
#

@tulip sleet that happened to me. unplugging jlink, double resetting, then plugging in jlink worked for me

#

should get red neopixel for bootloader

tulip sleet
#

@stuck elbow could you copy the extra doc lines re buffer size from busio/I2C.c to bitbangio/I2C.c ? (I'm having trouble adding review comments on some lines.) Tnx

#

@tidal kiln you mean unplugging the ribbon cable, or the Jlink USB to host?

tidal kiln
#

i just removed the jlink from the usb port on the host computer

#

left all the ribbon cable hooked up

stuck elbow
#

@tulip sleet done

formal plover
#

Hey @stuck elbow!

tulip sleet
#

@tidal kiln Worked, thanks! Had to do it in exact order.

tidal kiln
#

yay. glad it worked.

stuck elbow
#

@formal plover that's awesome, they even don't have the problem with the neck!

formal plover
#

@stuck elbow Nope, they look great!

manic glacierBOT
tidal kiln
#

what's the 0x0C about?

slender iron
#

@tidal kiln they number the stickers

tidal kiln
#

ah

slender iron
#

@pastel panther you'll need to manually update circuitpython. the self updater is just something to update the bootloader

tidal kiln
#

guess not always, got several without

tulip sleet
#

@slender iron does the UF2 bootloader know the size of flash? I have one of the orig Metro M4's with a J20 instead of a J19 and want to update the bootloader on it.

pastel panther
#

@slender iron I know, I was just telling Dan that I didn't have the factory bootloader

slender iron
#

@tulip sleet I'm not sure

tulip sleet
#

k I'll look

slender iron
#

@tidal kiln really? post a pic

#

@pastel panther ah ok

pastel panther
#

@slender iron Is the USB fix from your fork going to make it into master? I'm currently testing my filename extension hackery against your repo

slender iron
#

there isn't a fix in there. its mostly just outputting the clocks

pastel panther
#

hmmm. but then why does it work when master doesn't?

slender iron
#

thats a good question

#

time to compare them

pastel panther
#

seems probable?

#

got to head to work, ttyl

slender iron
#

thanks @pastel panther !

tulip sleet
#

@slender iron that's really interesting - want to push that to master?

slender iron
#

couldn't hurt

tidal kiln
slender iron
#

@tulip sleet wanna just try it on your end?

tidal kiln
#

@slender iron ok, only one style, in the ones i could find at least

slender iron
#

@tidal kiln yup I think they number the hexagons. I have a bunch on my smd binder

tulip sleet
#

@slender iron k, will do. Do you still want me to test clock speed on my M4? Did you see from last night my M0 seems OK (goes to 239.8 when plugged in)?

slender iron
#

nah, I don't think its as important as I think

tidal kiln
#

the others could've come from a table-o-stickers at a conference or something

pastel panther
#

@slender iron I love/hate that. I have a horrible pokemon fever when it comes to things like that. MUST ORDER MORE BOARDS

slender iron
#

πŸ˜ƒ

#

@tulip sleet I was gonna go back to the m0 today and try it through a usb2 hub too

manic glacierBOT
#

There are libraries that already assume they can read and write no bytes (e.g., https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display). The Arduino SPI and I2C libraries allow empty buffers: they just don't do anything. I think is kind of like allowing file.write(b'') in Python, the Posix routine write(fd, buf, len) allowing len to be zero, etc.

The exception was an empty read in I2C. That in fact doesn't seem to have a use case, and doesn't really fit with the protocol.

#

Ok, sounds good!

On Fri, Nov 3, 2017 at 10:06 AM Dan Halbert notifications@github.com
wrote:

There are libraries that already assume they can read and write no bytes
(e.g., https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display).
The Arduino SPI and I2C libraries allow empty buffers: they just don't do
anything. I think is kind of like allowing file.write(b'') in Python, the
Posix routine write(fd, buf, len) allowing len to be zero, etc.

The exception was an empty re...

tulip sleet
slender iron
#

kk, I'll look soon. I did see a hardfault on the m0 yesterday that could be the issue πŸ˜ƒ

manic glacierBOT
slender iron
#

(β•―Β°β–‘Β°οΌ‰β•―οΈ΅ ┻━┻

#

asf4 mixes two different usb status enums

pastel panther
#

lol

slender iron
#

looks like clang might be able to detect it

pastel panther
#

I see they're fans of the "por que no los dos?" school of programming

formal plover
#

@slender iron What's the rule of thumb for UF2 devices? Is it all M0s or is it all "designed for Circuit Python" boards?

slender iron
#

yeah, everything new

formal plover
#

cool cool. Just soldered the headers onto a M0 Adalogger. So that's a no go then lol

slender iron
#

it only has bossac

manic glacierBOT
formal plover
#

Is it still hit or miss with certian SD cards?

#

(using CircuitPython)

manic glacierBOT
solar whale
#

@tulip sleet @slender iron I won't say this went smoothy, but wow! ```
Adafruit CircuitPython 3.0.0-alpha.0-1143-ge7d6df7 on 2017-11-03; PCA10056 with NRF52840

help('modules')
main math sys ustruct
array micropython test utime
builtins os time
gc pyb ucollections
machine random uos
Plus any modules on the filesystem

#

now if I can just remember how I got here?

idle owl
#

That's always the hard part

slender iron
#

Great job @solar whale !

#

I look forward to the pull request!

solar whale
#

@slender iron I did not change anything - just built the version in ports/nrf -- one step at at time.... I can blink the leds!!!

meager grove
#

Gah. I didn't know about CircuitPython during my last order, so I had to place another order...

manic glacierBOT
pastel panther
#

@meager grove If you're anything like me, you'll slowly gather an army of CP minions

meager grove
#

Yeah, might ordered a few M0 boards of different flavors.

pastel panther
#

πŸ˜ƒ

#

There are some tasty treats coming down the pike so prepare your bank account ;P Not that they're going to be all that expensive

meager grove
#

Always. I need to make a project board so I can make sure that I am working through my backlog.

pastel panther
#

Did you get a Circuit Playground Express (CPX)?

meager grove
#

I did. "For my girlfriend"

pastel panther
#

nice. You know, my wife never seems to use the arcade machine "we" got for our wedding. Oh well ;P

meager grove
#

My friend once made a refrigerator door alarm and our freezer door has a tendency to not shut all the way.

#

So I am going to introduce her to Python with the Circuit Playground Express and recreate the project.

pastel panther
#

Nice

#

are you going to use the temp sensor or the light sensor ? Or the IR sensor? or the....

#

you've got options. There is a lot to love in that little board

meager grove
#

Yeah, I like that it has so many things. It should be a lot of fun to play with.

#

Am I reading correctly that the Huzzah will run CP?

meager grove
#

Ooh, bonus. I bought one thinking I'd use it with Arduino!

pastel panther
meager grove
#

Ok, I need the brown truck to arrive.

pastel panther
#

Before too long, 2 day shipping will seem like an eternity

meager grove
#

Seriously, I remember when I would go to a store if I needed something now.

#

If their was an Adafruit-like store in my neighboorhood, I would be living in a box outside of it.

pastel panther
#

Same

meager grove
#

I don't know where I'd plug my Hakko though...

pastel panther
#

Wire a dynamo on an excercise bike and 'hire' children to pedal it for candy

#

Candy in, electrons out. Easy peasy

#

@meager grove How did you learn about Circuit Python?

meager grove
#

One of the recent videos, very exciting.

#

I am looking for ways to get people started hacking fast for workshops/classes. Seems perfect.

formal plover
#

@meager grove one thing to point out is the difference between the boards that have the UF2 bootloader and the ones that don't

#

The UF2 bootloader is the drag and drop code/files feature

meager grove
#

That is cool. That is only the Trinket M0 for CP and the Circuit Playground Express at this point, right?

formal plover
#

The boards that don't you have to use a tool called Ampy to mess around with files and whatnot. Not incredibly difficult, I just wanted to make you aware

manic glacierBOT
formal plover
#

Circuit Playground Express, metro M0 Express, Feather M0 Express, Trinket M0 and Gemma M0.

meager grove
#

Oh. So many options. Nice. For teaching, that is the way I will go. For my own stuff, I'm much more flexible.

formal plover
#

You will probably see us mentioning a metro M4 as well. That's not out yet but some of us are lucky enough to be testing it right now.

#

@meager grove yes, tons of options. Lots of fun

meager grove
#

I love the idea of using a Circuit Playground Express to expose people to making stuff.

formal plover
#

Yeah, it's awesome.

meager grove
#

Running away. Thanks for the info! I can't wait to play with my new toys. πŸ˜ƒ

stuck elbow
#

hmmm.... ImportError: No module named 'adafruit_usb_descriptor' in the latest master

pastel panther
#

update your submodules

#

you may have to remove an old directory

stuck elbow
#

my submodules are up to date

pastel panther
#

Hm.. I got the same error and updating my submodules helped after I removed some directory it was complaing about because the submodule wanted to overwrite it

stuck elbow
#

I will make a fresh checkout

tulip sleet
#

@stuck elbow see my debugging of same issue with Hukuzanatua in this room starting 9:18am Eastern time. The tools/usb_descriptor was a regular directory and is now a submodule, and I had to fix that manually.

#

That was not his problem, though (he did not have a /usr/bin/python)

stuck elbow
#

hmm, I don't have such a directory at all...
ok, git submodule init fixed it

pastel panther
#

That's my goto fix whenever it's complaining about a missing file

#

I wonder if you can't make git update make sure submodules are in sync

stuck elbow
#

thanks

tulip sleet
#

git submodule update --init --recursive is the do-everything

pastel panther
stuck elbow
#
Adafruit CircuitPython 3.0.0-alpha.0-1143-ge7d6df7f7 on 2017-11-03; Metro M4 Express with samd51j19

\o/

tulip sleet
#

now you get to have the MSC and CDC problems, esp if on Linux

bronze geyser
#

I got my circuit python port of an Arduino library (for the ATM90e26 energy monitor chip) working...here's my write up in case anyone is interested. https://bitknitting.wordpress.com/2017/10/31/using-circuit-python-on-the-feather-huzzah/

pastel panther
#

@bronze geyser neat!

bronze geyser
#

Thank you for your help. Particularly @slender iron

slender iron
#

glad you got it working @bronze geyser !

#

@tulip sleet you around?

formal plover
#

@slender iron I think he's cooking

slender iron
#

kk

tidal kiln
#

@slender iron you around?

slender iron
#

πŸ˜„

tidal kiln
#

just remember something in that tsl library i wanted to ask you about

slender iron
#

kk

tidal kiln
#

it was originally 0, then i changed to None, guess i can see going either way

slender iron
#

what are you trying to convey with that value?

tidal kiln
#

something equivalent to a NaN, or an error, since it means something is wrong and there is essentially no value

slender iron
#

perhaps throwing an exception would be better then

tidal kiln
#

yeah. i think i thought of that too.

#

which is kind of another question, how liberally should we be throwing exceptions?

#

concern being how that would look to a user

stuck elbow
#

I think it generally makes sense to throw exceptions whenever there is an error

#

that lets you not write all those if value is None: checks later on, just catch the exception in one place

#

another reason for exceptions is that if you return something like NaN, the program will keep on running and encounter a weird error later on β€” and it will be difficult to tell where that NaN came from

slender iron
#

I think exceptions with good explanations are much better than returning None

stuck elbow
#

whereas if you have an exception, you see the traceback that tells you exactly where

tidal kiln
#

yep. i agree with all this.

#

i think the current python libs for tsl return 0

#

so i started with that, but then realized it should be something to actually indicate an issue

#

so i just switch to None

#

but meant to then ask (which is where i'm at now)

#

one of the cases is for sensor saturation

#

so with an exception, you'd have someone write a simple little loop on tsl.lux, get some happy values, move their lamp real close, and BAM! a wall of exception text

pastel panther
#

Generally my philosophy is to accept a wll defined range of inputs and if something unexpected happens with those inputs, raise. Exceptions are there to handle exceptional cases. If your reasonable input reasonably produces nothing, you don't need to return anything.

#

I apologize if that's not directly relevant to this case

formal plover
#

Question about i2c stuff. So do you always have to write to an i2c address then read off of it? Or can you just read values?

slender iron
#

yeah, they can always handle the exception in their loop if they want

#

@formal plover you need to give it an address

tidal kiln
#

who's they?

slender iron
#

the user who wrote the loop

tidal kiln
#

the very beginner level programmer?

formal plover
#

@slender iron I know you need an address, but an address to both read AND write?

slender iron
#

you always need a device address

tidal kiln
#

totally agree with exceptions, just thinking of target audience, should we be tasking them with exception handling?

pastel panther
#

I would say not immediately, but that can be avoided by being clear that only specific inputs will work.

slender iron
#

its better than wondering why a number isn't changing

manic glacierBOT
pastel panther
#

Exceptions are at least currently the best way to say "this went wrong because of X" which is important so they can fix the issue. Perhaps someone should eventually write a "my first stack trace" guide

manic glacierBOT
tidal kiln
slender iron
#

yes please

tidal kiln
#

done

slender iron
#

thank you!

tidal kiln
#

np. thanks for helping me through the process.

slender iron
#

no problem!

tidal kiln
#

i thought pr's were from a specific commit point (not sure why). TIL that they are just from a branch. :the_more_you_know_emoji:

slender iron
#

yup yup

tidal kiln
slender iron
#

ooooh I should watch that

tidal kiln
#

should time travel and attend

#

video has some tech issues, but still has good content

#

but hey, that's mr. readthedocs teaching

formal plover
#

Oh it includes sphinx and it's not 3 hours long? πŸ˜‚

slender iron
#

I prefer to watch online

tidal kiln
#

what do you got against time travel?

slender iron
#

nothing. then I could get teleportation too

idle owl
#

@bronze geyser Congrats on your CP port!!!

manic glacierBOT
slender iron
#

@tulip sleet did you try that pull yet?

tulip sleet
#

@slender iron got home just a few minutes ago (was at a potluck)

#

about to try it!

slender iron
#

πŸ‘

#

I think that was causing your issue

tidal kiln
#

@slender iron you free for noob help?

slender iron
#

for abit longer

tidal kiln
#

trying to do the readthedocs tie to github

#

starting from scratch and not using cookiecutter

#

made a repo, used sphinx-quickstart to populate it

#

pushed it up

#

went to readthedocs and did the manual import (per your guide)

#

that good so far?

slender iron
#

I've never done non-cookiecutter

#

but go ahead and explain the issue

tidal kiln
#

oh, and added the readthedocs service to repo on github

#

so the issue is with readthedocs

#

it initially pulled over the stuff from github and did a build

#

but it says there is no webhook and no additional commits trigger anything

slender iron
#

did you refresh?

tidal kiln
#

yep

slender iron
#

can you see it listed in github integrations?

tidal kiln
#

on readthedocs?

meager fog
slender iron
#

on github

meager fog
#

er, Metro M4 not m3

tulip sleet
#

@slender iron By George, you fixed it!!

tidal kiln
#

yep. github shows the service.

slender iron
#

w00t

tulip sleet
#

That was a lot of staring at USB traces, I bet

slender iron
#

it wasn't super bad once I realized it was sending the same response twice

tulip sleet
#

I have no trouble getting into the REPL either. This is great!

slender iron
#

ooooh perfect!

meager fog
#

@tulip sleet @slender iron anything for me to try with my metro m4 on cpy

tulip sleet
#

@meager fog that is also great! How big is it? Thinking of adding it to M4 CPy?

meager fog
#

yah its for arduino and hopefully soon python, its 32KB of flash and at least 32KB ram

#

right now arduino uses 100kb of ram because we're doing a ton of buffering. basically just got it working

slender iron
#

@meager fog I think I got rid of some usb gremlins

meager fog
#

is busio commited or is that still in progress?

tulip sleet
#

@meager fog scott just made a really significant fix to USB

meager fog
#

yayy

tulip sleet
#

I just got busio.I2C to scan for devices last night. I was going to test further but was stuck due to usb -- however that's fixed now and I can go back to testing.

#

If I2C sees devices that means it is working to a significant extent.

meager fog
#

all good i will wiat for y'alls command

slender iron
#

just found a msc bug for m4 too I think

meager fog
#

lol ok

#

imma go and keep working on my UDA1334 tester

cunning crypt
#

Woo, I finally have a Circuit Python Express. Today has been a good day. I can hear out of my ear again (mostly... stupid ear infections), went and saw Thor after work, and come home to a CPX waiting for me.

tulip sleet
#

@slender iron what's your workflow been for making changes in asf4? Should I replace the submodule with a fork of it, or just move patches over?? tnx

cunning crypt
#

AH it yelled at me!

#

I was... not expecting that

main pine
#

I have this server muted but sometimes I still get random notifs you guys send.

slender iron
#

gotta run. spontaneous date night!

tulip sleet
#

have a great time!

slender iron
#

thanks!

cunning crypt
#

@main pine Muting doesn't inherently remove notifications for "everyone" or "here" or if some chance someone tags you directly.

tulip sleet
#

@main pine did you turn stuff off by right-clicking on the adafruit server icon and choosing notifiaction settings?

cunning crypt
#

You can go into the server settings and/or channel settings and change the "Frequency" to "Nothing"

tulip sleet
idle owl
#

Yay gremlins gone!

#

@tulip sleet Did the new build get posted for testing yet?

tulip sleet
#

@idle owl - yes! you can pull master. Also see above that Scott has another msc bug he's working on for m4. But I don't know what that is

idle owl
#

Excellent! Thanks!

#

Ooh I just made it mad with the submodule update.

#

@tulip sleet What did I do wrong? 1553 kattni@robocrepe:atmel-samd [55m master *%= 5ff641772]$ git submodule update --init --recursive Submodule 'tools/usb_descriptor' (https://github.com/adafruit/usb_descriptor.git) registered for path '../../tools/usb_descriptor' fatal: destination path '/Users/kattni/repos/circuitpython/tools/usb_descriptor' already exists and is not an empty directory. fatal: clone of 'https://github.com/adafruit/usb_descriptor.git' into submodule path '/Users/kattni/repos/circuitpython/tools/usb_descriptor' failed Failed to clone 'tools/usb_descriptor'. Retry scheduled fatal: destination path '/Users/kattni/repos/circuitpython/tools/usb_descriptor' already exists and is not an empty directory. fatal: clone of 'https://github.com/adafruit/usb_descriptor.git' into submodule path '/Users/kattni/repos/circuitpython/tools/usb_descriptor' failed Failed to clone 'tools/usb_descriptor' a second time, aborting

tulip sleet
#

@idle owl rm -rf circuitpython/tools/usb_descriptor and try again

#

the plain directory was replaced with a submodule

idle owl
#

Yes! Thank you!

tulip sleet
#

did it work?

idle owl
#

Yep!

#

At least it looked like it did, lol.

#
Cloning into '/Users/kattni/repos/circuitpython/tools/usb_descriptor'...
Submodule path '../../lib/axtls': checked out 'dac9176cac58cc5e49669a9a4d404a6f6dd7cc10'
Submodule path 'asf4': checked out '1e0e419f197661baa40ce35bc712ce14f0d4a714'
Submodule path '../../tools/usb_descriptor': checked out 'a04341153b41b4728f9b42a77cbd51c495362287'```
#

Yeah, it's usually only one line I think, but it says checked out like it does normally

cunning crypt
#

I somehow managed to horridly mangle my fork. My knowledge of Git was insufficient so I chose the nuclear option.

idle owl
#

@cunning crypt That's a totally valid option. I've done the same before.

cunning crypt
#

It looked like the folder layout changed between when I forked mine, but the updates weren't updating it.

#

So... Nuke it from orbit. It's the only way to be sure

#

...Hmm, strange.

#

Oh, right, I hadn't deleted my local files.

idle owl
#

Hah! The Code of Death no longer bricks the board! @slender iron Great job!

cunning crypt
#

DotStar is NOT compatible with Neopixel libraries, correct?

tulip sleet
#

@cunning crypt - right. different signaling protocol. DotStar is SPI. NeoPixel protocol is its own thing.

#

but we try to make the libraries have same/similar API's

cunning crypt
#

Yep, but! Writing a Neopixel example will have (slightly) different stuff than writing DotStar examples

idle owl
#

@cunning crypt Congrats on the new CPX btw!

cunning crypt
#

I'm going to do fun things with it eventually, I know it

#

But for now, it'll do some more mundane things. Like make examples.

#

Or, as with many things I do, stand on the backs of giants and simply transcribe and do some annotations and updates as needed.

#

Hmm, as the Circuit Playground has most examples covered, I think I'll just take the "Easy" method, and create a text file with pointers.

idle owl
#

We try to. Did you look at the CPX API doc on ReadTheDocs? It's limited if you're an experienced programmer, but we included examples for everything in the API. Typically there was more in depth code written to test the API, but the examples are all meant to be simple.

cunning crypt
#

Those are the examples I'm going for - The super simple beginner stuff

#

Also, me, an experienced coder? That's an amusing joke.

idle owl
#

Fair enough... You ask excellent questions then. πŸ˜ƒ

cunning crypt
#

Actually, experienced is probably the most accurate term. I'm not exactly proficient.

cunning crypt
#

I've learned how to ask the right questions.

idle owl
#

It's an important skill to have.

cunning crypt
#

Knowing what and how to ask is a more important skill than having the answers.

#

Many people I know think of me as some IT Genius. I'm not. I just know how to find the answers, and/or know people who DO know the problem.

idle owl
#

Sometimes that's the better skill to have, I've found.

tidal kiln
cunning crypt
#

That's what's up on one of my other monitors right now!

tidal kiln
#

that's pretty much the uber guide for cpx

#

running circuitpython is just one of its tricks

idle owl
#

I need to get in a PR for the CPX API library translations of all of the included examples from that guide. I have them all written.

cunning crypt
#

Yep, and reinventing the wheel is a terrible idea for basic examples. So I'm just going to point to those for the stuff that doesn't need new examples written

idle owl
#

@tidal kiln Did you see? The Code of Death isn't a brick sentence anymore. It's working fine with the update.

tidal kiln
#

saw that. haven't tried it yet.

#

been flailing with rst/docutil/sphinx/readthedocs

idle owl
#

Oi.

tidal kiln
#

oi indeed

#

but a battle i want to at least attempt. don't like cookiecutter magic.

idle owl
#

Makes sense. Seemed like one I would lose, so I wasn't sure which path to take. Both cookiecutter and not seemed like losing propositions to me.

tidal kiln
#

get latest from s3 bucket?

cunning crypt
#

OK, that is cool. If you set the brightness to 0.004 on the CPX's NeoPixels and have it display "White" you can EASILY see the individual color LEDs

idle owl
#

I'm also completely lost on starting to write a driver in the first place, so I think that adds to not feeling great about starting with Sphinx from scratch.

tidal kiln
#

looks like i modded and overwrote my code of death, if i remember, it's this?

import neopixel
import board

pixels = neopixel.NeoPixel(board.NEOPIXEL, 1)
while True:
    pixels[0] = (0, 0, 50)
    pixels.show()
cunning crypt
#

Well, there's that. In case anyone is curious, the minimum brightness you can get the Circuit Python CPX Neopixels to show at is 0.0039215703

idle owl
#

Yeah that looks right. I forgot to add pixels.show() back to it, but I'm pretty sure it bricked either way before.

tidal kiln
#

and i'm rockin Adafruit CircuitPython 3.0.0-alpha.0-191-g5ff6417 that's latest?

idle owl
#

Mmm... this is what mine says: Adafruit CircuitPython 3.0.0-alpha.0-1145-g5ff641772-dirty on 2017-11-03; Metro M4 Express with samd51j19

#

Oh wait, that's the same. I just read the end of mine.

#

Yes. You're on the latest.

cunning crypt
#

Since I don't have one to check - M4 Express board has LED on D13, right?

idle owl
#

Yes.

tidal kiln
#

indeed. no more bricky mcbrick brick.

#

although it might be a while before i totally lose my fear of a blue neopixel

cunning crypt
#

Someone want to humor me and make sure my "Universal" CircuitPython Blink example works on the M4?

#

It's just your standard Blink, except it checks what board it's on and applies the correct pin.

#

Which is D13 on everything except the ESP8266

idle owl
#

Checking.

#

Yep it works on the M4. Nice job!

tidal kiln
#

same here.

cunning crypt
#

Yay!

#

I love it when stuff works, even simple stuff.

#

Especially stuff on things that are experimental

tidal kiln
#

wonder if it was ever considered to have a board.RED_LED or some such?

idle owl
#

Hmm. No idea. It's part of the CPX API but that's not the same or useful for anything other than the CPX. When using the API.

manic glacierBOT
umbral dagger
#

Humidity monitor status: Prototype boards and parts have all arrived. First board populated. Code tweaked. Trinket updated to CP2.1. Code loaded. It seems to work. Battery is charging, then I’ll see the power management stuff working. Tomorrow I’ll install it, take pictures, and finish a blog post.

idle owl
#

@umbral dagger Nice!

umbral dagger
#

Super thin board, no headers to mount the trinket and power breakout.

idle owl
#

Did you have to cut into the Trinket?

umbral dagger
#

Trimmed the outer edges.

idle owl
#

Looks good. Well done!

umbral dagger
#

That’s before the piezo thingy and header for the Si7021 breakout were added. I’m not using the neopixel in the final design.

#

I’ll need a 3d printer to completely finish the project.

idle owl
#

How will it work in the end?

pastel panther
#

I dig the DIY castillations

umbral dagger
#

@idle owl Read the blog post πŸ˜ƒ

idle owl
#

Wait is this all new, or have you blogged about it previously?

umbral dagger
#

New.

#

So I should have said β€œRead the blog post once I write it” πŸ˜ƒ

#

Which I’m planning to do tomorrow.

idle owl
#

@tulip sleet Thanks for jumping in on the forums. I totally missed that they'd already tried the flash eraser. Just edited my post.

bronze geyser
#

i'm hoping to use mqtt w/ circuit python... is the paho library available?

stuck elbow
#

paho?

bronze geyser
#

it's the mqtt library i use on the raspberry pi...doesn't matter...just want to know if i can send mqtt messages from circuit python...if that's available.

stuck elbow
#

on th esp8266?

#

may be worth a try

umbral dagger
#

@bronze geyser I’m using the Paho C client in my smarthome system (with custom Chicken Scheme integration). As @stuck elbow said, it’s worth a try. You might have to do a custom CP build to incorporate in, though.

bronze geyser
#

thanks @umbral dagger and @stuck elbow...i'm in process trying the umqtt.simple lib that's part of micropython.

umbral dagger
#

@bronze geyser I’m interested in hearing how that goes.

bronze geyser
#

@umbral dagger = will let you know. Thank you.

pulsar bloom
#

noob here, I have some 'defs' defined in a file called test.py which I save to CPX with the goal of testing the functions in the REPL. From the REPL I import test without a problem but can not see my functions, has to be something simple.........................

tidal kiln
#

@pulsar bloom could just be how you are trying to access the functions. see this example:

#

test.py:

def foo():
    print("hello world")
#

in REPL:

>>> import test
>>> test.foo()
hello world
>>>  
#

you can also use dir() to see what's there:

>>> dir(test)
['foo', '__name__', '__file__']
#

note that foo shows up

pulsar bloom
#

That is what I am trying but not working, will try that simple case when home.

tidal kiln
#

ok. if it doesn't work for you, post an example of exactly how you are trying it.

pulsar bloom
#

Another problem is I can not ctrl-C a running program and have it's variables and functions stay in scope. I have done one project in micropython and it seems like I could do that.

tidal kiln
stuck elbow
#

yeah, circuitpython doesn't allow that, apparently it was confusing to user

#

you have to import main to get access to all that

pulsar bloom
#

Thanks all problem solved, is test.foo() not just foo()

tidal kiln
#

yay!

pulsar bloom
#

Unless 'from test import *', problems doing this?

tidal kiln
#

you lose the namespace and can possibly shadow / overwrite things, so just need to be aware of that

pulsar bloom
#

@stuck elbow your comment makes sense now, thanks

tidal kiln
#

ex, add a second file test2.py:

def foo():
    print("the second foo")
#

in REPL:

>>> from test import foo
>>> foo()
hello world
>>> from test2 import foo
>>> foo()
the second foo
>>> 
#

compare to this:

>>> import test
>>> import test2
>>> test.foo()
hello world
>>> test2.foo()
the second foo
>>> 
pulsar bloom
#

Got it, keeping track of namespaces could turn into a debuging nightmare. My use case is developing simple functions and then trying them in the REPL.

tidal kiln
#

in that case you could probably use the from test import ... syntax

#

there's also this option:

>>> from test import foo as someothername
>>> someothername()
hello world
>>>  
pulsar bloom
#

Yeap

tidal kiln
#

and to really shortcut things:

>>> from test import *
>>> foo()
hello world
>>>  
charred blaze
#

I pressed the reset button on my trinket too soon after saving the file to the pydrive

pulsar bloom
tidal kiln
#

edge illuminated direction indicator?

pulsar bloom
#

Yeap, does not photograpy well if you zoom in you can see the pointer, 8 cardinal directions.

#

Next to decode gray code on weather vane

tidal kiln
#

@charred blaze only express boards have spi flash, so that won't work for trinket m0. what exactly is your trinket doing?

charred blaze
#

Ah dang. Gimme just a sec to explain. I switched to my phone.

slender iron
#

@charred blaze you can also just flash arduino and then circuitpython again

charred blaze
#

Ahhh ok!! That works

slender iron
#

πŸ‘

charred blaze
#

@tidal kiln I was having an issue where I couldn't open/delete the main.py

tidal kiln
#

can you try what @slender iron just suggested?

charred blaze
#

That's what I'm gonna do. As soon as I'm done eating

tidal kiln
charred blaze
#

Yeah I've been looking through that. Maybe I just didn't catch it

tidal kiln
#

it doesn't explicitly mention running an arduino sketch first as a way to clean up (erase) the flash

charred blaze
#

Not a bad idea though

tidal kiln
#

and all that does is run bossac under the hood with a -e option

charred blaze
#

Ahhh

tidal kiln
#

well, and uploads your sketch, etc.

#

having someone run an arduino sketch is just the easiest way to get this done

#

just run a blink or whatever, after that you should be able to use the directions in that guide

charred blaze
#

Huh. I had it working. but now something else is wrong and i have no clue. circuit python isnt running at all and it doesnt show up on my desktop either, nor does it show up in the arduino ide. if i double tap the reset button nothing happens. using my multimeter to check connections for some reason when i connect it with usb i get the ding when touching the usb and gnd pins. but if i power it using the bat pin i get the ding when checking the bat and gnd pin but not the usb and gnd pin. and there are no stray connections

#

But when i have the trinket powered off there is no ding from the multimeter when checking any of those connections

tidal kiln
#

@charred blaze you can't even get back into bootloader mode?

charred blaze
#

not at the moment no. But I had it working and then this happened

tidal kiln
#

it sounds like you have hardware attached to the trinket?

charred blaze
#

some, yes

#

but even after detaching it nothing happens

tidal kiln
#

detach everything. plug trinket in to computer via usb. double reset.

#

you get nothing?

charred blaze
#

only thing attached right now is a tiny strip of neopixels. and there are no crossed connections. and i still get nothing

tidal kiln
#

can you post a photo of your setup?

charred blaze
#

Ignore the second micro usb port on it.

#

thats not wired up as a usb port. its being used as a connector for something else.

tidal kiln
#

is the trinket soldered into that green board?

charred blaze
#

yes

tidal kiln
#

what is the green board?

charred blaze
#

just a perfboard

tidal kiln
#

can you post photo of other side?

charred blaze
#

excuse my solder job. first time using a perfboard like this one.

#

And ive checked that there are no connections from any power and the gnd

bronze geyser
tidal kiln
#

hmmm. there could be some other short or something. hard to tell.

#

plug the trinket into usb and post a photo of the top showing the led status

charred blaze
#

with my luck there probably is

#

all i get is the one green led

stuck elbow
#

even after you press the reset twice?

charred blaze
#

yup

stuck elbow
#

does it even appear as usb device to your computer?

charred blaze
#

And i know the cable is good. been using it for a while

#

@stuck elbow no it doesnt

tidal kiln
#

the double reset is pretty quick. sometimes you can miss it by being just a little too slow.

stuck elbow
#

I'd say either it's broken, or the bootloader is broken

charred blaze
#

dang. t

#

the usb port is a little warm.

stuck elbow
#

can you cut it off that board and try again?

#

maybe the board has a short after all

charred blaze
#

maybe

tidal kiln
#

at this point, i'd expect a hardware issue before a broken bootloader

#

do you have a second trinket?

charred blaze
#

thankfully yes. and its working just fine

tidal kiln
#

with same usb cable, etc?