#circuitpython-dev

1 messages Β· Page 131 of 1

idle owl
#

Brilliant thanks!

tulip sleet
#

I chose the wrong dropdown option first time

fading solstice
#

okay then. magic

idle owl
#

Merged and release published.

fading solstice
#

yeah

idle owl
#

Updating the list now.

tulip sleet
#

@idle owl fyi, old CPX mic starts responding with non-zero data in 10 msecs, new one takes 100 msecs at 16kHz. so I'll see about keeping it running all the time or delaying longer

#

it's not spec'd to do that πŸ˜•

idle owl
#

Ahh

#

Yeah the old one was happy with 160byte buffer for the sound meter

#

That explains so much

tulip sleet
#

do you think waiting 0.1 seconds before recording is too much?

idle owl
#

I don't think so no. In realworld time that's negligible and if it means actually capturing data vs not capturing any, it probably makes sense.

#

I mean obviously in programming time that's huge. But we're trying to make this work.

tulip sleet
#

i'll look at running all the time vs just waiting. it does explain a lot of the issues. And I am going to look at the filtering code.

idle owl
#

How'd you finally figure all of that out?

tulip sleet
#

i instrumented the recording code so it would check for non-zero buffers of data and print out how long it took before one showed up. One really weird thing is that with the old mic, it takes ~10 msecs regardless of the sampling frequency, but the new mic it's roughly proportional to the sampling frequency. This does not make a lot of sense with the old mic, since I'm not sure how it knows how much time has passed unless it has its own internal clock, which seems unlikely (but maybe not).

idle owl
#

Wow. Nicely done. And that is really odd.

tulip sleet
#

[scratches head]

#

i'll read up more on how they work internally

idle owl
#

I mean anything we do for the new one should work with the old one, but not vice versa so it makes sense to code for the new one

tulip sleet
#

yeah, but the datasheet appears to be a lie

#

(not so unusual, apparently)

idle owl
#

Sounds about right.

#

Nope πŸ˜„

tulip sleet
#

i'll get back to you tomw about touch api stuff

idle owl
#

Oh I got some more help!

timber mango
#

How do you guys paste code into the REPL?

..with all those auto-indents causing a stair-stepping effect (killing proper syntax that was in the original paste-in code from the other -- text-editor-- window)?

manic glacierBOT
manic glacierBOT
#

Our general philosophy is to match the regular Python's libraries as much as we can, without enhancing or changing their API's, so that code can be ported more easily. If you can suggest an existing API call that returns a unique ID for the current machine, that would be great, but I'm not sure there is one. There are some ways to get a MAC address but they're not straightforward.

Yeah, uuid (MAC and other unique id's) doesn't really fit this case either, and definitely wouldn't be rec...

raven canopy
#

@cunning crypt I missed your comment while writing mine (had to verify the ESP stuff). I think with what @tulip sleet was saying with remaining recursive with Python (and probably MPy), it makes better sense to use microcontroller. We would be adding

#

to the os API...

cunning crypt
#

Yeah, that makes sense.

#

The only reason I brought up os was because there was already some board info there, so there's somewhat of a precedent.

raven canopy
#

hey, i was right there with ya. πŸ˜„

solar whale
#

@timber mango mostly I just avoid cut/paste when indentation is involved! You can try β€œpaste mode” by entering control-e https://github.com/adafruit/circuitpython/blob/master/docs/reference/repl.rst . I have not used this myself so I can’t comment on it. What board are you using. If it supports a usb file system I find it simplest to just copy a new file over and import it.

solar whale
#

@timber mango I ran a quick test of paste mode with some indented code and it worked: note: contol-e to enter then contol-d to exit paste-mode and execute the code. This was for CP2.1.0 but for CP 3.0 the copy/paste buffer is limited to 128 bytes so only a few lines fit anyway.

manic glacierBOT
half sedge
#

Hi, I published my code to play RTTTL songs on Trinket M0 and Gemma M0 using pulseio rather than audioio that is only available in Express board.

#

Best would be to do something like that in Adafruit RTTTL library...

#

I don't know if I want to put my hands in there.

#

@timber mango You may want to try the RTTTL thing I just published in previous message. It could drive your Piezo.

timber mango
#

@solar whale Thank you. I didn't realize I could import my own file (haven't figured out what that does, but it does something useful). It (ex. 'import main' for the file, main.py) completes without a complaint from REPL, which is encouraging. Doesn't quite do what I thought it might do, but it's (again) providing more capability, than without it. I'm used to interactive programming (forth interpreter, mostly, these days). I'm not used to typing stuff just to get it into an interpreter's vocabulary, but this is embedded, after all. πŸ˜‰ Some tethered forths use address calls and a very simple kernel resident on the micro.

Will look at the Control E and D thing, thanks! Maybe an ASCII upload would simplify things, there (to keep within the 128 byte boundary of the buffer).

I guess I just wanted to know how people are making do with the limits of this schema -- what tricks and techniques to make the environment most useful.

I found it was helpful to type each line of source code at the REPL prompt, for trying to understand someone else's code (especially, as is often the case, where a change has to be made, such as from dotstar support to NeoPixel support (or to drop support for color LED output, entirely).

Loading main.py doesn't quite replace that, the simple way I do so (Control D to reload). I don't understand why, though between this being a microcontroller environment (and not a desktop PC) and something else (that just slipped my mind) .. well, that it was designed by smart people, let's just say .. I would like to understand it.

Thanks again. -nis

#

@half sedge I just read up on RTTTL the other day. Probably in response to one of your recents, here. Thank you.

slender iron
#

@half sedge It'd be great if you could integrate it into the Adafruit RTTTL library

half sedge
#

@slender iron I believe a I raised a few unaswered questions on how to do that... Do you want to not use audioio anymore from RTTTL library? This mean both Express and non Express board would use pulseio.

manic glacierBOT
slender iron
#

@half sedge take a look at how simpleio does it. It tries to use audioio but if it throws an exception it falls back to pulseio

#

@idle owl why do you need a separate API for the threshold stuff?

#

can't you just to cpx.touch_A1.threshold += 200 directly?

idle owl
#

@slender iron No, it doesn't work that way, you have to call the private version of it and it ends up being 18 lines of code including the init required

slender iron
#

ah

idle owl
#

17 I guess.

#

This seemed like a much more elegant solution. There if needed, but not built into the touch stuff so it's not in the way.

slender iron
#

adding the list of touch pads to alter feels too advanced to me

idle owl
#

Hmm that was a lengthy discussion between Dan and I. The issue is that you have to initialise them, and if you have it init all of them at once it means if you use the threshold thing, you can't use those pins for anything else.

#

So if you wanted to use fruit and a servo, you'd run into a problem if you needed to change the threshold

#

that way you can choose which pins to alter, and only initialise the ones you're going to use for touch

#

is why we went that way with it.

#

Oh and the other issue is, if one of the pins is already in use, threshold will fail completely if it inits all fo them at once vs choosing which ones based on your use case.

solar whale
#

@timber mango just be aware that main.py (or code.py, main.txt or code.txt) will execute automatically on reboot. For testing via REPL I use a different file name and make sure I have none name main.py etc so I get a clean boot then if I want to run foo.py just import foo

slender iron
#

@idle owl why do we need the threshold in the first place? is our thresholding code at the start just bad?

idle owl
#

@slender iron Once you attach fruit it's way off. Remember I ran into that when I was trying to finish my project? 3 hours, and having to angle all the alligator clips in really weird ways so they didn't interfere with each other. JP ran into the same thing, everything wa activating, nothing was fixing it. Threshold did

slender iron
#

could you keep track of the touch pins already used and threshold those only?

solar whale
#

@timber mango BTW - I have been a forth user fo many years. It makes an excelleant test environment for early hardware checkout.

idle owl
#

not that I know of because they're only init'd when they're called

slender iron
#

do you adjust the threshold before actually reading them?

idle owl
#

no, the threshold API intiialises them and then gets the touch data

#

then adds to it

#

The default right now is +100

#

JP said it worked best at 800-1500

#

to give you an idea.

#

I don't know if it's something about fruit and the CPX or what

#

but I ran into the same issue.

#

so I don't think your code is bad, I think it can't handle the number of variables that come up with different uses of cap touch on these boards. Directly touching Gemma must act differently than the CPX fully wired up to a fruitbasket.

#

etc.

slender iron
#

my issue is the complexity of passing in the list of what you'll use

idle owl
#

hmm.

slender iron
#

instead what you can do is save the threshold value in a separate attribute and add it any time you initialize a touch pin later

#

and you can also add it to any existing touchins during the call

idle owl
#

so add it as a default thing to the current touch stuff? I'm not sure I have any idea how to do what you're suggesting. Which is a me thing not that it can't be done.

slender iron
#

could we just adjust it internally always?

#

internal to the cpx library

#

I'm surprised the threshold is a fixed amount now

#

I'd expect it to be a percentage

idle owl
#

Yeah. But I don't know if it'll always work for both cases. I seriously think fruit make the threshold need to change. At least in 2 cases I know of. But I can go that route.

#

both being with and without things attached

slender iron
#

if the threshold computation was based ont he first read value it would change if fruit were attached

idle owl
#

hmm... what if we make it default to doing all the pins, but if you wanted to use only some, then you could change that list? I have no idea how to do that either but it seems like something that's possible.

#

I did raw_value printing too and it changes, but the differences are huge.

#

I don't understand it. The limes I used, I could hover over them from an inch away and set them off

#

so if they were w/in 2 inches of each other, they'd go off constantly

#

or something close to that

slender iron
#

let me sketch out what I'm thinking

idle owl
#

