#circuitpython-dev

1 messages Β· Page 208 of 1

idle owl
#

review only. it's pypi setup only.

pastel panther
#

@slender iron continuity seems fine (cut open a cable, measured to the pins on the ic). No shorts as far as I can tell. sense pin isn't connected to anything.

slender iron
#

hrm

#

clocks could be the problem then

idle owl
#

Can this chunk of code be accurately described as "iterating over the NeoPIxel grid using the width and height values"? python for x in range(trellis.pixels.width): for y in range(trellis.pixels.height): pixel_index = (((y * 8) + x) * 256 // 32) trellis.pixels[x, y] = wheel(pixel_index & 255)
Context: https://github.com/adafruit/Adafruit_CircuitPython_TrellisM4/blob/master/examples/neopixel_trellism4.simpletest.py

pastel panther
#

how would the clocks be messed up?

tidal kiln
#

@idle owl who's the audience? might be ok to just say "looping"

idle owl
#

@tidal kiln People using the TrellisM4 library. It's going into the board guide. A page on using the lib.

tidal kiln
#

use either one

idle owl
#

ok. I wanted to make sure I was correct in my understanding of what iterating is. I looked it up, and it seemed like I was, but I wanted to verify with the example I would be using.

tidal kiln
#

for this, same thing, and i'm not even really sure when the difference in semantic minutiae matters

idle owl
#

Ok

exotic pumice
#

I think you're right, but iterating doesn't necessarily have to be in a loop

#

like a generator is kind of iterating too

#

I think

tidal kiln
#

@idle owl that PR looks boiler plate, did a quick copy-pasta scan, travis is happy, want me to merge?

idle owl
#

Yes please

pastel panther
#

@slender iron I have to admit defeat, have a little breakdown and then go to work 😐

#

thanks for your help. at least I know it's running code

slender iron
#

ya, I'm with you. I have a similarly frustrating issue

tidal kiln
#

@idle owl done

idle owl
#

Thank you!

pastel panther
#

good luck with yours, ttyl

slender iron
#

thanks! you'll figure your issue out with fresh eyes

idle owl
#

@tidal kiln @exotic pumice thanks for the input. I used iterate in a general explanation of what to use width and height for, and then simpler wording in the specific explanation of the example.

tough flax
#

@tidal kiln - yup, I saw that

uneven yarrow
#

I'm running into an issue with circuit python, the gemma v2, and capacitive touch. When I set up my gemma for cap touch it works fine when I touch the pad directly or when I alligator clip into something like fruit, but when I try to attach to some conductive fabric I can't get the touch to respond

tidal kiln
#

@tough flax have you experienced similar issues with i2c pull ups?

uneven yarrow
#

and I've seen some tutorials that say to use a resistor to control the sensitivity of the touch, but I thought the circuit python cap touch was self regulating

tough flax
#

Not with that sensor

uneven yarrow
#

(though now I'm wondering if that self regulation was on the playground express specifically ...)

tough flax
#

I've had other issues with them on the relay board

#

@tidal kiln did adding a 10K pullup solve it?

tulip sleet
#

@uneven yarrow When you first create a TouchIn object, the "calibration" is done by reading the current .raw_value, which assumes it's not being touched. The threshold for touch is then that value + 100

tidal kiln
#

@tough flax unknown. still working that specific forum issue.

uneven yarrow
#

oooh! oh yeah now I remember reading that!

#

looking for that spot in the docs ...

tulip sleet
#

You could take some data on this by connecting the fabric, creating a TouchIn, and then looking at the .raw_value with and without being touched, and see what the difference is. You can set .threshold yourself if you want to tune it. But it might just not work very well with a piece of conductive fabric, or a long wire (like more than 2-3 feet, I've seen).

uneven yarrow
#

πŸ‘ fantastic! awesome yeah I will give that a try. Thanks @tulip sleet !

#

ty. I remember reading it when I was building a cap touch jack-o-lantern last month, but I completely forgot about it since then πŸ˜›

idle owl
#

APIs change πŸ˜ƒ

uneven yarrow
#

(working on my second cap touch related project now)

#

oh! didn't realize I was looking at old docs, ty @idle owl

#

bookmarked!

idle owl
#

Always check to see that latest is in the URL, that's how you know. And it'll say "latest" down towards the bottom left in green.

#

I have a lot of 2.x in my history and sometimes forget and wonder why things are weird πŸ˜„

uneven yarrow
#

def. I'll make sure to keep an eye out for the version. thanks πŸ˜ƒ

crimson ferry
#

Does anyone know why the M4 products (e.g., ItsyBitsy M4 Express, Feather M4 Express) don't have capacitive touch (or do they)? Is it a library issue or a hardware issue? Microchip site seems to indicate that the SAM D5X line has plenty of it, but I find no mention on Adafruit product or CircuitPython pages, and import touchio fails on M4 feather.

idle owl
#

@crimson ferry The way that it works was significantly different than on the M0 and so it didn't port at all. We haven't gotten to sorting it for the M4s as a result.

crimson ferry
#

Thank you. Sounds like it could be a possibility in the future for these boards.

gusty kiln
#

(re: that forum thread @slender iron posted earlier.)

idle owl
#

@gusty kiln Merged. Are you good to do the release?

gusty kiln
#

@idle owl procedure is just tag version with commit message as release notes at this point? haven't done one in a while.

idle owl
#

@gusty kiln Yeah, minor bump or whatever, and include the "to use this install the bundle, to install use pip, here are the docs" part too. Should be able to edit/copy/paste from a previous release for that if it was done before

gusty kiln
#

cool, on it.

solar whale
#

cool -- hooked up a Bluefruit SPI breakout to an ItsyBitsyM0 -- the "simpletest" works -- woohoo!

idle owl
#

Bundle add fail. bleh.

tidal kiln
#

ooo...i'm good at that...did i do it again?

idle owl
#

No, that's on me.

#

Tried to add to the bundle before releasing and then didn't bother to read what the error said thoroughly enough to realise that was the issue. Fixing it now.

prime flower
#

Just finished listening to the CPY Weekly, +1 on the live review session idea

idle owl
#

I guess I should have checked the fancy new Adabot output that would have told me that literally every lib I tried to add did not have a release instead of failing my way through Travis checks to figure out which needed it... 🀦

#

FINALLY

slender iron
#

@crimson ferry correct, its a software issue

timber mango
tidal kiln
raven canopy
#

@idle owl was the need-release list accurate?

idle owl
#

@raven canopy yeah

raven canopy
#

whooray! πŸŽ‰

#

never trusts his own testing

idle owl
#

as far as I can tell anyway, heh. I didn't check all the empty repos. But now the non-empty ones all have initial releases.

tough flax
#

So... just thought I'd share. I've spent the week very frustrated. I put a reverse proxy ("edge server") in place in front of my day job's primary servers. I've done this many times to speed things up in my former clients, but this was on a service (and company) that I own, so it was "all me".
And it _just_didn't_work. I mean, everything got slower! It was insane! Server was sitting at 0.1 load, no IO, no network traffic, and yet when we went through the proxy, it crawled. Every 100th request or so would totally time out.

I finally pulled the plug and tried other approaches to fix our growing pains.

Today, I tried to reuse the edge server for a temporary project and downloaded a file from github... it ran at 120K/sec! After a call to the colo, it turns out that the port I had plugged the new server into had throttling set to 1MBit/sec. That was it!

We're back on track and I'm so happy I had to share πŸ˜ƒ

Sorry to be off-topic, but I've really appreciated having someplace with competent people who helped me this week πŸ˜ƒ

cedar beacon
#

do any circuitpython boards have wifi?

solar whale
#

@cedar beacon The only wifi support in CircuitPython a t this time is for the ESP8266.

cedar beacon
#

πŸ‘

marble hornet
#

hey, i'm working on a project and want to revert my aster to a previous commit, i tried googling but the git bash is giving me this error ```jonah@DESKTOP-39O84BI MINGW64 /d/system (master)
$ git push origin master
To https://github.com/TG-Techie/TG-US.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/TG-Techie/TG-US.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

jonah@DESKTOP-39O84BI MINGW64 /d/system (master)``` after i ran:

#
git reset --hard
git pull
**i edited  a file and added a comment**
git add --all
git commit -m 'who would cross the bridge of death etc'
git push origin master```
tulip sleet
#

You can push -f, or you can use git revert, adding an explicit rollback commit

#

Push -f probably makes sense in this car. Don’t do it if anyone else might have pulled from the github repo.

marble hornet
#

thanks @tulip sleet what does -f stand for?

#

it worked 😁 tnx

tulip sleet
#

β€œforce”. Usually implies it’s dangerous

marble hornet
#

πŸ˜…

#

because you could remove improvements made by other people?

tulip sleet
#

πŸ˜ƒ you can mess up the history so other people's repos are out of sync

marble hornet
#

this: schedule_secondary_terminal_read just popped us while using mu and a cp device. can i ask what is it?

meager fog
#

@umbral dagger hey dave. just checkin' my guidezchedule today - are you planning to submit one? totally no pressure!

umbral dagger
#

I have a few in the works. One on extending CP is nearing "ready to submit".

meager fog
#

@umbral dagger just so mike and i know our day - is it likely to be submitted in the next 3 hours? (again totally ok if not!)

ruby lake
#

ok, finally solved that mux address issue

umbral dagger
#

@meager fog 3 hrs.... probably.

#

@meager fog Doing a proof/edit pass now.

meager fog
#

k thx

#

all good

uneven yarrow
tulip sleet
#

@uneven yarrow Watched the video: very nice project! You might want to try the conductive fabric in some jacket or sweater of your own. The fabric will be close to body capacitance when it's worn, so you might need adjust the sensitivity in some way

#

@slender iron I think I am going to accept arturo's PR as is and then modify it from there ("we guarantee the API will change").

uneven yarrow
#

ah cool. Yeah I'll give it a try. Based on the testing I did this morning I figured I'd need to adjust the threshold as I add it to the hoodie, but good to know that it's likely going to change

slender iron
#

@tulip sleet sounds good to me

tulip sleet
#

kk, I'll get it up to date and submit a PR

coarse topaz
#

I'm using a DS3231 and compiling the latest version from git- I get RuntimeError: SDA or SCL needs a pull up when I try to initialise the I2C object with i2c = io.I2C(board.SCL, board.SDA)

tidal kiln
#

is the DS3231 actually attached ?

coarse topaz
#

🀦

tidal kiln
#

@coarse topaz i can see how that message isn't really helpful if you don't understand the inner workings of I2C

#

@tulip sleet @slender iron should that message be appended with something like "check wiring" or "is device connected"?

slender iron
#

@tidal kiln sure! feel free to refine it

tidal kiln
#

d'oh. that's what i get for asking. πŸ˜ƒ

#

@coarse topaz what do you think? what would be more helpful? keep in mind it needs to be as terse as possible.

pastel panther
#

@slender iron I don't suppose you have any thoughts on what hardware wise could mess up the usb clock?

tulip sleet
#

@pastel panther does your board have a crystal? this is m4, right? Which board of ours does it most closely resemble. I'd say this is more likely software setup

pastel panther
#

( on a samd51 board)

#

it does have a crystal, probably closest the the feather m4 express

tulip sleet
#

@tidal kiln would "no pullup found" be clearer than "needs a pullup"?

#

but we are running xtal-less because the DFLL is messed up, so any setup code should resemble the metro m4

#

or feather m4

pastel panther
#

I don't know if you caught the earlier discussion, but uf2-samd also can't get usb to work

tulip sleet
#

no, missed that

#

51j19a, same chip as our boards?

pastel panther
#

51G

#

strange thing is it's the same basic uf2 and CP config that I've used successfully with other boards.

tidal kiln
#

@tulip sleet maybe. but also, some text that doesn't require knowing what "SDA", "SCL" or "pullups" are.

tulip sleet
#

maybe "no I2C devices detected (no pullups found)"?

#

@pastel panther so it's like an itsy (51g)

coarse topaz
#

That's much clearer

pastel panther
#

ya but it has a crystal

#

which isn't mission critical at this point

tulip sleet
#

but crystal stuff is broken due to DFLL errata; we never tried a 51g with a crystal, I think. is your uf2 board copied from itsy?'

slender iron
#

@pastel panther I usually check the clocks by outputting a PWM signal with a known frequency

pastel panther
#

@tulip sleet I don't recall at this point

#

@slender iron ok, I guess I can try that

tulip sleet
#

there is some commented-out code that outputs clocks on pins in supervisor/port.c

idle owl
#

@tidal kiln Note about initial PRs to empty repos: when you fork it, you need to delete the filler README.md otherwise it defaults to using that one and not the fancy one you added.

tidal kiln
#

@idle owl did i not linux correctly again? i thought i had done that 😦

idle owl
#

It doesn't get replaced when you copy because it's a different filename. So it's not a linuxing fail, it's an extra step I think. It was on BMP3XX. No worries. Simply wanted to make sure you knew.

tidal kiln
#

oh...hmmm. i thought there was a README.md in the cookiecutter stuff - so it would replace.

idle owl
#

README.rst

#

is what cookiecutter makes

tidal kiln
#

grr. ok.

#

guessing that's in one of my repos?

idle owl
#

It was. Isn't anymore.

#

I took it out when I did the PyPI setup

tidal kiln
#

sweet. spa treatment bonus!

idle owl
#

πŸ˜„ yes

tidal kiln
#

"repos leave clean and refreshed!"

tulip sleet
#

@idle owl @tidal kiln would you like to switch to README.md's in the cookie-cutter in the long run?

tidal kiln
#

i'm fine with whatever. defer to @idle owl

idle owl
#

Really the only thing that would do is eliminate the step of deleting the readme.md in the initial PR.

#

Which I guess might be worth it.

tulip sleet
#

i just mean do you prefer RST or markdown when writing a README?

idle owl
#

markdown for sure.

#

But that's because that's what I know.

tulip sleet
#

me too

idle owl
#

I don't know what the badges would look like in markdown

#

(looking at a readme.rst right now)

timber mango
#

@pastel panther where is your code?

idle owl
#

Welp, figured out how to do the badges in Markdown.

#

I think it's worth looking into.

#

@raven canopy When you're around, I want to discuss changing the README in cookiecutter to markdown instead of RST.

pastel panther
#

@timber mango sitting right here

#

taps laptop

#

Haven't checked it in yet but the CP32-M4 board files are pretty much what I used for the new board, but with different pins

timber mango
#
 $ ag PINMUX_P.*GCLK_IO0  
samd51g19a.h
128:#define PINMUX_PA30M_GCLK_IO0      ((PIN_PA30M_GCLK_IO0 << 16) | MUX_PA30M_GCLK_IO0)
132:#define PINMUX_PA14M_GCLK_IO0      ((PIN_PA14M_GCLK_IO0 << 16) | MUX_PA14M_GCLK_IO0)
136:#define PINMUX_PB22M_GCLK_IO0      ((PIN_PB22M_GCLK_IO0 << 16) | MUX_PB22M_GCLK_IO0)

samd51j19a.h
160:#define PINMUX_PA30M_GCLK_IO0      ((PIN_PA30M_GCLK_IO0 << 16) | MUX_PA30M_GCLK_IO0)
164:#define PINMUX_PB14M_GCLK_IO0      ((PIN_PB14M_GCLK_IO0 << 16) | MUX_PB14M_GCLK_IO0)
168:#define PINMUX_PA14M_GCLK_IO0      ((PIN_PA14M_GCLK_IO0 << 16) | MUX_PA14M_GCLK_IO0)
172:#define PINMUX_PB22M_GCLK_IO0      ((PIN_PB22M_GCLK_IO0 << 16) | MUX_PB22M_GCLK_IO0)
#

Those are the pins that can output clocks.

#

G19A: PA30, PA14, PB22
J19A: PA30, PB14, PA14, PB22

#

This include file decides if the clock output is enabled on one of those pins:

// <q> Output Enable
// <i> Indicates whether Output Enable is enabled or not
// <id> gclk_arch_gen_0_oe
#ifndef CONF_GCLK_GEN_0_OE
#define CONF_GCLK_GEN_0_OE 0
#endif
```from `config/hpl_gclk_config.h`
#

That's Atmel Start based. Dunno what other programming systems use.

raven canopy
#

@idle owl iirc, rST is used over Markdown so that Sphinx renders correctly.

idle owl
#

@raven canopy ah ok. nm on that one then.

#

@raven canopy not sure I'm prepared to fight Sphinx to get it play nice with markdown.

#

I guess on the plus side I now know two ways to use Markdown to make an image with alt text and a target link.

raven canopy
#

[!alt text] right?

idle owl
#

sort of

#

but that's the right idea

raven canopy
idle owl
#

oh. hmm.

raven canopy
#

note: would require change to docs/index.rst and docs/conf.py as well for every repo. might be able to adabot patch it though

idle owl
#

Yeah I figured it would require a massive redo of Things β„’

raven canopy
#

All the Things! πŸ˜„

idle owl
#

Though it wouldn't matter in existing repos if we didn't change the existing READMEs right?

#

Or is that something Adabot could do

raven canopy
#

No, wouldn't affect existing. Would create a rift in the standard. Haha

idle owl
#

Also, can I say, Adabot is pretty much amazing.

raven canopy
#

She is. And getting amazinger. I hope.

idle owl
#

Could Adabot update the readmes to .mds? Or is that way ridiculous.

timber mango
pastel panther
#

@timber mango thanks for that; I'll give it a try when I get back to the bench

timber mango
#

that was my big achievement over the summer: USB CDC ACM in Atmel Start, for both M0 and M4 targets. ;) /a_whole_summer

#

clock foo is here:

obsidian compass
#

Hello everyone, my name is Ayan, I used to be active here few months back but was travelling for a while now not being updated with the progress on circuit python, but now I am back and ready to catch up and hopefully contribute here πŸ˜ƒ

timber mango
#

Hi Ayan!

obsidian compass
#

Hi @timber mango

raven canopy
#

@idle owl we can test it. I imagine that a patch would work; just depends on how git would gen/handle the diff.

idle owl
#

Fair enough.

obsidian compass
#

The new trellis really caught my eyes in newsletter this week ..

#

Seems out of stock already

#

wanted to order one.

stuck elbow
#

those things often appear out of stock, as they are announced while they are being produced (I think)

obsidian compass
#

Ah! I see

stuck elbow
#

so you can subscribe and get a notification when they appear

manic glacierBOT
solar whale
#

@stuck elbow received 2 Pew Pew 10.2 yesterday -- both up and running -- well done!

stuck elbow
#

@solar whale awesome!

solar whale
#

now I just need to find time to play with them!

stuck elbow
#

haha, I have the same exact problem

manic glacierBOT
solar whale
#

with the ble WIP PR merged, I get ```jerryneedell@Ubuntu-Macmini:~/circuitpython_master$ git submodule update --init --recursive
error: Server does not allow request for unadvertised object b96950abf27229c2a3b1719d60691321246bfc94
Fetched in submodule path 'ports/nrf/nrfx', but it did not contain b96950abf27229c2a3b1719d60691321246bfc94. Direct fetching of that commit failed.

stuck elbow
#

someone forgot to push?

solar whale
#

@tulip sleet see above

#

or @slender iron

slender iron
#

@solar whale I think you may need to sync your submodules

#

we changed to our own nrfx repo

#

travis passed so the checked in state is ok

solar whale
#

how do I sync submodules?

slender iron
#
(.env) /V/E/c/l/tinyusb (tinyusb_samd|βœ”) $ git submodule sync
Synchronizing submodule url for 'hw/mcu/nordic/nrfx'
#

then git submodule update --init --recursive

solar whale
#

thanks -- happier now

slender iron
#

πŸ‘

solar whale
#

so far so good ```Adafruit CircuitPython 4.0.0-alpha.2-135-gd08747d37-dirty on 2018-11-07; PCA10059 nRF52840 Dongle with nRF52840

help('modules')
main busio microcontroller supervisor
analogio collections micropython sys
array digitalio neopixel_write test
binascii framebuf os time
bitbangio gamepad pulseio uio
bleio gc random usb_hid
board hashlib storage
builtins math struct
Plus any modules on the filesystem
import bleio
dir(bleio)
['name', 'Address', 'AddressType', 'AdvertisementData', 'Characteristic', 'Descriptor', 'Device', 'ScanEntry', 'Scanner', 'Service', 'UUID', 'UUIDType', 'adapter']

solar whale
#

@tulip sleet still issues using USB to copt fiels to nrf52840 after ble active

tulip sleet
#

not surprised - I have not tested this, just reviewed the API. a lot of this code is from ubluepy. Did it have the same issue?

solar whale
#

but a simple scan works ```from bleio import Scanner

def display_scan_results(scan_entries):
for e in scan_entries:
print("ADDR: ", e.address)
print("NAME: ", e.name)
print("RSSI: ", e.rssi)

    # Line break between record sets
    print("")

Scan 1s for advertising devices in range

s = Scanner()
scan_res = s.scan(1000)

Display the scan results

display_scan_results(scan_res)

tulip sleet
#

main things that will change coming up is that Device will probably be split back to Peripheral and Central again.

solar whale
#
ADDR:   Address('b8:78:2e:19:70:42')
NAME:   None
RSSI:   -86

ADDR:   Address('1c:e7:69:c0:22:d5')
NAME:   None
RSSI:   -86

ADDR:   Address('45:4d:2c:4f:63:e2')
NAME:   None
RSSI:   -52

ADDR:   Address('c8:69:cd:1c:5d:f8')
NAME:   None
RSSI:   -86

ADDR:   Address('1c:e7:69:c0:22:d5')
NAME:   None
RSSI:   -82

tulip sleet
#

what BLE devices are you scanning? I don't have many to test for.

solar whale
#

I have a bunch of Pcs and phones nearby

tulip sleet
#

so a lot of centrals, but not peripherals (or not peripherals only)

solar whale
#

I'm really not even sure what it is seeing

#

I need to work on my sniffing tools

solar whale
#

@tulip sleet also trying on feather_nrf52832 -- so far - ok -- Control-C still does not work 😦

tulip sleet
#

same as before? not sure about that - I haven't tried it in a while

solar whale
#

yes -- has not been working for a long time -- works at REPL prompt, but wont interrupt a runnig script

#

ble_scan works same as on 52840 -- no hangup issues with USB -- yet

#

my other programs --not BLE related seem to be working as before -- SPI - SDCard stuff

#

@tulip sleet All of a sudden BLE is everywhere -- been having lots of fun with the new BluefrutiSPI library for the NRF51 devices. Works great!

tulip sleet
#

glad to hear! Lots of BLE is certainly a goal!

I have to test the SPIM3 bug again with the new code

solar whale
#

I'll be tied up tomorrow, but hope to have lots of time to poke/prod things this weekend. - My weekends now start on Friday πŸ˜ƒ

idle owl
#

@solar whale congrats! πŸ˜ƒ

solar whale
#

Thanks !!

umbral dagger
#

@solar whale Heh.. My weekend starts on days that end in Y.

solar whale
#

I'm getting there!

umbral dagger
#

The flip side is that everyday becoms a work day

solar whale
#

work is in the eye of the beholder

stuck elbow
#

and then where is the burnout?

umbral dagger
#

That's why I keep several projects on the go at all times.

#

Plus video games.

#

A small, fuzzy kitten also helps.

solar whale
#

It's a delicate balance -- kittens or puppies do help

stuck elbow
#

sorry, that was against the coc

solar whale
#

πŸ˜‚ Still trying to get my dog to understand the return to "Standard time"

stuck elbow
#

DST is undefensible

solar whale
#

agreed - even my dog knows that

stuck elbow
#

good thing we are getting rid of it in EU, finally

solar whale
#

nice!

stuck elbow
#

this will be the best thing right after the metric system :)

solar whale
#

the dog is demanding dinner -- back later

stuck elbow
#

β†’ bed

marble hornet
#

is the pyboard supported? it looks like the stm branch is mostly left alone

raven canopy
#

@marble hornet not in CircuitPython. MicroPython yes.

marble hornet
#

thanks @raven canopy

#

to anyone:

#

could someone help me learn how to sceen share during show and tell?

slender iron
#

ya, but switch to a different channel

#

(and ping me)

marble hornet
#

pinged

manic glacierBOT
raven canopy
#

question: anyone ever had file writes truncated inside

try: 
    gen_list() 
finally: 
    f.write("\n".join(list))

i'm losing like the last 6 lines...

EDIT: nevermind. text editor on ubuntu just refused to show the last few lines with the window maximized. weird...

manic glacierBOT
pastel panther
#

heya @slender iron I'm going to spend some time tonight trying to dig a bit deeper into this usb issue but honestly I'm struggling to motivate myself to debug the clocks because I don't understand what I could have done hardware wise to mess them up

slender iron
#

Β―_(ツ)_/Β―

#

its hard for me to know either

pastel panther
#

because you don't know what I've done or because hardware making clocks broke doesn't make sense to you either?

#

I mean it doesn't not make sense, but I don't understand it (beyond an external crystal being messed up)

raven canopy
#

@pastel panther are your changes up on github? i am far-from-expertly, but have studied the clock code and may be able to see something...

#

unless, you haven't messed with clock code...

pastel panther
#

nope

#

I haven't, just added a set of board files

#

I have the same problem with the bootloader as well

#

so it's not CP thats the problem

raven canopy
#

ahhh...well, i am of even less help then. πŸ˜„

pastel panther
#

I appreciate the offer regardless

raven canopy
#

πŸ‘

slender iron
#

debugging hardware is hard

pastel panther
#

that's very true

raven canopy
#

are you getting any USB messages? or just crickets?

pastel panther
#

nada, as far as I can tell

#

dmesg doesn't show anything, nothing in system info, no mass storage

#

I might poke the data lines with my scope later just for kicks, but I don't think I'll be able to make any sense of it

tough flax
#

Wow. Just realizing how tight memory is going to be on this Trinket M0 KeySwitch... probably should have spent the extra $5 each on an Itsy M4

#

I might have to take Dan's fall-back approach & free adafruit_hid modules into a custom build & get rid of Math and stuff like the PIRkey

#

freeze (not free)

#

So I just realized something about Python. I imported KeyCodes in main.py... and then I imported it in a module file... it actually used twice the space!

#

Is there a way to share that import between the files memory-wise?

velvet badger
#

Anyone know if there is a way to solder an off switch onto a crickit?

upbeat plover
#
import gc # needed to keep memory nice

def write(f, what_to_write):
    with open(f, "a") as fp:  # open to add line to file
        fp.write(what_to_write)  # write
        fp.flush()  # what does this do, hope it helps????

def read_in_chunks(f, size=64):
    while True:
        chunk = f.read(size)
        if not chunk:
            break
        print(chunk)
        yield chunk
        

def copy(file_from, file_to, size=64):
    with open(file_from) as f:
        for chunk in read_in_chunks(f, size):
            write(file_to, chunk)
            gc.collect() # this is very importaint without it the memory fills

# larger size will use more memory per chunk but increases speed greatly
read_in_chunks("test.txt", size=64)
copy("test.txt", "test2.txt", size=64)

gc.collect()
print(gc.mem_free())
print(gc.mem_alloc())

read and copy large files, with a set amout of RAM size

pastel panther
#

@velvet badger Doesn't it already have a switch?

velvet badger
#

A very tiny switch. I need one that's external.

tough flax
#

@velvet badger If you're using the Crikit Feather, you can wire between GND and EN - that will disable the Feather's 3.3v regulator which will stop your code. I will not stop powering motors, etc.

tough flax
#

Has anyone written a guide on how to freeze in a module in a custom build? I basically can make my code work if I don't import adafruit_dotstar, but I'd really like to be able to give visual feedback

#

One option would be to freeze dotstar & hid into the build

#

The alternative I've come up with is to export the configuration in a JSON-ish (is there a python serialize in CP?) and only parse the file when it changes

slender iron
#

@tough flax it shouldn't use twice the memory. How are you importing it?

tough flax
#

Perhaps not twice, an extra 1K each time

#

?

#

from adafruit_hid.keycode import Keycode

#

HEY! πŸ˜ƒ mpy-cross got me just under the limit!

#

@slender iron - ignore me

#

I was importing the KeyboardLayoutUS as well when I ran that test

slender iron
#

hrm

tough flax
#

The only difference in size is the code for the import line (50bytes)

#

My bad

#

I also wasn't running gc.collect() before mem_free()

#

I'm just finding it very tight in the M0 Trinket

#

But mpy-cross will probably get me just where I need to be

#

with about 500bytes left πŸ˜ƒ

#

You can't mpy compile main.py can you?

#

Just to catch you up on what I'm trying to do (@tulip sleet is doing something similar & we're collaborating)
I have a config file like this:

debounce=yes
bouncetime=.1
repeat=yes
repeattime=1.0
color=#555555

[common]
color=#FF0000
1 SPACE
2 ENTER
3 LEFT_CLICK
4 RIGHT_CLICK
5 LEFT_CLICK LEFT_CLICK

[mouse]
color=#00FF00
1 MOUSE_LEFT
2 MOUSE_UP
3 MOUSE_RIGHT
4 MOUSE_DOWN
5 LEFT_CLICK


[browser]
color=#0000FF
1 SPACE
2 TAB
3 SHIFT+TAB
4 PAGE_DOWN
5 PAGE_UP
#

I want to have "modes" for what the KeySwitches do (those three modes are pretty common) & some settings global and at each mode

#

The lines can have 'chords' too (like

1,5 CHANGE_MODE
#

The file would be on the Trinket and be editable by end users

#

Code to parse it now works (yay) and I am activating when the switches are pressed

#

when I tried to light the dotstar it barfed on memory

#

Not sending HID yet (but that should work)

#

After mpy-cross I have 1552 bytes left

#

So, my only remaining question before I crash is ...

#

Is there anything like pickle or some other serialize in CP? @slender iron

stuck elbow
#

I would stick to the configparser's syntax

#

so SPACE=1 instead of 1 SPACE

marble hornet
#

can i override the permission denied in the write function without unmounting the cp drive ?

tulip sleet
#

@tough flax I made you a trinket build with hid frozen in. See your dm’s. Didn’t read here first.

#

@marble hornet only if you use remount in boot.py. See a data logging learn guide for details.

manic glacierBOT
meager fog
#

@tidal kiln hey0

tidal kiln
#

@meager fog hey

meager fog
#

@tidal kiln basecamp's down - if ya have a todo list of sorts i can paste it here

tidal kiln
#

only todo currently on there was for the few wrap up things - cp libs, feedback servo guide update

#

are you looking for new todo?

tidal kiln
#

@idle owl ran into a blinka issue - do you take those also?

slender iron
#

looks like its missing

#

and should be added

tidal kiln
#

ok. so i was looking for the right thing?

#

just to make sure i was reading how it's suppose to be done correctly

tulip sleet
#

@tidal kiln the deinit() doesn't really deinit, it just sets the .fraction to 0. The object to deinit would be the PWMOut that you passed in when you created the Servo or ContinuousServoc

#

I'm not sure why there's a deinit() in Continusous Servo

tidal kiln
#

thanks. was wondering about that approach. thought maybe the servo one did that plus other stuff.

tulip sleet
#

maybe you or I should file an issue

#

there's with support in ContinuousServo.

#

DCMotor also has a deinit() that just stops the motor without actually deinit-ing the PWMOut.

tidal kiln
#

here's more context...

#

so was looking for CP equivalents for attach and detach

#

those are needed for the record part, so user can move servo without it fighting back

tulip sleet
#

I think if you just set .throttle to zero, that would do it. The API is reallly pretty different.

tidal kiln
#

that's only on continuous

tulip sleet
#

hmm, yes, it looks like there shold be a turn_off() or release() or something that sets duty_cycle to 0

#

right now there is no straightforward way to do that

tidal kiln
#

ok, so i wasn't overlooking something.

#

like you said - for now, could just cheat and directly use the PWM object

tulip sleet
#

yes, though that's kinda messy ("leaky abstraction")

idle owl
#

@tough flax You can mpy-cross main.py, and then import it in a different main.py. It's weird but possible, there was a demo early on for CPX that was too big to run standalone and was therefore mpy-crossed and then run from main.py - this is the only reason I know this.

#

@tidal kiln Depends on the issue, but either way you should file it on the Blinka repo probably.

tidal kiln
idle owl
#

hmm. Ok, file an issue on the NeoPixel repo for that one. I'll talk to Brennen about it.

tidal kiln
#

is it an issue for that repo because one of the requirements files should've taken care of that?

#

vs. a blinka repo issue?

idle owl
#

no it's a Blinka dependency issue.

#

you're right. But we're looking into it now.

gusty kiln
#

@tidal kiln if you install it in a fresh venv, does it still not pull in the rpi_ws281x dependency?

tidal kiln
#

unfortunately, haven't done much with the venv yet. but one thing i did do different from guide page - i didn't run with sudo

#

for the initial neopixel lib install

gusty kiln
#

i'll poke at it.

tidal kiln
#

@tulip sleet can you please file the issue for the servo stuff? i think you're more dialed in on it than i am.

tulip sleet
#

sure

tidal kiln
#

thanks!

#

@gusty kiln it's quite possibly me. i wasn't following the guide directly. let me know if you need any more deets on what i did. thanks for looking into it.

idle owl
#

@tidal kiln Something seems odd on @gusty kiln's end as well.

tidal kiln
gusty kiln
#

@tidal kiln what pi do you have?

tidal kiln
#

zero w

gusty kiln
#

i bet this is the issue: rpi_ws281x>=4.0.0; platform_machine=='armv7l'

idle owl
#

ahhhhh

tidal kiln
#

and now that you ask, rings a bell, isn't blinka advertised for pi 3 (and maybe 2)? goes to look.....

#

oh. no. it's ok with zero. it's just the much older pi 1's.

tulip sleet
#

@tidal kiln filed two issues on Motor

tidal kiln
#

@tulip sleet awesome. thanks!

meager fog
#

@tidal kiln sorry back got thrown into a meatin'

#

but basecamp is back meanwhile πŸ˜ƒ

tidal kiln
#

@meager fog yep. appears so. over to basecamp then?

meager fog
#

ill add it, no rush

idle owl
#

@tidal kiln Can I get your opinion on something? Does any part of this seem like something that should get added to the CircuitPython Troubleshooting page? https://forums.adafruit.com/viewtopic.php?f=48&t=143343 I feel like not really except maybe something about "Errors in the Serial Console: Make sure the serial console window is tall enough to show the errors or it may appear that no error has been shown" or something worded better than that. And even that I'm not sure is worth adding. But you see support stuff way more than I do so I'm asking for your opinion.

tidal kiln
#

@idle owl i'd say add it. with a screen cap and some arrows pointing at the scroll bar in the serial window. and big text that says "SCROLL BACK AND LOOK UP THERE ^^"
its not the first time people have been tripped up by that UI quirk. esp. since the default height seems to be pretty slim.

idle owl
#

hah. Ok fair enough.

gusty kiln
#

@tidal kiln so i think the zero is a bcm2835, right? i.e., same or close to same ARM chip as a pi 1. testing on a pi 1, at any rate:

#
Python 3.5.3 (default, Sep 27 2018, 17:25:39) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.machine()
'armv6l'```
#

so i guess if the neopixel code will work on those older systems, we probably want to change that restriction.

tidal kiln
#
pi@raspberrypi:~ $ cat /proc/cpuinfo
processor    : 0
model name    : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS    : 697.95
Features    : half thumb fastmult vfp edsp java tls 
CPU implementer    : 0x41
CPU architecture: 7
CPU variant    : 0x0
CPU part    : 0xb76
CPU revision    : 7

Hardware    : BCM2835
Revision    : 9000c1
Serial        : 000000009ead533c
idle owl
#

@tidal kiln And it did work once you installed the dependency?

#

as in there's not some hardware restriction that we were working around

tidal kiln
#

no. ran into permission issue trying to access mem.

idle owl
#

that's the sudo thing I think. It's required to access the peripherals needed for NeoPixel.

#

Did you try it with sudo later?

tidal kiln
#

yep. but since i hadn't installed with sudo (my bad, guide has you do that), the module wasn't available then

gusty kiln
#

looks like we don't support neopixels on other than 2 & 3, so i guess this is a non-issue but we should make the docs clearer about that.

meager fog
#

2, 3 and Zero

#

maybe Pi 1 isnt' supported

#

but...i think if Zero is, Pi 1 is - same chip

gusty kiln
#

if board_id == "raspi_2" or board_id == "raspi_3":
    from adafruit_blinka.microcontroller.raspi_23 import neopixel as _neopixel
elif "sphinx" in sys.modules:
    pass
else:
    raise NotImplementedError("Board not supported")```
#

i dunno if that means it wouldn't work, but it's written to blow up if you try anyhow...

idle owl
meager fog
#

oh we just haven't written in blinka support yeah

#

@gusty kiln we should do that

#

do you have a pi zero to check the board_id

tidal kiln
#

@idle owl yep looks good

gusty kiln
#

yeah, can do

tidal kiln
#

@idle owl in text that goes along with this, could also mention re-sizing window as an option

idle owl
#

good call, thank you

tidal kiln
#

@idle owl yah. even more info than i was expecting. awesome.

idle owl
#

Excellent thank you

river quest
prime flower
#

@idle owl Did you write a SPI scanner at some point?

idle owl
#

For which pins are HW SPI? It's on the SPI Essentials page.

manic glacierBOT
idle owl
prime flower
#

Thanks Kattni, found it

dapper falcon
#

@idle owl Thanks again for the debugging help. The web page looks great.

idle owl
#

@dapper falcon You're entirely welcome!

#

@dapper falcon We have an educator's role on our Discord server, if you'd like to be added. The purpose is to make you more identifiable to other educators in the event that you'd like to discuss methods or curricula or that sort of thing. There's no obligation associated with it, nor is there any obligation to be added. I wanted to let you know so you are aware and if you'd like to be added, we can absolutely do that!

dapper falcon
#

@idle owl Sure. Sounds good.

idle owl
#

Thank you! You'll show up to the right under the Educator list when you're online. πŸ˜ƒ

slender iron
#

@tulip sleet I'm about to land from this giant leap and I'm hoping I won't squish you. (Getting close to a PR)

#

anyone know where ble.h comes from in the new nrf build?

raven canopy
#

i can't even find it... 🀷

slender iron
#

got it, had to run bluetooth/download_ble_stack.sh

raven canopy
#

ahh...dependency.

slender iron
#

time to do one more cleanup pass

tulip sleet
#

@slender iron I think we don't overlap very much if at all

slender iron
#

its just a huge PR

tulip sleet
#

@slender iron bleio allows keyword args for non-optional args, e.g. UUID(uuid=777) is OK. The arg must be present, the keyword is optional. In a lot of our existing builtin modules, we don't allow that (e.g. TouchIn(pin=board.A0) is NOT allowed), even though the arg is named pin in the documentation. Do you have an opinion? This is kinda typical for MicroPython: it saves code and flash space not to match regular args against keyword names. In CPython, it always allows keyword names even for non-optional args.

#

i started taking out the keyword checking, but then thought I would ask you

slender iron
#

I like allowing kwargs because it makes calls more readable

#

I bias towards always using them

tulip sleet
#

so in the long run, we might add them to all the places where we don't allow them right now

slender iron
#

I don't think we handle required kwargs right yet

#

ya

tulip sleet
#

ok, I'll just put the code back that came from arturo and glennrub, not a big deal

#

tnx

slender iron
#

np, thanks!

tulip sleet
#

@slender iron approved descriptor PR

slender iron
#

yay!

idle owl
#

πŸŽ‰

slender iron
#

thanks for the quick turn @tulip sleet. now I may be able to get the other PR passing on Travis

manic glacierBOT
#

This started while adding USB MIDI support (and descriptor support is
in this change.) When seeing that I'd have to implement the MIDI class
logic twice, once for atmel-samd and once for nrf, I decided to refactor
the USB stack so its shared across ports. This has led to a number of
changes that remove items from the ports folder and move them into
supervisor.

Furthermore, we had external SPI flash support for nrf pending so I
factored out the connection between the usb stack and the...

slender iron
#

At least its net negative: +2,223 βˆ’3,487

idle owl
#

yay!

raven canopy
#

negative is good! well done, @slender iron.

lime trellis
#

quick question πŸ™‚ i'm able to compile my own CP port based off the feather M0.

#

where do I set pin states at startup?

#

so chip selects and such aren't floating

raven canopy
#

@lime trellis i think you could do it on the CircuitPython side by using a boot.py, which would get run before code.py/main.py.

lime trellis
#

@raven canopy I tried that first, and it didn't seem to hold once main.py started

exotic pumice
#

anyone know the difference between interrupts SERCOM0_0 SERCOM0_1, etc.

#

samd21 just has SERCOM0, but samd51 has more options

#

the docstrings are no help

manic glacierBOT
raven canopy
exotic pumice
#

also, what's the equivalent of SERCOM0_CORE in samd51?

raven canopy
#

@exotic pumice the 0_0, 0_1, etc are "pads" for the I/O routing. from the datasheet:

33.5.1
I/O Lines
Using the SERCOM I/O lines requires the I/O pins to be configured using port configuration (PORT).
The SERCOM has four internal pads, PAD[3:0], and the signals from I 2 C, SPI and USART are routed
through these SERCOM pads through a multiplexer. The configuration of the multiplexer is available from
the different SERCOM modes. Refer to the mode specific chapters for additional information.
#

note: i'm pretty sure there are typos in that text. there are only two pads per sercom

exotic pumice
#

so what if I just want an interrupt handler for the whole sercom?

#

do I do nvic enable on each pad?

raven canopy
#

yeah, for each pad. i don't think 21 had multiple pads per SERCOM (don't have the sheet on this PC)

exotic pumice
#

ok thanks

#

do you know what I mean by SERCOM0_CORE?

#

it's the IDR value of SERCOM0, but samd51 has no IDR

#

so instead of gclk.genctrl.write(id, blah, blah, blah) it's something like gclk.genctrl[id].write(blah, blah blah) I think, but I'm not sure where to get the id from

#

I guess I just have to figure out the array positions and define it myself

#

great, they're just called 0-11

#

😦

exotic pumice
#

I think table 14-9 might be what I'm looking for

timber mango
#

@raven canopy definitely four pads per SERCOM

#

I think for example you can have DTR or DSR pins for the UART with the two 'extra' SERCOM pads.

#

(all four SERCOM pads could be routed to physical, external pins)

exotic pumice
#

it's actually 3

#

at least according to my svd-generated crate

#

it can't find SERCOM0_3

timber mango
#
 $ pwd | cut -b26-99
circuitpython/ports/atmel-samd/asf4/samd51/include/pio
 $ ag SERCOM0_PAD? samd51j19a.h | egrep PORT
489:#define PORT_PA04D_SERCOM0_PAD0  (_UL_(1) <<  4)
493:#define PORT_PA08C_SERCOM0_PAD0  (_UL_(1) <<  8)
497:#define PORT_PA05D_SERCOM0_PAD1  (_UL_(1) <<  5)
501:#define PORT_PA09C_SERCOM0_PAD1  (_UL_(1) <<  9)
505:#define PORT_PA06D_SERCOM0_PAD2  (_UL_(1) <<  6)
509:#define PORT_PA10C_SERCOM0_PAD2  (_UL_(1) << 10)
513:#define PORT_PA07D_SERCOM0_PAD3  (_UL_(1) <<  7)
517:#define PORT_PA11C_SERCOM0_PAD3  (_UL_(1) << 11)
#

Looks like (in general) that one of two pins (PA04, PA08 for example) can be routed to each SERCOM pad.

#

I could be way off base, here. ;)

