#circuitpython-dev

1 messages ยท Page 188 of 1

tidal kiln
#

do you still have the 2.3.0 firmware installed?

acoustic pollen
#

yes

tidal kiln
#

go ahead and switch back to 3.0

#

i don't think this is a firmware version issue, so might as well move forward with the latest version

acoustic pollen
#

like magic it worked

#

it only likes to play the first bit of the wav though

tidal kiln
#

the examples are short

#

we got these files to play interactively using the REPL last night

#

they should play the same way when a button is pressed for that guide example

acoustic pollen
#

yeah, console could play the whole wav but it seems that buttons can only play a short bit

tidal kiln
#

did you also change the version of lib bundle when you changed the firmware to 2.3.0?

acoustic pollen
#

no

#

now im trying to see if i can do the random talking code from the sparky automation box minus the servos

#

so i got it so that pressing the a button does a random wav, is there a way to do it that if it goes fast enough it plays a random wav?

tidal kiln
#

if what goes fast enough?

acoustic pollen
#

the board

idle owl
#

@gusty kiln Agreed with reducing overhead, and agreed without understanding it, I don't have any idea how to either. It's really not too bad once I get it right. It's the getting it right in the first place bit that I'm still figuring out ๐Ÿ˜„

acoustic pollen
#

also, when trying to do it so that sound triggers on a1 being touched, using an alligator clip makes it just go off repeatedly when plugged in via usb. is this intentional, or am i just using a bad alligator clip?

idle owl
#

@gusty kiln So updated workflow:1. I do a PR. 2. You review/change request/merge. 3. I trigger a Travis build and deal with getting it building. Possibly goto: 1. 4. I do the release.

#

Does that work for you?

gusty kiln
#

sounds good.

idle owl
#

ok rad.

#

I'm going through everything, finding some that I didn't do that don't have overwrite = true. I added it to one, should I keep adding that?

gusty kiln
#

yeah, i think so.

idle owl
#

ok

gusty kiln
#

If you need to overwrite existing files, add overwrite: true to the deploy section of your .travis.yml.

idle owl
#

oh ok keen

gusty kiln
#

seems like it mostly won't come up but if it did that's what we'd want.

prime flower
#

@gusty kiln I have a weird pypi question/issue as well if you have time

#

(shakes fist) PYPI

#

maybe you;ve hit this too, kattni.

gusty kiln
#

@prime flower dunno if i'll know, but hit me

idle owl
#

same

prime flower
#

Released a new version of the IO-Python client, merged to master. Released and tagged.

#

It was tagged on release (release page), but pypi complains that the commit was not tagged.

idle owl
#

Does it need to be master? Not sure how you would have released a specific branch, but I'm reading that as it not liking a branch.

#

Otherwise, no afaik I haven't run into that but I haven't been handling travis builds so far. I picked that step up today.

prime flower
#

maybe my flow is wrong but I was doing: branch -> pr into master -> release master with new tag

gusty kiln
#

that seems like the correct flow. i haven't seen that error before.

idle owl
#

That is correct, @prime flower

prime flower
#

I had it release, twice. And somehow can't get it releasing without that error again.

gusty kiln
#

should that be tags: true, possibly?

idle owl
#

It's tags: true in mine.

prime flower
#

changing yml, re-releasing/tagging

idle owl
#

@slender iron Is the only thing that needs to be added to .travis.yml to force the earlier pylint this line under install? ```install:

  • pip install --force-reinstall pylint==1.9.2```
prime flower
#

@gusty kiln @idle owl welp, that seems to have pushed it to latest on pypi!

#

thanks!

idle owl
#

np!

gusty kiln
#

cool

prime flower
#

dont remember why I took tags false, but at least I'll spot it next time.

slender iron
#

@idle owl I think so but haven't done it myself

idle owl
#

@slender iron It seems like it worked, travis passed pylint after I added it. Thanks

slender iron
#

good enough for me

idle owl
#

The only one we'd updated was the Learn repo and it had something different under scripts: in .travis.yml so I wasn't sure if that was part of it or how we handle pylint in the Learn repo because of the weird structure. I assume the latter.

#

@slender iron Ok, so the build I just linked says it's logged in as not-Adabot. Where is that coming from? Is it the GitHub Token in travis-ci.org?

slender iron
#

ya

idle owl
#

Is the way to fix that to delete the GitHub token from travis-ci.org, and run Adabot?

slender iron
#

thats one way or make one manually yourself

gusty kiln
#

definitely the same deal as bmp280

idle owl
#

Ok, so log in as Adabot, create a token, and then add it to Environment Variables on travis-ci.org, correct?

#

Hmm now it passes but it's claiming it's not a tagged release. I retagged the current release. Running again.

#

Same thing. Hmm.

#

@gusty kiln Now I'm getting this instead. ```store build cache
Skipping a deployment with the releases provider because this is not a tagged commit
Skipping a deployment with the pypi provider because this is not a tagged commit

Done. Your build exited with 0.```

gusty kiln
#

lookin'

idle owl
#

I redid the release tag like it says to do in the instructions.

#

I could delete it and do another new release instead.

main meteor
#

Maybe it's the commit tag, not the release tag it's complaining about?

idle owl
#

It's based on release tag as far as I understand it.

#

You create a release, and it uses that tag.

gusty kiln
#

it looks like 2.0.4 is good?

idle owl
#

It passes, but it's not deploying at the end. It's not doing the pip stuff in travis.

gusty kiln
#

ah, my bad - hrm

idle owl
#

Yeah it's misleading because if it skips deployment, it doesn't actually fail

upbeat plover
idle owl
#

@upbeat plover Not that I'm aware of.

gusty kiln
#

there may be weirdness because both tags point to the same commit?

idle owl
#

Oh. Like I need to create a new commit of some sort?

gusty kiln
#

it doesn't seem to me like that should be the case, but it also wouldn't surprise me.

#

googles

idle owl
#

But both show up there.

#

There is a way to create an empty commit.

gusty kiln
#

my guess is that travis's code for detecting a new tagged commit is slightly failure prone around some edge case.

idle owl
#

Ok I deleted the initial tag.

#

So there's only 1 on the commit now according to GitHub.

#

Trying the build again

#

I did figure out there's a way to create an empty commit on git. So we can try that too if you think it might help.

#

Same.

gusty kiln
#

that is actually new information to me. :)

idle owl
#

Passes build, skips deployment.

gusty kiln
#

probably worth just trying a fresh commit & bumping the version tag.

#

i'm trying to figure out how travis determines whether a thing is tagged, but it turns out that modern idiomatic ruby is kind of... inscrutable.

#

(or maybe it just turns out i don't know ruby.)

idle owl
#

(ruby can go stuff it.)

#

Blergh. Ok. I'll do the empty commit thing.

#

@gusty kiln Wait, so I can't delete a release apparently. Do I create a new one? Or will bumping the tag move it to the new commit?

#

Looks like it might. I'll try it.

#

Oh can delete it, have to delete the binaries first.

gusty kiln
#

@idle owl in general we should probably avoid changing what a tag points at

#

i came to this conclusion after changing what a tag pointed at the other day

idle owl
#

I deleted the release.

gusty kiln
#

and then reading the extremely dire warnings about Never Doing That in the git tag man page.

idle owl
#

Fair enough

#

Bad Things โ„ข

gusty kiln
#

i can see why, but it's not something i'd given a whole lot of thought in past.

slender iron
#

tag numbers are free ๐Ÿ˜ƒ

gusty kiln
#

yup

#

minor versions don't hurt nobody. :)

idle owl
#

Yah I know. Just wasn't sure what route to get there.

#

Ok. New release. New commit. New tag.

gusty kiln
#

cool, fingers crossed

idle owl
#

Build autotriggered.

#

YES

#

YES YES YES

#

Seriously, travis can go swim with hungry sharks. ๐Ÿ˜„

#

It worked

#

Logged in as Adabot

gusty kiln
#

whew. :)

idle owl
#

Ok so I have so many threads of things I'm trying to do here, but I will add to that getting every lib logged in as Adabot. I need a spreadsheet or something ๐Ÿ˜„

gusty kiln
#

sometimes that really is the best way, much as office suites grind my gears

idle owl
#

Agreed, and I'm useless with spreadsheets, but this is HAPPENING RIGHT NOW.

manic glacierBOT
idle owl
#

@slender iron I have a question about RTD. The badge says docs are failing. I don't know how to get to the dashboard that tells me exactly what's failing unless I'm the one who imported and added it. What am I missing? The docs are there if you click on it, but the badge says failing. I know there's the thing that shows you the builds, but I can't seem to get to that page unless I'm the one who added it so it shows up under my Projects.

slender iron
#

its in the lower left menu on rtd

idle owl
#

ohhh... ok. Thank you.

slender iron
#

can't remember what its called

#

lunchtime for me

prime flower
#

@idle owl if you do find the name of it, lmk. I usually build sphinx locally beofre passing to travis to avoid that

idle owl
#

It's just "builds" in that lower menu. I build it locally too but this is on stuff that failed all on its own.

#

Appears there's no way to trigger a build without a new commit being pushed to the repo.

#

So if a build failed due to inactivity, which this one did, there's no way to trigger a new one without pushing a commit to the repo.

#

No, I was able to trigger a build on one that I imported and added to RTD.

#

hmm.

#

Yah button's not there on a different one.

manic glacierBOT
idle owl
prime flower
#

@idle owl you'll want to expand the part where it's deploying to pypi on the log

idle owl
#

Oh. Thank you.

prime flower
#

L800 is the error

#

I fumbled around the pypi setup (a LOT) a week or so ago

idle owl
#

L800?

#

deep sigh

#

If that's the file that already exists, then I have to retag it. Which means doing the empty commit again and deleting the release and redoing it and etc etc etc.

#

New tag will be new file name if I'm reading that right.

manic glacierBOT
prime flower
#

@idle owl I was doing 2.0.x starting with 1. Wound up on tag 2.0.9 when it finally deployed to PyPi

#

(was about to temporarily throw in the towel if I hit 2.0.10 without a successful deploy for that time and drink some water)

idle owl
#

Got ya ๐Ÿ˜„

#

....

#

I updated it and it failed on the same file name, it's not using a new tag in the filename.

gusty kiln
#

hrm

idle owl
#
Current tag is: 0.5.1```
gusty kiln
#

just reading scrollback

idle owl
#

second verse, same as the first! apparently.

gusty kiln
#