Like would def adjust_touch_threshold(cls, adjustment, pad_names=["touch_A1", "etc"): cause it to default to using that list but then you could edit it in your code if you wanted to like you can with other parameters

#

ok

slender iron
#

didn't test it but thats the idea

idle owl
#

ok. I'll test it.

slender iron
#

does it make sense?

idle owl
#

Kind of? The part I'm unsure about is whether it'll work because of when/how it initialises the pads and calibrates. Because it has to calibrate when they're init'd and Dan explained it to me yesterday but now I'm unsure about it, whether it will init while you're still touching it and then that'll throw everything off because it'll have the raw_value assuming you're not touching it.

slender iron
#

yeah, it assumes you start the program when you aren't touching it

idle owl
#

TypeError: can't convert 'int' object to str implicitly It's an issue with this line, PyCharm is unhappy with it too: for pad_name in ["_touch_A" + x for x in range(1,8)]:

#

the first x

slender iron
#

yeah, it shoudl be str(x)

#

sicne i'm adding it to the string

idle owl
#

TypeError: unsupported types for __iadd__: 'TouchIn', 'int' line 173 in touch_A1.

#

wait...

slender iron
#

oops

#

missing .threshold

idle owl
#

yep I caught that

#

heh

slender iron
#

😬

idle owl
#

Figuring out errors Me: 4. Needing someone else: a billion. πŸ˜„

slender iron
#

you got it πŸ˜ƒ

idle owl
#

I can't get it to stop working when increasing the number. I don't know if it's working. The code runs though.

#

Wait, I think I got it to act differently at least

#

Yeah I did. It's subtle without fruit in the way, but it's changing.

#

Just alter it in the same PR? Or should I pull the PR and start over

#

I'll make a new one.

tulip sleet
#

@idle owl @slender iron maybe we can have a 3-person discussion on this?

#

(I just opened up discord after doing some other stuff.)

slender iron
#

I'm about to head to the farmers market

#

what are your thoughts on it?

#

@idle owl same PR is preferred to hold the history of the changes

idle owl
#

ah crap.

#

it's already been cleared.

#

I have what I did locally though.

tulip sleet
#

well... I think a lot of the current complications are due to the touch API being a little "too simple" right now. If you had access to the TouchIn objects implicitly, you could access the threshold directly. Otherwise we're adding duplicate stuff to cpx that's already implemented in TouchIn

slender iron
#

thats ok, next time

tulip sleet
#

you can reopen the PR

#

you can even undelete your branch if you pushed it

slender iron
#

cpx is meant to be simple though, at some point why not just use touchin?

tulip sleet
#

Maybe JP's code should instead of using only Express

idle owl
#

I really like the idea of having this available in cpx in some way.

slender iron
#

yeah I do too, but I don't like the user having to know about the threshold

tulip sleet
#

the old threshold was 2x initial. That was too insensitive. Limor suggested the Arduino choice, which was +64 over initial. I made it +100. But what it needs to be varies a lot depending on the application. as the leads get longer and the capacitance increases, the variance between touch/no-touch actually goes down, so a percentage goes the wrong way.

slender iron
#

ah interesting

idle owl
#

The adjustment JP needed was huge.

slender iron
#

I think we really need a constructor argument to TouchIn for it. that way we don't need new version of circuitpython to change it

tulip sleet
#

when the capacitance is high, the touch/no-touch difference can be just a few points diff.

#

so a threshold_delta argument or some name like that

idle owl
#

ok so what does this mean for what we're doing right now. Either we get this in or JP can use the 17 lines of code necessary to do it individually without changing cpx. Both of the API solutions seemed good, one has been tested in situ, the other hasn't yet.

tulip sleet
#

but cpx doesn't have a constructor for the touches.
can you post JP's code

slender iron
#

cpx does internally because they are lazy inited

idle owl
#

I don't think I have the current version with that stuff at the top

#

I do not

#

It's the thing you told me yesterday for calling the "private" function out of cpx in the code.

tulip sleet
#

yeah, so where do you give the new threshold delta? maybe you have tos set it before you use any of the touch_Ax's

slender iron
#

I think having an adjust method is ok

tulip sleet
#

or, when you adjust the threshold, it changes it on the existing ones and remembers it for future ones

slender iron
#

@tulip sleet thats what my example does

tulip sleet
#

i missed your example, didn't scroll back far enough

slender iron
idle owl
#

So go with that?

slender iron
#

there are bugs in it but thats the idea

#

@idle owl thats my vote

#

I do believe its inevitable that we need a knob for people to adjust it

idle owl
#

It ends up looking in the code like it did in the first place with what I started with before we realised it would init them all and keep them before we wanted it to.

slender iron
#

fruit and environment has too much impact to do it well automatically

idle owl
#

yeah. Well, this is a code knob.

slender iron
#

yup yup

idle owl
#

will you be back later

slender iron
#

ya, I'll be back in a couple hours

tulip sleet
#

yeah, that looks good to me, don't know what the bug is

idle owl
#

no .threshold and no str

slender iron
#

kattni found and fixed the bugs

idle owl
#

It's fixed already

tulip sleet
#

ah ok

idle owl
#

I'll reopen the PR, I already restored the branch, just need to figure out how to get it back locally because I -D'd it from here.

#

Or I can just start a new one.

slender iron
#

if you fetch it'll be available under <remote name>/<branch name>

idle owl
#

ok

tulip sleet
#

then you can just check it out

slender iron
#

and hten you can checkout -b to create a local version

idle owl
#

git's so great. Delete everything everywhere, panic, and then restore it all.

tulip sleet
#

@idle owl btw, I can make the mic run all the time like you proposed. Limor did that too in some other code and it works fine, so no issues on different mic parts

idle owl
#

Brilliant!

#

Awesome that I had the right idea to begin with!

tulip sleet
#

yeah, the clocking is separate from actually having to read anything. I tried it and it works perfectly.

idle owl
#

That's exactly what I was thinking/hoping would happen

slender iron
#

thats great news @tulip sleet !

idle owl
#

And that means soundmeter in the API!

tulip sleet
#

Limor was up until 3am rewriting the arduino PDM code

slender iron
#

ok, I'm off. will check in once I'm back

idle owl
#

@tulip sleet It worked a bit ago but now I'm getting an error. python def adjust_touch_threshold(self, adjustment): for pad_name in ["_touch_A" + str(x) for x in range(1,8)]: touch_in = getattr(self, pad_name) if touch_in: touch_in.threshold += adjustment self._touch_threshold_adjustment += adjustment Should it be self.adjust_touch_threshold? And be changed in all the touch methods too? Or is something else wrong

#

Error 'Express' object has no attribute '_touch_threshold_adjustment'

#

Wait I found it

tulip sleet
#

that was set in line 113 in scott's code

idle owl
#

It wasn't added to init

tulip sleet
#

yeah

idle owl
#

I have no idea why it worked before

#

Cups of water work for testing!

#

It works exactly as it should. Way too sensitive without an adjustment, perfect with adding 600 in my case. And fails at 1000.

#

pylint passes 10/10, Sphinx builds.

#

@tulip sleet If you get a chance, can you review it and merge it?

idle owl
#

@tulip sleet Thanks! Change pushed.

#

@tulip sleet Thank you so much!

tulip sleet
#

np - it's good to have multiple people thinking about this

idle owl
#

Creating a release now.

#

@tulip sleet How did we get the zips set for the different versions? The only assets I have on that release are the source code zips.

#

Because we just missed the autobundle creation. It was released an hour ago.

tulip sleet
#

i see the built ones now

#

it just takes a little while

#

refresh the releases page

idle owl
#

Oh!

#

Nice ok

#

Excellent, thank you

solar whale
#

@idle owl @tulip sleet Wow! Great job today! Dizzying πŸ˜‰

idle owl
#

Oi I was just saying that! Started yesterday at 4pm with this, what a whirlwind

solar whale
#

All I did today wa retile a bathroom floor and reinstall a toilet - I feel like such a a slacker πŸ˜‰

idle owl
#

That's not slacking at all! Well done you!

solar whale
#

No leaks - I am thrilled!

idle owl
#

nice!

solar whale
#

I have been peeking at the discord site throughout the day - It has been amazing to watch.

#

Now I have to update all my boards!

idle owl
#

I'll have to go back and update my first guide at some point. This change was very needed at the end of that.

slender iron
#

@idle owl I can release a new bundle if you want it

idle owl
#

@slender iron That would probably be great for JP

#

More consistent

#

if that's even how he wrote it up, I'm not sure.

timber mango
#

@solar whale this is starting to sink in. Very helpful to find:

https://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/repl.html

to suss out some of the rules of the road for the REPL.

ASCII upload worked fine. There's a confirmation prompt in the REPL once Ctrl+E is pressed on a newline:

paste mode; Ctrl-C to cancel, Ctrl-D to finish

The source I uploaded (in minicom, a terminal program similar to the old Procomm) was accepted without incident. Maybe the 128 byte limit is prior to a CR/LF sequence -- seems to reset and accept all lines of a source code document uploaded in this way.

The program ran as expected!

https://github.com/wa1tnr/ainsuForth-CPX_fs-exp

is the port of YAFFA (Yet Another Forth For Arduino) I've been working on. It has primitives to store source code (in ASCII plaintext) on the SPI flashROM of the CPX.

solar whale
#

@timber mango What board(s) are you using for CircuitPython?

#

@tulip sleet @slender iron I recall some discussion about the 128 byte cut/paste line in CP 3.0. Is that likely to be increased? Just curious. I'm not advocating for an increase, but if the 128 limit is to stay, it will severly limit the usefulness of "paste mode" and it probably should be made known.

timber mango
#

@solar whale I have all of them. πŸ˜‰ The entire product line, I think.

tulip sleet
#

Scott thinks it's a bug, I'm pretty sure.

#

it has an issue

solar whale
#

Thanks - I'll check the issues.

tulip sleet
#

oh, Scott's back, probably with kale

timber mango
#

What's the recommended sequence to power off Feather M0 Express (as when recovering the host PC's USB port for use with another target such as Metro M0 Express)?