#

Not just two pins; for example, SERCOM5:

 $ ag SERCOM5_PAD? samd51j19a.h | egrep PORT
1266:#define PORT_PA23D_SERCOM5_PAD0  (_UL_(1) << 23)
1270:#define PORT_PB02D_SERCOM5_PAD0  (_UL_(1) <<  2)
1274:#define PORT_PB31D_SERCOM5_PAD0  (_UL_(1) << 31)
1278:#define PORT_PB16C_SERCOM5_PAD0  (_UL_(1) << 16)
exotic pumice
#

shruggo

raven canopy
#

yep...correction accepted. IO table (6.1) does have 0->3 references for each SERCOM. was thinking i only ever saw 0 & 1.

exotic pumice
#

not having the idr is really screwing me over

#

I should get some sleep

raven canopy
#

same here. laptop thinks so too... πŸ˜„

timber mango
#

I can't think of an application besides DSR and DTR for the USART - but somewhere I'd already encountered this. Very confusing to me. ;)

#

(BTW only SERCOM5 seems to support all four pads)

exotic pumice
#

oh, that could be why they weren't showing up in my pac

timber mango
#

(skuze me -- this is hard -- only SERCOM5 supports four different pins per PAD). haha

#
 $ ag SERCOM5_PAD0 samd51j19a.h | egrep PINMUX
