#circuitpython-dev

1 messages · Page 209 of 1

pastel panther
#

oooh, fancy

timber mango
#

ESC[0;1;32m type stuff

pastel panther
#

right

#

One of these days I want to write a curses based UI to run on one of these guys

errant grail
#

@pastel panther ... one step at a time...

pastel panther
#

every time I ls /Volumes/CIRCUITPY I'm mildly nervous that it'll be gone

#

😱

manic glacierBOT
#

Following up on #1326 and #1327:

Made some CPX builds to test NeoPixels.
168e23e and after don't work: no REPL
9d91111b does not seem to build: I get this error:

In file included from ../../shared-module/usb_hid/Device.c:33:0:
../../lib/tinyusb/src/tusb.h:92:7: error: "CFG_TUD_CUSTOM_CLASS" is not defined, evaluates to 0 [-Werror=undef]
   #if CFG_TUD_CUSTOM_CLASS
       ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
../../py/mkrules.mk:81: recipe for target ...
timber mango
#

I find the more time that has passed between a difficult technical accomplishment, and my reexamination of it, the more likely it feels 'stable' subjectively, to me -- the more I'm apt to successfully re-navigate its ins and outs. ;)

#

There's no cheat for that -- no I know KungFu neo declaration for that.

#

The time itself is what does it.

pastel panther
#

I think I know what you mean

timber mango
#

For me, the ability to flip a switch ON or OFF (easily, without a screwdriver) has human remembrance consequences that stabilize the longer I do not touch the ON/OFF switch. ;)

#

If I flipped it twenty times in the past hour, I won't be able to tell you which state I left it in, without very special concentrated effort to commit the final state (ON / OFF) to human memory (to remember it).

#

After several hours driving in Pennsylvania on the Interstate at night, I cannot tell if I'm going uphill or downhill. ;)

solar whale
#

Wow! Blinka on the Raspberry Pi is really nice! Just discovered that I can write text to my OLED display using bitmapfont.py just like I can on my feather M0/4 boards. just copied bitmapfont.py and font5x8.bin to the local directory and it works... Maybe I'm just easily impressed 😉

pastel panther
#

@solar whale no you're right, that's pretty cool

sly wagon
#

Quick WIP update on my black panther cosplay LED upgrade using circuitpython

#

46% of the way done. Not using soldered connections(yet) for digital pins on circuit express playground. Center animation will work after that. Ribs connection needs to be fixed too along with upper arm animation. Need to turn off green light as well

river quest
#

@sly wagon great work, we're adding this to the newsletter this week!

sly wagon
#

!!!!

#

That's so cool! Thank you!!! @river quest

river quest
#

email pt@adafruit.com with any updates, photos, etc. too, we can do a blog post or whatever, circuitpython was made for this, thanks for showing the progress and more!

sly wagon
#

Will do for sure 😃 !!!

digital slate
#

I don't have Kaspersky though and didn't see it on Ubuntu either

#

was wondering if there's any other known issues

#

I was thinking it might be the flash memory on my custom board might not be soldered down properly. I'll try resoldering it tomorrow but wondering if there's anything else to look at

idle owl
#

@digital slate There are more reasons why it wouldn't show up but most of them are software related when in the context of issues we typically run into. (Which is to say, most times it's not someone creating custom boards.) The software can become corrupted and cause issues, sometimes things will mess with the host USB controller and cause it to not show up...

#

Trying to think. There's an issue right now with one of the builds that causes CIRCUITPY to show up and then disappear and not show up again until you reload CircuitPython in a particular manner...

digital slate
#

yeah, was wondering if it might be a driver thing

idle owl
#

The Kaspersky thing is in the troubleshooting page because we've been seeing it so often lately, and shouldn't imply that it's the only thing that would cause it.

digital slate
#

I tested the board and the REPL shows up

#

so that's good

#

it's just the drive

idle owl
#

Which OS are you on?

digital slate
#

Windows 10 normally but like I said I tested on Ubuntu as well

idle owl
#

Neither of those should have driver issues. Hmm.

digital slate
#

it should show up without driver installs, correct?

#

maybe i should try reloading the bootloader

idle owl
#

Unless you installed drivers for something else that is interfering. Which can happen. As in installing drivers when you don't need them.

#

Yes correct. Should work without drivers.

digital slate
#

yeah, didn't install anything

#

esp in Ubuntu

idle owl
#

Ok. Then that's probably not it then.

digital slate
#

another data point

#

I have a Feather M4 and that worked fine

#

so it's capable of showing a drive

#

also when I hit reset, FEATHERBOOT shows up

idle owl
#

and you didn't change anything in your custom build that might have done something with mounting the drive?

digital slate
#

don't think so

#

I did build this firmwrae myself

#

so maybe something inthere

idle owl
#

Building it yourself shouldn't change anything like that.

digital slate
#

UF2 Bootloader v2.0.0-adafruit.7 SFHWRO
Model: Feather M4 Express
Board-ID: SAMD51J19A-FeatherM4-v0

idle owl
#

I meant actually going into the core code and altering it

#

before building

digital slate
#

no, this is right off of GitHub for UF2

idle owl
#

Ah ok. And what's custom about your board?

digital slate
#

not too much, I basically refactored the feather

#

different shape and the pins go different places

#

but kept everything else the same

#

AFAIK

idle owl
#

Got it, so that's why you're thinking the feather build should work

digital slate
#

correct

#

esp for getting started here, might remap pins later

#

but might not

idle owl
#

Thing is CircuitPython does not need the SPI flash (there are boards without it), but that build assumes it's there. So maybe you're right that the flash chip soldering isn't solid?

#

You said you mounted CIRCUITPY from the Feather M4, so I would agree it's not a driver or computer software issue.

digital slate
#

yeah, had some footprint issues with the part

#

so might not be soldered properly

idle owl
#

If your bootloader is mounting, I don't think it's a bootloader issue, but redoing the bootloader isn't a terrible step to try. I really don't think that's it though.

digital slate
#

did I miss a step and I need to convert the uf2 after compilation?

idle owl
#

Hmmm.... no. That shouldn't have been necessary.

digital slate
#

oh wait

#

that's the uf2

idle owl
#

Because building CircuitPython produces firmware.uf2 on its own

digital slate
#

I did the .bin from the build

idle owl
#

OH!

digital slate
#

and loaded that at location 0

#

so this was programmed using a JLink

idle owl
#

Wait, like using the JLink or something?

#

Ok, that should also work though

digital slate
#

yeah, it's the stuff I was asking about Friday

idle owl
#

but if you have bootloader, you can use the firmware.uf2 produced from your build of CircuitPython, and drag it over, I think....

digital slate
#

ah, I didn't build CP yet

idle owl
#

Loading the .bin with the JLink produces a lot more feedback if you're trying to debug something in that section

digital slate
#

I built the uf2 bootloader

idle owl
#

okay.......

digital slate
#

and then loaded the .bin to the board using a JLink

idle owl
#

How did you get the .bin?

#

if you didn't build it

digital slate
#

oh sorry

#

I mean i built the UF2 bootloader, which produced a .bin, not a .uf2

#

and then I loaded the .bin onto the board

#

which then gave me a FEATHERBOOT drive

idle owl
#

Ok. I think that means you still have to load CircuitPython if you want the CIRCUITPY drive. The bootloader is separate from CP

digital slate
#

which I dropped the .uf2 file onto

idle owl
#

Ok

#

you did that then

digital slate
#

(of CP)

idle owl
#

Alright. Back on the same page again

digital slate
#

yep

#

haha

#

and I am decently certain the CP is working, since i can get to the REPL via a serial terminal

idle owl
#

Right, that seems accurate.

digital slate
#

at least part of it is working

idle owl
#

Oooh question. Can you check the mount points more specifically and see if it mounted but didn't show up in the file explorer?

#

That has happened

#

As in see if the drive is there but doesn't show up on its own in the available drives in the main bit of the file explorer

digital slate
#

ah, interesting

#

that's like in the drive section of windows?

idle owl
#