tulip sleet
#

@timber mango on what os?

timber mango
#

CircuitPython.

tulip sleet
#

host machine os

timber mango
#

linux

#

umount?

tulip sleet
#

if you haven't written a file in the past two minutes, just unplug it, otherwise maybe press eject in the nautilus window, or type sync

#

and then pull the plug

timber mango
#

I'm using Nautilus so that's a win for me.

tulip sleet
#

the little triangle in a circle

timber mango
#

If I run into problems I'll ask again. Looks like it'd work fine. Thanks.

tulip sleet
#

two minutes might be overkill. 25 seconds might be enough. I don't usually bother to do anything unless I've just written one or more files.

#

two minutes is true on Windows, so there Eject, or Safe Remove from the taskbar icon

timber mango
#

A sync at the command line would flush it or is that unreliable here?

tulip sleet
#

Mac seems to write everything pretty much immediately. sync is fine; sync -f maybe to write all filesytem data out

solar whale
#

I found ~ 30 sec to be the needed for gedit - your mileage may vary....

timber mango
#

I'm editing using rvim in another terminal.

#

The target board responds immediately after every :w! in vim.

solar whale
#

I mostly avoid editing on the USB files sytem. I edit loaclly and copy. Gives me a backup. But I still wait a few mintes and eject the USB drive before powering off. I also stand on my left foot πŸ˜‰

timber mango
#

Haha. I hear you. I do that when I put my hand near a live wire in the house. Right foot, though. ;) πŸ˜‰

slender iron
#

@idle owl I released a new bundle

idle owl
#

Thank you!

tulip sleet
#

@timber mango the file data gets written mmediately, but the file metadata (which blocks are used) may be late. CPy triggers a restart on any write. it waits 0.5 secs, but not more.

idle owl
#

@slender iron I tested INA219

slender iron
#

πŸ‘ please comment on the PR

idle owl
#

That's the plan

slender iron
#

great!

idle owl
#

I'll review/merge/release

#

And fix the travis.yml typo

#

first.

slender iron
#

you read my mind πŸ˜ƒ

#

I'll go over all my PRs tomorrow to fix it

idle owl
#

I've been doing it as I go

slender iron
#

cool cool!

#

thanks! I'm out for the day

idle owl
#

Later! Thanks for your help!

slender iron
#

no problem!

pastel panther
#

adios

manic glacierBOT
deft briar
#

Trying to get COM to work with my new Gemma M0, on Windows 7.... In trying to follow with the readme's suggestion to try the keyboard. I have installed the drivers, and it shows up in Device Manager as COM6. Speed is 9600, data bits 8, no parity, 1 stop bit, no flow control... I have used PuTTY before (for SSH), but setting all the serial options doesn't seem to work. Anybody have suggestions?

idle owl
#

I think the speed should be 115200.

deft briar
#

Looks like that worked, thanks!

idle owl
#

Yeah! Great job!

manic glacierBOT
#

What do you think your use cases would be for the UID? The basic integer type is 31 bits (including sign bit). Only some CircuitPython impls are going to provide long ints due to code space issues. So just a list of integers won't always work.

I'd prefer the ID be bytes because its immutable. Its also very similar to a list of ints which are 0-255 each. Its a sequence so you can do indexing and such.

As far as I can tell through digging in each boards' structures so far, the ESP82...

half sedge
#

On Circuit Playground Express, the speaker is connected to A0. But it seems I can not do pulseio on A0. Is there a digital equivalent to A0? I mean another name that would be a digital output connected to that same speaker?

tulip sleet
#

@half sedge you can do digital io on the Ax pins. They will do both analog and digital. You don't have to use a Dx name. e.g. DigitalInOut(board.A3) is fine

half sedge
#

Yes @tulip sleet but I am particularly interested in A0, because there is already a buzzer connected... and it seems to refuse A0. Right now I have been playing 10 to 20 xmas tunes on another pin... and I can not support it anymore. πŸ˜ƒ Anyway, it is time to sleep for me now.

#

"Note that not every board and build of CircuitPython includes PWM support. Currently the Trinket M0, Gemma M0, and other non-express M0 builds do not include PWM output support. You’ll need to use a bigger board like Circuit Playground Express or Metro M0 Express to access PWM outputs."

#

This is not true and not up to date anymore.

#

Regards.

tulip sleet
#

@half sedge the speaker is permanently wired via a cap to A0. do you mean you haven't been able to use the speaker? If you want to sleep, get back in touch later, np.

half sedge
#

I have not been able to use the build in speaker... I connected a buzzer on other pin. I'll review/retry tomorrow and report if it continue to make sense.

tulip sleet
#

You need to make board.SPEAKER_ENABLE high. make it a digtial out and set it high

#

that enables the amplifier connected to A0

tulip sleet
#

@half sedge fixed the obsolete remarks about PWM not being on every board. Thanks for catching that.

solar whale
#

@slender iron Just checking - is there a weekly today?

slender iron
#

yup!

solar whale
#

Thnaks - talk to you then.

slender iron
#

<@&356864093652516868> Our normal weekly meeting is in 2 hours at 11am PT / 2pm ET here on Discord! Talk with you soon!

formal plover
#

Taps mic Hello is this thing on?

#

Hi everyone! Sometime in the near future I'm going to take a look at GitHub and the learn guides and see if there's anything needing drivers or whatnot.

solar whale
#

@formal plover Welcome back - brace yourself. There has been a whirlwind of recent activity. No shortage of things to be done, but you will be amazed at what has happend in the past few months.

formal plover
#

Thanks @solar whale! Oh I'm sure there has been. Every time I tried "checking in" here I'd miss over 1,000 messages just after a few days

slender iron
#

@errant grail from #help-with-projects "If there's a way to adapt your project to CircuitPython, you'll be surfing on the most narley wave in this ocean."

idle owl
#

CPX is apparently back in stock.

cunning crypt
#

For now.

idle owl
#

Exactly

tidal kiln
slender iron
#

@raven canopy want to join?

raven canopy
#

That was a failed experiment. Phone + old concrete building = choppy robot speak on discord.

cunning crypt
#

Join the robot revolution!

slender iron
#

will record it so you can listen later if you like too

raven canopy
#

Roger dodger!

#

Thanks

idle owl
#

2015...?

#

Yes.

#

πŸ˜„

manic glacierBOT
timber mango
#

heya was delayed

idle owl
#

All good πŸ˜ƒ

timber mango
#

yah!

#

i did a bunch of work on PDM mic, dan is being awesomely helpful

#

john park is writing up some guides for Adabox 006 which is CPX based

#

its already shipped πŸ˜‰

#

too late!

#

MUAHAHA

errant grail
#

(mine arrives today!)

timber mango
#

and tested a bunch of drivers that are linted

#

thank u all! sorry i am a spoiler

#

thats it πŸ˜ƒ

idle owl
#

I think I spoiled it first... oops

timber mango
#

lol

#

πŸ˜ƒ

errant grail
#

(I expected it and am very happy about it)

idle owl
#

πŸ˜ƒ

timber mango
#

haha

#

OH WAIT one more thing i tested M4 metro. its great! nice work dan

cunning crypt
#

Adabox should have the Spanish Inquisition in it. Nobody would expect that!

timber mango
#

lol

idle owl
#

I thought a thing was added to accept a list of single character variables, and i is included.

tidal kiln
#

x , y, z ?

idle owl
#

Also included.

#

If that change did what I thought it did anyway....

slender iron
tidal kiln
#

is it case sensitive?

timber mango
#

~submodules~ πŸ˜„

#

j/k

stuck elbow
#

why "Run"?

timber mango
#

"i had a problem. then i added a submodule. now i have 2 problems" πŸ˜„

#

can you have travis follow a link? e.g. point it at a gist

stuck elbow
#

tox

timber mango
#

i like that we're getting the 90% top issues. tabs/spaces, snakecase, etc

idle owl
#

Yeah

timber mango
#

chasing the last 10% takes a lot of energy, maye better used for writing libraries & guides

tulip sleet
#

yeah, not blind adherance to picky rules

timber mango
#

pylint isn't a ruthless dictator - you can ignore it when you disagree πŸ˜ƒ

stuck elbow
#

they are not difficult to write

timber lion
#

oh nifty

stuck elbow
#

like a curriculum

timber mango
#

no not featured, its a search-modification - just added

#

its very new for learn

idle owl
#

Ah ok

timber mango
#

we can update the learn guide categorization

idle owl
#

Thank you

#

That would be amazing

timber mango
#

ok ill ask learn dev to do that today

idle owl
#

When you click on Learn, it's in that main list, that's what has been asked for

tulip sleet
cunning crypt
#

I agree. Putting the "Welcome to CP" plus some other introductory Learn guides right above "CP Products" could work well

tidal kiln
#

agree also, do what tony's suggesting on that page

stuck elbow
#

why is MAX7219CNG even there, it doesn't even have a guide for micro/circuitpython

timber mango
#

it has a driver

stuck elbow
#

ah, ok

cunning crypt
#

It doesn't show anything on the page for it though. No links to CP drivers.

timber mango
#

gotta go to next meeting. l8r!

idle owl
#

later!

cunning crypt
#

Enjoy!

tidal kiln
#

tah!

slender iron
#

thanks @meager fog !

cunning crypt
#

Well, as much as you can enjoy meetings.

timber lion
#

yeah i have to run to meeting now too

idle owl
#

later!

slender iron
#

thanks @timber lion !

manic glacierBOT
errant grail
#

Very cool, @solar whale

stuck elbow
#

import errno

idle owl
stuck elbow
#

pylint --list-msgs

slender iron
half sedge
#

@tulip sleet I tried to make A0 a digital out... but no success:

#