#

that'll return four lines. Anything but SERCOM5 there will return fewer than four lines.

#

fades

tough flax
#

I'd love some feedback on this - the docs are not done and it's not structured right (should be in src, etc.) but if you look at settings.ini I think you'll get the way it's supposed to work. Right now, individual switches as well as multi-switch "chords" work sending either keystrokes or mouse movements (no mixing right now ala "shift-click")

#

The code should run on M4s with plenty of room, etc. but with the parsing code, getting it on a M0 is tight. The FrozenHID.UF2 is a custom build freezing HID and removing Math and other stuff like the PIRKey does to make everything fit. KEYSWITCH.UF2 has that build Plus the actual CIRCYUITPY filesystem with the config files etc.

#

Undocumented, you switch modes by holding switches 1+2 for > 1sec (configurable later)

slender iron
#

@lime trellis the board.c file can do any init you want and then in the mpconfigboard you'll want to add the pins to the mask so they aren't reset

#

@exotic pumice I'm not sure what you mean by IDR. where is it mentioned in the datasheet?

manic glacierBOT
cedar beacon
#

What simple, low energy display would people recommend for the metro m0? Got 3 sensor readings to display

stuck elbow
#

one of the oled displays, probably

#

or you could use a 7-seg display and display the readings in order

hoary hill
#