Hmm not sure in Windows....

digital slate
#

ah

#

wait, wrong board plugged in

#

haha

idle owl
#

I would go check /Volumes/ in Mac for example

#

oops 😄

digital slate
#

"computer management" is the screen I was thinking of

#

but it's not there

#

should the drive have a name when it shows up in hardware manager?

idle owl
#

Ok. If it's not there, it's probably not connected. I'm pretty sure that's the most base level drive list on Windows.

#

um.... I'm not sure about that

digital slate
#

ok, I think I need to mess with the hardware again tomorrow

#

I have another board I can try this on as well

#

(tomorrow when I'm back in the office)

#

appreciate the troubleshooting help!

idle owl
#

For sure! Sorry it wasn't something simpler. At least you've got enough stuff to test with to determine it's probably not the computer. So many variables to deal with 😄

digital slate
#

yeah, it really can add up, even for seemingly simple stuff

idle owl
#

Nothing is ever simple ™

digital slate
#

haha

idle owl
#

It seriously never is though.... it's always one more thing you never expected

digital slate
#

ah, one other datapoint i just noticed as I went to go close some files

#

the part I have on board is the ATSAMD51J19

#

I believe this is similar to the feather m4

#

since i loaded from that

#

didn't noitce that though and was following tutorials that said ATSAMD51J20

#

might be some register differences preventing?

#

from when I was putting the boatloader on there

#

so might just retry thta with the correct part number

idle owl
#

I'm not sure. I feel like the big changer is the letter not the number... so the ATSAMD51G vs J. But I'm not sure. Datasheet might have that answer although that's a rabbit hole all its own right there.

#

Definitely worth retrying with the correct part though.

#

My Feather M4 has a J19 on it.

digital slate
#

yeah, will add that to the things I try tomorrow

#

thanks again!

lone sandalBOT
manic glacierBOT
#

Arduino: 1.8.7 (Windows Store 1.8.15.0) (Windows 10), Board: "Adafruit Feather M0 Express"

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware -hardware C:\Users\Glenn\Documents\ArduinoData\packages -hardware C:\Users\Glenn\Documents\Arduino\hardware -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__md...

manic glacierBOT
exotic pumice
#

It seems that when I try to feed DFLL into GCLK0 my program hangs

manic glacierBOT
manic glacierBOT
slender iron
#

@digital slate Sounds like the build isn't configured correctly for the flash chip. Over serial do:

#
import os
os.listdir("/")```
#

if it raises an error there is a spi flash issue (not a host os issue)

#

<@&356864093652516868> Here are the notes for tomorrow's meeting: https://docs.google.com/document/d/1z3-F_GTPGvw5fETP39sFrMuKw3qlRyQftPCn9bAJaRU/edit?usp=sharing

exotic pumice
#

I should be able to make it to circuitpython weekly this week 😀 It's a national holiday in Canada tomorrow so I don't have any school

manic glacierBOT
covert oxide
#

Hi, I have a question, can any port be set to double-precision floats? I tried setting MICROPY_FLOAT_IMPL to MICROPY_FLOAT_IMPL_DOUBLE in mpconfigport.h but I see issues "/py/formatfloat.c:94:5: error: floating constant exceeds range of 'float' " , do you know if there is something else I need to change?

raven canopy
#

clearing the FRAM breadboard, re-bagging the breakouts, and realize i have 2 of the I2C version. oddly enough, i have no recollection of ordering two, nor do i remember soldering headers on both... good thing i don't spend much time on ebay. 😆

digital slate
#

yep, looks like there's something wonky @slender iron

#

is there a default bootloader .bin I can try pushing to the chip?

#

I'll definitely still want to build it

tidal kiln
#

@raven canopy maybe you were thinking you'd test multiple devices on the I2C bus?

slender iron
#

Why bootloader? Seems like that is working. This is a circuitpython issue

raven canopy
#

@tidal kiln we'll go with that. since it reduces any cases of brain == absent. 😄

slender iron
#

The bootloader’s drive is fake, not the spi flash

digital slate
#

oo

#

got it got it

#

yeah bootloader does seem to work

#

it pops back into featherboot whenever I doubleclick the reset

slender iron
#

You’ll need to configure your board config for the spi flash device

digital slate
#

and that shows up fine on Windows and Linux

#

gotcha

slender iron
#

Yup that’s all good then

digital slate
#

just thought I was copying things exactly

#

hence my confusion

#

like same parts AFAIK on the Feather M4

slender iron
#

It checks the Jedec id on startup

#

Qspi too?

digital slate
#

yeah

#

let me go reslder the pins, they look shaky

#

maybe that's it

slender iron
#

Hrm. Then it could be an assembly issue. But I’d triple check the pin mapping and part number

digital slate
#

ok, will do

#

what should I see when I do that OS list command?

slender iron
#

Boot_out.txt at least

manic glacierBOT
umbral dagger
#

My talk on CP at PyCon Canada went well. Packed room, lots of interest, good questions, plenty of followup discussions after the talk.

idle owl
#

@umbral dagger That's great! 🎉

umbral dagger
#

I believe it was recorded.

tulip sleet
#

@umbral dagger Drop a link to the video when you know what it is. I looked but couldn't find it.

manic glacierBOT
umbral dagger
#

@tulip sleet They don't seem to be posted yet. I'd expect later this week. I'll be sure to post the link.

manic glacierBOT
digital slate
#

@slender iron after solder touchup on the QSPI, looks like some drives show up now

#

does that part get touched in the bootloader install?

slender iron
#

great!

digital slate
#

like should I reload that

slender iron
#

nope, its ignored

digital slate
#

but the drives are empty, as is the os.listdir

slender iron
#

no boot_out.txt?

digital slate
#

but some progress is better than none

#

nope

#

tried reloading the latest CP build as well

idle owl
#

@digital slate Great job!

slender iron
#

@digital slate can you load a file from the comp and have it stay?

manic glacierBOT
digital slate
#

it's still not showing up as a CIRCUITPY drive, to be clear

#

let me try dropping something onto there in a bit

slender iron
#

oh, I thought it was

digital slate
#

no, they're blank drives, there are two of them

#

it's weird

slender iron
#

ah, that sounds suspect. you can try to reformat them from the repl

#
storage.erase_filesystem()```
raven canopy
fluid helm
#

Not gonna make it today folks, sorry

hazy gust
#

I'm new to all things. sorry. When you use REPL, you need to enter each line of code in? You cant, like, set a breakpoint and troubleshoot 1 part/section?

stuck elbow
#

No, it's a repl, not a debugger. There is some work ongoing to provide a debugger as well, but I think it has stalled a bit.

raven canopy
hazy gust
#

cool, no worries, thank you.

exotic pumice
#

my discord is saying RTC Disconnected, not sure what that means

stuck elbow
#

real-time chat, I guess

raven canopy
#

@exotic pumice mine did too when i first tried to connect. try re-connecting.

gusty kiln
#

yeah, seems like discord is a little glitchy today.

strange pumice
#

With the M0 Express Feather is it possible to tell when it is connected to a USB power source?

gusty kiln
#

brb.

inland tusk
#

goood day everybody

gusty kiln
#

(back.)

fierce girder
#

Scott: Travelling so I'm just lurking today

marble hornet
#

anyone else have no audio ?

timber mango
#

@strange pumice yes and no.

marble hornet
#

nm

tulip sleet
#

@inland tusk we're hearing background noise ; could you mute?

strange pumice
#

@timber mango - The only way I can think of is to have a battery connected and watch the voltage change. Obviously this would be unreliable if the battery were fully charged. What ways do work?

timber mango
marble hornet
#

Tannewt: i'm just lurking, b/c only been working on my project

idle owl
#

@hazy gust We're in a meeting right now, FYI - may be a bit for a response.

#

Oh I wasn't scrolled. Someone already responded.

exotic pumice
#

I added a new PR this morning in libraries 😃

tulip sleet
#

@strange pumice you can tell if there's a usb serial connection: supervisor.runtime.serial_connected

idle owl
#

@exotic pumice We had already pulled the stats before you put that in. You'll be included in next week's.

exotic pumice
#

yep

raven canopy
#

@strange pumice note to dan's suggestion: serial_connected is not totally dynamic. it will update when a USB connection is made, but not when a disconnect happens.

idle owl
strange pumice
#

Good to know, thank you both @tulip sleet and @raven canopy

marble hornet
#

can one hug report even if just lurking?

raven canopy
#

bug...fixed!

marble hornet
#

thanks!

idle owl
#

@marble hornet Feel free to type it in now, you'll be next 😃

marble hornet
#

hugs to: @tulip sleet, @solar whale , @tidal kiln , @slender iron , and @raven canopy for always being so kind and willing to help 😊

#

also for helping debug

pastel panther
#

stuff in notes plz

slender iron
#

To kattni, scott, cgrover, nis, sommersoft and everyone else who helped me troubleshoot the issues with the board who shall not be named and talked me off the ledge when things went more and more pear-shaped.
To cgrover for a reminder that styrene is a thing that exists; it made my bezel making waay easier

marble hornet
#

who said that ^^^?

pastel panther
#

meeee

marble hornet
#

👌 tnx, just didn't catch name

#

i'm good thanks

tulip sleet
#

@gusty kiln Drew Fustini might have some intelligence on gpiod packages and their eventual appearance in Raspbian.

idle owl
#

Yeah Drew's in on the issue for it.

fierce girder
#

Yeah

#

I'll think about the packaging issue

#

We do have it on the Debian image for BeagleBone

#

But yeah raspbian is the more important platform

gusty kiln
#

i kind of lean towards "use it if available, otherwise fall back"

fierce girder
#

@errant grail good to hear 😀

#

@gusty kiln that makes sense

gusty kiln
#

that way we could tell people how to install but not make it a prereq for blinka on the pi.

raven canopy
#

studio builds...such fun.

fierce girder
#

It will be ahwile before /sys/class/gpio dissappears

pastel panther
#

so fun. much wiring

fierce girder
#

This is good work for the future

#

Yeah

errant grail
marble hornet
#

NEATO man

tidal kiln
#

@errant grail do you use eagle or kicad?

errant grail
#

KiCAD 5.0

tidal kiln
#

how'd you make the trinket footprint?

errant grail
#

Manually with the footprint editor.

tidal kiln
#

OLED sneeze guard?

errant grail
#

Works for fingerprints, too. I have a very curious grandkid...

manic glacierBOT
marble hornet
#

@ leaving the protective film on forever

neat folio
#

@marble hornet I believe the technical term is cheese wrapper, or so I have been told. 😉

marble hornet
#

ohh is that what's use to go between cheese levels ? like the bluefruit?

#

😉 😅

neat folio
#

hmmm.... meta... now my brain has to work...

exotic pumice
pastel panther
#

Stuff in notes again, please. pix incoming

idle owl
#

From @pastel panther:
last week: Received and assembled the new boards, didn't work, couldn't figure out issues in time for a new board rev :(((((
Scrapped the first board and assembled a second one that is working great though the boost converter needs rework before assembly
Learned a lesson: never. ever trust someone else's footprints.
Resolved to have a single example of the blinky Cyborg Raccoon for display at Designer Con instead of having some for sale :|
Started assembly of a base, doing some woodwork to build in the TFT and made an initial bezel out of styrene.

This week:
Finish up the rest of the base, prep and paint.
Work on more animations for the TFT and finalize coding for TFT and LED animations.
Pack up the car and drive to Anaheim for Designer Con! http://www.designercon.com/
(we're in booth 1049 for anyone who wants to stop by)

pastel panther
marble hornet
#

@pastel panther what screen is that ?

solar whale
#

Cool! BluefruitSPI allowing control of CPX neopixels from iPhone in CircuitPython

marble hornet
#

does it work with the st7735r lib?

pastel panther
#

ya

#

with some tweaks

marble hornet
#

ooh

stuck elbow
#

by the way, it would be nice to add those tweaks to the library at some point

pastel panther
#

Definitely will.

marble hornet
#

as another class?

stuck elbow
#

possibly

pastel panther
#

No, just need some offsets

solar whale
#

Still waiting for my particles too 😦

pastel panther
#

And some register munging to fix the rotation

marble hornet
idle owl
#

@raven canopy Nice! Thank you!

pastel panther
#

not sure

#

looks the same

tidal kiln
#

IN THE WEEDS

  • still need flash eraser UF2s?
pastel panther
#

ahahahahha

#

again!

raven canopy
#

yeah...Google can be mean. 😦

stuck elbow
#

it is the same

marble hornet
gusty kiln
#

blobfish: does what says on tin.

neat folio
#

after the weeds: talk about scheduling a get together for learning?

inland tusk
#

It does look like that in the water

slender iron
pastel panther
#

the '51 errata is a graveyard of broken dreams

raven canopy
exotic pumice
#

XD 32 pages of errata

pastel panther
#

wonder if you could patch uf2-samd to jump to some different offset with some reset tap pattern?

slender iron
#

@pastel panther I've been brainstorming that too. It could just set special memory values

marble hornet
#

is there a try and except in c?

pastel panther
#

also that

tulip sleet
raven canopy
#

@tulip sleet i posted it ... or that. 😄

marble hornet
#

what about the capacitive pins?

pastel panther
#

doubletapping with tweezers is also hard

idle owl
#

There's no D13 on the Trellis M4.

pastel panther
#

admin build could be cool?

#

(comes with free footgun)

#

(foot kevlar vest?)

raven canopy
#

(foot moat?)

exotic pumice
raven canopy
#

@exotic pumice will check it out! make no promises i can help...my smarts have limits. 😄

gusty kiln
#

real popular in webdev land

neat folio
#

"polite" suggestions (replaces interrupts after being nudged) 😉

solar whale
#

nudges - not interrupts

exotic pumice
#

I just noticed, I think I typed exclamation marks in my commit messages and it got replaced with my previous command

#

rust has interrupts 😛

raven canopy
#

so...MQTT-lite? no living history, just last events...

inland tusk
#

@slender iron why can you not implement queues like the bus module.

neat folio
#

so the t-shirt is labelled "pre-emption DE-nied" with an image of the towering 7 foot basketballer between you and rim... and you have have to choose between walking away with nothing, or looking at message queues and saying... "I could work with this" 😃

pastel panther
#

gotta run everyone! 👋

gusty kiln
#

so i wanted something like interrupts when i was doing a project with LoRa + some other stuff a while back.

#

message queues feel like interface scaffolding that people wind up kind of naively re-implementing when they're polling across a bunch of stuff.

#

i dig it, personally.

errant grail
#

Have to hit the road, folks. Great meeting today!

marble hornet
#

better cues than none, as someone who learned it in school the cues sound great as a start

raven canopy
#
typedef struct {
    uintxx_t message[n]; // message; what's the cutoff size?
    timestamp; // systick 
} msg_queue;

top-of-the-noggin, less than stellar psuedo...

marble hornet
#

high school^^

#

could i ask for some advice, python wise?

#

after after the weeds

gusty kiln
#

yeah, fair 'nuff.

#

off -> lunch. later all.

idle owl
solar whale
#

not annoyed at all -- but I also have to run -- Have a good day all!

raven canopy
#

same here. gotta figure out lunch. i may drop back in.

tidal kiln
manic glacierBOT
tidal kiln
exotic pumice
#

I'm not quite sure what the reference clock is at

#

I calculated based on 32KHz

slender iron
slender iron
#

@tulip sleet debug works for me

manic glacierBOT
slender iron
#

@tulip sleet make sure you have the latest tiny usb

tulip sleet
#
halbert@salmonx:~/repos/adafruit/circuitpython/lib/tinyusb$ git status
HEAD detached at 299a2f12
nothing to commit, working tree clean
halbert@salmonx:~/repos/adafruit/circuitpython/lib/tinyusb$ git remote -v
origin    https://github.com/tannewt/tinyusb.git (fetch)
origin    https://github.com/tannewt/tinyusb.git (push)
#

i'll try it on a mac

exotic pumice
#

why are clocks set to track dpll0 before dpll0 is initialized?

#

I'm having a hang

tulip sleet
#

that might be a mistake, but dpll0 might have been left over from the bootloader??

exotic pumice
#

I'm gonna try doing the initialization first and see what happens

meager fog
#

@tulip sleet hihi

tulip sleet
#

hi

meager fog
#

if we add a new UF2 bootloader def to our repo
what is the thing we do to make it generate the release files, do you do that manually

tulip sleet
#

i tag it and then build by hand and upload them

meager fog
#

oi

tulip sleet
#

yeah, it should be travis-ized

meager fog
#

ok - thanx - we have an incoming PR soon

#

should we have a shell script that at least iterates over everything to build?

#

i could probably write that

tulip sleet
#

there's a makefile target: drop-pkg or something like that. It's at the end of the makefile

meager fog
#

ooh ok thats not too bad then - ok thanx

tulip sleet
#

yeah, it doesn't take long

sly falcon
#

Howdy all...I've poking today and wanted to make sure I'm not missing anything - has anyone ever gotten the CircuitPython adafruit_rgb_display library working on the Hallowing?

tulip sleet
#

@slender iron HEAD of master works on Mac, does not work on Linux or Windows 10. On Windows 10, gets "USB device not recognized". I started with a completely fresh clone of adafruit/circuitpython, just to make sure there was no issue with tinyusb submodule

#

@slender iron does not always work on Mac. If I plug it in fresh, sometimes it doesn't enumerate and neopixel stays dark. If I then press reset, it does come up.

#

reset button on Linux doesn't help

slender iron
#

I was testing with arch linux

tulip sleet
#

try on your windows box - i assume you're out

slender iron
#

But I give it boot time before connecting usb. Ya at the gym now

#

Will try later. Probably a race condition of some sort

tulip sleet
#

we're going to the movies but I'll be back later in the evening like after 6:30-7 your time

sly falcon
#

w00t! Nevermind - I got it working...so stoked! Thanks to all of you wonderful folks behind CP 😄

exotic pumice
#

I seem to be getting stuck waiting for dpll status to be ready

#

maybe a quick sanity check is in order

while (!(OSCCTRL->Dpll[0].DPLLSTATUS.bit.LOCK || OSCCTRL->Dpll[0].DPLLSTATUS.bit.CLKRDY)) {}

is the same as

while oscctrl.dpllstatus0.read().lock().bit_is_clear() ||
        oscctrl.dpllstatus0.read().clkrdy().bit_is_clear() {}
}
#

oh wait no it's not

#

tricky boolean logic

#

still not happy

manic glacierBOT
ruby lake
#

hm, is there a win7 usb serial driver exe that includes the trellis m4?

slender iron
#

@tulip sleet I'm back working now if you get back

inland tusk
#

@idle owl is there a guide on how to get started with github for adafruit?

#

Also I would like to know if there is a template for creating libraries for drivers?

timber mango
#

You can clone a git repository on your hard disk -- to another directory on your hard disk.

#

Then you can push changes from the clone, back to the original.

#

In that way, your edits are not exposed to the public (as they would be on github.com).

meager fog
#

@slender iron heya for tinyusb do you get enumeration on samd51?

slender iron
#

@meager fog I do when I power it, start it and then connect usb. Its flaky on samd21 if I connect immediately

#

I think it may be because don't wait for the enable sync. Adding it now to see

solar whale
idle owl
meager fog
#

@slender iron kk just checkin'!

slender iron
#

that wasn't it. so there are startup gremlins I gotta find

meager fog
#

~its the clocks~

#

lol

slender iron
#

hopefully not. I didn't change those 😃

exotic pumice
#

its always clocks

slender iron
#

it might be.....

exotic pumice
#

I have no idea, I'm just venting my own frustration

slender iron
#

its not a bad intuition 😃

tulip sleet
#

@slender iron I'm back but have a phone call to make for a while.

slender iron
#

k np, just poking at it. I can only replicate when plugging it in

meager fog
#

@slender iron k i @'d ya on basecamp if you can reply before you zzz

slender iron
#

lemme look

#

@meager fog just replied

inland tusk
#

@idle owl It occured to me that when you upgrade a brand new cp express, you need to replace certain libraries for the demo to work. Could you include a list so that updater could know what libraries to extract from the new bundle.

meager fog
#

@slender iron thanks - back to routing for meeeee

ruby lake
#

hm, feather m4 shows up, trellis m4 does not.

pastel panther
#

same build?

ruby lake
#

does the adafruit windows drivers know the neotrellis m4 vid/pid?

timber mango
#

I did not have to tell Linux about Trellis M4.

exotic pumice
#

I set my d13 to be !(dpll0->clkrdy) and it's always on 😢

ruby lake
#

linux is better at resolving usb devices 😉 win7 is a bit old school

timber mango
#

I seem to recall I had to do something unusual when I first got the Trellis. There's a new .UF2 bootloader update out, and is a required update.

ruby lake
#

yeah, looking at Adafruit_usbser.inf there is no USB\VID & PID entry for the trellis m4

timber mango
#

(mine needed the update; I got mine Nov 1st or thereabouts)

ruby lake
#

right, that deals with the bootloader not being marked protected

#

this is getting the computer to see the trellis at all

tulip sleet
#

@ruby lake windows 7 or 10?

ruby lake
#

7

tulip sleet
#

sorry, yes, we need to update the driver package for it. I'll consult about it.

ruby lake
#

It probably needs lines like "%FEATHER_M0_RADIOFRUIT% CircuitPython (8025:00)"=DriverInstall, USB\VID_239A&PID_8025&MI_00

#

tuned for the trellis m4

tulip sleet
#

right, you could make your own, but it won't take that long to update. I'll try to do it tonight or by sometime tomorrow.

ruby lake
#

no huge rush, I'm about to zonk for the evening..but thanks 😉

tulip sleet
#

ok, I won't stay up late for it 😃

slender iron
#

@tulip sleet can you see what beagle shows?

#

I can replicate it sometimes but its not obvious where the code is stuck

tulip sleet
#

i'll get a trace

slender iron
#

thanks

#

I tried to get a backtrace but the stack was corrupt

exotic pumice
tulip sleet
#

@slender iron here are two traces from plugging in the M4 metro: once it worked, once it didn't

slender iron
#

excellent!

#

the failed one looks like it started working

#

and beagle would be better for this too since it shows the packet level

tulip sleet
#

the failed one just hung. I'll break out the beagle

slender iron
#

it could have hung on the set configuration

#

bonus points for getting it to hang with jlink tracing

#

I gotta take a break for now though

#

frustrating to have something so picky

tulip sleet
#

i'll post something here when I can get it to fail

slender iron
#

thanks!

tulip sleet
#

@slender iron

^C
Program received signal SIGTRAP, Trace/breakpoint trap.
0x0001057c in maybe_transfer_complete () at ../../lib/tinyusb/src/portable/microchip/samd21/dcd.c:283
283            if (maybe_handle_setup_packet()) {
(gdb) bt
#0  0x0001057c in maybe_transfer_complete () at ../../lib/tinyusb/src/portable/microchip/samd21/dcd.c:283
#1  USB_Handler () at ../../lib/tinyusb/src/portable/microchip/samd21/dcd.c:338
#2  <signal handler called>
#3  0x00002174 in __udivsi3 ()
#4  0x0002d806 in color_brightness (color=12288, brightness=<optimized out>)
    at ../../supervisor/shared/rgb_led_status.c:189
#5  0x0000d8c4 in tick_rgb_status_animation (status=<synthetic pointer>)
    at ../../supervisor/shared/rgb_led_status.c:267
#6  run_code_py (safe_mode=NO_SAFE_MODE) at ../../main.c:278
#7  main () at ../../main.c:432
#

Failed the first time I tried it. I should go to sleep but that backtrace looks promising. Getting datacenter to work on Ubuntu 18.04 required adding a bunch of old .so's to their private lib dir. They've had months to update their Linux version for 18.04 and haven't done it yet.

slender iron
#

ya, that doesn't surprise me. Thanks!

tulip sleet
#

many minutes later now, bt is just like #3 down. I assume the USB went dead.

slender iron
#

ya, I think its a concurrency issue. maybe with the fifo

#

anyway, back to my break. thanks again!

tulip sleet
#

sure, gn!

#

that backtrace was a lucky break. Repeating the whole thing now and I'm just backtracing in the pulsing loop

meager fog
#

@slender iron l@@k

pastel panther
#

ooooh

slender iron
#

nice! very excited

#

@meager fog is there a fuse on the trellis? I think I'm triggering it

meager fog
#

yes there is

#

trips at 1A

slender iron
#

will all pixels at full brightness trip it?

meager fog
#

yep

#

z'not a lamp 😃

slender iron
#

and what happens when its tripped?

meager fog
#

the whole thing will shut off

#

no power

#

for about 30 sec

#

until the fuse resets

#

cuts the UBS 5V

slender iron
#

hrm, i'm seeing them stay on but get dimmer and yellower

#

and the mcu becomes inaccessible

meager fog
#

ooh

#

that iz a brownout

#

the voltage sags a ton

#

ive done that

slender iron
#

ya, thats what it seems like

meager fog
#

i dont know if we have BOD fuse on

#

i think the samd51 had some bug so we didnt

slender iron
#

I think we do

#

ah

#

welp, I'm in there now

meager fog
#

yeah congrats!!!

#

🎈 🎊

slender iron
#

somehow my usb change causes us to send all white 🤦

meager fog
#

rad

#

bad timing data can do that...but thats assuming you're sending data

slender iron
#

ya, thats a suspect

#

overwriting the wrong memory is too

meager fog
#

heck yeah chapter 9

slender iron
#

kinda hard to debug until I can recover from the brownout

meager fog
#

you could hot air the shifter off

#

its easy to replace

#

its the same chip as an itsy m4

slender iron
#

nah, ideally I'll make it recoverable

#

first, when we reset the board, set them to off

meager fog
#

its possible..

#

the SK's tend to come up off

#

unlike previous pixels

#

so if you depower, they should not light up

#

if that makes sense

#

like, its definiately something sending data to cause it to turn white

slender iron
#

right, but ideally we can recover from the brownout

meager fog
#

hmmm not sure how

slender iron
#

if we manage to run the start of circuitpython before things get worse

meager fog
#

the pixels are putting it into brownout, you have ot shut em off

#

its possible! i think?

slender iron
#

eh, worth a try

meager fog
#

not sure tho

slender iron
#

the brownout isn't immediate so resetting with ctrl-c could save you too

#

as long as it shuts them off for you

meager fog
#

oh right yeah

#

if you're already connected

slender iron
#

welp, it does it when I try and reset them at the start

meager fog
#

yay!

#

wait, misread. not yay

slender iron
#

totally a clock thing 😕

meager fog
#

its always clocks

#

💤 for me

slender iron
#

night!

tough flax
#

Hey @slender iron can I get a pointer to the library and/or board def for the M0+BLE? I may have time to test it tomorrow

manic glacierBOT
#

Thank you for the detailed report. I was able to reproduce this on my end. I believe @jerryneedell is right that the bad failure mode is a result of overdrawing the usb line with all white pixels.

The question is, why the white pixels? Well, I haven't figured it out. It appears that the neopixel clocking is slightly slower than in d08747d. The zero high time is 0.5 us instead of 0.38 us which is enough to be a one. I get these numbers on a Metro M4 without neopixels attached so it isn't a ...

solar whale
#

@tough flax accordting to this Guide https://learn.adafruit.com/munny-lamp/code-with-circuitpython - use the feather_m0_adalogger build. I did this and it worked fine. I think the only difference from the feather_m0_basic is the definition of some of the pines used on the adalogger -- I did not look to closely to see if they are actually used but as I noted, it worked for me 😉 Looking at the code, it is not clear to me why the feather_m0_basic build would not work as well. I'll test it later.

Your colorful, glowing, wireless vinyl desk buddy!

tulip sleet
#

@slender iron I'm really sorry - the USB traces I posted last night were for Metro M0, not an M4 board, despite the filenames.

manic glacierBOT
neon briar
#

Trying this:

cs = digitalio.DigitalInOut(board.D0)
sdcard = adafruit_sdcard.SDCard(spi, cs) ```
produces:
```Traceback (most recent call last):
  File "main.py", line 19, in <module>
  File "adafruit_sdcard.py", line 113, in __init__
  File "adafruit_sdcard.py", line 141, in _init_card
OSError: no SD card```
#

There's an 32GB micro SD card in the Adalogger. I looked at it on a Mac and it appears to be formatted.

#

Replacing board.D0 with board.SD_CS won't work because that attribute doesn't exist:

Traceback (most recent call last):
  File "main.py", line 18, in <module>
AttributeError: 'module' object has no attribute 'SD_CS'```
#

These are the attributes of board:

['A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'SCK', 'MOSI', 'MISO', 'D0', 'RX', 'D1', 'TX', 'SDA', 'SCL', 'D4', 'D5', 'D6', 'D9', 'D10', 'D11', 'D12', 'D13', 'NEOPIXEL', 'VOLTAGE_MONITOR', 'I2C', 'SPI', 'UART']```
#

What's the correct setup to write to the Adalogger SD Card from the Feather M4 Express?

tidal kiln
#

@neon briar try D10

cs = digitalio.DigitalInOut(board.D10)
prime flower
meager fog
#

@prime flower heya are you around? plz ping me on slack 😃

tulip sleet
ruby lake
#

@tulip sleet Thanks, will check it out when I get home

river quest
#

relevant #LEEK

#

nrf52840 bluefruit Feather

pastel panther
#

(Express?)

#

methinks I see qspi flash and neopixel

river quest
#

@pastel panther yep, both 😃

digital slate
#

Lookin good!

#

hey @slender iron I saw your post over on the CE forum about QSPI configuration

slender iron
#

yup yup

digital slate
#

this is the part I have on board

slender iron
#

looks like its W25Q16JV_IQ in the list

digital slate
#

yep, saw that one

#

anyway, off to build, will let you know how it goes!

slender iron
#

kk!

digital slate
#

thanks all for the help

slender iron
#

np

prime flower
#

Does anyone using VSCode encounter it "locking up"/unresponsive window errors when editing files on the /circuitpy/ volume?

pastel panther
#

I can't say I have

#

I'm on a mac fwiw

prime flower
#

same

slender iron
#

@tulip sleet the disassembly of neopixel_write looks very different between the two builds

#

welp, the debug build was switched from -Os to -O0 which would do it

#

!!!! thats for all builds

neon briar
#

Thanks @tidal kiln board.D10 works. 👍

slender iron
#

(╯°□°)╯︵ ┻━┻

tulip sleet
#

well that was a rathole

slender iron
#

you have no idea

neon briar
#

@tidal kiln was there a schematic you looked at to find that? Or source code?

idle owl
#

@slender iron oi...

manic glacierBOT
#
[adafruit/circuitpython] New branch created: tannewt\-patch\-4
exotic pumice
manic glacierBOT
tulip sleet
#

@slender iron was @idle owl using the debug build?

slender iron
#

no, it was -O0 for all builds

#

maybe I should pragma that code to always be -Os

tulip sleet
#

🤦

neon briar
#

Thanks @exotic pumice

tulip sleet
#

could put a warning in the Makefile

slender iron
#

I like -O0 for debugging

#

@tulip sleet adding the pragmas now

tulip sleet
#

i'll wait for the travis-rerun

slender iron
#

I confirmed it works even if the top level is -O0

#

kk

#

canceled these builds

manic glacierBOT
slender iron
#

I think the m0 issue is separate. moving onto it now

tidal kiln
manic glacierBOT
digital slate
#

got the project built without issue (a first for me, I'm normally chasing compile ghosts)

#

created a new project

#

or new board, sourced from the feather m4 project

#

built with the memory I am using

#

...and now serial is gone too 😃

#

devices pop up whenever i'm in the bootloader

#

but back in the normal CircuitPython mode, it goes dark and I don't see anything

#

I assume that means something else is wrong

#

currently on my Linux machine (where I built the project), going to swap back to my windows machine to see if it sees something different on the board.

idle owl
#

Hmm

#

That's definitely worth trying first.

tulip sleet
#

if you have a crashing main.py or boot.py, that could prevent CIRCUIPTY from appearing

digital slate
#

and it at least comes up with serial

#

so maybe something wrong with my build?

tulip sleet
#

do you have a SPI flash chip?

#

this is a homemade board?

digital slate
#

yeah, homemade board with a different chip

#

that's why I was building

#

should I be building at a particular tag/release/commit?

tulip sleet
#

what chip?

digital slate
#

was talking with @slender iron about it above

tulip sleet
#

-IQ and -IM variants have differences. Do we have a def for that chip?

digital slate
#

but even the default feather_m4 wasn't showing serial when I plugged it in

#

the one I built, that is

slender iron
#

There have been some usb issues so it might be worth trying from before the big usb merge

digital slate
#

that one?

#

that's the commit tied to the release

tulip sleet
#

yes, try 4.0.0-alpha.2 if you want 4.0. I thought you were using 3.1.1 all the time, but if 4, yes

digital slate
#

nope, not using 4 yet

#

I mean

tulip sleet
#

3.x branch should be fine

digital slate
#

...am I?

#

haha

tulip sleet
#

if you're on master, you're on 4

digital slate
#

ah, ok

#

yeah, then probably need to swap back to make sure

tulip sleet
#

master is pretty unstable right now

digital slate
#

ok, good to know

manic glacierBOT
digital slate
#

that'll be a good sanity check against the files I downloaded from the site

#

(which work a bit more)

#

and 3.x should build no problem?

#

or are there other things I need to do other than swap branches

tulip sleet
#

after you checkout 3.x, do a git submodule update --init --recursive

#

and rebuild mpy-cross if you are freezing anytying

digital slate
#

got it, thanks

#

(bet that's it)

digital slate
#

woooot

#

CIRCUITPY shows

#

as is the case of many woes in my current life, I didn't pay enough attention to the BOM

#

😃

#

but this was a useful journey of learning how to build the firmware as well

idle owl
#

@digital slate 🎉

digital slate
#

when the feather boards are shipped from the adafruit factory, they have main.py programmed onto that drive, is that part of the build process as well? Should I be seeing those files or would I need to include them in future build processes?

slender iron
#

They aren’t on there by default. The test code that loads circuitpython loads them onto the flash

digital slate
#

that makes sense

#

fancy system y'all got going around here 😃

#

thanks again for troubleshooting help

manic glacierBOT
solar whale
#

@slender iron @tulip sleet congratulations on the trellisM4 fix -- just built and ran on mine -- working well now! Nice!

slender iron
#

@solar whale any usb problems?

solar whale
#

not that I have noticed - on the trellism4

slender iron
#

k cool maybe its the m0 that has gremlins still

idle owl
#

Ok so.... long story short the character LCD library never had support for the RGB shield, and was using incorporated driver shims for the other versions.... I redid the entire thing to use MCP230xx, sorted both I2C and SPI for the backpack, and I added code that makes the shield work. I've literally never done anything like this. I'm so crazy excited. (Had to share.)

solar whale
#

I will try more boards tomorrow - or possibly later tonight.

#

Ive been writing to and running some test scripts on the trellism4 -- not using neopixels -- but no issues with USB

manic glacierBOT
manic glacierBOT
slender iron
#

@tulip sleet I caught a concurrency issue similar to what you saw. ```
(gdb) p *_usbd_q
$20 = {buffer = 0x20000401 <_usbd_qdef_buf> "", depth = 16, item_size = 12, count = 0, wr_idx = 9,
rd_idx = 8, overwritable = false, mutex = 0x0}

#

count != wr_idx - rd_idx

#

and it should

ruby lake
#

@tulip sleet I can now see the usb serial port of the Trellis m4, but the CIRCUITPY: usb drive does not exist.

tulip sleet
#

@ruby lake the visibility of CIRCUITPY shouldn't depend on the drivers, so that is some other problem. are you using the trellis m4 build linked in the trellis guide?

ruby lake
#

checking

ruby lake
#

I updated that using a pi

#

hm, I thin kthe reset button on this board is broken

#

it has no tactile feel and the dotstar led glitches a lot

ruby lake
#

@tulip sleet ok, things are better now. I have the drive appearing and serial console

#

hm, actually it does not see the REPL in Mu

manic glacierBOT
tough flax
#

No joy on the RFM69 transmit/receive

#

😦

#

One chip is the built-in M0, the other is a wing on an M0 Bluefruit (loaded the Adalogger bin)

#
Temperature: 22.0C
Frequency: 914.999mhz
Bit rate: 250.0kbit/s
Frequency deviation: 250000.0hz
Sent hello world message!
Waiting for packets...

Built-in output:
Temperature: 32.0C
Frequency: 914.999mhz
Bit rate: 250.0kbit/s
Frequency deviation: 250000.0hz
Sent hello world message!
Waiting for packets...
#

Temp is off

#

on the built-in

#

I'm too tired - will chat w/@tulip sleet about this in the morning

#

Nevermind! My bad - 😃 All is working

#

(except the temp is wrong)

manic glacierBOT
#

The following code succeeds in running:

from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard import Keycode
import adafruit_rfm69
#code to do the work...

while the following fails:

import adafruit_rfm69
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard import Keycode
#code to do the work...

I get the following error:

Traceback (most recent call last):
  File "main.py", line 10, in <module>
  File "adafruit_hid/keybo...
manic glacierBOT
hoary hill
#

If I need to drive a stepper motor directly via DRV8833 breakout board, which circuitpython library to use? I only found examples and libraries for Arduino, not circuitpython...

stuck elbow
#

you may need to write your own

solar whale
#

@slender iron @tulip sleet FYI -- tried current master on pca10059 -- still not working. Will try on some atmel M0 and M4's next

solar whale
#

@tough flax FYI -- The CP build to use for the Feather_Bluefruit_M0 is indeed the Feather_m0_adalogger build, The pin D8 is not available in the feather_M0_basic build and it is needed to se the Chip select for the Bluefruit SPI interface. D8 is avaliable in the adalogger build. Mystery solved...

solar whale
#

@tulip sleet @slender iron No luck with current master on any M0 builds yet -- tried feather_m0_express,feathere_m0_adalogger,, trinket_m0,CPX --- none boot to REPL.

#

Metro M0 express "looks" like it boots -- green pulsing neopixel but no CIRCUITPY drive ....

#

Metro M4 express seems to be working fine -- so so far only M4s (MetroM4 and TrellisM4) are working for me.

manic glacierBOT
river quest
tidal kiln
slender iron
#

@solar whale thanks for the update. I know what I need to fix for the internal flash variants of nrf but have been focused on the M0s. One thing worth trying on the M0 is leaving it plugged in and hitting the reset button. I believe I'm seeing a clock startup issue from time to time

solar whale
#

I did try that on some. No response. I can try again in a little while.

slender iron
#

k, I'm going to try other m0s today after breakfast. some of them may be glaring issues

#

I'm seeing some crazy clock stuff on the metro sometimes. I have a code.py with 500hz pwm and it can be in the 600s after. The neopixel doesn't work then either

idle owl
#

Anyone done much with character LCDs? I'm thinking there's a superfluous property in the RGB lib for it but I want to make sure I'm not missing something.

ruby lake
#

@river quest woo

stuck elbow
#

@idle owl the rgb lib doesn't do character lcds?

idle owl
#

@stuck elbow I mean the character_lcd_rgb.py file

#

For character LCDs with RGB backlights

stuck elbow
#

ah, no idea about that one, sorry

idle owl
#

Ok thanks!

manic glacierBOT
#

The code doesn't really strip anything (the path is left intact) it only accepts "\\x00" and "/\x00" as valid endings of a path (before that it was only looking for chars lower than the printables - I don't know why not only \x00).

I added the rule for backslash as well as slash, because it was already used as a separator in other parts of the oofatfs code. No other rationale behind it.

proven bluff
#

If notro is here, sorry for replying so late.

tulip sleet
#

@idle owl I use char lcds but haven't done anything with the rgb ones

idle owl
#

@tulip sleet It's an RGB specific question. I think I'm right but if anyone else had worked with them I wanted an opinion.

#

@tulip sleet How are you at schematics? Maybe you could at least take a look and see if you agree. I don't have a schematic for the display itself, only it used on a shield, but it shows the pins on the display which is the thing I'm questioning

tulip sleet
#

i am good at schematics, so ga

idle owl
#

There is no "backlight" pin on that display. Because the backlights are the red green and blue pins.

#

Correct?

tidal kiln
#

think of it as 3 separate backlights

tulip sleet
#

right, there are three backlights instead of just one. The anode should be the common +V for all the backlights. You ground the R and/or G and/or B pins to turn them. I have one to verify

idle owl
#

Ok.

tulip sleet
#

well not that one, but I have the raw display

idle owl
#

Because there is a thing setting the the specific backlight pin, and then it uses set_backlight to turn it on or off. I don't think it belongs in this file, because it's meant for the monochrome.

#

That's what I was thinking.

tulip sleet
#

which pin?

idle owl
#

It defaults to None

#

So it's not actually setting anything.

#

But that means the property is in there, doing nothing

#

and you could add it to your code, and nothing would happen

#

because I don't think it makes sense for this LCD

tulip sleet
#

for a monochrome backlight, do you give it the pin to ground or the +V pin?

idle owl
#

Has a backlight pin.

#

so set_backlight makes sense and also works

tulip sleet
#

would you set_backlight to pin 16?

idle owl
#

let me look

#

No it's set based on the expander chip and the shift register

#

I'm using external libraries for both.

slender iron
#

@proven bluff notro is github only

idle owl
#

the MCP230xx and the soon-to-be 74HC595

#

using the get_pin() property

tulip sleet
#

which library file should I look at?

proven bluff
#

thanks @slender iron

idle owl
#

It's not all pushed to GitHub, hold on

#

There aren't any issues with the monochrome backlight

#

My question was regarding the lack of a separate "backlight" pin on the RGB one, separate from red, green and blue.

#

but let me get as much of this as I can pushed to GitHub

#

it's still a mess.

tidal kiln
idle owl
tidal kiln
#

not sure, but looks like you just ignore that maybe...

#

you create the RGB instance with:

lcd = adafruit_character_lcd.Character_LCD_RGB(lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7, lcd_columns, lcd_rows, red, green, blue)

so backlight will just be None

idle owl
#

Yes I know

tidal kiln
#

and then the idea is to use set_color

idle owl
#

Right

#

but that means that the property set_backlight does nothing.

#

And you could put it in your code, your code will run, and it will do nothing.

#

I don't think it needs to be in that file.

tidal kiln
#

from what i see, i agree

#

they're all generally the same in terms of backlight - one or more LEDs that you can PWM control. RGBs are basically just monochrome with 2 extra LEDs

gusty kiln
#

in my mind, the only reason to have it is probably if you want to be able to drop either of an rgb or monochrome display into code that talks to the interface.

#

and that's already kind of... you're gonna have to know which class you're instantiating anyway.

idle owl
#
solar whale
#

@slender iron pressing reset a few times did get Metro_m0 to boot to CIRCUITPY!

tidal kiln
#

or to allow simple code to treat the RGB as a monochrome version, for simplicity

idle owl
#

But there's no physical pin

#

so

#

How would it do anything?

tidal kiln
#

but then the RGB version of set_backlight should operate on the rgb_led

solar whale
#

But no REPL

slender iron
#

@solar whale ok interesting. did the neopixel work each time?

#

is this with ubuntu?

solar whale
#

yes neopixel pusling green

idle owl
#

which I considered @tidal kiln

#

but then it's not set_backlight

#

and it shouldn't be called the same thing in both and do different things

tidal kiln
#

@idle owl this is one of those things where i'd ask the original author if possible

tulip sleet
#

i agree w/ cater and brennen. one thing to worry about is the polarity. The code talks about R and G and B anodes (+), but the shield schematic you posted above has a common anode pin, so the polarity is opposite.

solar whale
#

yes ubuntu 18.04 -- I can see the CIRCUITPY foloer -- looks OK and screen /dev/ttyACM0 connects, but not response from REPL

idle owl
#

@tidal kiln Not possible.

tidal kiln
#

😦

idle owl
#

Already looked into that when I started this.

tidal kiln
#

then you are free to decide what the future holds 🌈

idle owl
#

@tulip sleet the polarity thing is already an issue because set_backlight works backwards at the moment.

solar whale
#

pressing RESET does drop the /dev/ttyACM0 to the metro_m0

idle owl
#

ok. I'm taking it out. or maybe just have it throw an error in case someone uses the same code as from a monochrome

solar whale
#

but it came back to CIRCUITPY

tulip sleet
#

i'd just take it out. It will throw an error because there's no property. That' good enough.

tidal kiln
#

i could argue to leave it in

idle owl
#

The error I'd throw is "This isn't supported for RGB. Instead use set_color"

tidal kiln
#

allow an RGB display to act like a monochrome

tulip sleet
#

well, there's also an optional arg to __init__. Do you want to support that? I'd say if you want to make it act like a monochrome, use the monochrome class, not the RGB class.

#

you can then specify which pin you want. Unless the polarity issue complicates things also

idle owl
#

no, I would take all of the backlight stuff out.

slender iron
tidal kiln
#

have RGB extend monochrome?

#

(it doesn't currently)

idle owl
#

I don't get what the use case is here.

#

This seems like an edge case. That could be done using the current code anyway

tulip sleet
#

would that make the rgb class smaller?

tidal kiln
#

you could run monochrome code with an RGB display, and it would just act like a monochrome display

#

R=G=B=backlight

idle owl
#

and what color would the backlight be?

tidal kiln
#

shades of white

idle owl
#

That will fail on RPi I think.

tidal kiln
#

or whatever was set with set_color

solar whale
#

@slender iron OK will give it a try -- take me a few minutes to figure out how...

idle owl
#

Can't use more than one LED at the same time

tulip sleet
#

you'd have to make all three pins be the backlight pin, can't do that

tidal kiln
#

i'm thinking overriding backlight in RGB class

slender iron
#

@solar whale you can go into the submodule and add me as a remote

solar whale
#

ah

tidal kiln
#

@idle owl just a guess - but current character_lcd_rgb.py was probably started from character_lcd.py copy pasta style, that's why the set_backlight code is there and the same between the two

idle owl
#

Yes I agree.

#

But since this is my first major driver work, I wanted to make sure I wasn't missing something before making the change.

tidal kiln
#

i don't think so

solar whale
#

that was git remote -v

tidal kiln
#

are you planning on moving to @property style also?

idle owl
#

yeah.

#

I picked this up yesterday... I only got it working entirely this morning.

solar whale
#

can I just do git fetch origin careful_reset?

slender iron
#

ah, ya. I think that will work

solar whale
#

seemd to accept it -- building now

slender iron
#

k I'm trying on adalogger too

tidal kiln
#

@idle owl fwiw - it's easier when you start from scratch. dealing with "why is this here?" kind of stuff when inheriting code is an unfortunate side effect. you end up burning time reverse engineering and speculating about things.

solar whale
#

on metro M0 -- I had to reset it twice htne it boots OK and I have REPL

slender iron
#

was the neopixel ok when it didn't work?

solar whale
#

commit did not change -- I htink I have ther right build ```uto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.2-149-gf190bb2c2 on 2018-11-14; Adafruit Metro M0 Express with samd21g18

slender iron
#

seems like it should be marked dirty

#

git status should show a change in tinyusb

solar whale
#

checking

slender iron
#

(make sure you checkout the branch too)

solar whale
#
HEAD detached at 299a2f12
nothing to commit, working tree clean
```   ahh - I did not checkout -- trying again
slender iron
#

👍

#

whats the bossac command?

solar whale
#

just asec

#

./bossac -e -w -v -R -p ttyACM0 adafruit-circuitpython-feather_m0_adalogger-0.8.0.bin

slender iron
#

thanks!

solar whale
#

hmmm -- no REPL on metro_m0 now -- didi get CIRCUITPY after two resets....

slender iron
#

hrm

solar whale
#

git status ```n branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)

modified:   ../../lib/tinyusb (new commits)

Untracked files:
(use "git add <file>..." to include in what will be committed)

../nrf/drivers/

no changes added to commit (use "git add" and/or "git commit -a")

slender iron
#

the adalogger worked for me when I loaded it

solar whale
#

OK -- I can try it -- did metro_m0 work for you?

slender iron
#

it was pretty reliable yesterday. when it failed the neopixel did too

solar whale
#

ddi you do debug build -- I am not

slender iron
#

no, let me post my bin

solar whale
#

adalogger not working for me either 😦

slender iron
#

thats for adalogger

solar whale
#

do you have a UF2?

#

I have the update bootlaoder on mine

slender iron
#

ya

#

I need to do that

solar whale
#

hmm -- no luck with your build either.

#

ok after reset -- get CIRCUITPY

#

and repl

slender iron
#

hrm

#

so it sounds better but not perfect

solar whale
#

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.2-150-ga96580e92-dirty on 2018-11-14; Adafruit Feather M0 Adalogger with samd21g18
>>> 
>>> 
>>> 
slender iron
#

I think I'll PR these changes so we can see

solar whale
#

code runs!

tulip sleet
#

I will try on a metro m0 as well

slender iron
#

👍

manic glacierBOT
slender iron
#

having a code.py with pwm out can help diagnose clock startup issues because a saleae can verify its speed

solar whale
#

my metro_m0 still not happy -- do you want me to try your .uf2?

slender iron
#

let me build one

tulip sleet
#

not working for me on metro m0 with adafruit/circuitpython f190bb2c269 (head) and tannewt/tinyusb at tip of careful-reset 😦

#

rebuilding again to double-check

solar whale
#

same for me

#

@tulip sleet try a reset or two

tulip sleet
#

i did, and also plug/unplug

slender iron
#

hrm, is the neopixel working?

tulip sleet
#

yes, pulsing

#

non-debug build

slender iron
#

so its not a clock issue

solar whale
#

@tulip sleet and I are consistent

tulip sleet
#

on USB2 and USB3 ports

#

Ubuntu 18.04

#

i can try windows and mac too

slender iron
#

k let me get closer to a clean branch

solar whale
#

on thirdt reset I got a CIRCUITPY mount, but still not REPL

slender iron
#

@solar whale do you have a beagle?

#

(usb debugger)

solar whale
#

no -- my dog is part beagle 😉

slender iron
#

😃

tulip sleet
#

do you want another beagle trace from me?

solar whale
#

I get repl on mac

#

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.2-149-gf190bb2c2-dirty on 2018-11-14; Adafruit Metro M0 Express with samd21g18
>>> 
>>> 
>>> 


slender iron
#

sure I guess

solar whale
#

after a reset

slender iron
#

making a new build for myself now

solar whale
#

@slender iron are you on mac?

slender iron
#

ya, but I also have an arch linux box I test with

solar whale
#

does it work on both? works on my mac but not linux

#

that was my build -- I can try yours

slender iron
#

ya, I think so

tulip sleet
#

worked on mac first time, but then I unplugged/plugged, and am now getting an irregular green flicker on the neoxpixel on metro m0

#

and no repl or circuitpy

slender iron
#

that sounds like a clock issue

tulip sleet
#

yah

#

maybe not clock, maybe excessive interrupts, since it is green

solar whale
#

mine (my build ) was OK after plug.unplug on mac -- still needed a reset

slender iron
#

here is my code.py: ```
import pulseio
import board

p = pulseio.PWMOut(board.D8, frequency=500)
p.duty_cycle = 2 ** 15

while True:
pass```

#

@chrome perch can you repro with a jlink attached?

#

oops wrong dan

tulip sleet
#

i'll try, and you want me to monitor D8 with saleae?

slender iron
#

ya, please

tulip sleet
#

you want me to do this on mac or linux?

slender iron
#

either as long as you plug it into what causes the issue

solar whale
#

I can hook it up too -- seeing solig green on mac after reset

tulip sleet
#

the flicker is new, never seen this before, only on mac

slender iron
#

it should be very close to 500 hz

solar whale
#

I see same thing -- solid green on Ubuntu, but no boot

slender iron
#

what linux kernel is it?

tulip sleet
#

Linux salmonx 4.15.0-38-generic #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

slender iron
#
~ $ uname -a
Linux dalinar 4.18.16-arch1-1-ARCH #1 SMP PREEMPT Sat Oct 20 22:06:45 UTC 2018 x86_64 GNU/Linux
solar whale
#

mine is ame as Dan

slender iron
#

k, I may go try it with the rosie box which is running ubuntu

tulip sleet
#

let's see if i can use jlink on linux with it plugged into Mac

slender iron
#

thats what I do 😃

tulip sleet
#

we are running ubuntu 18.04, updated to latest kernel

slender iron
#

k will update my box. its a little behind

tulip sleet
#

i mean latest 18.04 kernel

solar whale
#

my salea is showwing 500hz -- but no USB

#

on Ubuntu

slender iron
#

k, so not a clock problem

#

do you have wireshark?

solar whale
#

dmesg shows ```[245044.317406] usb 3-3.4: new full-speed USB device number 111 using xhci_hcd
[245044.440146] usb 3-3.4: New USB device found, idVendor=239a, idProduct=8014
[245044.440152] usb 3-3.4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[245044.440156] usb 3-3.4: Product: Metro M0 Express
[245044.440158] usb 3-3.4: Manufacturer: Adafruit Industries LLC
[245044.440161] usb 3-3.4: SerialNumber: D5B6D46D8413D405C413E263011241FF
[245044.440937] usb 3-3.4: can't set config #1, error -32

tulip sleet
#

that's the same error I was getting

solar whale
#

I do not have wireshark

slender iron
#

ok, thats good its the same error. I was digging in the code that responds to the set config request

#

I don't know where its getting lost though

#

ok, I got it too.

#

gonna move that box down here

tulip sleet
#

plugged into mac, removed jlink (because it interferes with neopixel), runing the PWM test code. PWM is fine at 500 Hz. LED started regular green, then switched to very bright green after a few seconds. can't reproduce that yet

slender iron
#

hrm

tulip sleet
#

stil not working on win10 either

slender iron
#

@tulip sleet I've reproed the beagle trace you sent me. lots of stalls

tulip sleet
#

a usb state viewer says "Configuration Descriptor Request Failed", which is what I saw in the usb traces

slender iron
#

ya, its weird. it looks like it works the second time

tulip sleet
#

maybe windows and linux are too fast? You could compare the time stamps on the enumeration requests/responses in the good and bad traces and see whether one is significantly ahead of the other?

solar whale
#

I can't get it to work at all on Ubuntu now -- still get 500hz on D8 but no response from USB

#

arg - unplugged/plugged and CIRCUITPY came right up!

slender iron
#

I've got it reproing with gdb attached

solar whale
#

but no REPL

slender iron
#

I kinda suspect a buffer overrun

#

the setup request data isn't making it through correctly

tulip sleet
#

but there is something on Mac and Arch Linux that's different: order of requests or timing related

#

that makes it less likely to fail

meager fog
#

@umbral dagger heya i replied in github but dunno if you didnt see it (you mentioned before not getting github notes) - wanna split Debouncer out?