'''

#

This is tested on the CircuitPlayground Express

import board
import pulseio
import time
from digitalio import DigitalInOut, Direction

enable the speaker

spkrenable = DigitalInOut(board.SPEAKER_ENABLE)
spkrenable.direction = Direction.OUTPUT
spkrenable.value = True

Works with board.A1 and fail with board.A0

speaker_pin = board.A0
pwm = pulseio.PWMOut(speaker_pin, variable_frequency=True, duty_cycle=0)

pwm.frequency = 440 # Set frequency
while True:
pwm.duty_cycle = 32767 # 50% duty cycle
time.sleep(1) # Beep take 1 s
pwm.duty_cycle = 0 # Stop playing
time.sleep(1) # Delay 1 s between beep

#

main.py output:
Traceback (most recent call last):
File "main.py", line 14, in <module>
ValueError: Invalid pin

#

So as suggested, A0 can not be used with pulseio.PWMOut on Circuit Playground Express.

timber mango
#

that is correct you cannot use A0 as PWM, it does not have a timer

stuck elbow
#

but you can use analog out on it

#

@meager fog I wanted to ask before digging into the datasheet, is it possible to run the samd51 the same way samd21 runs on the trinket m0, with internal oscillator only and synchronizing to the USB clock?

#

@untold arch maybe you know off the top of your head

#

if not, I'm happy to search for it

half sedge
#

@stuck elbow @meager fog So "my" RTTTL for Trinket M0 (and Gemma M0) can not use the build in buzzer (speaker) on the Circuit Playground Express.

#

I was suggested to adapt my code for the Adafruit RTTTL library. This make no sense, now.

stuck elbow
#

@half sedge ouch, that is unfortunate indeed

#

sorry for not realizing this earlier

#

hmm... I wonder if the SPEAKER_ENABLE pin supports PWM...

#

and how bad it would be

timber mango
#

you would replace the tone() with a sinewave generator

#

see the waveform library! its similarish

#

yes you can use USB sync on samd51 - the samd51 has serious clock sync issues in silicon 0

stuck elbow
#

thanks!

fading solstice
#

i made the mistake of mixing bundle libraries from 2.1 and 3.0beta. My Metro M0 will no longer mount as a drive. i can get to Boot mode, but not to run mode. so i need to wipe the code area of the eprom. i think there is a way to do right?

slender iron
#

@fading solstice I'm surprised mixing libraries broke the file systems

#

@fading solstice I'm surprised mixing libraries broke the file systems

#

@idle owl I'm ready when you are

fading solstice
#

me too

slender iron
#

@fading solstice I'm surprised mixing libraries broke the file systems

idle owl
#

@slender iron Waiting on a callback. I'll give them a few more minutes and if I don't hear, I'll have to deal with them another time.

slender iron
#

no worries @idle owl

fading solstice
#

i was doing some testing for pylint over ds3231. The register library was complaining about no "readinto". So i think i placed a 3.0 version of that library on there. as soon as a did that the board went deaf and blind.

slender iron
#

huh, interesting

fading solstice
#

i just need to wipe the code area and start over with that. i might have to wipe the whole board and put the boot loader on there

slender iron
#

yup, sounds like it

fading solstice
#

ok. using bossac?

fading solstice
#

thx

stuck elbow
#

@slender iron by the way, is there a chance for the vector versions of Blinka to be published somewhere?

slender iron
#

yeah, let me do it now

stuck elbow
#

I wanted to re-do the pcb, but a bit larger, so I can put a battery on it

slender iron
idle owl
#

Eh bugger it. I'm sure they'll call as soon as we start talking. I'll deal with it another day. I knew today would be a bad idea, but I tried anyway.

fading solstice
#

@slender iron @idle owl Just move DS3231 from remaining to "needs review"

#

@slender iron if you are not doing Char_LCD is tony d?

tulip sleet
#

@idle owl if you want to try the sound detector, here's a test 2.x CPX build with bug-fixed PDMIn recording. Min sampling frequency is now 16000. No waiting for samples needed: you should see good samples right away.

slender iron
#

@fading solstice I started it but stopped since @timber lion was redoing it. I think he might be done now though.

idle owl
#

@tulip sleet I'll give that a try in a bit!

idle owl
#

@tulip sleet So it's weird. It seems to be working but it's also giving me all 00s.

#

It spends the entire time flickering the first two pixels though even when it's quiet in here. But it responds to sound.

#

I can't get the flickering to stop. Changing the input_floor should fix sensitivity issues, but it's not stopping the flickering.

fading solstice
#

he released changes, i think i will discuss the pylint output with him.

#

@slender iron

idle owl
#

Ok I printed the magnitude and was able to see that at it's base it's higher than I thought, so I changed the input_floor to a much larger number and it's stopped flickering. Still can't explain the 00s. Because it works right. It was all 00s before and didn't work right.

fading solstice
#

@timber lion i was going to do the pylinting of Char_LCD. is that all right with you?

idle owl
#

@fading solstice Excellent regarding DS3231. I'll review and test it tomorrow.

tulip sleet
#

@idle owl can you drop your code here? I didn't see zeros but I was playing tones into it from a guitar app.

idle owl
#

Yep

tulip sleet
#

was the buffer full of zeros at the beginning? mic.record(buffer, 160) or whatever?

idle owl
#

I don't know

#

It's working like it's supposed to though. I had to increase the base value because it's so much more sensitive.

#

Wait... maybe I have the print statement in the wrong place.

#

There it is!

#

Yep. Had the print statement in the wrong place.

tulip sleet
#

i'll try and get back to you, but sounds good!

manic glacierBOT
#

For the record, I'd much rather have issues like this than have people not
file issues that haven't been fixed. So good work everyone!

On Mon, Dec 11, 2017 at 11:08 AM John Edgar Park notifications@github.com
wrote:

I mean no harm. ;)

β€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/adafruit/circuitpython/issues/476#issuecomment-350825399,
or mute the thread
<https://github.com/notifica...

timber lion
#

@fading solstice oh cool yeah totally good with me--i had just wanted to hold earlier because i was committing some big changes to add SPI and I2C backpack support. that's in now so it should be all good. thanks!

idle owl
#

@timber lion @slender iron What's going on with neopixel?

slender iron
#

what do you mean?

idle owl
#

There's a comment thread that stops at some point about enumerate and I didn't want to simply test it and merge it without that being resolved.

slender iron
#

got a link?

idle owl
#

It's not clear whether the appropriate change was made or what the plan was there.

#

Yeah sec

timber lion
#

oh yeah i wanted to call out switching to enumerate means a base micropython/circuitpython port won't work with the library anymore

#

since enumerate has to be turned on

idle owl
timber lion
#

IMHO there's nothing gained with enumerate in the library so range is safer to use

#

but it could go either way, i have no super strong opinion

#

it's a super easy thing to miss though with a new or slimmed down port

#

forgetting to turn on enumerate

slender iron
#

I'm ok using enumerate because all of our supported ports would work

timber lion
#

yeah IMHO it would be best to capture that requirement somewhere like a new starting from scratch port config header

#

or maybe just add a comment to the current one

slender iron
#

what about the test I suggested on the issue?

#

that way passes tests == supported

timber lion
#

are the tests just for atmel-samd?

slender iron
#

no

timber lion
#

i just wanted to highlight when someone starts from scratch with a new port, like nrf52, good to know turn on enumerate or else neopixels will fail πŸ˜ƒ

slender iron
#

we could change it so it won't skip when its not available

timber lion
#

yeah can't hurt to have the test for sure

manic glacierBOT
timber lion
#

and probably want to give ktown a heads up, it doesn't look like nrf52 port currently has enumerate turned on

slender iron
#

kk, I'll sync with him. I'd love to get an nrf52 going on rosie too

#

I'm working through my email backlog now and will mention it

timber lion
#

so yeah @idle owl sounds like we're cool to take neopixel with the enumerate change

idle owl
#

Ok thank you.

tulip sleet
#

@idle owl I'm playing music next to it, looks good. I set curve up to 4 to make it be more responsive. I still find it a little weird that the magnitude is only varying 20-50 or so. "Don't Let Me Be Misunderstood" works particularly well πŸ˜ƒ

timber lion
#

but folks might want to be warned on nrf52 or maybe other ports it might fail πŸ˜ƒ

idle owl
#

@tulip sleet I had to set the base to 20 for it to not be constantly flickering.

#

@tulip sleet I left that out as a variable in the event we wanted to make it available.

tulip sleet
#

@idle owl I reduced the 255 to 80 in the fscale call to make it more sensitive

#

and set curve back to 2

idle owl
#

Dinner! Bbiab

#

@tulip sleet Ok so I want to check it on my original CPX because it worked fine as it was on that one and I'm not sure if those values will work

tulip sleet
#

I was testing it with those values on a "KV1".

idle owl
#

Oh ok

tulip sleet
#

are you yelling in it or something else?

idle owl
#

Music and yelling both. I didn't try it on the KV1 mic yet, my super high values were on the H016etc mic

tulip sleet
#

I'm getting random flickerings up to the 4th NP when not playing music. hmm.

idle owl
#

That's why I changed input_floor. The name of which needs to be change to "sensitivity" or something.

#

I was getting the random flickerings in a silent room.

tulip sleet
#

trying above 20 up to 30...

idle owl
#

I just changedt the KV1 to 30 and the flickering stopped.

#

I have it running on both, with fscale still at 255

tulip sleet
#

input_floor increase low-end sens, decreasing the 255 will light more pixels

#

have it at 120 now

idle owl
#

The pixels seem about right. I can get it to max no problem with it at 255.

tulip sleet
#

yeah, but if you just leave it on the table and talk or play music is it interesting

idle owl
#

With the input_floor at 27 on the KV1, and the other one at 20, they seem about the same.

#

So we might need to expose that variable.

tulip sleet
#

you could read once before the while True loop and set input_floor to the min of that.

idle owl
#

Ooh.

tulip sleet
#

that is sort of a calibration (like touch).

idle owl
#

Yeah I see

#

I like that idea.

tulip sleet
#

also were you using frequency=8000 (was the default) before? 160 is now a shorter sample. could try 320

#

it won't crash now so any buffer size is fine

idle owl
#

Nice!

#

And no length mismatch πŸ˜„

tulip sleet
#

right

idle owl
#

Omg you're right about lowering the fscale number! That's so fun!

tulip sleet
#
mic = audiobusio.PDMIn(board.MICROPHONE_CLOCK, board.MICROPHONE_DATA, frequency=16000)
volume_sample = bytearray(320)
mic.record(volume_sample, len(volume_sample))
input_floor = max(volume_sample) - min(volume_sample)
#

I put that at the beginning. Then I forgot to pause the music before restarting, and wondered why it seemed insensitive.

idle owl
#

Hmm kind of works on one and not the other

#

One is super insensitive, and the other one is reading at least 3 pixels at all times, and going up from there.

tulip sleet
#

i see the same thing. the "H016" mike is more erratic or more sensitive or something

idle owl
#

Yeah. The H106, if I print input floor at the beginning, it prints 0.

tulip sleet
#

i was just going to say that

idle owl
#

Explains why it's reading 4 pixels at all times.

tulip sleet
#

the first buffer is all zeros

idle owl
#

The KV1 is 29 for me, which is a little high I think

tulip sleet
#

i put a time.sleep(0.2) before the initial .record and that fixed it. I think I may need to put a delay in the PDMIn constructor to allow the slow mic time to start up. The clock doesn't start running until you create the PDMIn.

idle owl
#

Oh

tulip sleet
#

we don't run the clock before the PDMIn is created. That starts it running (since we don't know where to send the clock pulses -- you might be using a differen mic)

idle owl
#

I got 19 that time

lofty topaz
#

@tulip sleet
Hi Dan, quick question, are those two functions, min() and max() taking tuples or a list.
The bytearray is throwing me off.
Having fun right now with mu and one of my micro:bits while kibitzing your comm. πŸ˜ƒ

tulip sleet
#

they take anything that's iterable, i think

lofty topaz
#

a-ah. thought so. Thanks eh?

tulip sleet
#

yw! e.g. min((range(20))

idle owl
#

So they're not running equally but with the time.sleep they're at least responding.

tulip sleet
#

you mean you have two side-by-side?

idle owl
#

Yes

#

The two I was referring to, the KV1 and the H016 mics. So one from September and one from more recently.

#

It's consistent on what it's getting as the input floor though, I'll give it that. But the KV1 is too high.

tulip sleet
#

mine are relatively the same. positioning seems important. i pointed the base of the phone a little more toward one than the other and it is showing more

idle owl
#

My music is from computer speakers but position changing doesn't seem to alter it...

tulip sleet
#

you could keep a long running average of the max magnitude to adjust the original_max arg (now 120). kind of an agc

idle owl
#

I just did - 6 on the input_floor on only the KV1 and they're acting about the same.

#
input_floor = (max(volume_sample) - min(volume_sample)) - 6```
#

That's not a viable solution, but I wanted to try it.

tulip sleet
#

mine are about the same: H016 might be more sensitive

idle owl
#

hmm.

tulip sleet
#

remember to stop the music when you restart

idle owl
#

I've tried both ways just to see if it mattered. The input_floor is a difference and it's coming out with the same number for a given board really consistenly.

#

19 and 29.

#

But the 29 is too high.

tulip sleet
#

a fixed 20 might still be ok

#

and, you know, maybe the point of this code is to make people experiment

idle owl
#

Well the plan was for this to go in the API. But I'm leaning towards them being a little different and 20 being a solid solution

#

cpx.volume_meter or something.

slender iron
idle owl
#

They both seem happy with 20.

slender iron
idle owl
#

Thanks @slender iron!

tulip sleet
#

is the api this whole program?

#

(not with a while True, I guess)

idle owl
#

... yeah. It's a lot. But it was a combination of wantring there to be something to do with as many of the sensors as possible in the API and it being in the mega demo.

tulip sleet
#

but how do you interrupt it? it won't return

idle owl
#

I hadn't gotten that far yet.

#

I slimmed it all down and got it working was where I stopped because it was failing on different boards until you resolved that issue.

tulip sleet
#

you could have an init call, and then call it once for each trip around the loop

idle owl
#

Nice ok

tulip sleet
#

or see how it's done in the mega demo

idle owl
#

He switches through modes so it's different

#

It's calls all the options in a list and you can cycle through them

tulip sleet
#

i moved one of them and now I have stereo meters

#

this is mesmerizign

idle owl
#

I know, right? Completely! πŸ˜„

tulip sleet
#

i felt guilty when the pandora ad came on

idle owl
#

lol

tulip sleet
#

ok, maybe I should take a break and practice the guitar or somethign

idle owl
#

Yeah! I have to head out for a few hours. Well not out-out. Luckily. It's cold.

#

Practice with the CPX on πŸ˜„

#

If you can focus with the light show

idle owl
#

Later!

tulip sleet
#

'night!

timber mango
#

CPX 3333 still 'In Stock' with no count. πŸ˜‰

slender iron
#

must have a bunch πŸ˜ƒ

timber mango
#

They're made by little elves in a hollow tree

tidal kiln
#

yah, counter doesn't kick in until numbers go lower (i think)

timber mango
#

I'm now at the point where simple fatigue is my limiting factor; not so stumped on what to try next. I could go for weeks without asking another question, which is a good place to be, for me.

Wrt CPX development in Circuit Python, that is.

tulip sleet
timber mango
#

As it turned out, the Github repositories for individual drivers was the aha factor.

slender iron
#

πŸ‘

timber mango
slender iron
#

@timber mango we're gonna start requiring drivers always have an examples folder too

timber mango
#

One simple example is so much better than no examples. πŸ˜‰ Really: just one that works and does a few obvious things.

#

Still feels like I went to a restaurant and they handed me a wok and a pile of vegetables, though. πŸ˜‰ Haha.

#

@tulip sleet
$ cat ./main.py > /media/nisnis/CIRCUITPY/main.py ; sync

exposes the difference (omit 'sync' to see it). rvim writes immediately and the target board knows immediately, whereas using /bin/cat to overwrite takes .. up to like 15 seconds to complete, even though the target responds to the event immediately (but still does not finish loading the python source).

#

I was waiting a very long time for the target to respond (by executing the new code) until I added 'sync' to the end of that (using cat to overwrite the code resident in SPI flashROM on the CPX target board).

#

For completeness:

$ > ./thisfile

.. creates a new file 'thisfile' of length zero. It'll also truncate any file without removing it.

I haven't been doing that on the CPX but I'll experiment to see what effects it brings.

LATER: seems harmless to truncate main.py in this manner. Everything behaves as expected (doesn't annoy CircuitPython at the REPL fwict).

tulip sleet
#

what abou just cp instead of cat

timber mango
#

Let me try cp.

#

cp seems to stat faster. If 'stat' is the right verb there. The target didn't wait to run the job.

#

Yeah, with cp I don't have to wait, the way I do using cat per the above. cp doesn't need a sync.

raven canopy
#

just finishing up listening to today's call. thanks for the hugs (unnecessary...all i've done so far is read and regurgitate ;D). group hugs back at ya, folks. really good discussion. one of these days i'll figure out how to join in realtime (late lunch?).

timber mango
#

Those are hug thoughts. Need another person in the room with you, for the correct version. πŸ˜‰

raven canopy
#

let me have my fantasy!!! lol

robust coral
#

Hey, what does it mean to "freeze" a python library into the firmware? I'm trying to understand how this works around the lis3dh malloc problem by removing it from lib/ (thanks, @idle owl for that tip).

#

It's a little confusing. Seems there are py libs, mpy libs in lib/ I guess, and then there are yet more in the "firmware" somehow.

timber mango
#

I think it just means you compile it into something like a bytecode, and that it's expected to be present when called upon (unlike a lib which needs an import).

#

It might have such strong dependencies that it's too risky to not bind it into the kernel as indelible. Whereas libs would be more plastic; could perhaps be of different versions. Just guessing.

robust coral
#

Fascinating stuff.

slender iron
#

@timber mango is generally right. frozen libs are byte code that can be run from the internal flash rather than needing to be loaded into ram

idle owl
#

@robust coral The new release of the cpx library is designed to prefer the frozen modules so there won't be issues with memory allocation failures if you have the local copies as well. You can load the entire lib folder now. I can't remember if that was your issue or not.

robust coral
#

that was it, yes. Thanks

idle owl
#

It must have been if I told you to remove lis3dh to fix it

#

Yeah if you download the latest library bundle you can safely load the entire thing if you want to

robust coral
#

I didn't understand what a frozen module was. This is a micropython feature that sounds like it begs more RTFMming.

manic glacierBOT
#

Ok..so that was part of my fear with that giant post. Info got a little fragmented. I'll see if I can give a clean explanation of where I THINK I am. (Found one mistake from yesterday. I was looking at the SAM_G_51 datasheet. So that info is garbage; I will correct it. SAMD51 uid is identical to SAMD21...just @ different addresses.)


  • SAMD21: 128bit (4x 32bit) uid is stored in Flash (nvm) @ these addresse...
timber mango
#

@robust coral the SAMD21G18A (ARM Cortex M0+, branded as the 'M0' line at Adafruit) has 32,768 bytes of RAM, but 256KB of flashROM, all inside one chip (along with the microprocessor core!)

The frozen lib lives in the memory map address space in that 256KB region. It can be executed from that codespace, without copyiing it into RAM. I think I have that right. πŸ˜‰

robust coral
#

thx

#

I wasn't sure what versioned releases will work with what, so I rebuilt the master branch of Adafruit_CircuitPython_Bundle and loaded the nightly build adafruit-circuitpython-circuitplayground_express-20171206-3c49f53.uf2 and now everything works as expected.

pastel panther
#

group hug to @slender iron @idle owl @tulip sleet @timber lion @errant grail @solar whale for a really great discussion of improving documentation and user support in today's CP weekly. Work prevents me from participating much but I'm happy to hear everyone contributing great feedback on an important topic. Keep up the awesome work everyone, I hope I can pitch in soon

manic glacierBOT
dire token
#

Is python hard to learn? Im probably intermediate with java, but that's about it.

cunning crypt
#

@dire token One of the reasons for CircuitPython existing is that Python is one of the easier languages to learn.

stuck elbow
#

Python was designed for people who don't know Python.

manic glacierBOT
#

@sommersoft Thanks for doing all that research! The USB code does read the values, 4 bits at a time, on this line: https://github.com/adafruit/circuitpython/blob/b31c2ea7480a816bd909f841972f228d09242821/ports/atmel-samd/supervisor/serial.c#L49.

You don't need the nvm module for this. That module is written specifically to provide a small EEPROM-like space to store persistent data. It isn't mean as a general-purpose way of reading flash.

dire token
#

Thanks @cunning crypt. I want to learn it. I'll have to look for some resources.

#

Oh crap. Wrong server xD

#

I guess I'll delete it. Sorry lol

stuck elbow
#

don't worry

timber mango
#

@tulip sleet nice VU meters! yay!

#

@idle owl hiya im working on tester for next shipping CPX rev, which will come with cpy 2.2 + your lovely library. im writing up a demo

#

if you have a demo you like i can add it too πŸ˜ƒ

manic glacierBOT
manic glacierBOT
#

So, this would be some of my inexperience showing with "foundational" C & MCU programming. After looking back without my biases, I see what you're saying.

uint32_t* addresses[4] = {(uint32_t *) 0x0080A00C, (uint32_t *) 0x0080A040... is assigning pointers the ACTUAL memory, not simply assigning the locations. That's what was tripping me up, since you would never do that in more computer-os based environments (at least for the things I've done). The rest of that routine is just converting ...

pastel panther
#

at @slender iron's suggestion I would like to remove it but I have no idea how

tidal kiln
pastel panther
#

@tidal kiln somehow that didn't come up in a grep, thanks

tidal kiln
#

i don't think it's explicitly referenced in any rtd config files

pastel panther
#

(where are those?)

#

nvm, I think I found them

tidal kiln
#

cool, i'm not sure for that repo

pastel panther
#

@tidal kiln is readthedocs itself the best place for RTD config documentation or is there some CP specific info somewhere? I'm happy poking around the code to figure it out but if there is a good reference that would be swell

tidal kiln
#

good question. i'm still learning rtd myself, so don't know all the nuts and bolts.

#

but i'd think you'd want to look at RTD for it's documentation

manic glacierBOT
fading solstice
#

@timber mango @slender iron @timber lion @idle owl @solar whale @tulip sleet pylint has a limit on the number of paramters a __init__ can have. if existing code has too many, should i refactor the class have fewer?

solar whale
#

@fading solstice In my opinion, that is the type of lint infomation that should be taken "under advisement" Look at the code to see if if there is a better way to implement it but the code should not just be changed to satisfy lint. I'm curious what others think.

tidal kiln
#

this came up a couple of days ago and i think that was the general consensus
@fading solstice can you link to your specific case?

pastel panther
#

yea, it was discussed a fair amount in the CP weekly yesterday after the updates. Worth listening to

stuck elbow
#

yeah, lint is only a "are you sure about this" thing

#

as any automated tool

idle owl
#

@fading solstice If it seems like it makes sense to have it there, disable pylint with the comment message in the code. The idea is that we want to stick to pylint when we can, fix it when we can't, and acknowledge when we're choosing not to follow it.

slender iron
#

@fading solstice what @solar whale said. If the init method really shouldn't have that many then change it, otherwise just disable the check for that line

idle owl
#

@timber mango That would be amazing! I'd love to include something!

slender iron
#

@pastel panther locaiton for RTD docs depends on what the format will be. how-to guides and projects can go in a learn guide instead

pastel panther
slender iron
#

it is not

#

RTD is a hosting service that runs sphinx to generate the docs

pastel panther
#

That's kinda what I thought. Is there any documentation of how CP uses RTD or should one just read the RTD docs and look at the code to figure it out? From what I can tell conf.py in the CP root is the main config file

manic glacierBOT
pastel panther
#

I think I misunderstood your reply. You're saying there could be a learn guide for RTD

fading solstice
#

@solar whale @slender iron @idle owl @stuck elbow @pastel panther thanks for your input.

stuck elbow
#

@pastel panther you only need to learn sphinx

tidal kiln
slender iron
#

I'm running errands this morning but will be around later

pastel panther
#

yea, I just found that 😝 I'm having a bad google morning it seems

#

I think rhat's pretty much what I was looking for by my brain wasn't cooperating

tidal kiln
#

sudo think

pastel panther
#

/kms

idle owl
#

Adafruit order was supposed to be here and it is not. I am assuming it's not going to get here today at all. It seems like UPS either nails it or buggers it up completely.

pastel panther
#

Fedex isn't any better

tidal kiln
#

@slender iron @tulip sleet just noticed this in dmesg when plugging in a Trinket:

[596921.260636] scsi 6:0:0:0: Direct-Access     ATMEL    MicroPython VFS[ 1.00 PQ: 0 ANSI: 3

maybe that's known and intentional, but just in case that's meta info you want to change.

ubuntu uses it in dialogs also, like when ejecting: "Safe to remove ATMEL MicroPython VFS"

timber lion
#

yeah i wouldn't rip initializers apart just to satisfy lint's default rule. sometimes we have a lot of arguments like many different pins for something that communicates in parallel. it's another good case where lint is trying to be too smart imho

stuck elbow
#

well, in a "grown up" program you would then split the class into several smaller classes, for example putting all the pins into one object β€” but here we have memory saving considerations

#

but I sometimes think about simply using named tuples in such situations β€” they have very little overhead

timber lion
#

yeah i dunno i'd argue it's not necessary, if you have 8 params just leave them named πŸ˜ƒ

#

is really much gained by abstracting into another class that just carries the values?

#

but it's definitely a philosophical / style thing

stuck elbow
#

I used named tuples in the RTC drivers, but that was mostly because the rtc library from micropython used them

timber lion
#

oh yeah named tuples in python are great, lightweight struct-like classes are something i've always wanted

#

i wish named tuples were just part of the core syntax

stuck elbow
#

the declaration syntax sucks a bit, though

#

they just added data classes to 3.8

#

which are a bit like named tuples, only not lightweight

timber lion
#

oh nifty

stuck elbow
timber lion
#

ahh slick, i bet all the django and DB folks like that

#

handy to make classes for all your DB schemas

#

funny that python is slowly becoming more like C++ πŸ˜ƒ

#

type hints, data classes, etc.

stuck elbow
#

the DB schemas need their own metaclass magic, though, because they need to intergrate with the database

timber lion
#

before we know it there will be a memory.allocate() function or similar πŸ˜ƒ

stuck elbow
#

not C++. no

#

aren't you supposed to be using the "new" keyword in c++?

#

malloc is more like C stuff?

tidal kiln
#

c = malloc/free, c++ = new/delete

timber lion
#

yeah actually with c++11 and beyond they realized dynamic memory allocation is tricky and really push people to not use it when possible now

#

they added special auto_ptr types that reference count and new/free automatically

#

it kinda blew my mind, c++11 is really cool

stuck elbow
#

that's the thing google has been using since forever

#

in their c++ code

timber lion
#

they even have a 'foreach' style loop they added to the language πŸ˜ƒ

manic glacierBOT
tidal kiln
#

so maybe C++ is becoming more like python?

stuck elbow
#

this is why I hate C++ so much β€” it's such a mix of different languages, everybody picks different "good pats" to somehow cope

timber lion
#

yeah we're all kinda converging on similar things maybe πŸ˜ƒ

#

oh yeah totally i have seen some truly gnarly c++ code bases

stuck elbow
#

but then if your "good parts" are different from the author's, you can't understand a thing

timber lion
#

20+ years of language changes, hard to learn stuff, etc. does a real number on the code

#

yep it can definitely be like javascript

#

i remember back to the early 2000's when template metaprogramming was all the rage

stuck elbow
#

js is a "make your own language" toolkit

timber lion
#

and it was all about how 'smart' you could be with super esoteric template stuff

#

that was a dark time πŸ˜ƒ

#

when a 3 or 4 line program could generate pages and pages of errors from the compiler

stuck elbow
#

c++ is more "we included everything, pick the least broken parts and use them"

timber lion
#

haha

#

'we have a lot of sharp things, try not to poke your eyes'

stuck elbow
#

micopython was such a relief with its relatively plain and simple C code

timber lion
#

yep i remember people used to look down on C, but I realize there's a real zen to the simplicity of it

stuck elbow
#

though there are some nasty parts, like the exceptions stuff

manic glacierBOT
tidal kiln
#

neat (named tuples):

Adafruit CircuitPython 2.1.0 on 2017-10-17; Adafruit Trinket M0 with samd21e18
>>> import ucollections
>>> Point2D = ucollections.namedtuple('Point2D', ('x','y'))
>>> location = Point2D(3.4, -6.7)
>>> print("x={} y={}".format(location.x,location.y))
x=3.4 y=-6.7
>>>
idle owl
#

interesting

tidal kiln
#

i've almost used these a few times but wasn't sure if they are considered supported in circuitpython.

timber lion
#

oh slick someone ported them, hah cool πŸ˜ƒ

tidal kiln
#

looks like it's a carry over from micropython

timber lion
#

yeah they're great for little struct-like 'classes' to carry data around

tidal kiln
#

yep. and pass into __init__ 's, etc.

timber lion
#

but there's some memory overhead vs. just using raw values

#

so always a little trade off of when to use

#

and it would be another dependency to add to a lib

tidal kiln
#

yah, wish it were in core. another reason i probably didn't use it.

stuck elbow
#

they are in the standard library

#

in Python

#

also, I think there is no overhead for the instances -- only for the definition

tidal kiln
stuck elbow
#

looks like the perfect use case

timber lion
#

ah yeah a thing i like instead

manic glacierBOT
timber lion
#

do:
x, y, z = lis3dh.acceleration

stuck elbow
#

oh, in cp there will be overhead, because it doesn't have slots

timber lion
#

it will unpack all the values into the 3 variables

#

even if you only need the z value, nice and compact syntax without a ton of overhead

#

lis3dh.acceleration[2] is still going to make the same I2C call to read the register, etc. so they're both kinda equivalent

tidal kiln
#

yah. more of a syntax thing. looks odd / wasteful to unpack and then not use.

timber lion
#

oh nifty, yeah totally a named tuple could simplify it a bit

#

yeah i dunno why they haven't pulled it into the core syntax.. i'm sure there have been heated debates on it πŸ˜ƒ

#

i guess it's effectively part of the proper python code, just a standard lib part

#

er core

tidal kiln
#

here's another use case for single axis access:

# Wait for Circuit Playground to be flipped over (face down)
while cpx.acceleration[2] > 0:
    pass # do nothing
timber lion
#

ah nifty

#

actually if you want on the cpx class you could add x, y, z properties

#

that just read the single access from accelerometer

#

so it could be
while cpx.z > 0:

tidal kiln
#

yep. i almost put that issue in that repo originally.

#

just figured it should be done to the underlying driver first

#

but doesn't have to, since the cpx code could be updated if the lis3dh driver is changed

raven canopy
idle owl
#

We discussed that while we were writing it and I think we decided it was too vague.

tidal kiln
#

sure that was it? doesn't seem vague to me. maybe having it be just x and y and z is a little too terse in terms of variable names?

stuck elbow
#

@raven canopy what the bootloader presents to the system is not a real disk, so some figures might make little sense

idle owl
#

@tidal kiln I thought it was anyway. I initially had it written into 3 separate things and was asked to combine them, but I only had it in 3 because I didn't know it could be done with 1. So I thought the discussion was happening around when I had it in 3 things, I think I called them cpx.acceleration_x and that started the discussion. But it wasn't what they wanted anyway so it was changed in the end.

raven canopy
#

@stuck elbow okie dokie. i figured it may be a matter of forced-fudging or lost-in-translation... thanks

idle owl
#

Might have been two separate issues I guess. I could be conflating.

tidal kiln
#

oh, if that was all you had, then i can see the case for wanting a tuple return instead

idle owl
#

I had it in 3 but then it could return the tuple I think... eh, maybe I'm misremembering.

stuck elbow
#

@raven canopy I think they had to report some size, and they choose 4MB because that's bigger than any firmware file you would copy onto it, so the operating system won't complain that it doesn't fit

tidal kiln
#

and maybe the use cases weren't thought of at that point?

raven canopy
#

oh yeah...i vaguely remember that conversation in here. if only i remembered more than i forgot...

idle owl
#

I remember there being a discussion about single axis being desirable.

#

I mean I'm open to discussing it. I think cpx.x etc isn't clear enough so I don't think it should be that if we include it.

#

I remember a discussion about it previously is all and I don't remember all the details of that discussion. No reason not to discuss it again.

tidal kiln
#

all it would take is this:

    @property
    def acceleration_x(self):
        return self.acceleration[0]

    @property
    def acceleration_y(self):
        return self.acceleration[1]

    @property
    def acceleration_z(self):
        return self.acceleration[2]
idle owl
#

I know. I'm just not sure if there was a reason why we didn't do it in the first place.

tidal kiln
#

yah, dunno either. maybe it was more of "it should return a tuple" and not "single axis isn't needed"

idle owl
#

Could have been.

#

It's on the list, I'll see about getting it added

tidal kiln
#

and if the lis3dh library is ever changed, you can just change your code to use it

idle owl
#

Is it not in lis3dh already? I guess I thought it was.

tidal kiln
#

don't think so, that's why i put in that issue

idle owl
#

We'd have to make sure the frozen module gets updated if we want to change that anytime soon. At least if that's how we do it in the cpx library

#

Probably best for now to not reference it

tidal kiln
#

what i put above would work with the current frozen module

idle owl
#

I know, I'm saying in general

tidal kiln
#

for if / when lis3dh driver gets updated?

idle owl
#

For if someone decides to update it between now and the time we're shipping the CPX with this library, in case the frozen module didn't get updated or something.

fading solstice
#

in library Adafruit_CiruitPython_Char_LCD, pylint is complaing about a method called setColor(). Changing the method name is a interface break. This library hasn't been part of the bundle very long, but there is a learn document that reference setColor() method. The best I can do it create a new method called set_color, but do you agree that I should not remove setColor()

idle owl
#

It can be changed and removed, but we'd need to update the guide. That's been what we've been doing is changing it to what makes sense in the library, but updating the guides where necessary.

fading solstice
#

ok, then i will change it. this takes some careful corrdination. do i need to create issue for the doc updates?

idle owl
#

Yeah I think that's the best place to start. Then we figure out who can update the guide. @solar whale has been involved in that and might be able to. Make a note to talk to Scott about it to make sure we get it coordinated.

timber mango
#

@idle owl hiya! im getting the CPX demo done...

idle owl
#

@timber mango Nice!

timber mango
#

and was wondering if/why some subobjects are _ and some are not

#

eg cpx.pixels vs cpx._lis3dh

idle owl
#

I only partially get it. _ sets them as private, but they're not really private in the C sense, you can still call them in the code if you include the under but the doc stuff and so on ignores them. the idea is that they're not meant to be used publicly.

#

And regarding shake_threshold are you saying why isn't it found in the cpx API?

timber mango
#

ok i think for the lis3dh maybe not _ is better, for example im using tap detection

idle owl
#

Shouldn't be no. it's like cpx.pixels.brightness.. it's not in the API, but it works to call it out. And I found that sometimes shaking wasn't sensitive enough for shake to work, and I didn't want to include it in cpx.shake so I set a default in lis3dh, but it's accessible if you want to use it, like brightness for neopixel.

#

I tested it anyway, but maybe it doesn't work now that it's frozen? I don't know. It worked at some point...

#

I included it in the API documentation instead of including it in the actual method.

#

I'm creating a build right now.

#

or trying to. πŸ˜•

#

@timber mango Finished the last section of the guide I emailed you about - I didn't want to send a third email to tell you.

#

I see. threshold doesn't work now.

#

@timber mango Yeah that line is wrong.

#

It must have been something about my setup when I tested it that made it work without any other changes. We can either add it where it needs to go to work, or we can remove that part of the documentation.

timber mango
#

k ill check email later!

#

i just worked around it πŸ˜ƒ

idle owl
#

I'll discuss it with Scott and figure out which way we want to go with it. It'll either be included or I'll nix the API doc. I'll let you know what we decide.

timber mango
#

kk

idle owl
#

@timber mango how's the demo going to work? I have a few ideas for stuff, but if you're already including it, it's silly to duplicate

timber mango
#

oh here it is!

idle owl
#

Nice!

#

Side note: that wheel isn't r - g - b like the comment says. I have a fixed version, it's just a matter of things around.

#

not that it really matters, it cycles around eventually regardless πŸ˜„

#

It threw me when I was trying to replicate the MakeCode demo that CPX ships with right now.

timber mango
#

oh i did fix it

#

its a little different code

idle owl
#

Oh nice!

#

explains why it looks a little different from what I expected.

timber mango
#

it should swirl and play sounds n stuff

idle owl
#

I'm having lib issues πŸ˜„

#

Oh I know why. oi.

#

I love it!

#

Accelerometer reading seems off. It's the same no regardless of movement, even if I move it and then reset so it starts fresh.

tidal kiln
#

reading are updated in if clause that resets pixeln

tidal kiln
#

@idle owl accel worked for me, but not neopixels, did they for you?

idle owl
#

Yeah, they did. I have to run for a bit.

tidal kiln
#

right o, tah

slender iron
#

I'm around now

#

at the library πŸ˜ƒ

tidal kiln
#

cool. because...

manic glacierBOT
slender iron
#

@tidal kiln weird, not sure why

#

@tidal kiln I think it needs a new release

#

the bundler looks for an init.py file in the folder which was added after the release

tidal kiln
#

yep. wondered if that might it. let me try that.

#

do i need to do anything with the new meta tags?
__version__ = "0.0.0-auto.0"

slender iron
#

nope, those are there for when I'll have the build search and replace them

#

the __repo__ won't be replaced

tidal kiln
manic glacierBOT
#

New issue would be great!

On Tue, Dec 12, 2017 at 8:24 AM bsiepert notifications@github.com wrote:

@tannewt https://github.com/tannewt I was pointed to the ISR doc page
and can remove it; should I create a new issue for cleaning up it and
similar docs?

β€”
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/adafruit/circuitpython/issues/439#issuecomment-351103926,
or mute the thread
<https://github...

tidal kiln
#

need another release?

slender iron
#

@tidal kiln meh, no rush

tidal kiln
#

yah, rush is too loud for the library πŸ˜‹

tidal kiln
slender iron
#

@tidal kiln what are you thinking exactly?

tidal kiln
#

there are two "things" - the bus class and the device class, currently they're in two separate files

#

could throw all that in one file

#

or create a subfolder and keep them separate

slender iron
#

I'd probably keep them separate but with simple filenames like bus and device

#

so it ends up from adafruit_onewire.bus import OneWireBus

idle owl
#

I am also at a library!

tidal kiln
#

so that'd be a folder named adafruit_onewire containing the files bus.py and device.py ?

idle owl
#

@tidal kiln I'm lurking in a presentation so I commented out the sound and neopixels, and now the acceleration works. I know it's unrelated to the sound bits.

tidal kiln
#

@idle owl i got neopixles to work, but i had to change the color definition from a list to a tuple

idle owl
#

Ahh. That makes sense. Could be what was messing with the aceleration too.

tidal kiln
#

this:

cpx.pixels[p] = [int(c * ( (10 - (pixeln+p)%10)) / 10.0) for c in color]
#

i'm i just behind on firmware or something? maybe?

idle owl
#

I'm running 2.x built today

tidal kiln
#

i think i was running 2.1

idle owl
#

I thought it needed 2.x because I initially thought shake was involved.

slender iron
#

@tidal kiln yes to the folder/files you said

tidal kiln
#

cool. thanks @slender iron
pretty close to what i was thinking. but i wasn't making the filenames that simple

slender iron
#

πŸ˜ƒ

#

I think if the folder has adafruit already then the files and classes don't need it

tidal kiln
#

yep. i was leaving in 'onewire' also, but it is also in folder name.

slender iron
#

yup, exactly

idle owl
#

@slender iron Two things: One - Ladyada would like lis3dh to be made an unprotected member of cpx. If you're ok with it, I'll get it taken care of. Two, shake_threshold doesn't work like I thought it did, my testing must have been wrong or under some other circumstances. Long story short, two options: we give it the default argument and have it be cpx.shake(shake_threshold=30) in the API, so it can be set, or we remove that part of the documentation in the API. I'd like it to be available.

#

Or obviously we can discuss any of it

slender iron
#

shade_threshold as a kwarg is fine with me

idle owl
#

ok

slender iron
#

er, shake

#

why does she want lis3dh exposed?

idle owl
#

Now I'm thinking about what the shade_threshold is..

#

She's using cpx.lis3dh in the demo the CPX will ship with for tap detection. so right now it's cpx._lis3dh.etc and she'd like it to be exposed.

slender iron
#

looks at the demo code

idle owl
#

Or, if there's enough time, I figure out getting the hardware tap detection into cpx. I'm game if it's doable.

#

then we do cpx.tap or whatnot

slender iron
#

yeah, I'm not a huge fan of set_click and read_click

idle owl
#

Neither am I.

#

I'll find out what we're looking at for a timeline.

slender iron
#

any function that starts with get, set, read or write get my attention

idle owl
#

@slender iron Ok, early next week. Should be plenty of time. famous last words

tidal kiln
#

what about the question of exposing lis3dh in cpx?

idle owl
#

tap detection will eliminate the need. That's what this resolves.

tidal kiln
#

i see, it's lack of a cpx.tap currently that's making her access the lis3dh directly?

idle owl
#

yep.

tidal kiln
#

ok. might come up again though. for other things the lis3dh can do. but i think answer is the same - add a cpx.cool_new_feature() function for whatever

idle owl
#

agreed πŸ˜ƒ

tidal kiln
#

that's just my 2 cents though
it's all designy decisiony thingys

idle owl
#

Which it's great to have you as a part of.

slender iron
#

providing tap through cpx means we can change it under the hood later without effecting the demo code

#

looks like it'd be ok to leave on anyway

idle owl
#

I don't follow your second statement

slender iron
#

having click detection enabled doesn't conflict with any other functionality so it'd be ok to leave on

idle owl
#

ah ok

slender iron
#

then you could have cpx.single_tapped and cpx.double_tapped

idle owl
#

yeah exactly, something like that was the plan

slender iron
#

if we have the tap cleared on read then it should be a function probably

#

similar to the gamepad module

slender iron
manic glacierBOT
#

Changes:

  1. New faster filter loop, by @ladyada. New filter coefficients as well.
  2. Turn on microphone clock when PDMIn object is created, and run it all the time, so the user code doesn't have to wait for microphone startup, which can be 10ms or even 100ms.
  3. Wait for microphone startup when PDMIn is first created, based on new optional parameter microphone_startup_msecs.
  4. record() returns number of samples actually recorded, so you can see if it's not keeping up.
  5. Fix buf...
raven canopy
#

so, if i'm reading all this right....as a windows user, if I want to compile a CPy build then travis would be the easiest way? otherwise it looks like I'm pulling out the rpi and PuTTy or scrambling to get my pre-upgrade components a case for the linux box.

slender iron
#

@raven canopy we recommend an Ubuntu VM

#

though a few folks here have had success with the windows linux environment thingy in win 10

errant grail
#

The newest version of the Trinket M0 CPy StringCar controller is now out of the prototype phase. The CircuitPython code and hardware passed all tests, and the PCB (pin-compatible with the original 2015-era controller) is ready to go. Many new features and improved functionality, not to mention groovy sound effects. Now if I could just make it sound like a 1965 Shelby Mustang. πŸ˜‰

slender iron
#

looks great @errant grail

errant grail
#

Appreciate the help from the CPy team. Y'all removed some pretty significant learning-curve roadblocks for me. Thanks.

slender iron
#

perfect!

raven canopy
#

@slender iron thanks. didn't even think about VMing.

slender iron
#

the learn guide for samd21 micropython has a vagrant file

manic glacierBOT
manic glacierBOT
meager fog
#

@idle owl reviewing your guide now!

idle owl
#

@meager fog thank you!

fiery drift
#

My apologies in advance if this is not the right place to ask this question. I'm trying to install the latest circuitpython release 2.1.0 on HUZZAH with ESP8266 WiFi (ID: 2821), but I'm getting SAM-BA operation failed error when I run ./bossac

#

./bossac -e -w -v -R -p /dev/tty.SLAB_USBtoUART adafruit-circuitpython-feather_huzzah-2.1.0.bin

manic glacierBOT
meager fog
#

esp does not use bossac, it requires esptool!

fiery drift
#

mentions esptool, but it doesn't say anything about esp doesn't support bossac

meager fog
#

thats because thats the page for the feather m0 πŸ˜ƒ

fiery drift
#

I tried usbtool, but it doesn't complete the flashing...

#

esptool.py --port /dev/tty.SLAB_USBtoUART --baud 460800 write_flash --flash_size=detect 0 adafruit-circuitpython-feather_huzzah-2.1.0.bin
esptool.py v2.2
Connecting........_
Detecting chip type... ESP8266
Chip is ESP8266EX
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...

A fatal error occurred: Invalid head of packet (b'F')

tidal kiln
fiery drift
#

@tidal kiln, yes those are the instructions I'm following to flash the HUZZAH with 2.1.0 (adafruit-circuitpython-feather_huzzah-2.1.0.bin)

meager fog
#

check the bin file has stuff on it, maybe try again? ESP is finicky πŸ˜ƒ

fiery drift
#

it's estrange because "esptool.py --port /dev/tty.SLAB_USBtoUART erase_flash" successes

meager fog
#

@idle owl ready for some final changes?

sick creek
#

it's nice how microbit those small connectors are unique to the board

#

in micro:bit

#

as I have MXChip iot devkit what have edgeconnector so small connectors are a little bit different

fiery drift
#

@meager fog, yes it has stuff on it. I'm getting "A fatal error occurred: Timed out waiting for packet header"

#

I know it is not the cable because erase_flash works.

slender iron
#

@fiery drift try doing another erase and then flash with a lower baud rate

fiery drift
#

Unfortunately Tony's video shows uploading the MicroPython firmware instead of the CircuitPython. @slender iron, ok let me try that.

slender iron
#

@fiery drift it should be the same process

#

just a different bin file

fiery drift
#

@slender iron, hum! Lowing the baud rate to 115200 worked. At least, complete.

#

esptool.py --port /dev/tty.SLAB_USBtoUART --baud 115200 write_flash --flash_size=detect 0 adafruit-circuitpython-feather_huzzah-2.1.0.bin
esptool.py v2.2
Connecting........_
Detecting chip type... ESP8266
Chip is ESP8266EX
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0040
Compressed 595076 bytes to 387307...
Wrote 595076 bytes (387307 compressed) at 0x00000000 in 34.1 seconds (effective 139.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting...

#

@slender iron, thank you!

idle owl
#

@meager fog ready!

meager fog
#

@idle owl oh sent mail thx πŸ˜ƒ

idle owl
#

Thanks!

meager fog
#

its great, nice work!

idle owl
#

thank you!

#

I have a couple of questions, do you want them here or email?

meager fog
#

here'f ine

slender iron
#

@Al Bee#3668 great! glad it worked

meager fog
#

TYPING

idle owl
#

The reason we didn't include the bossac stuff and libraries was because we were trying to keep it as beginner as possible, making it more about getting the person who just got a free trinket with their order through the first 20 minutes of their experience. should I make the bossac install it's own nested page so it's clearer it's not part of the basic install process?

meager fog
#

good Q, im ok with that. we could also add a page to the end, FOR ADVANCED USERS

#

?

idle owl
#

I like that even better

meager fog
#

tan, any opinion? πŸ˜ƒ

slender iron
#

sounds good to me

meager fog
#

it is agreed! :gavel:

idle owl
#

excellent. then where makes the most sense to put libraries.

#

Also I just realised all that stuff on the libs page about running out of space could be added to Troubleshooting.

slender iron
#

on the what is page I wouldn't go so far to say circuitpython is "completely compatible" because there are caveats

idle owl
#

ok

#

um.. "works hard to be compatible" ? Or just take that out.

meager fog
#

i like to say "almost-completely compatible"