Hi, how do I request a new Circuitpython library? There is library for MCP23008/17, the I2C GPIO expander. But I need a library for MCP23S08, the SPI expander. Is it possible?

marble hornet
#

@cedar beacon on the product pages for the .96 inch oled and the super tiny st7735r display they both have around a 20mA current draw (5mA diff) https://www.adafruit.com/product/931
https://www.adafruit.com/product/3533

cedar beacon
#

Thanks @marble hornet

marble hornet
#

are you using python ?

raven canopy
hoary hill
#

Thanks @raven canopy , I just filed the issue #110.

raven canopy
#

Ahh. You put it on the bundle. The "#110" threw me off; core repo is in the 1300s. πŸ˜„ That should be fine.

marble hornet
#

i'm having an issue with exec

#

im running:

#
print(fmoop)```
#

and getting

#

and eval is saying i have a syntax error but the exec('from '+path+' import ' + name + ' as fmoop') is just 'from system.programs import sys_bar as fmoop'

manic glacierBOT
tulip sleet
#

@marble hornet maybe there's an error in the code you're importing? (as opposed to in those two lines)

marble hornet
#

i've ran the string as regular code and it works

solar whale
#

@marble hornet you need double ' for the inner quotes xec('from ''+path+'' import '' + name + '' as fmoop') not a double quote " -- two single quotes '

marble hornet
#

@solar whale what does two quotes do vs "

solar whale
#

not sure but - you need two f the same to tell it that it is not the terminator of the first '

#

it thinks 'from ' isa string ' from ' ' then it the second single quote is an inner string

marble hornet
#

i'll give it a go

#

and get back to you later, thanks!

solar whale
#

exec('from ''adafruit_rgb_display'' import ''rgb'' as ''bgr'' ') works for me

#

those are all single quotes

#

exec("from ""adafruit_rgb_display"" import ""rgb"" as ""bgr2"" ") alos works -- all double quotes

stuck elbow
#

ugh, use %

solar whale
#

what is the syntax for %

stuck elbow
#

also, do bgr2 = __import__(".".join(path, name))

#

no need for exec

solar whale
#

Thanks!

solar whale
#

BTW -- I was not advocating the method or style -- just trying to explain the "syntax error"

stuck elbow
#

the explanation is simple: eval only can run expressions, and import is a statement

#

the quotes have nothing to do with it

manic glacierBOT
copper shuttle
#

hello everyone
I just installed Mu to work with my Gemma M0 but I can'T launch it?
I click on it and simply nothing happens
No loading, no nothing
Already restarted my PC twice and still nothing
Anyone got an idea?

stuck elbow
#

try launching it from a terminal?

#

see if you get any messages

slender iron
#

@umbral dagger I just read over your extending guide. I think you'll want to use shared-modules instead of common-hal because your libraries are not mcu specific

umbral dagger
#

Cool. I'll pull it back and make that change.

slender iron
#

thanks for writing it up!

manic glacierBOT
idle owl
#

@tidal kiln You around? I'm setting up the MPL3115A2 to test it. Do SDWN or RST need to be wired to anything? Also do you happen to have a .mpy I could use?

tidal kiln
#

let me remember/check....

idle owl
#

There's no assignment for either pin in the simpletest.py so I'm guessing no. But there's no guide for it so I'm assuming.

manic glacierBOT
#

This fixes commit a99f9427420d("'/' and '' are also acceptable ends of the path now") which broke mkdir.
The problem is where the directory name is a single letter like this:

>>> os.mkdir('a')
>>> os.mkdir('a/b')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 17] File exists
>>> os.mkdir('a/bb')
>>>

I wasn't smart enough to fix this in the oofatfs library, so I did it in the os shared module by
creating a path lookup function fo...

tidal kiln
#

yah, they don't need to be hooked up.

idle owl
#

ok right on. Do you have an .mpy?

tidal kiln
#

looks like i was just testing with the .py

idle owl
#

ok.

ruby lake
#

hm, the Metro M0 Express pages need to explain that IORef is tied to 3.3v

tidal kiln
#

pretty easy to mpy-cross it if you want though

idle owl
#

I can do it, I figured if you had it, I would use yours

tidal kiln
#

i typically just try the .py to see if i can get away with it, then mpy-cross if not

idle owl
#

Yah the py is working

#

Tried that first

#

looks good! I'll merge it.

tidal kiln
#

cause my dev setup isn't much more than cp and sync

slender iron
#

@ruby lake m0 or m4?

ruby lake
#

I would add a line in the power connections section saying IORef is tied to 3.3v on the board, or something like that.

slender iron
#

Why would it be something else?

ruby lake
#

It wouldn't πŸ˜‰

#

It is just not called out in the pin list

umbral dagger
#

@slender iron What about where I use atmel_start_pins.h ?

slender iron
#

why do you need it @umbral dagger ?

#

@ruby lake added it under other

#

ah, @umbral dagger use digitalinout internally like you do in the python

idle owl
#

@slender iron Are you ok with us setting up Sphinx to render Markdown and moving README.rst to README.md if we can sort doing it reasonably? Getting Sphinx to render .md is easy. It's the rest of it that involves "figuring out."

slender iron
#

I'd rather not because we can't use markdown inline last time I checked

idle owl
#

I don't know what you mean by "use markdown inline"

gusty kiln
#

i'll note that pypi markdown support also seems... kind of weak.

slender iron
#

in function docs and in the rst in the shared-bindings c

idle owl
#

ok.

#

I initially said nevermind on it but the Sphinx part was easy, so I reconsidered. But if it's going to complicate everything, no.

slender iron
#

I'd love to use markdown everywhere but we can't. so I'd rather use rst everywhere even though its not as friendly

idle owl
#

@tidal kiln I know you did everything with MPL before we talked about BMP, but one more reminder that when you fork the repo, delete README.md or it supersedes README.rst.

#

@slender iron Fair enough.

#

I have a repo where the docs are passing according to RTD (as in the Builds tab on the dashboard), but if you click "view docs" you get the not found page. And it says "docs failing" according to the badge on the GitHub repo.

#

And the docs badge also goes to a not found page.

#

I doublechecked that I added it with the right alias, and I did.

tidal kiln
#

@idle owl sry. yah. good chance i'll remember for like the next few then forget again. so many details. very glad you're on the job to catch these things.

timber mango
idle owl
#

@tidal kiln No worries. I forgot about it until I'd already merged and released, so I deleted it separately. I missed it too initially.

#

Also, nm, stable passed, latest did not, that's why it's showing failed because all the links are to latest. Oi.

winged grail
#

Does anyone have any good examples of synth programs for the neotrellis m5? I am just getting started in circuitpython, and so I would like to study the code as well as learn how to upload it to my board. Thanks sorry for a stupid question

#

sorry I meant a MIDI synth

idle owl
winged grail
#

awesome thank you so much!

slender iron
#

@winged grail do you want to generate midi or read midi?

winged grail
#

Generate, but I will take whatever anyone has, for learning purposes

slender iron
#

I'm hoping to add midi over usb soon. I think it works over uart now

tulip sleet
slender iron
#

will keep an eye on it and see what they want to do

manic glacierBOT
exotic pumice
#

@slender iron, on samd21, the genctrl of each gclk has an ID register, but samd51 doesn't

exotic pumice
#

my samd21 code is

fn set_gclk_divider_and_source(
        &mut self,
        gclk: ClockGenId,
        divider: u16,
        src: ClockSource,
        improve_duty_cycle: bool,
    ) {
        self.gclk.gendiv.write(|w| unsafe {
            w.id().bits(gclk.bits());
            w.div().bits(divider)
        });

I think what it's doing is "write divider to the gclk which was passed in"

#

the equivalent samd51

self.gclk.genctrl.write(|w| unsafe {
    w.div().bits(divider)
});

self.gclk.genctrl is an array of 12 and I don't know which one to write to

#

because there's no id on the gclk passed in

idle owl
#

@solar whale thanks for testing my code!

solar whale
#

@idle owl no problem - thanks for providing it! blinka

manic glacierBOT
tidal kiln
#

@idle owl i'm doing a major overhaul on a lib, it doesn't look like it has an example that complies with the naming boiler plate - is that critical to anything? worth making one?

idle owl
#

@tidal kiln there should be a sensor_simpletest.py example, so if there isn't one, you should create one.

tidal kiln
#

it's one of those libs that supports a family of sensors

#

have one for each?

idle owl
#

hmm

#

yeah probably that would be good unless one works for all of them

tidal kiln
#

went with that. there's nothing in the automated stuff that expects sensor_simpletest.py?

idle owl
#

cookiecutter creates it by default and expects you to populate it, I thought. But maybe that was before we added that.

#

Not sure if Adabot checks.

#

Maybe Adabot checks to see if /examples is empty, but that's it.

slender iron
#

@exotic pumice thats a common difference between the 21 and 51. the 21 will make you write the id of the instance you want to change while the 51 just has you offset to the right one

exotic pumice
#

so is the offset still gonna be gclk.bits() ?

lime trellis
#

I know i've seen a write-up for building custom c-modules for CP. But for the life of me I can't find it.

#

Anyone know what I'm talking about?

slender iron
#

@exotic pumice I'm not sure what bits is. I don't know rust

exotic pumice
#

let me look it up

slender iron
solar whale
#

hmm -- just pulled master and built for metro M4 -- boots ok -- installed modulel list seems a bit short ```
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.2-141-g97bc95183 on 2018-11-09; Adafruit Metro M4 Express with samd51j19