it looks like it's trying to upload a tarball for 0.5.0 despite that being a build for 0.5.1

idle owl
#

Right.

#

And that already exists evidently because that was the tag previously.

#

But it sees the updated tag earlier.

#

My google fu is failing here. I don't know where to begin searching for this. Restarting the build to see if maybe it takes a minute and it triggered too early. Doubtful but I don't know what else to do.

gusty kiln
#

yeah, digging a bit

idle owl
#

failed. as expected.

gusty kiln
#

ok, so i have a working theory

#

i think setuptools_scm might grab the first tag (0.5.0) instead of the second one.

#

running an sdist on its current state builds 0.5.0, at any rate.

idle owl
#

hmm.

#

deleted the tag from GitHub.

#

not sure if that'll matter.

#

@gusty kiln Nicely done!

#

That worked

gusty kiln
#

cool.

#

yeah, in general it seems like any time there's more than one tag on a given commit, the tooling is going to break somewhere.

idle owl
#

I thought deleting the release was enough to fix that, because it wasn't showing two tags. But noted for future reference.

#

I'm actually surprised it worked, I didn't do the empty commit.

#

Forgot that step.

#

LOL ๐Ÿ˜„

#

I HAVE ARRIVED!

#

I finally did a git blame and it was me!

manic glacierBOT
idle owl
#

So pylint is failing on this now in multiple repos. Module 'board' has no 'NEOPIXEL' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) It obviously DOES have NEOPIXEL in it, but it's not seeing it. So do I disable it? Do we need to update .pylintrc to either ignore no-member or add something to the whitelist? The description of what happens if you add things to to the whitelist doesn't sound great.

#

In the other repo, I disabled it because I have no idea what was going on in that section of code. In this one, I do get it but don't understand how I could make it not complain.

#

This is with pylint 1.9.2 supposedly.

#

$ pip install --force-reinstall pylint==1.9.2 is in there.

#

@slender iron I need your thoughts on this one.

#

I know we don't want to default to simply disabling pylint, but I'm wondering if it's the right thing to do here.

slender iron
#

ah, its c-extension-no-member? that we could disable

idle owl
#

In other places it's no-member

slender iron
#

plain no-member can be useful

idle owl
#
Using config file /home/travis/build/adafruit/Adafruit_CircuitPython_NeoPixel/.pylintrc
************* Module neopixel_simpletest
E: 11, 9: Module 'board' has no 'NEOPIXEL' member (no-member)```
#

So it's different for me locally

#

The one I pasted earlier is from me

slender iron
#

hrm

idle owl
#

Yeah.

#

I didn't think putting that in pylintrc made sense

slender iron
#

does automock fix it?

idle owl
#

I thought we took that out?

slender iron
#

instead of using blinka

idle owl
#

let me try

#

We never put board in there though that I was aware of....

#

I'll try putting it in there.

#

how does pylint get the automock though? I thought that was sphinx specific

slender iron
#

ah right

#

are you using 2.0.0 locally (and getting the better message)?

idle owl
#

Yes apparently.

#

2.0.1 it says. Oh I know why, this is a new venv. I didn't update the other one.

slender iron
#

could update and blacklist the c error

idle owl
#

I wasn't thinking when I installed it in this one.

#

Then we run into other issues I think. But I'll give it a try.

#

So, remove the 1.9.2 line from travis.yml, and then add that to the pylintrc disable line?

#

the error I mean

#

Ugh. I think it's using 2.0.0 and maybe that extra fancy message was 2.0.1?

manic glacierBOT
idle owl
#

Ok this is weird. I forced 2.0.1 install. And it still says (no-member)

#

Is it asteroid that's giving me extra fancy messages? Because pylint --version gives me a list of things. 2710 kattni@robocrepe:neopixel (venvpypi) [5s pypi 14cf74c]$ pylint --version pylint 2.0.1 astroid 2.0.1 Python 3.6.5 (default, Mar 30 2018, 06:41:53) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]

#

No that's up to date too Requirement already satisfied: astroid>=2.0.1

#

I'm disabling it locally and moving on.

#

@slender iron I thought having Adafruit-Blinka in requirements.txt handled all the built-ins? It's not handling neopixel-write.

#

Do I readd it to automock?

#

Or is it supposed to work.

slender iron
#

it only handles whats been implemented. ya, mock it or skip the lib all together

idle owl
#

I don't know how to skip it so I'll mock it.

slender iron
#

don't pypi it at all

idle owl
#

Oh.

slender iron
#

it won't work on cpython anyway

idle owl
#

I thought you were saying there was some magic to skipping neopixel_write in sphinx.

#

It won't?

#

Adafruit-Blinka should cover analogio right?

slender iron
#

yeah but not neopixel_write

idle owl
#
No module named 'analogio'```
#

Blinka is in req.txt and I at least think I installed the right things in the venv.

#

Failing remotely too.

slender iron
#

not implemented

idle owl
#

Oh.

#

Ok thank you.

slender iron
#

yup

#

its not perfect ๐Ÿ˜ƒ

idle owl
#

No but it was all a mystery to me until now, so that's super helpful.

slender iron
#

๐Ÿ‘

idle owl
#

Is the plan to eventually implement all of it?

slender iron
#

ยฏ_(ใƒ„)_/ยฏ

idle owl
#

Fair enough.

leaden kettle
#

Hey all! Total newbie here...I'm not sure if this is the place to ask, but it's driving me crazy and I can't seem to find an answer on Google. Is it normal for the CPX to show up as two drives on my computer? It seems to be working ok for now, but it was just unexpected. When I first started using it, it only showed up as one drive, but somewhere along the line it decided to turn into two. CIRCUITPY(E:) and USB Drive (F:)...The extra one is empty, and 0 bytes used 0 bytes free. It may not even matter, but I was just curious. Thanks! ๐Ÿ˜ƒ

upbeat plover
#

i would put it back into bootloader and throw uf2 on it again, if that doesnt fix it then in REPL use

import storage
storage.erase_filesystem()
#

backup everything you want to keep first

opaque thicket
#

n00b question about opening audio files in CircuitPython. I'm looking at the playing .wav file example here: https://learn.adafruit.com/circuitpython-essentials/circuitpython-audio-out

We open the file by saying "wave_file = open("StreetChicken.wav", "rb")"

Can we get away with using a "with" statement, like this?
with open("StreetChicken.wav", "rb") as filey:
wave_file = filey.read()

Does this sort of call only work with text or is this valid?

The next step in learning CircuitPython.

#