help('modules')
main busio micropython storage
_os collections neopixel_write struct
_time digitalio network supervisor
analogio errno os sys
array >>>

slender iron
#

and @umbral dagger is working on a guide

#

@solar whale I'll try it here. totally could be a bug

solar whale
#

@slender iron no way πŸ˜‰

exotic pumice
slender iron
#

haha, there are always bugs

exotic pumice
#

that's the underlying type of ClockGenId

#

in the example above

slender iron
#

pchctrl connects the clock to things

solar whale
#

I just thought I'd run the new USB stuff on as many boards as I could.

slender iron
#

I figured you would πŸ˜ƒ

#

ideally they'll all have the same bugs πŸ˜‰

#

@exotic pumice I'm having trouble helping you because I don't know the rust side. I could help better if you reference the datasheet instead

solar whale
#

ran some neopixels and I2C sensors on the M4 -- no issues.

exotic pumice
#

I think I got it figured out

lime trellis
#
exotic pumice
#

but if you're curious look at gen in 14.7, under pchctrl

slender iron
#

glad you did @lime trellis

exotic pumice
#

bits is just the raw value of that field

slender iron
#

@solar whale I was considering redoing the output buffer for cdc already πŸ˜ƒ

solar whale
#

did the new code go into esp8266 as well or just atmel and nrf?

slender iron
#

no esp because it doesn't have usb

solar whale
#

oh yeah -- small detail...

raven canopy
#

@idle owl @tidal kiln adabot doesn't currently check for simpletest. only that there is at least one file in the examples/ folder.

#

and cookiecutter does have examples/name_simpletest.py.

slender iron
#

@solar whale did you ever try help("modules") on nrf before? I bet it has the same problem

solar whale
#

@slender iron well -- pca10059 won't boot after loading new image 😦

slender iron
#

thats the dongle?

solar whale
#

yes

slender iron
#

I tried the 56 only

tidal kiln
#

@raven canopy thanks for info. yep. this was a retro update, so just wanted to make sure something like adabot wouldn't get unhappy.

slender iron
#

this afternoon is debugging time πŸ˜ƒ

solar whale
#

I'll try the pca10056 and feather_nrf52832

raven canopy
#

@tidal kiln all good. i noticed a lot of example filenames don't "conform" to the new standard when adding them to the bundle. which can be confusing on some of them, just looking at the bundle. πŸ˜„

slender iron
#

I bet the 832 will fail for the same reason

#

my guess is that its internal flash related

tidal kiln
#

@idle owl are we all done with MPL?

solar whale
#

reverted dongle to 20181105 build -- no harm - no foul πŸ˜‰

#

BTW module list on 20181105 was - ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.2-135-gd08747d37-dirty on 2018-11-07; PCA10059 nRF52840 Dong$

help('modules')
main busio microcontroller supervisor
analogio collections micropython sys
array digitalio neopixel_write test
binascii framebuf os time
bitbangio gamepad pulseio uio
bleio gc random usb_hid
board hashlib storage
builtins math struct
Plus any modules on the filesystem

idle owl
#