(If it's valid, are there any advantages/disadvantages between the two methods?)

opaque thicket
#

Another question: if I'm importing random, is it the same as importing the standard python random library? Like, could I call something like r = random.uniform(0, sum(w))?

onyx hinge
opaque thicket
#

@onyx hinge - Awesome! Thanks so much!

onyx hinge
opaque thicket
#

Oh man - I'm not following with what's happening there...

#

Also, thanks for the readthedocs link - bummed to get no results for list comprehensions

onyx hinge
#

@opaque thicket just an experiment to see if CircuitPython can be compiled to run inside the web browser

opaque thicket
#

lol - that would be bananas!

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

FYI -- I connected an 8 LED strip https://www.adafruit.com/product/2869 to my itsybtsy m4 express and I do see the 280kHz data rate, but thes trip works fine on bit my itsybitsy m4 and feather m4 -- note that this test

import board
import neopixel_write
import digitalio
import time

pin = digitalio.DigitalInOut(board.D13)
pin.direction=digitalio.Direction.OUTPUT
pixel_off=bytearray([0,0,0,0])
pixel_on=bytearray([0,255,0,0])
while True:
    neopixel_write.neopixel_write(pin,p...
onyx hinge
#

oh, crafty. emscripten's stack might grow up OR down. That is tricksy and confuses MICROPY_STACK_CHECK

manic glacierBOT
solar whale
#

@idle owl You've been doing a great job cranking through the the drivers. I was curious if each sensor is being verified to work via Blinka before it gets pushed out to PyPi? I know there are still some issues with some SPI interfaces like the RFM69 and RfM9x but I'm not sure if any others have issues.

manic glacierBOT
prime flower
#

@idle owl I can't install Adafruit_CircuitPython_PCA9685 from Pip, was it deployed?

prime flower
#

adafruit-circuitpython-motor, too.

#

oh...

#

l9, provider: releases -> - provider: releases

#

dht isn't on there either, same error.

#

@idle owl @gusty kiln you may want to incorporate into your workflow: travis-lint (gem install travis-lint), then check if the request made it's way to pypi by running pip3 install lib_name after submitting a release

manic glacierBOT
#

I was attempting to install Motor and PCA9686 on my Pi this morning when I saw the builds were requested in Travis, but did not go through to deploy due to an error in .travis.yml:
provider: releases should be - provider: releases.

Libraries referenced here which need to be deployed to PyPi are: Adafruit_CircuitPython_DHT, motor, featherwing, amg88xx, BNO055, CCS811.

I suggest adding a few steps to the workflow to prevent this:

  1. Before merging into master, validate the `.t...
idle owl
#

@prime flower There are PRs in to all those libs to fix that. We already added those steps to the workflow, it wasn't added to the GitHub issue.

prime flower
#

ah

#

ok

idle owl
#

I had issues with gem installing. We're not using travis-lint but we are verifying deployment through Travis before marking it completed.

prime flower
#

on macOS? with brew?

idle owl
#

Brew isn't gem. Gem is straight Ruby. I was able to brew install travis but not gem install it.

prime flower
#

huh, weird. I honestly don't remember how I got gem installed on this computer (long time ago)

idle owl
#

I brew installed Ruby but it gave me permissions issues trying to gem install anything.

prime flower
#

do you want ruby installation help with that (adam is a rails dev and i can loop him in?) or nah

idle owl
#

My workflow is convoluted but it works. So for now, nah.

prime flower
#

ha, np, going to install a pre-pypi pca on this pi for now

idle owl
#

It should be taken care of today so you should have it by the end of the day.

prime flower
#

yay, thanks!

idle owl
#

@solar whale We're doing it backwards a bit. It gets setup with PyPi then we have them queued to test. And if there's issues we resolve them at that point. So at the moment a lot of it's in flux because we're in the middle of the steps.

#

Check the guides. That's that last step I think, so if the guide has CPython in it, it's been tested successfully.

solar whale
#

@idle owl OK -- no problem -- I just wanted to give you a heads up about ones I know have issues. There is an issue in the Blinka repo for the RFM9x. Its actually a problem with the SPI implementation and not meant to be "fixed" in the sensor dirive.

idle owl
#

Ah ok. Thank you.

prime flower
#

fritzing while suddenly - old and new new new colors

solar whale
#

arrgh -- I forgot the cause/fix for this error for travis -- ```Warning, treated as error:
autodoc: failed to import module 'adafruit_tmp007'; the following exception was raised:
No module named 'micropython'

prime flower
#

@solar whale I just ran into that too, its part of removing the autodoc moc import and moving to requirements.txt

#

(if you're working on what I think you are)

solar whale
#

I'm just trying to create a new library

#

do I have to change one of the files from cookiecutter?

#

@prime flower did you find a workaround?

bronze geyser
#

I've been able to create an atmel start project, build it in the makefile and start debugging w/ JLink on an itsy bitsy. To do this, I had to adjust the linker script by commenting out the rom statement.... i think the linker script is still not quite right (memory mapping). Does anyone know where i can get hold of a linker script that would work w/ itsy bitsy? the makefile script w/ CP doesn't use .ld files, although i've been able to figure out a few things. My challenge is i am not fluent on linker scripts. (?)

tidal kiln
#

@solar whale look for autodoc_mock_imports in doc/conf.py

solar whale
#

@tidal kiln tahnks I think I jsut need autodoc_mock_imports = ["micropython"]

tidal kiln
#

i'm not an expert, but that's what i remember making it work

#

it tells it to pretend like it actually has that module

tulip sleet
#

@bronze geyser we do have .ld files - they are in circuitpython/ports/atmel-samd/boards/*.ld

#

the one used for itsy is chosen in boards/itsybitsy_mo_express/mpconfigboard.mk

bronze geyser
#

@tulip sleet Thank you. Off i go...

#

@tulip sleet i'm finding the atmel start "code builder" to make more sense as i bumble deeper :-).

tulip sleet
#

it makes sense, but it's hard to keep track of updates to their code, and it doesn't provide a way to download the whole set of libraries

bronze geyser
#

@merry turret Halber ...oh, that explains how $(LD_FILE) resolves....

prime flower
#

@solar whale @tidal kiln yuup! I have had an issue when importing "pulseio" though through requirements.txt

bronze geyser
#

what i like about it is it kinda works with the datasheet to give me a clue on the "right" steps to take.

#

as a learning tool.

tidal kiln
idle owl
#

@solar whale The plan is for Adafruit Blinka to handle that. I think. And if Adafruit-Blinka is in requirements.txt it will handle the built-ins. However. pulseio isn't implemented in Blinka yet apparently.

tulip sleet
#

@tidal kiln Those are generated automatically by github. I don't think they're very useful -- it's a snapshot of the bundle repo

idle owl
#

This is the weird middle-flux I was referring to. Not everything is implemented but we're PyPi-ing all the libs. I assume in preparation for it all being implemented.

solar whale
#

I think @tidal kiln had the fix I needed

idle owl
#

@solar whale Yes the automock works, I'm simply telling you how it's supposed to work moving forward. The automock isn't supposed to be needed anymore.

tidal kiln
#

@tulip sleet they're empty, just folders, no files

solar whale
#

OK thanks !

idle owl
#

So if it's not implemented in Blinka, etc, then automock it. If it is, the requirements.txt with Adafruit-Blinka in it will work.

tulip sleet
#

@tidal kiln cause whoever downloads that has to do a git submodule update --init -recursive

solar whale
#

ok - I can try Bilinka after I get it submitted the first time...

tulip sleet
#

just like if you cloned the bundle repo

tidal kiln
#

@tulip sleet ah. interesting. so it's actually a git repo in the zip. gotcha.

idle owl
#

@solar whale The link I posted has what Blinka has in it. pulseio isn't on that list.

#

micropython is though.

tulip sleet
#

it's a piece of a git repo. it has a .gitmodules but not a .git/

idle owl
#

@prime flower Your DHT PR failed travis on other files. I've been linting everything up and adding the force install to .travis.yml for pylint. If you don't want to deal with all of that, close the PR, and I'll do DHT next and take care of it.

solar whale
#

@idle owl thanks -- I "think" I uinderstand

prime flower
#

@idle owl closed, that'll need an automock for pulseio

idle owl
#

@prime flower Yep I see that in Travis.

solar whale
#

Travis -- I know where you live ....๐Ÿ‘Š

idle owl
#

ooooooh it's about to go down.

#

I'm getting in line.

#

After travis finishes anyway.

solar whale
#

you can have first dibs

idle owl
#

Missed a couple of things. Oops.

#

@solar whale Excellent. There's no evil grinning emoji. Disappointing.

#

There we go.

solar whale
#

anyy idea what this is complaining about ```
Warning, treated as error:
/home/travis/build/jerryneedell/Adafruit_CircuitPython_TMP007/adafruit_tmp007.py:docstring of adafruit_tmp007:1:'any' reference target not found: Adafruit_TMP007

idle owl
#

Yes.

#

If you reference something like that in a docstring, you need double backticks around it or it tries to actually look for it to use it.

prime flower
#

@idle owl looks good from the travis build!

idle owl
#

@prime flower Yep! Do you want to merge it? Then I can start sorting the next steps.

#

@solar whale Did that get you sorted?

meager fog
#

@gentle bronze hi for the nrfutil stuff that dan is putting on pypi, we can update arduino too!

solar whale
#

@idle owl yes -- on to more issues, but I'm working through them'

idle owl
#

@solar whale That's exactly how it goes ๐Ÿ˜„

prime flower
#

@idle owl (I can't merge), but feel free to mergein if you can, then release/tag and check if it deploys to PyPi

idle owl
#

@prime flower Please review it on GitHub for me then, so there's a comment thread.

#

Thank you

prime flower
#

Ok, added comment/review, didn't do a code-based review bc it looks fine to me

idle owl
#

Yep that's fine.

solar whale
#

Halleluja!!

idle owl
#

@prime flower Should be good to go.

#

In however long it takes PyPi to update.

prime flower
#

@idle owl Successfully installed adafruit-circuitpython-dht-3.2.0

prime flower
#

Looks good, release from PyPi installation matches tag release #.

idle owl
#

Brilliant.

#

PCA9685 is next. Other things require it as well.

prime flower
#

I just soldered the one on my desk up ๐Ÿ˜ƒ

idle owl
#

It was started but was missing some things so it should go quickly.

manic glacierBOT
idle owl
gusty kiln
#

yeah, just saw that dependency - lookin'

idle owl
#

Thanks

manic glacierBOT
#

I needed to rebase #1064 on yesterdays pin->number change and my tests started to fail:

pi@cp:~/work/circuitpython/cp-smbusslave/tests $ pytest --board=feather_m0_express --bus=1 smbus/
============================================================== test session starts ===============================================================
platform linux -- Python 3.5.3, pytest-3.6.3, py-1.5.4, pluggy-0.6.0
rootdir: /home...
idle owl
#

@prime flower PCA9685 is set on our end.

manic glacierBOT
gusty kiln
#

@idle owl restarted build on featherwing

idle owl
#

@gusty kiln There's another requirement that I apparently missed adding to requirements.txt so that one's on hold for now.

gusty kiln
#

right on.

idle owl
#

It's added locally, but never got pushed apparently.

#

So it can wait.

acoustic pollen
#

so is the circuit playground express limited to only importing 6 libraries?

idle owl
#

Depends on the library.

#

It's limited on memory. So if the libs are big, you're going to fit less. If they're small, more.

acoustic pollen
#

so this code is fine for the cpx to run:

import time import random import board import os import audioio from adafruit_circuitplayground.express import cpx

but adding import touchio makes it not work

idle owl
#

That's because the cpx lib has touchio built in. So you're adding it twice.

#

If you want to do touchio yourself, don't use the adafruit_circuitplayground.express library.

manic glacierBOT
acoustic pollen
#

oh, guess i can do my code without touchio then

idle owl
#

@raven canopy FYI I've started adding the line manually to .travis.yml as I go through and update them. So, doing it manually may not be as big of a deal if we're doing in tandem with something else already happening. I assume your patch checks to see if it's already there. Also I hope I'm doing it right, it seems to be working, but that would figure that it would work but not be right.

#

@acoustic pollen Touch is built in to the cpx lib. To use touch, use cpx.touch_A1 etc to use the touch pads A1-A7.

acoustic pollen
#

got that working now

idle owl
#

The point of that lib is to make everything on the board super easy to use, but it means you don't have as much refined control over each feature because the lib does the setup for you. At the point that you're wanting to do all of that yourself, you move on from using the cpx lib and do it all yourself.

acoustic pollen
#

also, when using alligator clips on the cpx, capacitive touch just goes rapid fire instead of doing it only on press.

#

unless air's a conductive material or i need to put it in something first

idle owl
#

It calibrates on startup so when you add something to the touch pad, you need to restart the board.

#

Then it calibrates with whatever's on it.

manic glacierBOT
idle owl
#

You can also set touch threshold if it's too responsive.

manic glacierBOT
#

A long time ago I implemented instrumentation for measuring max stack usage in the atmel port. If you enable MICROPY_DEBUG_MODULES in ports/atmel-samd/ mpconfigport.h, it turns on uheap and ustack, and also turns on MICROPY_MAX_STACK_USAGE, which enables ustack.max_stack_usage().

THis is not in the nrf port, but it wouldn't be hard to add that.

Having said all that, I used the instrumentation when I added it, and came up with 12kB as a reasonable stack size. That includes ...

lone sandalBOT
manic glacierBOT
manic glacierBOT
prime flower
idle owl
#

@prime flower register was already done but there had been another commit merged since the release, so it was skipping deployment due to a lack of a tagged commit. I fixed the docs badge, and did a release. I'm checking it now.

#

Should be good.

prime flower
#

@idle owl looks good so far, just installed it and pca isn't complaining when imported

#

Thanks for the speedy addition!

idle owl
#

There wasn't much to do.

lone sandalBOT
idle owl
#

@gusty kiln Sorry about the flurry of emails on merged PRs, I realised I'd forgotten to reference the original issue, so I went back through what I could remember and referenced it.

gusty kiln
#

right on

errant grail
#

Help, please: Just updated the bootloader on an old Feather M0 AdaLogger board -- it worked! Is there an AdaLogger .uf2 file out there somewhere?

idle owl
#

@errant grail It's part of the standard CP releases...

#

So go to releases and download it. Unless you're asking for something other than what I think you're asking.

errant grail
#

I found the .bin file out there, but I was hoping to be able to use the most recent bootloader (more convenient than moving the .bin file via bossac).

idle owl
#

Oh I see. I missed that it was a .bin, sorry

#

I'm not sure. I guess I thought it had a UF2 in all that. You could build one maybe?

errant grail
#

I'm willing to try -- back to the steep part of the learning curve! ๐Ÿ˜‰

idle owl
#

@tulip sleet Does building CP for the Feather M0 Adalogger create a UF2 as well as the other firmware files? Do you know off hand?

#

Before I send @errant grail on a goose chase.

tulip sleet
#

checking...

errant grail
#

@idle owl that's okay, I could probably use the (mental) exercise.

tulip sleet
#

@idle owl @errant grail the .uf2 does get made, but we don't bother to put it in the release, since it doesn't have a uf2 bootloader

idle owl
#

@errant grail Yeah but if it doesn't even build it, I didn't want to send you after something that wouldn't happen anyway. There you go!

#

@tulip sleet Thank you for checking

tulip sleet
idle owl
#

right on

errant grail
#

Thanks Dan. I probably have the only M0 Adalogger with the uf2 bootloader...

#

updated it with the .ino file - easy peasy.

humble plover
#

I'm new to circuitpython but not to coding. I'm happily working through the samples using the mu editor. Very impressed with what my playground express can do. I'm wondering what people are doing for a development workflow. I find the load/save cycle very odd as I'd llike my code on my hard dive in project folders and not on my board (CIRCUITPY) folder which occasionally gets corrupted. Also an observation from a newbie - the REPL/ctrl D thing was confusing. I think there were times (early on) when I was in REPL mode and thought my board was not responsing to changes to my saves in the editor.

errant grail
#

@tulip sleet @idle owl Found the .uf2 file in the tree. Thanks!

#

... and it worked! Yippee!

gusty kiln
#

@humble plover FWIW, on projects i've done, i've just gotten in the habit of writing a tiny makefile to copy code across. might be a good fit for you.

humble plover
#

@gusty kiln thanks - that makes sense. I thought I was missing something. So you are using mu editor but against a folder on your filesystem and then have a terminal to run your make file

errant grail
gusty kiln
#

i'm using vim, with a hotkey to run make, but i imagine you could do something similar with most editors. (this is where i confess i haven't really tried mu.)

idle owl
#

@errant grail Nice job!

errant grail
#

Couldn't have done it without you and Dan (the community)!

idle owl
#

@humble plover Are you new to Python? Or do you already have a preferred editor that you use for programming?

humble plover
#

Fairly new to python - I'd probably use visual studio code for this sort of thing.

idle owl
#

Ah haven't used that enough to know how well it works with CircuitPython.

#

Which is to say at all.

#

Mu should be able to work with files not on the board, it'll be a couple of extra steps though because it's designed to streamline working with CircuitPython in the live-on-the-board workflow.

humble plover
#

I like mu's serial output and I like the 'check' linter button.

idle owl
#

Yeah it's a great editor ๐Ÿ˜ƒ

humble plover
#

but would prefer to use another editor

idle owl
#

What OS are you running?

humble plover
#

oops - its not that bad!

#

Ubuntu

idle owl
#

Before I head off down a rabbit hole you can't use

#

Ok

gusty kiln
#

what i do is use vim alongside a screen session connected to the repl

idle owl
#

I use PyCharm. Which has a Terminal built in. And you can use screen to connect to the serial console within the editor.

#

I learned that recently. I've been using a terminal program and PyCharm side by side.

humble plover
#

I've got PyCharm installed for when I was playing with tensorflow. It works pretty well then? I thought it might get a bit confused with the cut down syntax

gusty kiln
#

circuitpython should always be a proper subset of regular old python, i think, so you shouldn't really have any issues there.

idle owl
#

I've run into a few things. Where it'll complain about libs not being there because it can't find them in CircuitPython, but I ignore it.

#

It's basically great. I love it.

#

If you're plugging in a bunch of boards at the same time, you have to do a couple of workarounds to get it to play nice with all of them at once.

humble plover
#

@idle owl - what arguments are you using for screen to connect to playground express. I thought screen was like tmux, i.e. splitting windows, etc

idle owl
#

But I don't know if you'll be doing that

#

screen /dev/tty.ACM0 115200

humble plover
#

no - just the one board

idle owl
#

I think that's right for linux.

#

I'm on Mac OS.

gusty kiln
#

@humble plover sudo screen /dev/ttyACM0

#

should be right for a debian-derived linux like ubuntu

idle owl
#

Oh right, you have to sudo unless you're in the dialout group

gusty kiln
#

you might not need the sudo if your user is in the dial... yeah.

#

this is the one reason i still wind up using screen these days. otherwise it's tmux all the way...

idle owl
#

Someone this past weekend at the conference tried to connect using tmux, I never heard that they succeeded.

humble plover
#

Yep that worked! thankyou (ttyACM0)

idle owl
#

Great!

gusty kiln
#

yeah, unless something has changed, tmux doesn't do arbitrary serial connections.

tulip sleet
#

vscode is good -- does an fsync after writing the file, which will ensure it's all written

humble plover
#

Trying pycharm - I've got the tools > micropython > MicroPython REPL working. Is it possible to set up circuitpython libraries so that I don't get angry squiggles under the imports?

idle owl
#

Good job with the REPL. I've had all kinds of problems getting it working. I find it'll work once and then not work next time, without me deleting all my settings and starting over which I Finally gave up on doing.

#

It's not designed to work with CircuitPython per se.

#

And not really, with the imports thing. That's what I was talking about earlier.

#

It's the nature of CircuitPython, we have steps all over to deal with it.

humble plover
#

so no intellisense ๐Ÿ˜ฆ

idle owl
#

PyCharm isn't designed specifically to work with CircuitPython either, so it doesn't know how to look for the libs.

#

CP is very CPython compatible, but also has it's unique quirks.

humble plover
#

Well thanks all for the information and tips - very useful! I can get started on a proper project now!

idle owl
#

Good luck! Keep us posted, we love to hear about projects ๐Ÿ˜ƒ

humble plover
#

๐Ÿ‘

idle owl
#

@tidal kiln You around?

tidal kiln
#

@idle owl am now. waddup?

idle owl
tidal kiln
#

that link may not have gone to correct place. scrolling down......this?
E: 75,19: Module 'busio' has no 'OneWire' member (no-member)

idle owl
#

Oh. Yes that.

#

Sorry

tidal kiln
#

np. let me look....

idle owl
#

Thank you

tidal kiln
#

why would it say that?

idle owl
#

Because it can't actually read busio so it's incorrectly reporting it doesn't have that in it.

#

Or because it's not implemented in the new setup?

#

Either way, sounds like a disable situation.

#

I wanted to make sure I wasn't missing something.

tidal kiln
#

there's no actual issue as far as I can tell:

Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit Trinket M0 with samd21e18
>>> import busio
>>> dir(busio)
['__name__', 'I2C', 'SPI', 'OneWire', 'UART']
>>> import board
>>> ow = busio.OneWire(board.D2)
>>> 
#

all as expected

idle owl
#

I get a fancier error locally: adafruit_onewire/bus.py:75:19: I1101: Module 'busio' has no 'OneWire' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)

#

But we can't get it to find that one to disable it globally, so we are doing it as it comes up.

#

Ok keen. I'll disable it then.

tidal kiln
#

but i'm also behind on the latest happenings. whats the "new setup"?

idle owl
#

Doing all the PyPi stuff. I think it looks in a different place now.

tidal kiln
#

is it possible to fix the setup somehow?

idle owl
#

I'm not sure. Because it wouldn't explain why I'm also getting the error locally, except fancier. We could do the thing suggested in my fancy error, but there's a rather awkward sounding explanation of what happens when you do that in .pylintrc so that seemed like a bad idea... something about python "running arbitrary code"

#

I feel like it has to be added to Adafruit-Blinka or something, but I'm not sure pylint is using that, I only know that it installs the requirements before running pylint.

#

Something changed somewhere though because this is happening on files I didn't change when I submit the PyPi setup stuff.

#

I've been checking it and then disabling it if it's definitely invalid.

#

I don't really understand all of this, I'm learning as I go here.

tidal kiln
#

you probably know more than i do though.

#

just wondering if there's some magic something to put in .pylintrc?

idle owl
#

@tidal kiln There is. but I don't understand what it does when you put it there.

#

@tidal kiln ```# A comma-separated list of package or module names from where C extensions may

be loaded. Extensions are loading into the active Python interpreter and may

run arbitrary code

extension-pkg-whitelist=```

gusty kiln
#

@idle owl right on - i'll have a run through what's currently in the, and then i think i'm going to call it an afternoon and go stare at my garden for a while. :)

#

"currently in the queue", i meant to say.

idle owl
#

@gusty kiln Sounds lovely ๐Ÿ˜ƒ

#

I read it right ๐Ÿ˜„

#

@tidal kiln I tried to get remote pylint to return the fancy error, including forcing updating it and so on, and I couldn't get it to do it. Kept returning only no-member which we don't want to globally disable. We could globally disable the c-extension-no-member or whatever it was, but I couldn't get it to show up in Travis-pylint. Not sure why. Some kind of dependency of Pylint that isn't updated I'm sure.

tidal kiln
#

@idle owl what happens if you add busio to that list and run it locally?

idle owl
#

I didn't try. I'll try it the next time it comes up.

tidal kiln
#

that first message makes a little more sense to me (i think). since busio is core, it's in C, so pylint can't really inspect it, at the source code level, like a module written in python, so...

Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects.

would tell pylint to just import it and look at it that way.

idle owl
#

It is bound to come up again, it has been. I'll try it when it does.

solar whale
#

@tulip sleet I am running into this repeatedly with the current master, Is something broken ```RuntimeError: maximum recursion depth exceeded

tulip sleet
solar whale
#

@tulip sleet nevermind -- reading the isse

#

hmm -- I tried notros fix, but it did not work

tulip sleet
#

try making it bigger, like 4096 or 8192 instead of 2048 in the line he changed

#

that only works once, on the next reboot

solar whale
#

can it be done fron the REPL? or does that have to be done somewher internal

#

or change it in mpconfigport.h and rebuild

tulip sleet
solar whale
#

ok - thanks

#

trying 8192 on a feather M4

#

much better!!

manic glacierBOT
tulip sleet
#

@solar whale the corresponding code hasn't been implemented in esp8266

solar whale
#

Thanks

tulip sleet
#

could you try importing some large .py file, to see if the stack is big enough for the compiler when it's 8192?

#

I'm preparing a PR to bump it up to something comfortable for now

solar whale
#

on teh M4 I use the .py libraries and have not had problems with the RGB display and bitmapfont .pys

tulip sleet
#

oh, that sounds good, that' what you just tried?

solar whale
#

yes -- I was trying a bitmaptfont test and it kept failing!

#

works fine now at 8192

tulip sleet
#

ok, I'll make the PR 8192 for now -- we can try tuning it later. Also I'll change that error message.

solar whale
#

Thanks --- Must be Friday night ๐Ÿ˜‰

tulip sleet
#

thanks for testing this!

#

my wife is away for the weekend ๐Ÿ˜ƒ

solar whale
#

I'm trying to catch up on my todo list -- I'll be pretty scarce for the next two weeks after Sunday -- Going to visit my new grand-daughter ๐Ÿ˜ƒ

manic glacierBOT
tulip sleet
#

@solar whale very nice! first grandchild?

solar whale
#

Second -- our job wil be to entertain the 3 year old!

tulip sleet
#

congrats!

solar whale
#

Thanks!

tulip sleet
#

8k might be high

Adafruit CircuitPython 4.0.0-alpha-919-g177515a7b on 2018-08-03; Adafruit Metro M0 Express with samd21g18
>>> import gc
>>> gc.mem_free()
16240
>>> gc.collect()
>>> gc.mem_free()
16192
#
Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit Metro M0 Express with samd21g18
>>> import gc
>>> gc.mem_free()
19696
>>> gc.collect()
>>> gc.mem_free()
19648
>>> 
#

top is heap size with 8k limit , bottom is 3.0.0 heap size

#

could shave 3.5k off maybe

solar whale
#

hmm - I can try with 4K and see how it works

tulip sleet
#

if you have time, thanks, sounds like you have a good stress test

solar whale
#

Just take a few minutes

tulip sleet
#

actually scott put this comment in:

// TODO(tannewt): Make this 6k+ for any non-express M4 boards because they cache sectors on the
// stack.
#

oh, never mind, that's m4 non-express (of which we have none right now)

solar whale
#

but I'm using a feather_m4_express and it was failing.

tulip sleet
#

no, i mean 4k is probably ok, i thought maybe we should make it 6k for m0 basic, but that's not what he means (I missed the "m4")

solar whale
#

all my tests work at 4K as well

tulip sleet
#

ok, I'll change my PR. double thanks

solar whale
#

glad to help.

manic glacierBOT
solar whale
#

just ran into an odd problem -- I mounted an SD card - then , as I have many times before, tried to use another SPI device, but I get an error that SCK is busy ??

#

I'll look into this more in the morning and file an issue if need be.

#

ruh roh -- there were changes to the SPI pin handling 3 days ago ....

#

Tomorrow is another day to break things -- good night!

manic glacierBOT
#

Version 3

  • Rebased
  • Move mp_hal_is_interrupted() to lib/utils/interrupt_char.c
  • Move MP_DEFINE_CONST_PROP_GET to py/obj.h
  • Now also tested on M4

These ran out of space:

circuit_playground_express
/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 5304 bytes

circuit_playground_express_crickit
/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 4776 bytes

feather...
manic glacierBOT
#

With the current master, if I execute the following script to mount my SD card

import adafruit_sdcard
import busio
import digitalio
import board
import storage
import sys
# Connect to the card and mount the filesystem.
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
cs = digitalio.DigitalInOut(board.D5)
sdcard = adafruit_sdcard.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
sys.path.append("/sd")
sys.path.append("/sd/lib")

then try to ex...

tulip sleet
#

@solar whale do you know when the #1088 problem was introduced? like maybe go back to end of july and e7ae5a3070a1422cf7287f546004b12eec9d0d49. Have you done a bisect before?

solar whale
#

I have done a bisect -- not overly successfull, but I'll see if I can track it down -- most of the time I have been using the nrf52 board so I'm noat at all sure when this began.

tulip sleet
#

thanks. it could be the new pin stuff or it could be vfsfat changes from the micropython merge

solar whale
#

OK -- I see that the new pin stuff is not in the nrf port, is the vfsfat stuff in it?

tulip sleet
#

yes. I'm actually surprised it worked before, because you're creating two spi objects that use the same pins, if i understand your code correctly.

solar whale
#

yes, but how could you execute code from an SDCard if you don't

tulip sleet
#

pass a single spi object around

solar whale
#

sure, but then you have to have different code for use from SDCard thna from Flash..

tulip sleet
#

but i don't understand why it worked before. and you say this still works on nrf52 with no error, so it's less likely to the be vfsfat code, since that's shared (or it should be)

solar whale
#

yes - just ran it on the nrf52

tulip sleet
#

it's like there's a claim_pin() that was not there before

#

so the essence is:

spi1 = busio.SPI(board.SCK, board.MOSI, board.MISO)
spi2 = busio.SPI(board.SCK, board.MOSI, board.MISO)
#

does that work on nrf52 but not m4?

solar whale
#

really 2 questions -- Yes - I think so

#

Ill check

#

does not work on feather_m4_express ```Adafruit CircuitPython 4.0.0-alpha-918-gdfa2581ff-dirty on 2018-08-03; Adafruit Feather M4 Express with samd51j19

import busio
import board
spi1 = busio.SPI(board.SCK, board.MOSI, board.MISO)
spi2 = busio.SPI(board.SCK, board.MOSI, board.MISO)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: SCK in use

#

on on feather feather2832 ```Adafruit CircuitPython 4.0.0-alpha-918-gdfa2581ff-dirty on 2018-08-04; Bluefruit nRF52 Feather with nRF52832

import busio
import board
spi1 = busio.SPI(board.SCK,board.MOSI,board.MISO)
spi2 = busio.SPI(board.SCK,board.MOSI,board.MISO)

tulip sleet
#

Hah!

solar whale
#

I'll add taht to the issue

tulip sleet
#

if you tried the same thing with I2C, I think you'd get complaints on both

solar whale
#

note: I had to type it in manually on the nrf -- cut/paste caued it to hang ??

tulip sleet
#

that's certainly another bug

solar whale
#

sigh..

tulip sleet
#

it's alpha ๐Ÿ˜ƒ

manic glacierBOT
#

simple example to isolate issue

on feather_m4_express

Adafruit CircuitPython 4.0.0-alpha-918-gdfa2581ff-dirty on 2018-08-03; Adafruit Feather M4 Express with samd51j19
>>>
>>>
>>> import busio
>>> import board
>>> spi1 = busio.SPI(board.SCK, board.MOSI, board.MISO)
>>> spi2 = busio.SPI(board.SCK, board.MOSI, board.MISO)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: SCK in use
>>>

on on feather feather52832

Adafruit Circ...
solar whale
#

so - real question is -- should it work on the m4?

#

nrf52 is OK with I2C as well !!

tulip sleet
#

then nrf52 is wrong, because the pins should be claimned. Scott's recent changes to that code are only cosmetic. I believe this may have never actually worked on any atmel board -- maybe you are trying things in a new order?

solar whale
#

I'm not sure I ever tried it on the ATMEl since I don't need the SDCard for the code . On the feather52832, I need it because it wont fit on the intenal Flash.

tulip sleet
#

the SPI (or I2C or whatever bus) pins are owned by the busio.whatever object, and you have to pass the object around

solar whale
#

so I need a master script taht mounts the SDCard then execites somethig from it. awkward

tulip sleet
#

it could be the bare object or it could be a bus_device object

#

or use a diff SPI bus

solar whale
#

all workable, just got spoiled by the nrf52 ๐Ÿ˜‰

tulip sleet
#

you have to be your own OS ๐Ÿ˜ƒ

solar whale
#

so any user has to take this intoconsideration when using an SDCard to store code. If the code uses SPI, you have to manage it .

tulip sleet
#

with an OS, the OS would take care of managing the shared resources

solar whale
#

I guess this has not gotten much exercise.

tulip sleet
#

i will open a new bug about pin ownership for nrf52, and close yours in favor of that

solar whale
#

Is the problem that the 2 instances can conflict with eachother -- so if ai actualy tried writing to the SDCARD while suing an SPI sensor -- things could get ugly.

#

I feel like I've ratted on the nrf52 ๐Ÿ˜‰

tulip sleet
#

yes, exactly

#

or, a worse example, since there's no pin ownership, you could create an SPI bus and and I2C bus on the same pins, and it would not catch that

solar whale
#

good to find this -- I thik the only way the feather52832 is really nice with an SDCard attached. very limited without it.

tulip sleet
#

there's a 52840 express board coming down the pike

solar whale
#

That'll be nice!

tulip sleet
#

52832 is like feather m0 basic

solar whale
#

yup -- but more RAM

manic glacierBOT
solar whale
#

so -- to do thsi properly -- I need to creat the spi instance -- mount the SD Card, then import the libraties I need from it and run my code,.

#

so my first script -- not on the SDCard has to know waht I am planning to do after I mount the SDCard...

tulip sleet
#

yes. you're the only person I know who's used an SDcard to hold code to import

solar whale
#

likely the last ๐Ÿ˜‰

tulip sleet
#

i think you might have to use a global

#

because there's no way to pass params to the import

solar whale
#

It was so nice - I have th whole Bundle on the SDCard -- just mount it and use it like normal

tulip sleet
#

you could mount it in boot.py and have a global SPI object, or, can you use other pins?

#

are you using a logger wing?

solar whale
#

usually either a breakout or the tft featherwing

#

mostly the tft featherwing.

#

how do you use the global -- not sure I've done that?

#

don't take a lot of time -- I can google.

tulip sleet
#

trying to think of the cleanest way to do this

solar whale
#

Don't spend any time on ti-- as you said, I'm the only one doing it... I'll see what I can do,

#

Thanks for helping me understand the problem.

tulip sleet
#

working up an example...

#

explained better than i could

solar whale
#

thanks . This has taken up much more of your time than I intended!

tulip sleet
#

no prob - you are always finding valuable stuff! I'll go exercise soon

#

heavy rain is imminent

#

for you too - looking at radar map

solar whale
#

we had some excitement last night! Tornado warnings and nearby lighnting strikes.

tulip sleet
#

we missed that -- it went north, and you got it. western ma but then it went northeast fast

solar whale
#

I'm looking forward to Winter !

tulip sleet
#

be careful what you wish for ๐Ÿ˜‰

#

we have a/c

solar whale
#

we don't -- its a lot easier t o get warm than to get cool!

#

its the humidity that is really annoying.

tulip sleet
#

but no static troubles! - ttyl, thanks for all the testing as usual!

solar whale
#

You're welcome -- thanks for the fixes --- enjoy the day!

solar whale
#

@tulip sleet FYI - I now have an M0 adalogger set up so I can mount the SD Card then configure and use my STMPE610 TFT driver via SPI with the STMPE610 driver residing on the SD card. Nothing fancy just had to import the driver after mounting the SDcard and use the same spi instance for both -- here is the example ```jerryneedell@Ubuntu-Macmini:~/projects/feather_adalogger$ cat stmpe610_sd.py
import adafruit_sdcard
import busio
import digitalio
import board
import storage
import sys

Connect to the card and mount the filesystem.

spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
sd_cs = digitalio.DigitalInOut(board.SD_CS)
sdcard = adafruit_sdcard.SDCard(spi, sd_cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
sys.path.append("/sd")
sys.path.append("/sd/lib")
from adafruit_stmpe610 import Adafruit_STMPE610_SPI

cs = digitalio.DigitalInOut(board.D6)
st=Adafruit_STMPE610_SPI(spi,cs)
print("Go Ahead - Touch the Screen - Make My Day!")
while True:
if not st.buffer_empty:
print(st.read_data())

idle owl
#

@solar whale lol, nice print.

meager fog
#

@gentle bronze hi thach - do we have any examples of creating a timer-called function in arduino for nrf52832?

idle owl
#

Hmm. Getting a pylint error on the fingerprint sensor example, I think I know how to fix it, but I don't have one to test to make sure it works.

meager fog
#

@idle owl are you using pyling 1.92?

#

used to pass !

idle owl
#

I have the updated version, but even 1.9.2 is finding new errors for some reason. I'll try it again. give me a sec

#

Hmm ok passes with earlier version. So in theory it should pass remotely. ๐Ÿ˜ƒ

gentle bronze
idle owl
#

oh wait

meager fog
idle owl
#

no it doesn't pass with 1.9.2

gentle bronze
#

It is not a obvious example, I will add one more example just for the Software example

idle owl
#

I added the disable and it autosaved before I ran pylint again

meager fog
#

@gentle bronze will that timer be consistant or is it a little flexible on timing? ๐Ÿ˜ƒ

gentle bronze
#

it is based on the freeRTOS ticks, pretty accurate, but flexible, since other task may not give up control when the time is up

meager fog
#

ok - i may ask for help later once i get it mostly working

#

it isnt a big project for me, would be nice to get working but i only know SAMD21 timers ๐Ÿ˜„

gentle bronze
#

@meager fog 1 Khz is 1 ms tick, which is too fast since freeRTOS tick is also around 1 khz. you may need to use hw timer for that.

meager fog
#

can i use HW timer or does FreeRTOS use all of them? yes they need to be fast because it refreshes the whole screen every time!

gentle bronze
#

@meager fog freeRTOS only uses RTC1 as tick timer

#

you can use systick

#

it is easiest to configure

meager fog
#

ok cool. i hope the timers are easier to use than with nrf51! ๐Ÿ˜ƒ

#

ok cool i will do that!

#

@idle owl did ya resolve or..?

gentle bronze
#

just a note, RTC is used instead of systick for freeRTOS, since it consume less power

meager fog
#

ok got it!

gentle bronze
#

RTC tick still run when cpu enter sleep mode, which systick won't

idle owl
#

@meager fog It's not passing, and I don't have one to test so I don't want to start refactoring it without being able to test it. I'm going to add a pylint: disable and a note to refactor it when it can be tested, I guess?

meager fog
#

@gentle bronze i emailed raytac and they are finishing certification, so we'll get final modules in maybe 4 weeks

#

@idle owl can u link me the error

#

@gentle bronze so its all very good timing for us. we will have some code ready for hardware. i just need to finish the feather design - that's on me

gentle bronze
#

@meager fog yeah, thanks for the info, by that time we should have both Arduino and CP ready ๐Ÿ˜„

idle owl
#

@meager fog examples/fingerprint_simpletest.py:64:4: R1705: Unnecessary "else" after "return" (no-else-return)

#

I didn't push it so it's not running on Travis yet. That's local.

#

This is the block: python print("Searching...", end="") i = finger.finger_fast_search() if i == adafruit_fingerprint.OK: print("Found fingerprint!") return True else: if i == adafruit_fingerprint.NOTFOUND: print("No match found") else: print("Other error") return False

#

line 64 is the first if

meager fog
#

@gentle bronze that reminds me to ask, can we reuse the tinyusb code for nrf52840 arduino?

#

@idle owl ooh yeah, i guess that's true. not my style but correct. how about stick a disable in for now

idle owl
#

Ok.

meager fog
#

and we'll look at it later!

gentle bronze
#

@meager fog yeah, we will need that for CDC + MSC on Arduino code. May need to write some C++ wrapper for tinyusb as well.

meager fog
#

ok - hopefully peripherals for 840 are similar to 832

#

we can reuse same bootloader and everything

gentle bronze
#

I am actually focusing on the Arduino side now, there is quite some works to get it ready especially with the usb as you said, new SD v6 API. Making usre most code work with both 832 and 840

meager fog
#

also, with appveyor making mac and windows binaries, we dont have to have complex install instructions

gentle bronze
#

yeah, some user may be confusing at first, though we could just tell them to upgrade the BSP to lastest ๐Ÿ˜„

#

but pretty much the same, do more testing later

meager fog
#

yep ok let me know when u want to do the update to nrfutil procedure, i can update BSP/test on mac, win7 and win10

gentle bronze
#

Thanks, I will try it locally first, then ask you test it again when it is all ready ๐Ÿ˜ƒ

meager fog
#

๐Ÿ‘

gentle bronze
#

๐Ÿ‘

manic glacierBOT
gentle bronze
#

@meager fog just in case you haven't check the systick, here is the code #include <Arduino.h>

extern "C" {

void SysTick_Handler(void)
{
ledToggle(LED_BLUE);
}

}

void setup() {
// put your setup code here, to run once:
SysTick_Config(F_CPU/1000);
}

void loop() {
// put your main code here, to run repeatedly:

}

meager fog
#

ok!

gentle bronze
#

don't forget teh extern "C" , otherwise it won't link with the one in the asm file. Take it 15 minutes of scratching head ๐Ÿ˜ฆ

#

take me ๐Ÿ˜ฆ

idle owl
#

I just had one of those moments with something else, except it was a day and a half of head scratching. ๐Ÿ˜•

gentle bronze
#

very easy to forgot ๐Ÿ˜ฆ

idle owl
#

Those are the most frustrating ones ๐Ÿ˜ƒ

gentle bronze
#

yeah, really frustrating, no warning or whatsoever. And we just copy the code from a working proejct ( which is pure C ) ๐Ÿ˜„

#

I will add systick example to Arduino example as well. It i useful. not-used and much easier to confi that other phrph's timer.

main meteor
#

I had a somewhat similar moment trying to call a C++ routine from an interrupt. I finally just had a short C routine that set a flag, then C++ would check the flag. It works, but it's a little tricky to generalize.

gentle bronze
#

@main meteor nice trick, another way I use is declare an extra extern C func in a cpp file. Then call that function from the c file. The extern C func could call all other c++ funcs without any issue.

main meteor
#

Ah, I see, function chaining. A C function in the library handles the interrupt and calls another C function in the file that uses the library, which in turn calls a C++ function. I'm unsure how much overhead all that would add (especially the C++ call), given that interrupt handlers are supposed to be quick.

gentle bronze
#

๐Ÿ‘ yeah, it has a bit of overhead, kind of annoying.

#

But we could defer instead of invoking it right away. It helps to address the linkage from C to C++

#

Sometimes, the overhead is acceptable too ๐Ÿ˜…

#

Hmmm, setting a flag is actually a deferred isr method. I guess it is a better approach for a more robust system. If the C func is not isr, chain call is easier to write :)

gentle bronze
#

๐Ÿ’ค

idle owl
#

@gentle bronze Night, Thach! Have a good night!

gentle bronze
#

@idle owl thanks, good night (afternoon)

scarlet fjord
#

I have a question about speed with checking for a switch press: is it equally as fast to look through an MCP23017 as it is to do matrixing...? or is one faster than the other?

scarlet fjord
#

like, in terms of latency and clock cycles etc

stuck elbow
#

not sure what you mean by "matrixing"

#

what are you trying to do?

scarlet fjord
#

im making a keyboard, so matrixing in that context would be having 'rows' and 'columns' and checking for keypress events that way.
so a key press check would be:

#

-turn on the row as an output
-turn on the column as an input
-check to see if the key was pressed
-repeat for each key in the matrix

#

whereas for the MCP23017, its just:
-check the key to see if it was pressed

#

so im wondering if checking through the MCP23017 takes more clocks than enabling the GPIOs as inputs/outputs/etc for the matrix

#

im just worried about latency when cycling through an entire keyboard

tulip sleet
#

@scarlet fjord Are you not going to use a matrix with the MCP23017?

scarlet fjord
#

I am not at the moment no ๐Ÿ˜… I'm just using three MCP23017s

#

interesting - I'll check those links out ๐Ÿ˜ฎ

tulip sleet
#

anyway, it should be plenty fast either wya. You can run the MCP23017's at a good clip, especially with SPI. But I2C is probably plenty fast enough too.

scarlet fjord
#

hmm ok...
I've run some testing and found that it's possible for me to skip a key when pressing it relatively fast. would switching to the SPI version of the MCP23S17 make a large difference to the time it takes to check each pin? I have no idea where my bottleneck is unfortunately lol I'm just not that knowledgable about this stuff

#

it was cool to check out that imgur link though - I love looking at custom keyboards that people make. I'm wondering what the shift register is for though?

tulip sleet
#

The shift register is to read the column values. There's only one pin used for the columns. The rows each have a separate pin.

#

The missed keys may have more to do with the speed of the CircuitPython code rather than the raw speed of the MCP23017. Why don't you just measure the latency? Get the time.monotonic() value at the begining and end of the key scan and subtract them to see what the elapsed time is.

scarlet fjord
#

hmm I could, yes.
I guess I could test two keys on one MCP23017 vs one key each on two MCP23017s and see if the time is different... that would at least tell if I compared those two results how much time it takes to read the MCP23017... hmm
I guess I should actually put together a matrix and do that testing too to see the time there as well and compare it

#

I guess I was just hoping someone had already done that testing lol ๐Ÿ˜…

tulip sleet
#

I thought nearly all keyboards were matrixed, for cost reasons. Are there existing designs that have used MCP23017 or similar for non-matrixed keyboards, or are you striking out on your own?

scarlet fjord
#

I haven't seen any that use them, I'm just using them cause I figured it would be easier to understand than trying to learn how tf the diodes fix the n-key rollover and how the code for row/columns works
for my code it's just 'yo pls check this key for a press' instead of some trinary gpio magic lol

#

tldr; I'm lazy

#

I guess a matrix isn't so hard.. a for loop within a for loop
I'll try that out tomorrow

manic glacierBOT
rotund basin
#

Hey all , I am trying to pull a pin low on adalogger , but repel is saying no DriveMode attribute or Pull has no attribute down ๐Ÿค”

tulip sleet
#

@rotund basin Could you paste the code you're trying here?

rotund basin
#

I'll have to login via laptop hold on

idle owl
#

I just hit a personal record. Your code has been rated at -47.18/10

#

(It's not my code.)

tulip sleet
#

this code is so bad it runs backwards

idle owl
#

Pro tip: don't use wildcard imports. Your code has been rated at 7.69/10 (previous run: -47.18/10, +54.87)

#

That's all from fixing the wildcard import. The rest is stuff we ignore in .pylintrc.

rotund basin
#

@tulip sleet This used to work but doesn't def initMotors():
renable = digitalio.DigitalInOut(rightMotorEnable)
renable.switch_to_Output(pull=digitalio.DigitalInOut.Pull.UP)

#

sorry don't know how to embed code format

tulip sleet
#

use triple backticks for multiline code

rotund basin
#
    renable = digitalio.DigitalInOut(rightMotorEnable)
    renable.switch_to_Output(pull=digitalio.DigitalInOut.Pull.UP)  ```
tulip sleet
#

did you import digitalio?

rotund basin
#
import pulseio
import digitalio

rightMotorPin = board.D5
leftMotorPin = board.D9
rightMotorBrake = board.D10
rightMotorDirection = board.D11  ##must brake before change dir)
leftMotorBrake = board.D12
leftMotorDirection = board.D13  ##must brake before change dir)
rightMotorEnable = board.A0
leftMotorEnable = board.D5
###rightMotorTicks = board.D10
###leftMotorTicks = board.D11


def initMotors():
    renable = digitalio.DigitalInOut(rightMotorEnable)
    renable.switch_to_Output(pull=digitalio.DigitalInOut.Pull.UP)  ##low enables motor
    lenable = digitalio.DigitalInOut(leftMotorEnable)
    lenable.switch_to_Output(pull=digitalio.DigitalInOut.Pull.UP)  ##low enables motor
    rbrake = digitalio.DigitalInOut(rightMotorBrake)
    rbrake.switch_to_Output(pull=digitalio.DigitalInOut.Pull.UP)  ##low activates brake
    lbrake = digitalio.DigitalInOut(leftMotorBrake)
    lbrake.switch_to_Output(pull=digitalio.DigitalInOut.Pull.UP)  ##low activates brake

tulip sleet
#

hmm - it's switch_to_output (all lowercase), not switch_to_Output

#

also

#

digitalio.Pull.UP not digitalio.DigitalInOut.Pull.UP

rotund basin
#

ahh

tulip sleet
#

cause Pull could be used other places besides DigitalInOut

rotund basin
#

it's cool. thanks Dan.

tulip sleet
#

yw!

rotund basin
#

extra keyword argument at renable.switch_to_output(pull=digitalio.Pull.UP) ?

#

maybe pull= not needed?

tulip sleet
#

pull is for inputs

rotund basin
#

oh hmm...

tulip sleet
#

are these inputs or outputs

rotund basin
#

enabling motor drivers and doing PWM so they are outputs , have to output Low on some pins

tulip sleet
#

you mean you are supplying +V externally and you need to sink current? You have a transistor on the pin output?

#

what are you driving with the pins?

rotund basin
#

no, i have motor drivers and I just set pins

tulip sleet
#

what kind of motor drivers?

rotund basin
#

one moment

tulip sleet
#

_External input adjust: the terminal of external potentiometer connect to the GND and + 5v terminal, connect the regulator terminal to SV, not only make it possible to adjust speed by external potentiometer, but also can achieve speed adjust through other control unit(Such as PLC, Microcontroller, etc) input
analog voltage to SV. The acceptance of SV is DC 0V~+5V, and the corresponding motor rotate speed is 0
to rated speed. You also can use external digital signal to adjust speed: apply PWM with 5V amplitude and
1KHz ~2KHz Frequency between SV and GND to adjust the speed. The motor rotate speed is adjust by the
duty radio liner adjustment. _

#

so you just apply a 5v PWM to the SV pin. If its duty cycle is zero, speed will be zero, if I understand correctly.

#

oh, I see, brake signals, hold on

#

just make the Brake pins normally high, and switch them to low (False) when you want to brake.

#

you can use DriveMode OPEN_DRAIN, but it probably doesn't really matter. Looks like floating means not braking.

rotund basin
#
    rbrake = digitalio.DigitalInOut(rightMotorBrake)
    rbrake.switch_to_Output(drive_mode==digitalio.DigitalInOut.Pull.DOWN)  ##low activates brake
    lbrake = digitalio.DigitalInOut(leftMotorBrake)
    lbrake.switch_to_Output(drive_mode==digitalio.Pull.DOWN)  ##low activates brake

tulip sleet
#

Note that this is a 5V device you're driving, so using a 3.3V signal for speed and other controls may be marginal. OK for braking pins, since they are just care whether they're grounded or not.

#

also you are using == in the code sample above; use = for setting keyword args

#

otherwise you just wrote an expression that's a boolean value (and there's no variable named drive_mode)

rotund basin
#

Oh dear I think my metro was 5v

#

Will adjust code when I get back, thanks @tulip sleet

tulip sleet
#

@rotund basin all the CPy devices are 3.3v, except that itsybitsys have a single 5v output pin (meant for driving neopixels mostly). But here are a number of level shifters available. Looking at the motor controller data sheet, it says "Low -10~0.5V High 3~30V" for the logic pins, so maybe ok. But if you are sending a speed control signal, that will never rise above 3.3v, so you will not get full speed without a level shifter.

rotund basin
#

It's cool I have some level shifters

rotund basin
#

weird behavior i get in 3.0 .... ``` >>> drivemotor.rightMotor(100)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "drivemotor.py", line 28, in rightMotor
ValueError: Pin PA15 in use

#

i am not using PA15

tulip sleet
#

@rotund basin which board is this, and could you post the whole codefile? Use gist or upload the file with the "+" sign over to the left.

bronze geyser
#

hmm.. i'm using CP 3 w/ build that includes RFM69. I do import adafruit_rfm69 I get ImportError: no module named 'adafruit_rfm69' what am i missing? (thank you).

tidal kiln
#

@bronze geyser that's not a built in module. you need to install the library.

bronze geyser
#

@tidal kiln oh...thank you.

tidal kiln
#

@bronze geyser sure, no problem. were you able to figure it out and get it working?

manic glacierBOT
manic glacierBOT
#

When using audioio, I noticed that the DAC output makes a loud pop noise when it starts playing a raw sample or wave file. I suspect (but haven't verified) that it happens because the initial DAC value before playback is zero whereas the sample's zero voltage value correlates to the mid-value of the DAC. Playing the sample/file causes a large output voltage jump that, if the output pin is decoupled through a series capacitor, creates a noticeably loud pop.
Since audioio is used for a...

manic glacierBOT
manic glacierBOT
#

Is this what you had in mind?

     #if defined(__SAMD51G19A__) || defined(__SAMD51G18A__)
         #define AUDIOBUSIO_MODULE
     #else
         #define AUDIOBUSIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_audiobusio), (mp_obj_t)&audiobusio_module },
     #endif

+    #ifdef SPECIALTY_BOARD
+        #define I2CSLAVE_MODULE
+    #else
+        #define I2CSLAVE_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_i2cslave), (mp_obj_t)&i2cslave_module },
+    #endif
+
     #ifndef EXTRA_BUILTIN_MODULES...
manic glacierBOT
#

How about just CIRCUITPY_I2CSLAVE instead of SPECIALTY_BOARD, since there will probably be other things later that we want to enable or disable?

I am also surprised it is 7kB. Have you looked at the firmware.elf.map to see what's taking up so much space? Is it all just the new C code you wrote?

Besides the map, this command is useful for figuring out what's taking up space in the the image:

arm-none-eabi-nm --print-size --size-sort --reverse-sort firmware.elf

And this ...

manic glacierBOT
manic glacierBOT
#

Thanks, that's very helpful. What I see is that the double-precision floating point library has been dragged in, because I see _aeabi_dadd, _aeabi_dsub, etc. These routines are large, and you have to be careful to avoid invoking them implicitly.

They were brought in probably because of this code:
https://github.com/notro/circuitpython/blob/dccf8f7523cc82c67a48c2b627709bd484fca90e/shared-bindings/i2cslave/I2CSlave.c#L170-L176, probably specifically line 174.

which is mixing `uint64_...

turbid radish
#

Just a friendly plug - if you'd like to get the spam-free Python on Microcontrollers newsletter, go to adafruitdaily.com. blinka ๐Ÿ•ถ

manic glacierBOT
#

It's the busio_uart_obj_t itself which MUST initially be allocated in the long-lived pool:

Consider the particular case of atmel-samd: usart_uart_obj_t contains a usart_async_descriptor contains a _usart_async_device. In _sercom_init_irq_param the address of this contained _usart_async_device is assigned to a global array sercom_to_sercom_dev which is later used from the interrupt context _sercom_usart_interrupt_handler to store the received data in the right ring buffer.

torpid goblet
#

@slender iron Not going to be able to make todays meeting. Off earning money....

Hug report: Special thanks to Dan for rebasing off the latest upstream micropython.
That is a thankless task that requires great patience.

Rosie status: Spent most of last week experimenting with development hardware and a
Development environment. My current approach is to rewrite the logic of
https://github.com/adafruit/rosie-ci using the structure and best practices of Miguel
Grinberg's book at https://flaskbook.com/ . Learning git.

idle owl
#

@errant grail I noticed that same pop, I attributed it to initialising the DAC, seems I was right. It was louder than the tone for me. I didn't think there was any way around it.

errant grail
#

@idle owl The pop can probably be avoided if the DAC is slowly initialized to the mid-point value, 65535/2. Slowly could mean stepping from the DAC's current value to the mid-point over a span of 30 to 40ms. Longer would be quieter.

idle owl
#

Interesting

errant grail
#

Probably doable in the library.

#

In the recording biz it's called managing the sound signal's zero-crossing point.

idle owl
#

Fancy

#

Seems like a reasonable amount of time too. I'm assuming essentially undetectable by the human ear.

errant grail
#

It may also be useful to precondition the DAC when the audioio library is first called so that when playback is started, the delay would be shorter.

#

It's in the < 30Hz range. Still audible but not very noticeable since it's a softer slope rather than a sudden pulse.

idle owl
#

I meant the delay being undetectable. But that's good to know

manic glacierBOT
errant grail
#

Ah. The DAC is still sending out a sound during the delay, akin to a quarter of a single wavelength -- but at a loudness of up to 65535/2.

idle owl
#

Oh ok

#

So it's essentially spreading the pop, not getting rid of it completely

manic glacierBOT
#

Haven't tried that yet. Was trying to decode the DAC initialization routines in the library first to see if the DAC is always set to zero value before playback. Decoding libraries is not my strong suit so I decided to raise the issue for the experts. I'll give your suggestion a shot late this afternoon (Pacific). BTW, I also encountered a similar pop when using the I2S DAC breakout board.

errant grail
#

@idle owl Yes, exactly. Trying to slow down that initial transient.

manic glacierBOT
#

I was worried that the DAC(s) can be shared while in use, but for AudioOut it claims them for exclusive use. We could ramp up the output over a certain period of time.

Are there use cases where you don't want full-scale output, so the logical "zero" point is not 0.5*3.3V? E.g., you might want 0.0-1.0V output. Or is it always AC-coupled? And if that's specifiable, should the ramp-up time also be specifiable? What's a good value for that?

slender iron
#

<@&356864093652516868> Here are the meeting notes for the meeting in an hour: https://docs.google.com/document/d/1-bCCpSRXZo84OsLJNklUst2FH8BqO1kotYfjBYwOcR8/edit?usp=sharing

ruby atlas
#

I'm glad I looked through the PRs. @slender iron you commented in PR https://github.com/adafruit/Adafruit_CircuitPython_DotStar/pull/23 about the use of an extra buffer for brightness=1.0 which is something that will be the default under the pixelbuf/rgbled/dotstar/neopixel work I'm (finally) continuing to do. I need to keep in mind that that there should always be a way to instantiate a neopixel or dotstar with a single buffer (PixelBuf and RGBLED will support that).

solar whale
#

@slender iron I'll miss this weeks call ( and probably next week, too) Thanks to Dan for explaining and fixing the stack issue. Thanks to Scott for reviewing the tmp007 PR. Group hug to all. Status - finally got tmp007 driver submitted PR in review. Won't be able to test much for the next few weeks. Will concentrate on on reading/learning.

manic glacierBOT
ruby atlas
#

I've been struggling with what to call the per-pixel brightness for Dotstar. It's not quite alpha, but RGBB is a terrible constant for RGB+Brightness and RGBA isn't quite the right name.

manic glacierBOT
#

Thanks @dhalbert for catching this.

Changing timeout to timeout_ms and always use an integer avoids pulling in the library and the size increase is now ~2.8k:

     #if MICROPY_PY_BUILTINS_FLOAT
-    float timeout = mp_obj_get_float(args[ARG_timeout].u_obj);
+    float f = mp_obj_get_float(args[ARG_timeout].u_obj) * 1000;
+    int timeout_ms = (int)f;
     #else
-    int timeout = mp_obj_get_int(args[ARG_timeout].u_obj);
+    int timeout_ms = mp_obj_get_int(args[ARG_timeout]...
drowsy geyser
#

I'll be in listen-only mode today (shared work space).

tulip sleet
#

@ruby atlas "intensity", or is that too much like HSV?

slender iron
#

<@&356864093652516868> Meeting in four minutes

idle owl
#

@ruby atlas Do a mic test, you were quiet last week.

stuck elbow
#

@slender iron it's my pleasure, can't unmute again :(

raven canopy
#

this laptop's "cinema sound" makes the meeting sound quite interesting...

ruby atlas
#

having issues with audio output. sec, restarting discord.

#

i may have to reboot, discord won't output voice to the headset

#

brb

drowsy geyser
#

True. My fault. ๐Ÿ˜ƒ

raven canopy
#

mazel tav!

drowsy geyser
#

Wow!!!! Be sure to play Adventure.

#

(Oblique Ready Player One reference)

raven canopy
#

Battle Tanks (i think that was the name) was my favorite 2600 game...

tidal kiln
#

subhunt!

idle owl
#

@turbid radish Mute until it's time ๐Ÿ˜ƒ

turbid radish
#

ty

wraith tiger
#

Just lurking today.

idle owl
#

@wraith tiger Ok thanks!

turbid radish
#

๐Ÿ‘ @idle owl & @gusty kiln

wraith tiger
#

@raven canopy Battlezone actually. In the arcades it used vector graphics as I recall.

gusty kiln
#

mostly @idle owl :)

turbid radish
#

It did @wraith tiger

idle owl
#

๐Ÿ˜Š

raven canopy
#

@wraith tiger that might be the one... or Combat. 20 odd years ago... ๐Ÿคท

drowsy geyser
#

Hugs to @idle owl for blasting out so many library fixes over the weekend!!!

wraith tiger
#

Pebkac?

ruby atlas
#

in discord, wouldn't it be pebmac to unmute?

raven canopy
#

OneNote pasting fail....

#

Group hug...i've vacationed more than anticipated this week...

idle owl
#

How awful.

onyx hinge
#

that one's rad @slender iron (qstr)

idle owl
#

@drowsy geyser Do you have a status update to read out?

drowsy geyser
#

I do not.

#

ะฏ ะฟะปะพั…ะพ ะณะพะฒะพั€ัŽ ะฟะพ-ั€ัƒััะบะธ.

turbid radish
#

(he says he doesn't speak Russian

neat folio
#

you can skip me no status.. I am not "working" on anything, just playing ๐Ÿ˜ƒ

stuck elbow
onyx hinge
#

nope

gusty kiln
#

@idle owl can probably grep for that pylint-disabling string across repos as a check...

idle owl
#

@gusty kiln I'll follow up with you on that for sure.

gusty kiln
#

cool

neat folio
#

intensity?

raven canopy
#

Again, not much progress this week.

Adabot Patches: Code of Conduct patch was successful on all library repos. The .travis.yml patch for pylint failed across the board. Realized the problem was the diff result during patch file creation. Basically it included a line that was unique in each library, which raised the "not applicable" flag. I've figured out how to make a patch file without the unique lines, and how to run the git am so that the error isn't flagged. Currently working on adding command line arguments to the adabot script so that any necessary flags can be sent through to the am command. Should have a PR in this week.

FrequencyIn: Only took like 2 momentary stabs at correcting the FREQM interaction; nothing to report beyond that.

#

@idle owl ๐Ÿ‘ i figured you would. there was only about 25 repos that it fails travis on...

tidal kiln
#

GPS only uses uart.write() and uart.readline()

raven canopy
#

or....

manic glacierBOT
stuck elbow
#

RGBW is traditional, I think

#

RGBV for value?

wraith tiger
#

RGBi maybe

stuck elbow
#

but not iRGB because Apple will sue us

#

right

turbid radish
#

off to another mtg, next week y'all

raven canopy
#

๐Ÿ‘‹

onyx hinge
#

RGBL

tidal kiln
#

RGBฮฑ

onyx hinge
#

L = luminance

stuck elbow
#

HSV uses Hue Saturation Value

idle owl
#

I know there's at least one person who has asked about being able to set the brightness this way for DotStars.

gusty kiln
#

i wondered about "luminance", but i dunno how that differs semantically from "brightness". might just get kinda confusing.

stuck elbow
#

I wonder how it actually metches the terms used in color calculations officially -- there is luminance, intensity, value, etc. -- they are all slightly different things

#

also gamma

slender iron
#

If anyone else has a topic let me know otherwise we'll wrap up

raven canopy
#

what about candle?

onyx hinge
#

@slender iron meme

tidal kiln
#

@slender iron i do

slender iron
#

kk

tulip sleet
#

how about lower case "brightness": GRBb

idle owl
#

That could prove confusing.

gusty kiln
#

hehe

neat folio
#

many of these terms are the historical results of previous official organisations tackling the same problem and "issueing a decree" ๐Ÿ˜‰

errant grail
#

Luminance?

gusty kiln
#

"glowiness"

neat folio
#

glowiness, I like glowiness

#

when in doubt, define a "new" term ๐Ÿ˜‰

gusty kiln
#

no better way to nerdsnipe a bunch of nerds than asking them to name a thing.

stuck elbow
#

sparkliness

errant grail
#

blind-esque-ness

stuck elbow
#

power

raven canopy
#

Candlepower (abbreviated as cp or CP) is an obsolete unit of measurement for luminous intensity, equal to 0.981 candelas. It expresses levels of light intensity relative to the light emitted by a candle of specific size and constituents. In modern usage, candlepower equates d...

ruby atlas
#

LLOL

raven canopy
#

๐Ÿคฃ

neat folio
manic glacierBOT
#

Pressing Ctrl-C when sleeping aborts the operation but doesn't raise an exception like in CPython.

CircuitPython:

Adafruit CircuitPython patchbase-3-gedb366e7f-dirty on 2018-08-06; Adafruit Feather M0 Express with samd21g18
>>> import time
>>> time.sleep(10)
>>>

CPython:

Python 3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.sleep(10)
^CTraceback (most r...
onyx hinge
#

@slender iron I had an experience a couple weeks ago where on Metro M4 Express, the AnalogOut object would misbehave: the board would freeze when I tried to create a DAC for the A1 pin. This misbehavior would survive clicking the "reset" button, but would go away when I actually removed power from the whole board. What would NOT be reset by using the physical reset button? Only passives (some resistors) were connected to the A0/A1 pins at this time.

neat folio
#

gamma seems to be the closest/most similar thing to what we are talking about ( although there might be color shift involved there too)

raven canopy
#

dynamic clocks survive, yes?

onyx hinge
#

Unfortunately(?) I haven't been able to reproduce it since fixing the UART long-lived problem.

#

Oh, that's interesting -- I Didn't know that about samd51