@tidal kiln it's not on PyPI yet.

slender iron
#

hrm

tidal kiln
#

but it's all set to go, right?

idle owl
#

Oh. Yeah. I forgot to add it to the bundle though.

#

I wasn't sure what you meant by "set to go" I guess

tidal kiln
#

so_many_steps.gif

solar whale
#

@slender iron on the PCA10056 -- it boots and the module list looks complete ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.2-141-g97bc95183 on 2018-11-09; PCA10056 nRF52840-DK with nRF52840

help('modules')
main busio microcontroller supervisor
analogio collections micropython sys
array digitalio neopixel_write test
binascii framebuf os time
bitbangio gamepad pulseio uio
bleio gc random usb_hid
board hashlib storage
builtins math struct
Plus any modules on the filesystem

idle owl
#

Monday is my library day, is what's essentially going to happen.

slender iron
#

ah, so its an m4 thing

#

thats good to know

#

I found an optimization while digging πŸ˜ƒ

tidal kiln
#

@idle owl sounds like you'll take care of it? i'm gonna check it off

idle owl
#

If you want to add it to the bundle, go for it, but I'll deal with it on Monday otherwise.

#

but yes in terms of checking it off, go for it.

tidal kiln
#

meh. i'll pr a bundle add. i need to get back on that horse anyway.

idle owl
#

ok, right on πŸ˜ƒ

solar whale
#

cool -- I can still mount an SDCard on the pca10056 ...

#

@slender iron yup feather_nrf52832 does not boot

slender iron
#

kk, will look at that next

manic glacierBOT
solar whale
#

@slender iron do you want me to post issues or are these comments enough for now?

slender iron
#

for modules don't bother but the nrf with flash would be good

#

I may not get to it until monday

solar whale
#

OK - so for the pca10059 and feather_nrf52832 -- one issue or 2?

marble hornet
#

Can i partition the flash ? and then mount the second partition to just the atsamd?

manic glacierBOT
raven canopy
solar whale
#

@raven canopy thanks - still waiting for mine -- HAve good time away!!

marble hornet
#

it looks so close

raven canopy
#

we'll see how borked i can get it. πŸ˜†

slender iron
#

@solar whale I think the modules thing is because I have a smaller buffer on the samds

solar whale
#

OK - so were things like pulseio removed?

slender iron
#

oh no, its just outputting info too fast and overwriting

solar whale
#

ah -- that's better -- I'll check in a minut -- restoring 52832

slender iron
#

CFG_TUD_CDC_TX_BUFSIZE in the makefile

#

its setup to overwrite as needed now

solar whale
#

OK -- import pulseio works

slender iron
#

goes to find his 832

solar whale
#

good luck!

#

have to make dinner -- back in awhile to see what else I can break πŸ˜‰

digital slate
#

Hi everyone

#

I was telling to @slender iron earlier today trying to get a device up and running with CP

#

Figured out I had a bad board on the first one, that was a relief

#

Now I think I'm at the point of uploading the compiled UF2 bootloader code via a JLink and I'm doubting how far I am

#

I am able to connect to the device via JLink, stops at "Waiting for GDB connection..." , ostensibly because there is no program file?

exotic pumice
#

I got my hal compiling πŸŽ‰

digital slate
#

I think my next step is flashing the uf2 firmware, but was hoping for a sanity check

exotic pumice
#

hi

digital slate
#

Hi Saj

exotic pumice
#

you don't upload uf2 with jlink, you drag and drop onto the usb mass storage device

slender iron
#

@digital slate you'll need to run gdb to connect the jlink software

exotic pumice
#

oh nvm I misunderstood

digital slate
#

Ah, so second window and then load up with the program

pastel panther
#

@digital slate You can also use JLinkExe's loadbin bootloader.bin, 0

#

maybe the offset and filename is reversed, I can never remember

idle owl
pastel panther
#

It's good to know how to use the jlink gdb server and gdb but for just loading .bins, I find it easier to just use JLinkExe (I think it's called JLink commander?)

slender iron
#

@digital slate right, I use a second tab

idle owl
#

@digital slate Hey! πŸ˜ƒ

slender iron
#

@idle owl its for libraries that match cpython

idle owl
#

@slender iron Hmm. Ok. Thanks.

digital slate
#

Hi @kattni!

#

I guess a dumb quesiton, but I'm just loading to address zero since it's a bootloader, right?

pastel panther
#

yup

digital slate
#

yep, that worked

#

killer

#

friendly breathing LED is aliiiiiive

pastel panther
#

can you get your blablaBOOT?

digital slate
#

uh

#

like "FEATHERBOOT" but whatever I'm calling mine?

pastel panther
#

yea

digital slate
#

yep, didn't change anything so mine says feather

pastel panther
#

πŸ’ƒ

#

not the vibe I was going for but that'll do

digital slate
#

hey, it's Friday, why not a little celebratory dancing??

pastel panther
#

I was thinking more cabbage patch than can-can but I'll take what I can get

idle owl
#

@slender iron @tulip sleet The 20181109 release of the TrellisM4 build appears to have issues. I'm running the NeoPixel toggle demo, which runs fine on 20181105 (and I just got back to that build and it still works). When you put the newest version on the Trellis M4, all the LEDs turn white, and the status DotStar turns purple, and then you can't even reset the board to get back into the bootloader. The only way to get out of this state is to unplug/replug/REALLYFAST hit reset twice to get into the bootloader, and then load the older version. That took two tries as well to get it to work.

#

JP found it first when I had him update his board to run the demo for himself. We thought it was code, but I updated mine and the same results.

#

(I have to run, I'll explain it better later if you need me to, but I have to head out for the evening.)

slender iron
#

@idle owl when you are back please file an issue with the full filenames of what you are using. thanks!

exotic pumice
#

what's going on with the spi flash on metro m4? SCK and CS are connected to sercom4 and MOSI and MISO are connected to sercom0

#

at least that's what the schematic says

#

@slender iron any ideas?

slender iron
#

its connected to the QSPI peripheral, not a sercom

exotic pumice
#

oh, that's a thing?

slender iron
#

ya

exotic pumice
#

k well I guess I'll just disable that feature for now

#

don't feel like writing a hal around the qspi peripheral

solar whale
#

@slender iron @idle owl reproduced the trellis m4 issue - current master does some very odd things with the neopixels and eventaully drops USB connection.

slender iron
#

⬆ is a fix for you @solar whale

solar whale
#

I found that I could get back to TRELLISBOOT but when I loaded older image, I had to power cycle to have itcome oute of bootloader.

#

@slender iron for nrf52832 and dongle or just for modules list?

#

I'll pull the PR after travis finishes.

slender iron
#

just the help issue

#

looking at nrf now

exotic pumice
#

my blinky doesn't work

#

d13 is connected to a led still, right?

#

otherwise it wouldn't be an arduino

#

the one marked L?

slender iron
#

ya

exotic pumice
#

oh it turns on, but only when I press reset

#

Interesting

#

it's supposed to do it in a loop forever

#

is the reset button lighting L just part of the bootloader?

slender iron
#

ya

exotic pumice
#

hmm, well I've got some debugging to do

solar whale
#

@slender iron hmmm -- metro_m4_express does not boot with pr_1325

slender iron
#

hrm, thats what I was testing on

solar whale
#

I did git fetch origin pull/1325/head:pr_1325 then built merto_m4_express -- after falsh -- Blue neopixel -- no CIRCUITPY or /dev/ttyACM0

#

reverted to current master OK

slender iron
#

@solar whale ya, I got mine to do that too

#

without debug

solar whale
#

ah -- DEBUG hides things

slender iron
#

ya, it can

#

its stuck trying to write to usb from boot.py 🀦

exotic pumice
#

I think I'm probably setting up the clocks wrong

solar whale
#

from past (long past) esperinces with DEBUG hiding issues it was often an unitintialzed variable.

slender iron
#

@solar whale pushed a fix

#

just added a check to see if usb is connected before we wait for everything to be sent

exotic pumice
#

clocks are the bane of my existence

#

first it's neopixels, now this πŸ˜›

slender iron
#

yup, me too. using a tc to output a pwm you think you know can help get it tuned

#

@solar whale do you know how to swap bootloaders on the '832 feather? I have the mynewt version

solar whale
#

I build from the bootloader_nRF52 repo then flash via J-link - then in CP repo use jlink to make BORAD=feather_nrf52832 sd to get proper SD

slender iron
#

kk

solar whale
#

finally load vi make BOARD=feather_nrf52832 dfu-gen dfu-flash SERIAL=/dev/ttyUSB0 -- or just use Jlink make BOARD... flash

#

woohoo! ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.2-143-gd012fd155 on 2018-11-09; Adafruit Metro M4 Express with samd51j19

help('modules')
main busio micropython storage
_os collections neopixel_write struct
_time digitalio network supervisor
analogio errno os sys
array gamepad pulseio time
audiobusio gc random uerrno
audioio i2cslave rotaryio uio
bitbangio io rtc ure
board math samd usb_hid
builtins microcontroller socket wiznet
Plus any modules on the filesystem

slender iron
#

yay!

solar whale
#

@slender iron I ran into a problem in the past - if I flashed sd from the bootlaoader repo, it used the wrong version as default -- CP expects s132 for the 52832

slender iron
solar whale
#

looks good

slender iron
#

still not happy though

#

do I have to unlock the memory somehow?

solar whale
#

ah -- I think CP still uses SOFTDEV_VERSION 5.0.0

#

see the nrf/boards folder

#

I think if you do a make BOARD=feather_nrf52832 sd in CP repo it will be OK

slender iron
#

as its connected over jlink or nrfutil?

solar whale
#

jlink

slender iron
#

ah, that did something

#

heyo, there we go

#

thanks!

#

now to dig

solar whale
#

the sd's and SOFTDEV's are a bit confusing....

slender iron
#

ya, I don't know why they give options. we should just always have one we support

solar whale
#

in the bootloader_nRF52 I think it is set up for Arduino -- the CP repo does have the defaults for us.

#

I think @gentle bronze understands it πŸ˜‰

slender iron
#

ya, that was easy to update at least

covert oxide
#

Hello, so if I want a board to support double-precision floats, all I have to do is modify the mpconfigport.h , and st MICROPY_FLOAT_IMPL to MICROPY_FLOAT_IMPL_DOUBLE? and perhaps have enough space? is this correct?

slender iron
#

@solar whale gotta run. will let you know when I have a fix

solar whale
#

Thanks - no rush here!

timber mango
#

@exotic pumice Trellis M4 first Adafruit board I've seen (SAMD) that does not have D13 LED (at all).

exotic pumice
#

interesting

timber mango
#

My USB code ran first try, on Trellis M4 - I had vague plans to blink my own LED as a test for basic ops but was unneeded.

exotic pumice
#

does it only have neopixels?

timber mango
#

Has DotStar singleton, too (on the reverse side from the keyboard matrix)

#

May be the only Adafruit target with both DotStar and NeoPixel drivers required for full use of the board.

exotic pumice
#

yeah, that's tricky

timber mango
#

I've bit-banged DotStar APA-102 (Pimoroni Blinkt)

#

I still don't know how to send to the rest of the NeoPixel array -- the code I lifted only drives the first pixel.

exotic pumice
#

yeah but to not have a simple led for debug is pretty crummy

#

with neopixel data, you just send 3 bytes per pixel

#

so if you want to light pixel 2 send 6 bytes

timber mango
#

Well Trellis M4 is much like an ItsyBitsy M4 so get that going first.

#

I'll try that. APA102 is kind of like that as well.

exotic pumice
#

I'm working on a neopixel driver as well

timber mango
#

The seesaw code for neopixel is a lift of the arduino library - I got it from seesaw.

#

that nop stuff ;)

exotic pumice
#

I'm not a fan of the nop stuff

#

but it saves ram

timber mango
#

haha well if you read the original driver comments it seems recommended.

exotic pumice
#

yeah, my goal is to create a driver that can control neopixels with any mcu, so it doesn't fit my vision

#

any mcu with dma and spi that is

timber mango
#

oh you're the person who wants to use hardware SPI drivers. ;)

#

I definitely recommend a thorough read through of the Arduino lib for NeoPixel from Adafruit.

exotic pumice
#

yeah I've given it a good look

timber mango
#

nop nop nop nop nop

#

I'm sure there's a Star Trek TOS episode in that. ;)

#

(right up there with the horta)

bold plaza
pastel panther
manic glacierBOT
exotic pumice
#

My clocks are so broken I can't even get a nopping blinky to work

#

it probably doesn't help that a lot of my clock code is trying to achieve 48MHz

exotic pumice
#

Can an M4 run at 48MHz? I don't know

#

looks like it, according to 7.3.2

obsidian compass
#

Do we need to download espriff/xtensa toolchain to build circuitpython for ESP targets?

#

I did this already "make -C mpy-cross"

latent nimbus
#

Good day all,

#

I have a question about NeoPixels on CircuitPython on Raspberry PI. Why must the code run under sudo?

solar whale
raven canopy
obsidian compass
#

Thanks for sharing. @raven canopy πŸ˜ƒ

latent nimbus
#

@solar whale Thanks...

raven canopy
#

@solar whale the more i read up on the Particle Mesh and DeviceOS, its seems that to utilize it with all it offers we'll have to make a new port and somehow glue in the Particle Cloud stuff. otherwise its just a Feather nRF52. 😡

solar whale
#

All in good time πŸ˜‰

#

I’ll probably start with their SDK

raven canopy
pastel panther
#

I HAVE USB

#

sorry to interrupt, just had to get that out of my system

raven canopy
#

YAY!!! πŸŽ‰

#

what was the issue?

pastel panther
#

Either the crystal or two caps next to each other, across the same lines that were shorted with each other

#

I forgot that I had @timber mango 's code loaded so after I removed the crystal and its caps and then didn't see a CIRCUITPY drive, I kept going and adjusted the caps. Then when I was hopelessly poking around I noticed a /dev/tty.usbmodemxxxx!

#

I was also preparing to desolder the samd and was warming it up when I fixed the caps, so theoretically I could have reflowed an iffy connection there as well

#

Now I just need to see about getting uf2 and CP back on

slender iron
#

@pastel panther yay! we generally don't use an external crystal which simplifies things

#

@exotic pumice it runs at 48 by default I think

pastel panther
#

It's not working again now but I'm guessing it's a software issue cause I've been loading bins willy nilly

slender iron
#

πŸ˜ƒ

timber mango
#

Yeah it definitely runs at 48 MHz by default, @slender iron

#

But there's also an 8 MHz thing going on (probably for M0, don't remember).

#

Depends on the code base, perhaps. ;)

#

needs an oscope that can go higher than 25 MHz ;)

pastel panther
#

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

timber mango
#

The scope I already have displays a 48 MHz signal kinda/sorta.

#

sidd: 48 MHz is probably difficult to get away from more than hard to achieve in the first place.

#

(USB wants it for one thing)

#

I think the trick is to get above 48 MHz (MCU clock) while keeping USB at 48 MHz.

pastel panther
#

welp, I'm back to things solidly not working again 😐

#

I think I'm just going to write this board off and try to assemble a new one

timber mango
#
 $ pwd | cut -b17-99
Adafruit/circuitpython
 $ ag 25% | ag atmel
ports/atmel-samd/asf4/samd21/driver_init.c:386:/* The USB module requires a GCLK_USB of 48 MHz ~ 0.25% clock
ports/atmel-samd/asf4/samd21/driver_init.c:389:#warning USB clock should be 48MHz ~ 0.25% clock, check your configuration!
ports/atmel-samd/asf4/samd51/driver_init.c:422:/* The USB module requires a GCLK_USB of 48 MHz ~ 0.25% clock
ports/atmel-samd/asf4/samd51/driver_init.c:425:#warning USB clock should be 48MHz ~ 0.25% clock, check your configuration!
#

I don't know if that asf4 tree is really in the compiled image or not.

pastel panther
#

or maybe just write off hardware entirely and go back to fishing

timber mango
#

poisson!

pastel panther
#

les petit poisson?

timber mango
#

ladyada_ says to get used to setbacks. ;)

#

She's said that two or three times in various videos (in differently-worded utterances)

pastel panther
#

I'm not not used to it, I'm just not good at channeling my inner duck

timber mango
#

get one of those giant BFC capacitor ducks ;)

velvet badger
#

I liked Mr. LadyAda's "Software works until it doesn't, hardware doesn't work until it does."

#

It's a reoccurring theme in my projects.

#

Or maybe it's the reverse. scratches head

digital slate
#

found a broken page

idle owl
#

Guide page?

digital slate
#

going from here

idle owl
#

Oh right.

#

That page has been removed because it's not valid anymore. It shouldn't be trying to use it anymore, so that's odd.

#

Ah I see why. Fixing it now. @digital slate Thanks for catching that!

digital slate
#

no prob!

idle owl
#

Should be good now

idle owl
#

Ok I've repro'd the TrellisM4 NeoPixel issue multiple ways. Filing an issue in a bit here.

lime trellis
#

Is it possible for CP to use spi flash as a memory partition?

manic glacierBOT
#

I updated CircuitPython on my Trellis M4 and any code involving the NeoPixels is failing to function properly.

The failure is:

  1. All of the NeoPIxels will turn bright white (evidently (255, 255, 255)).
  2. After a seemingly consistent period of time (a few seconds), CIRCUITPY will disconnect, all of the NeoPixels will become a dimmer white (as though it's more like (45, 45, 45) or something), and the status DotStar LED on the back will turn a slightly purple-tinged red (which is to s...
pastel panther
raven canopy
#

Hamtonio lives! πŸŽ†

timber mango
#

@pastel panther awesome!

pastel panther
#

when in doubt, throw it in the trash and start over

timber mango
#

I went for a few months, maybe, on the UART before tackling USB.

pastel panther
#

I'm really excited to dig into your usb code. Thanks much for sharing

timber mango
#

You're welcome!

rare zephyr
#

Question does circuitpython have any moduals to operate as logic gates or like PLC?

timber mango
#

It has no ringbuffer so a huge kludge is used -- long delays.

#

The USB stuff seems to complete in the background on its own; the delays make sure no new use of USB occurs while that is happening.

pastel panther
#

@rare zephyr not that I know of

#

Though I don't know precisely what you have in mind

timber mango
#

Well you can do logic operations and control GPIO to correspond the what the program does with your inputs.

pastel panther
#

If you want to control relays programmatically, it can do that but it's all done by writing python

timber mango
#

(that's true of any and all microcontrollers, generally)

pastel panther
#

what nis said is also true

rare zephyr
#

i am looking to be able to detect a blinking light with a photo sensor and if it is blinking at 1hz turn on an out put pin but if it is on solid turn off the output pin

pastel panther
#

depending on the accuracy you want, that should be possible

timber mango
#

The problem with using any microcontroller's input pins are very different from the problem of using its outputs. ;)

#

Generally you're looking at scanning, or interrupts (or both) or busses (serial I/O).

#

Whereas a standalone logic gate just 'scans' though we don't call it that.

manic glacierBOT
errant grail
#

@pastel panther Excellent!

pastel panther
#

@errant grail I haven't had the huevos to put the boost converter together on this one yet

timber mango
#

@pastel panther make install make clean and other make targets exist in most of my projects.

#

They're all in the final 100 lines or so of a given Makefile

pastel panther
#

good to know; does install use bosac?

timber mango
#

yeah. I made a ./gcc/script dir with that script -- it is a path to arduino bossac

#

(there are two; one for M0 targets and one for M4 targets)

#

different bossac versions required ;)

#

I also put embedded ansi color escapes in the Makefile to colorize the text on your terminal. ;)