#circuitpython-dev

1 messages · Page 233 of 1

raven canopy
#

argh. that default to stable snuck in there (3.x)

obsidian dome
#

Hmm. I thought things like audioio were excluded for space reasons. I'd like to use a trinket_m0 to play sounds based on a touchio trigger.

ancient sage
#

How would you go about finding the memory size of objects in CircuitPython? sys.getsizeof seems not to be implemented

solar whale
#

@gilded cradle FYI -- with pr_1564 my the featherwing_rtc_simpletest runs with out error on my Particle_Argon!

raven canopy
#

@obsidian dome audioio is not included with a Trinket, since it is not a SAMD Express board. Express is when the board has external flash storage.

obsidian dome
#

@raven canopy so this would be a no-go to get the trinket to play audio out the analog port?

raven canopy
#

@obsidian dome well, you can but you'll have to remove other things from the build to make space.

obsidian dome
#

@raven canopy That's why I was looking for what was in the Trinket_m0 build: Most of it I won't need for my project.

raven canopy
#

that part has just changed significantly, so i wouldn't be able to help off the top of my head. still learning it myself. 😄

tulip sleet
#

@raven canopy would you be willing to go ahead and approve PR #1560? I know Scott is interested too, but I'd like to get the builds working again with all the current PR's. We can always change it later. Thanks.

raven canopy
#

i can. i told Scott last night that i'd leave it for him, but that list is growing. 😄

obsidian dome
#

@raven canopy Understood. Thanks anyway.

manic glacierBOT
raven canopy
#

🤞

#

well, that looks like it broke through the barrier... 🎉

#

and of course. fails 2 seconds after i type that...

#

CPX unhappy. 😦

tulip sleet
#

which build?

#

2573.1?

raven canopy
#

yeah. .2 is failing all the boards too.

#

all on mp_module_io

#

well, the weak links for it

tulip sleet
#

i'll work on it. I think it's all the atmel-samd builds. But this is why I wanted it merged. It's not the travis fix that's failing, it's the other PR's. Now I can actually test the new PR's comprehensively.

raven canopy
#

yep. net success!

tulip sleet
#

it's the small m0 builds that are failing

raven canopy
#

well, gemma just passed. 🤷

tulip sleet
#

?? well, I know which ones to test

gilded cradle
#

Thanks for the update @solar whale

obsidian dome
#

I just updated a trinket_m0, and now I am getting an error that I have "Incompatible .mpy file" when doing "from adafruit_hid.keyboard import Keyboard". I suspect I need new versions of the contents of the "lib" folder. This didn't seem to be a part of the firmware. Alternatively, where do I get the new default "main.py" for the board?

gilded cradle
#

As for the main.py, that's just the script that runs automatically when you start it up. I would suggest just using code.py though as that's the standard for adafruit boards. main.py was originally intended just for backwards compatiblity with micropython.

#

By script that starts automatically, I mean the program that you are writing that you want to run.

obsidian dome
#

There is a "default" version of "code.py" (or "main.py") that ships with most boards.
Given the amount of trouble I am having with my "upgraded" trinket, I am trying to start as "clean" and "simple" as possible.

gilded cradle
#

Yeah, I always blank mine out to start with.

obsidian dome
#

currently dying on "aout = AnalogOut(board.D1)"

#

reported error is "OSError: [Errno 5] Input/output error"

gilded cradle
#

Let me see which one that uses...

obsidian dome
#

I do have "import board" and "from analogio import AnalogOut, AnalogIn" prior to that.

gilded cradle
#

I think you also need import analogio

#

oh nevermind

#

Perhaps that got trimmed out?

obsidian dome
#

trimmed?

gilded cradle
#

From what I understand from above comments is you build CP from sources and added audio in there, but had to trim out some stuff that wasn't relevant to your project.

obsidian dome
#

I didn't do any trimming (yet). Just a stock build for the trinket_m0.

gilded cradle
#

Oh nevermind. I see the error. D1 is a digital pin

solar whale
gilded cradle
#

Oh yeah. I haven't really played much with the trinket. Do you have any ideas @solar whale?

solar whale
#

no - and no promises taht file will run with current release -- I'll try it

obsidian dome
#

Hmmm. Now that "main.py" complains "ImportError: no module named 'dotstar'"

solar whale
#

you'll neeed to put adafruit_dotstar.mpy in /lib

obsidian dome
#

It is there

solar whale
#

yes -- clearly the main.py is no longer valid 😉

#

let me try a few things -- it'll take a few minutes to get mine set up

obsidian dome
#

sure. I appreciate any help.

gilded cradle
#

Yeah, I just plugged mine in too

#

Which version of circuitpython are you now running?

obsidian dome
#

built "master" this evening.

gilded cradle
#

Ok, let me do that real quick...

solar whale
#

had to copy neopixel.mpy to the board as well

#

modify import and call to adafruit_dotstar

gilded cradle
#

Yeah, I saw that it had a different name too

solar whale
#

actually my build is with pr_1564

#

but should not matter

obsidian dome
#

This produces an error on line 25 "OSError: [Errno 5] Input/output error"

#

Your code ran on my trinket_m0 running CircuitPython 3 though

#

Only the one upgraded fails.

solar whale
#

hmmm -- ok -- maybey PR 1564 did fix something

#

I think it has been merged so try updating to current master and rebuild

obsidian dome
#

REPL reports I am running "Adafruit CircuitPython 4.0.0-beta.2-74-g90bc09a31-dirty on 2019-02-17; Adafruit Trinket M0 with samd21e18"

solar whale
#

you mus have made some changes -- "dirty"

obsidian dome
#

Was that within the last 2 hours? I just cloned the repo tonight.

solar whale
#

yes

#

trying it myself now

obsidian dome
#

ok. I'm going to just blow away the repo and start over to be sure.

solar whale
obsidian dome
#

make -C mpy-cross

#

oops, wrong window

gilded cradle
#

lol

solar whale
#

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.2-79-gfd3e9ce2f on 2019-02-17; Adafruit Trinket M0 with samd21e18
>>> import testmain
D0: 1.93
D0: 2.09
D0: 1.97
D0: 1.74
D0: 2.09
D0: 1.94
D0: 1.94
D0: 2.06
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "testmain.py", line 76, in <module>
  File "neopixel.py", line 169, in __setitem__
  File "neopixel.py", line 147, in _set_item
KeyboardInterrupt: 
>>> 
#

BUT -- I did get the IOI Error a few times -- pressing RESET cleared it....

obsidian dome
#

building the board firmware....

solar whale
#

it does not run after a soft reboot -- needs a hard reset

gilded cradle
#

Mine doesn't have enough room to copy all the libraries

#

I mean all the relevant ones

solar whale
#
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.



Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.2-79-gfd3e9ce2f on 2019-02-17; Adafruit Trinket M0 with samd21e18
>>> 
>>> import testmain
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "testmain.py", line 25, in <module>
OSError: [Errno 5] Input/output error
>>> 
#

Are you using .mpy versions?

gilded cradle
#

Yes

obsidian dome
#

Question: How are you formatting that in Discord to create the "block quote"?

gilded cradle
#

Lemme blow away the windows driver

#

now we're good

solar whale
#

put three "backtics" (below the tilde) on a US keyboard - before and after the code

gilded cradle
#

Yeah or for inline just use a single one

solar whale
#

interesting issue that it fails after a soft reboot

gilded cradle
obsidian dome
#

Weird. IF I unplug the board, when I plug in again MU shows the print statements running. If I load the code into MU and save, I get the error on line 25 again.

gilded cradle
#

Yeah, I'm getting the line 25 error after soft reset as well. Might be a bug?

solar whale
#

taht is the same issue I am seeing

obsidian dome
#

OK, at least I'm not alone.

solar whale
#

but if I do a soft-reboot I can manually read analog ```soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.2-79-gfd3e9ce2f on 2019-02-17; Adafruit Trinket M0 with samd21e18

from analogio import *
from board import *
analog1in = AnalogIn(D0)

obsidian dome
#

Same here.

gilded cradle
#

What about AnalogOut? That's what my line 25 has

obsidian dome
#

Fails in the REPL

#

I get ```>>> from analogio import *

from board import *
analogin = AnalogIn(D0)
aout = AnalogOut(D1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 5] Input/output error

gilded cradle
#

Yeah, me too

#

I'm not sure if the Trinkets have a DAC or not

solar whale
#

yup -- same here -- sorry - i was off by a line!

#

it works after hard reset

gilded cradle
#

Oh, ok

tulip sleet
#

@gilded cradle They do have a DAC, but I think we omitted the code for space reasons.

gilded cradle
#

Ah, and compiling ourselves got around that?

tulip sleet
#

oh, maybe not

solar whale
#

but why would it work after hard reset, but not soft

gilded cradle
#

Maybe something to do with stack size?

tulip sleet
#

the device or driver is not in the right state

obsidian dome
#

Hey, give me something to type and I'll test it 😃

tulip sleet
#

how did you add audioio to the build?

obsidian dome
#

I haven't.

solar whale
#

I'll create a simple test script -- just a sec.

obsidian dome
#

Just a clean build of "master" from 10 minutes ago

#

dropping all references to neopixel didn't help.

gilded cradle
#

Yeah, I did the same. Just a regular build

solar whale
#
Adafruit CircuitPython 4.0.0-beta.2-79-gfd3e9ce2f on 2019-02-17; Adafruit Trinket M0 with samd21e18
>>> import test
>>> 
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.



Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.2-79-gfd3e9ce2f on 2019-02-17; Adafruit Trinket M0 with samd21e18
>>> import test
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "test.py", line 3, in <module>
OSError: [Errno 5] Input/output error
>>> 


#

hard reset folowed by soft reset

#
from analogio import *
from board import *
aout = AnalogOut(D1)
tulip sleet
#

it's not calling analogio_reset() maybe or something like that on soft reset

solar whale
#

probably -- - I'll file an issue

obsidian dome
#

The only thing I can think of is my /lib contents came from adafruit-circuitpython-bundle-4.x-mpy-20190216.zip If this is incompatible....

gilded cradle
#

That's the right one. Mine came from the same

obsidian dome
#

But all three of us have the bug

gilded cradle
#

Yeah, but I think the bug is in CircuitPython itself.

obsidian dome
#

Understood. Just out of curiosity, how would I build the contents of that zip file from sources?

gilded cradle
#

It's an automated build, but to create an mpy, I believe you use mpy-cross.

manic glacierBOT
#

The following test script will execute after a hard RESET, but fails with an I/O Error after a soft reboot

test.py

from analogio import *
from board import *
aout = AnalogOut(D1)
HARD RESET
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.2-79-gfd3e9ce2f on 2019-02-17; Adafruit Trinket M0 with samd21e18
>>> import test
>>> 
soft reboot

...
obsidian dome
#

@gilded cradle Is that a build target somewhere in the source tree?

solar whale
#

yes just run mpy-cross sourcefile.py --it creates sourcefile.mpy

gilded cradle
#

It has a list of the CircuitPython Library repos and builds once a day if there were any changes.

solar whale
#

you will need to specify the full path to mpy-cross

raven canopy
#

you can also download a compiled version of mpy-cross from the releases. they're sprinkled in.

#

oh. nvm. we don't have one up for 4.x yet. 😦

solar whale
#

its the same as 3.x

obsidian dome
#

So looking at just neopixel, is this in: frozen/Adafruit_CircuitPython_NeoPixel/neopixel.py This makes me remember something about stuff migrating from /lib to /frozen. I don't know if that is relevant.

raven canopy
#

does it work? i know it has version checking, but couldn't remember if we're past that at the moment.

solar whale
#

the mpy format has not changed

raven canopy
#

and i really wish we could get travis to build mpy-cross for the releases. which, i'm sure we can. at least for the 3 OSes that are currently supported.

solar whale
#

it changed from 2.x to 3.x but has not changed since

raven canopy
#

k.

obsidian dome
#

roger that.

solar whale
#

but not a bad idea to regenrate it occasionally 😉

raven canopy
#

ahh. forgot about the Raspbian version. can't get that on Travis. 😆

solar whale
#

@obsidian dome has the repo cloned and built so it in in his mpy-cross directory already

raven canopy
#

true. but, i keep a separate copy outside of my dev dir. options. hehe

solar whale
#

Bedtime here -- goodnight all 💤

gilded cradle
#

Yeah, bedtime for me too. Goodnight

obsidian dome
#

G'night. Thanks all

#

Signing off

manic glacierBOT
#
  • Fix build issues on certain M0 ports.
  • Due to increased size of ure, turn on samd module only in m4 ports (was part of #1544, then got undone by #1554).
  • Update all frozen libraries (one didn't have a tag, so time to update anyway).
  • Make it clearer how to list weakly linked native modules that can be overridden, and how they have alternate names. (Now I think I really understand this properly.)
manic glacierBOT
exotic pumice
#

there's no bitbangio uart?

#

where will I steal code from now?

pastel panther
#

hmm... I thought he had samd51 code as well; I guess not.

exotic pumice
#

doesn't look bitbang-y

pastel panther
#

same54 is very close to the samd51 for what it's worth

#

why bitbang?

exotic pumice
#

because I'm making a bitbang library

#

similar to bitbangio

#

not sure if my logic analyzer has really fault-tolerant uart decoding or if my signal is ok

manic glacierBOT
exotic pumice
#

seems to be the former

#

actually, it's sending 10 bits, right?

#

so 943.4Hz is pretty close to 9600 baud I guess

#

I was thinking it was 8 bits

#

1.73% off, I'll take it

exotic pumice
#

it gets worse if I try 115200 😬

tulip sleet
#

@weary raven What does "FS" stand for here?

tulip sleet
#

the python files need to be stored somewhere. Do you mean not visible as a USB drive, or ?

#

no, we don't have anything like that (and neither does Python, really, as far as a I know). The average user needs libraries, etc. so they have to live somewhere.

I understand it from the point of view, of, say, how Smalltalk works, but that's just not hte model here.

#

yw!

manic glacierBOT
#

Up until your changes io and re were weak links on M4 and not available on the others (only as uio and ure). I have relied on this to add a bit of functionality to these as well.

Ideally I would like all CPython std module names to be weak links and an underscore version being the C module. I don't think any of the C modules cover all the CPython functionality, so they all need to be extended to achieve CPython compatibility.

I saw that the new PyBoard will have ...

solar whale
manic glacierBOT
#

FYI - json appears twice in the modules list on bot the feather_m4_express and feather_nrf52840_express -- any concern with this?

I built and ran this this on those boards and a pirkey - all seem to be running fine. No obvious issues


Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.2-79-g339a22752 on 2019-02-18; Adafruit Feather nRF52840 Express with nRF52840
>>> help('modules')
__main__          busio             microcontroller   te...
tulip sleet
#

ok, I'll fix that up.

#

thanks for spotting this - I thought I had done it, but was confused. I need to see if we should actually call it json or ujson (depending on how compatible it is). If It's a subset we're fine with json, otherwise not sure

manic glacierBOT
#

@notro How is MPy doing this? Would your sort of library completion work there? Do they have the equivalent of the _ version?

I'm a little concerned that listing a lot of _ versions will increase support issues. Is there a way not to do that, and have you import the original C module first, rename it, and then define yours? I'm not thinking very hard about this, so I may be missing somethign obvious.

tulip sleet
#

@solar whale I only see your reply to the ESP32 thread. Was there a response that was deleted?

solar whale
#

no -- but he has created 2 more threads asking about it.

tulip sleet
#

ok, will narrow the focus. :/

solar whale
#

why is the esp32 port even in the repo?

tulip sleet
#

We don't delete unused ports, so that we can continue to merge easily from upstream.

solar whale
#

ah -- good to know

manic glacierBOT
#

I'm going to discuss the u... versions of the modules with the other team members later today, to see what we might do going forward about dropped the u... names. We seem to be going in the opposite direction from MicroPython: https://github.com/micropython/micropython/issues/4370. Our philosophy is that a subset impl is OK, because it means that code can be written to run on regular CPython and CircuitPython, without doing any import ... as tricks, as long as you limit yourself to the ...

#

If you look at mp_builtin___import__ you see that as a last resort it looks at the weak links (aliases) before giving up. So if time exists in the search path it is loaded, if not the one in mp_builtin_module_weak_links_map is used.

MicroPython uses u as a prefix for the modules that exist in the standard library. @tannewt wanted us to use _ instead to differentiate from MicroPython.

I ...

idle owl
#

<@&356864093652516868> Reminder: the CircuitPython Weekly will NOT be happening today. The meeting will be TOMORROW, Tuesday 19 February 2019, at 11am PT/2pm ET. Thanks!

manic glacierBOT
marble hornet
#

@slender iron thank you for fixing safe mode !

tulip sleet
manic glacierBOT
#
from board import DISPLAY
import displayio, time
class rect(displayio.TileGrid):

    def __init__(self, x, y, width, height, color):

        self.plt = displayio.Palette(2)
        self.plt.make_transparent(0)
        self.color = color

        super().__init__(displayio.Shape(width, height), pixel_shader = self.plt, position = (x,y))


    @property
    def color(self):
        return self.plt[1]

    @color.setter
    def color(self, valin):
        self.plt[1] = ...
raven canopy
#

grrr! for the life of me, i can't get GH api search to return the circuitpython repo anymore. that's why the core stats are returning zeroes from adabot.

idle owl
#

@gilded cradle I've done that too!

solar basin
#

I just got a Crickit & nRF52840 and ordered the red robot chassis with the servo style motors. I'm about to get my autonomous robot on with CircuitPython

tulip sleet
#

@raven canopy wanna paste the URL here so we can eyeball it?

#

or point to it in the repo/

raven canopy
manic glacierBOT
#

Here is the process.

  • I have my code.py running to print Accel/Gyro/Magnet/Quat packets. The code runs fine while it’s waiting to connect.
  • I connect using the Bluefruit app. Connects fine. I go to the controller, and enable each of the four data streams.
  • The code starts printing the data streams to the serial console, but it prints them at weird inconsistent intervals. (As in, they do not print in order e.g. 1,2,3,4,1,2,3,4. It's more 1,1,2,1,1,3,4,2,4,2,1,1,2,1,1,1,1,2,1,4 etc.)
  • A...
tulip sleet
raven canopy
#

did it return the core repo in the results?

tulip sleet
raven canopy
#

yeah. the search is returning everything (libraries), just not the core repo like it used to.

tulip sleet
#

but "Adafruit_CircuitPython" is not part of that repo's name.

raven canopy
#

yeah, but the search still returns all sorts of stuff. its not exact. 😄

tulip sleet
#

i guess they changed the sloppy string matching

slender iron
#

@tulip sleet I think parallel bus is a bit too specific

#

but something similar is what they'd need

tulip sleet
#

maybe if we eventually have a pattern generator module or something

#

tnx for looking - just a thought

raven canopy
#

yeah, i think it was a change somewhere. no matter, failsafe almost complete. 😄

#

this is especially puzzling. in 10 pages of results...nothing. 🤷

#

but. failsafe works. next!

manic glacierBOT
tulip sleet
#

@raven canopy I added "user:adafruit" to the query and that helped

raven canopy
#

yeah, i've done that locally. i'll leave adabot to casting a wider net; the results aren't guaranteed obviously. 😄

#

list_repos() filters out all the non-adafruit owned repos; just a matter of cycles.

#

alright. late lunch and driving range time! 🍴 🏌

idle owl
#

Thanks @raven canopy!

manic glacierBOT
manic glacierBOT
visual valley
#

i have not received my hardware yet. if you are running the REPL, does it pause your uploaded code or does that run at the same time

idle owl
#

If you enter the REPL, your code.py is not running.

visual valley
#

kk that makes sense, thanks

idle owl
#

Sure!

manic glacierBOT
manic glacierBOT
manic glacierBOT
finite narwhal
#

I’m new to Circuit Python. Can someone point me to a language reference? (a reference that would include things like ‘’.join and chr(51) etc.)

manic glacierBOT
gusty topaz
#

Guys, will there be an Adafruit equivalent to Particle's Argon , but fully compatible with CP4?

manic glacierBOT
#

Fixes #1565.

supervisor/port.c was using EXPRESS_BOARD, which had been removed from the Makefile, so those #ifdefs were not working properly Changed to use INTERNAL_FLASH_FILESYSTEM and CIRCUITPY_xxx` instead

But INTERNAL_FLASH_FILESYSTEM which was defined as a make variable but not a preprocessor macro, so added that. QSPI_FLASH_FILESYSTEM and SPI_FLASH_FILESYSTEM we already maros. Now we actually check their values (=1 or not) instead of just doing #ifdef checks. Som...

manic glacierBOT
#

The output includes the MICROPY_GIT_TAG. but NOT the MICROPY_GIT_HASH. The tag string contains the tag name and the short hash of the rev of that tag. I wonder if that's not a bit confusing, to include the tag and hash, but not explicitly the most recent hash?

For example, I'm making some local edits to support a custom board. My boot_out.txt looks like

Adafruit CircuitPython 4.0.0-beta.2-74-gd7877d9b4 on 2019-02-18; My-Board with samd21e18

I was confused for quite a few ...

slender iron
#

anything added after 3.4 will likely not work along with many of the modules

#

<@&356864093652516868> and everyone, reminder that the notes doc for the meeting tomorrow is: https://docs.google.com/document/d/1Nd29jwuRkcS4M415TvGDRGjx6aA2M3xzeYl5m-gPJaI/edit?usp=sharing

manic glacierBOT
manic glacierBOT
manic glacierBOT
timber mango
#

is it planned in the far future to have BT5 mesh functionality using (future) circuitpyhon with the Adafruit Feather nRF52840 Express ? ,
or is it possible to have a BT "star"-topology network with one central and several BT clients (all of them nRF52840 based) ?

manic glacierBOT
#

Maybe something like this could be used to handle the standard library module aliases:


#if CIRCUITPY_TIME
extern const struct _mp_obj_module_t time_module;
#define TIME_MODULE(name)      { MP_OBJ_NEW_QSTR(name), (mp_obj_t)&time_module },
#else
#define TIME_MODULE(name)
#endif


#define CIRCUITPY_MODULES \
    ANALOGIO_MODULE \
    ...


#define CIRCUITPY_STD_LIB_MODULES(prefix) \
    IO_MODULE(MP_QSTR_##prefix##io) \
    OS_MODULE(MP_QSTR_##prefix##os) \
    RE_MODULE...
prime flower
#

@gilded cradle Q: Does the returned response have an associated HTTP error code?

#

or does it just get serialized into json

gilded cradle
#

The response is an object that is returned it has a function to format it in json, but doesn't appear to have error functions.

prime flower
#

like - response.status would return the error code, similarly to the cpython library

gilded cradle
#

You can look at it in the adafruit_esp32spi_requests.py file

prime flower
#

Yeah, I'll dig a bit deeper, it'd be nice to have a way to handle and return the status codes

#

i.e: When you GET a feed from IO which doesn't exist, it'll return {'error': "not found - There is no feed with the key 'test'. You can create one using the feed creation API https://io.adafruit.com/api/docs/#operation/createFeed or at https://io.adafruit.com//feeds"}, but also a status code

gilded cradle
#

yeah, hopefully that doesn't require a big rewrite from the way it's doing it now.

solar whale
#

gotta get the 404 😉

prime flower
#

Oh, it's within requests..yay

lone sandalBOT
lone sandalBOT
slender iron
#

@timber mango Nothing is planned yet. We'll probably circle back to it at some point though

#

circa 2004

prime flower
#

@idle owl I'm trying to figure out a name for the Adafruit IO CircuitPython library I'm writing. Using the pre-existing naming scheme would make it Adafruit_CircuitPython_AdafruitIO. I think that sounds strange... Any suggestions?

idle owl
#

I think that's fine, it's clear and not confusing. I realise it's redundant, but redundancy in the interest of clarity is fine. You could also consider Adafruit_CircuitPython_AIO.

prime flower
#

_AIO would omit the AdafruitIO text, I'd like to keep that. How about Adafruit_CircuitPython_Adafruit_IO?

idle owl
#

Either way is fine. I think it works better without the underscore though.

prime flower
#

Agreed. Easier to type too. Thanks for the input!

manic glacierBOT
modern wing
#

Good afternoon everyone -- lurking here 😃

raven canopy
#

👋

old smelt
#

Lurking today!

#

Yes.

raven canopy
#

Wait till you see it on GH in markdown.

slender iron
#

<@&356864093652516868> meeting is starting now

tidal kiln
#

lurking

modern wing
#

Join the club 😃

errant grail
#

No audio today. In a noisy environment...

prime flower
#

5th part 😮

idle owl
modern wing
#

@idle owl Thank you, joined 😃

manic glacierBOT
errant grail
#

Will there be a Pirate translation? ☠ 😉

slender iron
#

feel free to add it 😃

raven canopy
#

"Argh! That pin be invalid."

manic glacierBOT
modern wing
#

"Ye be best to connect to ground, landlubber!"

prime flower
#

Hugs to @gilded cradle @solar whale and @meager fog for work on ESP32 WiFi
@meager fog and @slender iron for PyPortal work. I have one on my desk and it’s my favorite piece of CircuitPython hardware so far!

errant grail
#

Group hug today. Very appreciative of Corey Schafer’s Python instructional video series that provided the inertia for a couple of important breakthroughs. David Beazley’s excellent printed reference is also foundational in my journey.

modern wing
#

Last pirate pun, I swear:

Why are pirates excellent software developers?
Because they spend years at C.

errant grail
pastel panther
#

(txt plz)

raven canopy
#
  • @danh for all the mp config changes.
  • @danh for the issue bringing up moving library documentation from the core to the bundle repo, and @kattni for helping facilitate it happening. Will make doc updates much easier and seamless!
  • @kattni for the PR merges on adabot.
  • grouphug_list = [hugs for hugs in circuitpythonistas]
inland tusk
#

No status update for this week

idle owl
#

Please ping Dan or I with any issues you would ping Scott with. Thanks!

prime flower
#

Adafruit IO…wait for it…on CIRCUITPYTHON…OVER WIFI!
Building it out, it’s a wrapper on top of the ESP32SPI library’s WiFiManager class. Lots of things are breaking, but shouldn’t by Thursday. Been testing using a PyPortal, would love to have other hardware testing it
https://github.com/brentru/Adafruit_CircuitPython_AdafruitIO

errant grail
#

The majority of CircuitPython effort this week was put into generalizing and adapting an analog signal quantizing helper that I’ve used to turn variable potentiometer signals into indexed rotary-switch-like values. The helper uses direction sensing to apply a variable hysteresis value to minimize the noise created when the potentiometer value is sitting on a threshold value shelf.
The result of the effort is a range_index class that supports multiple instances of the algorithm depending on the range of the input signal and the number of output index positions/values needed. It can handle analog signals for uses like the potentiometer switch application, but also for processing Eurorack control voltage signals, providing linear quantization, but also inversion, compression, and expansion.
The range_index library passed all the tests so far, but I want to exercise some extreme conditions before calling it “good.” The conceptual design of the hardware implementation is done, so after testing, I’ll wrap up a PCB design and build the front panel.

prime flower
solar whale
#

@prime flower 👍

pastel panther
#

@prime flower I'll definitely be testing with an huzzah32; got a project I'm working on that needs to talk to adafruit.io

old smelt
#

@slender iron - I recommend checking out the Talk Python to Me and Python Bytes podcasts.

slender iron
#

yup! I listen to them both

old smelt
#

Ok. Great!

slender iron
#

nina and Michael will be at pycascades too

pastel panther
slender iron
#

I listen to it as well but haven't met Elicia before

pastel panther
#

Is it just me or does Scott also appear to be getting rounder and more... hollow? I think I'm seeing a stem of some sort as well

slender iron
#

🎃

inland tusk
#

@slender iron Make sure you have a good time

pastel panther
#

😃

#

For real, it's like USPS specifically hates OSH Park

raven canopy
#

Last Week:

  • adabot - library report:

    • Fixed core insights (issues, PRs).
    • Fixed RTD version fetching.
    • Changed downloads by board/language section to a table.
  • Libraries RTD:

    • Moved the drivers.rst file/content from the core repo to the Bundle, and setup Travis to build the docs.
    • Updated the drivers page in the core to point to the new location on the Bundle.
    • Updated "creating/sharing a library in the bundle" guide to include adding new documentation link to the list.
  • FrequencyIn:

    • Brought my seriously out of date branch up to date, and started re-gluing things in.
    • Moving from pulseio to a new frequencyio to allow for better port/board inclusion.
  • samd-peripherals:

    • Re-submitted previously reverted work to move shared_timer_handler() back to ports/atmel-samd dir. PR to finish on the core is ready to go once I can update the submodule.

This Week:

  • FrequencyIn

    • Finish re-gluing, run a few more tests, then get ready for PR.
  • adabot:

    • Work on newline issue for Google Docs transcription (I keep forgetting to do this!)
    • Going to change Travis up a little to further debug the constant job failures. Dropping cache: pip and setting up the build as either a matrix or stages. 🤞
#

🗞

pastel panther
#

belated HR to @raven canopy for being a superhero

raven canopy
#

@pastel panther 🙇 its less than it looks. Hehe

#

Recharge is super good. Oh, and good point on empowerment. Information Czars/single-point-failure == bad!

modern wing
#

💯 to @idle owl

pastel panther
#

re: scott's points; addressing the bus/lotto problem is a good thing as well as working in a sustainable manner

#

that said I'm also sprouting, turning slightly more cheeto-like and even more rotund

#

👋

inland tusk
#

You got do ity

raven canopy
#

Thanks everyone! Keep rocking it!
@errant grail I'm going to be thinking about pirate translation all day.

modern wing
#

Thanks 😃

errant grail
#

Thanks!

old smelt
#

When I tell my kids that ANYTHING is my jam, they ask me to stop saying those words.

#

I'm old...

#

thanks all!

idle owl
#

Please tell me you've said that about actual jam at least once.....

modern wing
#

Join the club @old smelt

solar whale
#

big club

inland tusk
#

OLD is relative

old smelt
#

relative to my 16 year old

raven canopy
#

"Annoying you is also, my jam" would be a typical response to my kid.

modern wing
#

That's gold @raven canopy

raven canopy
#

It's a quid-pro-quo relationship. 😉

errant grail
#

"Don't open my door. That's my jamb."

modern wing
#

@slender iron Have you seen Hamilton?

#

ooof.

raven canopy
#

3!

modern wing
#

One of my friends is a costume designer who works literally above Hamilton in the theatre....and she can't even get tickets (and she works with Lin when he's in town).

solar whale
#

My nephew was in it -- and he could not get tickets ...

solar whale
#

Just noticed that on my Grand Central. the Neopixel does not show CP status -- is that a "feature" or a bug?

manic glacierBOT
solar whale
#

nevermind -- -aparently my neopixel has a bad solder joint -- works if I press on it...

manic glacierBOT
fluid helm
#

but you should check out this

solar whale
#

@pastel panther your metro_wing works great on the Grand Central!

#

so many pins....

gilded cradle
#

What metro_wing?

pastel panther
#

Thanks @solar whale ! @gilded cradle It's an adapter I made a while back to allow you to use two feather wings with a metro/uno as well as a debug header for saleae's or whatever

#

I'm for reals going to do another rev and possibly do a larger run soon

gilded cradle
#

Nice. I also noticed a doubler or tripler turned sideways is about the same size as a metro, which is why I was wondering.

pastel panther
#

@gilded cradle Can I hit you with a DM?

gilded cradle
#

Yeah

old smelt
#

@idle owl - oh absolutely I have. That and other "hip" youngster vocabulary that is 2-5 years out of date.

idle owl
#

@old smelt Eeeeeexcellent. 😄

idle owl
#

@solar whale Are you around?

solar whale
#

yes

idle owl
#

I have a question. If someone wanted to do WiFi with CircuitPython right now, what would they need hardware-wise?

#

I realise it's separate pieces right now, but it's doable right?

solar whale
#

I'd recommend a feather Huzzah ESP32 and an M4 or nrf52840 board

idle owl
#

Ok excellent. So the Feather Huzzah could be attached to a Feather M4 and have a somewhat streamlined compact solution to CP and WiFi?

solar whale
#

no! can't attach them

idle owl
#

Ah ok

solar whale
#

not without cutting some pins anyway

idle owl
#

that's not an option 😄

#

Alright, but the two feathers separately will work, wired together specifically?

solar whale
#

yes - 6 wires

idle owl
#

Right on, brilliant. Thank you

solar whale
#

and it works well with any of the M4s or with the nrf52840 -- or even a particle xenon

#

the argon has an esp32 but you can't use ESP32SPI with ti -- only ESP32ATControl and ESP32SPI is much better

idle owl
#

Right

#

I recommended the Feather M4 or nRF52840 if they wanted BLE support, but explained where we're at with it.

solar whale
#

you can also use the ESPRESSIF ESP32 Development board ( a few $ cheaper than the Huzzah) I use both

idle owl
#

Hmm good to know

gilded cradle
#

I prefer the Huzzah32 because it's a narrower profile

idle owl
#

That's what I suggested.

gilded cradle
#

For the DevKit board, I always have to straddle it across 2 breadboards

solar whale
#

but I made a mistake -- it needs 8 wires!

idle owl
#

Ok!

#

Thank you @solar whale! And @gilded cradle

solar whale
#

np

gilded cradle
#

yw

tulip sleet
#

@slender iron I looked at ure, ujson, and uerrno. They are all proper subsets of the CPython functionality. So I think we can keep the alternate non-"u" names for them (re, json, errno) in 4.0. I'll add a long-term issue to move them to shared-bindings. I thought you wrote a comment somewhere about this, but I can't find it.

slender iron
#

kk, sounds good @tulip sleet

tulip sleet
#

do you think we should remove the "u"-names for 4.0? We'd have to do some library try-except work to handle that.

slender iron
#

ya, sooner the better I think

tulip sleet
#

ok, I'll search libraries for that. Maybe we have already done that to make them compatible for adafruit-blinka use

manic glacierBOT
#

It sure looks a lot like there's a bit order reversal when handling i2c addresses.

I've got a custom board - call it a Trinket M0 (closest relative). I'm using an i2c port on SDA=PA22 and SCL=PA23. This port seems to be working normally, but only if I bit-reverse addresses. For instance, I've got a fuel gauge attached to the port with an address of 0x6C. However, if I i2c.scan():

>>> hex(i2c.scan()[0])
'0x36'

I can carry on using the device as expected, as long as I continue...

tough flax
#

Hmm... having trouble booting 4.0b2 on a NRF52840 Feather Expresss... UF2 fails half way through copy saying the drive no longer exists?

#

With beta1, I can get the REPL to come up using Mu, but have no CIRCUITPY drive (says it needs to be formatted?)

tulip sleet
#

@tough flax What is the bootloader version showing in INFO_UF2.TXT?

tough flax
#

This is what I get after a successful beta1 UF2 copy. For Beta2, I fail with the message above

#

UF2 Bootloader 0.2.6 lib/nrfx (v1.1.0-1-g096e770) lib/tinyusb (legacy-525-ga1c59649) s140 6.1.1
Model: Adafruit Feather nRF52840 Express
Board-ID: NRF52-Bluefruit-v0
Bootloader: s140 6.1.1
Date: Dec 21 2018

tulip sleet
#

that's new enough. When you get the "You need to format" error, what's showing as a mounted drive, the ...BOOT drive or CIRCUITPY or nothing? Maybe CIRCUITPY needs to be wiped. But also, the first error is very weird, because it says the .uf2 is going missing from your C: drive, which shouldn't have anything to do with what's going on with the board

tough flax
#

Neither, it shows that a drive exists, but says it needs to be formatted

tulip sleet
#

maybe try another usb cable first

tough flax
#

No no...

#

I used it with the itsybitsy 10 minutes ago

#

it's fine

#

I mean I have others

#

I will switch, but don't bet on that 😉

tulip sleet
#

if you can get to the repl with beta1, you can do import storage;storage.erase_filesystem() to get a fresh CIRCUITPY.

tough flax
#

Comes up with the "needs formatting" after erase_filesystem

#

new cord

#

I shouldn't say yes, right?

manic glacierBOT
tulip sleet
#

this is very weird, so you can get to the repl when it says "needs formatting"? Is this a win7 or win10 machine?

tough flax
#

When I enter bootloader mode it looks like a normal UF2 mode (FTHR840BOOT)

#

win10

tulip sleet
#

i'll give you a very fresh uf2, hold on

tough flax
#

Adafruit CircuitPython 4.0.0-beta.1 on 2019-01-28; Adafruit Feather nRF52840 Express with nRF52840

#

beta2 seems to think its too big? Not sure

tulip sleet
#

but that's complaining that the file is going missing from c:\Users\billb ...

#

which is ccompletely weird

tough flax
#

Agreed... I'll record what's happening - the timing makes it seem like the board's resetting too soon

tulip sleet
tough flax
#

Ugh

#

hold on

tulip sleet
#

i have to cook, but will keep an eye on this

tough flax
#

video is too big

#

the new one fails

#

says its too big for the filesystem

#

C:\Users\billb\Downloads>copy adafruit-circuitpython-feather_nrf52840_express-en_US-4.0.0-beta.1.uf2 f:
The system cannot find the file specified.
0 file(s) copied.
(Tried to copy from command line)

raven canopy
#

wish i wasn't order-lazy and had a 52840 so i could try and replicate on win10. 😦 but those are some funky things happening.

tough flax
#

Yes, it takes the time to send the file (I see the transfer on the red led) and then I get this:

#

d:\Python>copy f52840-2019-02-19.uf2 f:
The system cannot find the file specified.
0 file(s) copied.

tulip sleet
#

i am getting a different weird error on my windows 10. Do you have a mac or linux box to try?

tough flax
#

And yet it did make the copy Adafruit CircuitPython 4.0.0-beta.2-91-g4e75aaecd-dirty on 2019-02-19; Adafruit Feather nRF52840 Express with nRF52840

#

Nope

#

I can delay this test

#

It can wait until the 840 is more stable

tulip sleet
#

@tough flax I think this is some weird windows interaction with the nrf52 bootloader. We've been loading uf2's from Linux and Mac all day without seeing this. Or maybe it's some brand new Windows Update quick.

solar whale
#

Or until windows 10 is stable 😉

tough flax
#

So...I tried another board

#

Still got this error

#

d:\Python>copy f52840-2019-02-19.uf2 f:
The system cannot find the file specified.
0 file(s) copied.

#

However, Circuitpy came up 😃

gilded cradle
#

Ok, I'm gonna try copying on a windows computer 10 to an nrf52840 board to see if that has an error on another system.

tough flax
#

The second board is coming up in safe mode

#

Ok, let me try beta1 on the second board

gilded cradle
#

Yeah, I had the same thing happen to me too

tough flax
#

beta1 comes up without being in safe mode

#

empty circuitpy drive

raven canopy
tough flax
#

still gave the error during copy

gilded cradle
#

I tried to copy beta2 and got file too large for destination system on Windows 10.

raven canopy
#

what does explorer "report" the drive size is?

tough flax
#

Yes - once I got that, I also saw it on beta1 until I unplugged/replugged the device

#

3MB

raven canopy
#

and available?

tough flax
#

hold on

raven canopy
#

:holding:

tough flax
gilded cradle
#

Same for me too

raven canopy
#

huh. i mean, its bogus numbers anyway, but...windows. 😄

tough flax
#

That's with beta1 after it actually started

gilded cradle
#

The beta2 file size is only 524kb, so it's pretty weird.

tough flax
#

I have this in the event log around the time those copies failed`

#

An error was detected on device \Device\Harddisk3\DR53 during a paging operation.

gilded cradle
raven canopy
#

i was about to ask if either of you had a USB debugger. MS Message Analyzer can do it, but its a little tedious.

gilded cradle
#

You mean software or hardware?

tough flax
#

I do not have a debugger (or a J-Link unfortunately)

raven canopy
#

either. wireshark is another software tool, but i can't remember if they have a windows version.

manic glacierBOT
gilded cradle
#

I'm pretty sure there is a windows version of wireshark

#

I also have a j-link

raven canopy
#

this feels more on the USB reporting side, but the j-link on the hw side may help pinpoint.

tough flax
#

There is wireshark for windows - not sure if there's a usb capture interface (I use it for ethernet/wifi)

#

To me, this seems like a bootloader issue

#

like it's trying to restart the board before it's done copying

raven canopy
tough flax
#

In the short-run, I can continue with the sip/puff project... and I have the dead board if you want me to help test with that. In the long run, this is obviously an issue 😃

umbral dagger
#

Onward to my first PyPortal project!

raven canopy
#

glad you're not totally at a standstill @tough flax. thanks for the report!

tough flax
#

I'm happy to stay around and run tests, just don't want to kill the board that DID load 😃

raven canopy
#

always good to keep at least one functioning piece of equipment around. 😄

gilded cradle
#

The board I tried works great on a Mac. It's just windows it doesn't play well with.

umbral dagger
#

If anyone was toying with CircuitScheme, I have a PR in to add a proper REPL to it. Guide in the works on how to add a GNU readline style interface to CircuitPython apps.

exotic pumice
#

Microsoft UF2 broken on Microsoft Windows? Shocker lol

raven canopy
#

creates en_PIR translation branch ☠ 😆

exotic pumice
#

en_arr

raven canopy
#

hmmm. that might be better. 🤔

tough flax
#

I'll create a ticket so we can track this (MS problem or not 😃 )

manic glacierBOT
#

Hi folks, I have a Feather NRF52840 and tried to install CP 4.0b2 on it. I entered bootloader mode and got the FTHR840BOOT drive. I copied the UF2 and got a failure
image

I have gotten different errors saying that the file is too large to fit on the device, but it always fails.

Here is my bootloader version.

UF2 Bootloader 0.2.6 lib/nrfx (v1.1.0-1-g096e770) lib/tinyusb (lega...
exotic pumice
#

We're in uncharted territory. There's no iso lang code for pirates

raven canopy
#

hey, its open source. we don't need maps or charts. 😄

#

and glad someone else looked for the code, cause i sure did

#

we've got until Sep 19th to finish it in time for International Talk Like A Pirate Day.

tough flax
#

So, for the record - I have an official role for ITLAPD

raven canopy
#

wha!? awesome!

tough flax
manic glacierBOT
#

This is on Windows 10, 1809 build. I got a different error but also failed to copy the .uf2 to the Feather 52840.

UF2 Bootloader 0.2.6-10-g641d9fe lib/nrfx (v1.1.0-1-g096e770) lib/tinyusb (legacy-525-ga1c59649) s140 6.1.1
Model: Adafruit Feather nRF52840 Express
Board-ID: NRF52-Bluefruit-v0
Bootloader: s140 6.1.1
Date: Jan 31 2019

image

Upgraded to bootloader 0.2.8, tho...

manic glacierBOT
manic glacierBOT
raven canopy
#

@errant grail @exotic pumice starting a first draft...

#: extmod/machine_i2c.c:299
msgid "invalid I2C peripheral"
msgstr "yer I2C peripheral be wrong"

#: extmod/machine_i2c.c:338 extmod/machine_i2c.c:352 extmod/machine_i2c.c:366
#: extmod/machine_i2c.c:390
msgid "I2C operation not supported"
msgstr "I2C operation marooned"

#: extmod/machine_mem.c:45 ports/unix/modmachine.c:53
#, c-format
msgid "address %08x is not aligned to %d bytes"
msgstr ""

#: extmod/machine_spi.c:57
msgid "invalid SPI peripheral"
msgstr "yer SPI peripheral be wrong"

#: extmod/machine_spi.c:124
msgid "buffers must be the same length"
msgstr "coffers must be  th' same length"

🤣

errant grail
#

@raven canopy Hilarious! And to think I was just joking! Hope you can work walk the plank in there somewhere.

raven canopy
#

Joke or not, I think it's a great idea! walk the plank might be difficult, but we'll see.

manic glacierBOT
pastel panther
#

hey @slender iron thanks for the review on the bitmap stuff; I did however nuke your review while fixing my broken fix for the issue with the translations. For future reference, when updating a branch with upstream changes since the branch and/or PR was made, is a rebase or merge preferred?

manic glacierBOT
#

What is your motivation for supporting them?

They add functionality that's missing from the C module.

For instance the time module adds these:

from _time import localtime, mktime, monotonic, sleep, struct_time, time

def asctime(t=None):
    ...

def ctime(secs=None):
    ...

def gmtime(secs=None):
    ...

def strftime(_format, t=None):
    ...

It doesn't seem very useful...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Repointing some discussion that was in PR #1566 to here. Trying to summarize:

We decided to make weakly-linked _ versions of a few modules that could be extended with Python versions derived from the CPython standard library. Right now, this is just os and time, though there could be more.

We have not enabled the "weak links" (module alias) mechanism in the M0 builds. There is not enough RAM or unused flash in the M0 builds to make using this practical, so it would be for the M4 a...

slender iron
#

@pastel panther up to you. I usually rebase but merge sometimes

#

will look now

pastel panther
#

@slender iron thanks!

manic glacierBOT
tulip sleet
#

@pastel panther I almost alwasy merge because it's easier, less chance for mistakes. I don't care about the extra commits. If you're confident about where to rebase that can work, but I've wasted too much time fixing bad rebases, after making simple mistakes. I once went to a git talk about rebasing and how "it's easy", and the presenter messed up his (simple) demo.

simple pulsar
simple pulsar
idle owl
#

@slender iron do you have a minute for a question? or maybe more than a minute, I never know.

slender iron
#

sure

idle owl
#

ok, so in this driver, there's gain and integration_time registers, which you can read and also set. setting them, there are variables with constants. but I realised while doing other things, the first four constants are the same for both, meaning there's nothing stopping someone from setting gain = ALS_200MS which is an integration_time setting, because the constants are (0x0), (0x1) etc. If I weren't using register, I'd have to be creating properties to handle the getting/setting, but since I'm using register, the property is created when the register is created. So my question is, how do I make it so you can only use the appropriate variables, and throw an error if you don't?

#

other drivers have it happening in the property that handles setting the register. but that's not how this works, so I'm not sure where to handle it.

slender iron
#

right, you'd like the property to make sure the value is valid

idle owl
#

yeah, but it's not a normal property because it's a register line.

slender iron
#

right

idle owl
#

ok

slender iron
#

I doubt there is much you can do

#

the property or register can't tell the difference between two constants of the same value

idle owl
#

right but in the property you could force it to read the variable name, and only accept those 4 variables, right?

#

or does it all come down to the constant in the end

slender iron
#

nope, at that point you don't have the variable name

#

it would cost memory to have the value know what register it was for

idle owl
#

ok

slender iron
#

you could add a check for values 0-4 even on a three bit register (0-7 total) but I'm not sure its worth it

idle owl
#

alright. thanks

raven canopy
#

couldn't you class them (class sensor.Gain)? Still, I'd consider it wasted memory

slender iron
#

even then its usually just an integer constant in the class

idle owl
#

I have dicts with the variable: integer value already because it's required to calculate something else, but that only helps with this particular driver. not the other one, for example, that has a TON of variable constants that match.

main meteor
#

You can use enum to enforce type

simple pulsar
#

On midi front, I see there's not an implementation yet for reading and parsing but I can see data with ```while True:
a = midi._midi_in.read(3)
if len(a):
print([hex(x) for x in a])

manic glacierBOT
manic glacierBOT
modern wing
#

@raven canopy Can I collaborate with you on the pirate translation? I haven't contributed before to CP, and I think this would be a great way to get my feet wet -- even if just superficially.

raven canopy
#

@modern wing of course! my pirate isn't the best; i feel too kitchy at times. i'll get the PR in soon so others can add/edit.

manic glacierBOT
#

Since i upgraded to the most recent master,4.0.0-beta.2-97-g0dc260058 on 2019-02-20
, occasionally while editing with mu the pytportal freezes up and the led goes red and the mounted drive will freeze up and crash too if you try to interact with it. then when unplugged and re-plugged some file on the drive will be corrupted, or an entire folder. i have a jtag edu with me (the large one) if you think that could help. this is the only board this happens on that i have. i wish i had more data t...

modern wing
#

@raven canopy Awesome -- and that'll give me time to brush up on how translations are structured (and refresh the basics of github).

manic glacierBOT
marble hornet
#

@meager fog @river quest have you seen the git issues

#

?

river quest
#

we are on live video shows 😃

simple pulsar
visual valley
#

nice, i saw that they pushed some new midi stuff in, cewl to see its working

manic glacierBOT
marble hornet
lone sandalBOT
visual valley
#

oh no i can make the bot spam

#

uhh whos in charge of this bot?

manic glacierBOT
manic glacierBOT
#

Two problems with BLE:

  • Used a lock instead of critical section in an interrupt routine, causing a deadlock.
  • Needed to make the ble_drv linked list start with a root pointer. Its allocated storage was getting gc'd and reused.

I reordered some #include's for clarity, but the order doesn't matter (I thought it did).

Partly fixes #1568. The other part is https://github.com/adafruit/Adafruit_CircuitPython_BluefruitConnect/pull/10.

manic glacierBOT
manic glacierBOT
marble hornet
#

@tulip sleet do you think it is isolated to the pyp or applies to all of them?

manic glacierBOT
marble hornet
#

where is displayio declared fora board, i could not find it in the ports/atmel*/boards/pyportal

#

?

main meteor
#

It's in shared-module

manic glacierBOT
gusty topaz
#

GPS Logger: It records GPS coordinates (among other geographic stuff) to a CSV file in an SD Card, showing basic info on the OLED featherwing. Smart enough to only save new coordinates if the device changes positions. All done in CircuitPython with Adafruit and Particle hardware.

#

Big thanks to @solar whale for his help troubleshooting some hardware and software issues.
I'll post code and 3D print design on my blog in some days.

manic glacierBOT
marble hornet
#

@main meteor this is where displayio is defined but is it where it is told what boards to be compiled for, or is it in every board?

main meteor
#

Hmm, that I don't know

manic glacierBOT
raven canopy
#

@marble hornet it's been moved to /py/circuitpy_mpconfig.mk. displayio inclusion is based on CIRCUITPY_FULL_BUILD, which is default and "turned off" by defining CIRCUITPY_SMALL_BUILD = 1 in the board's mpconfig.mk.

manic glacierBOT
solar whale
#

@tulip sleet FYI ESP32SPI is one lib that imports ujson in adafruit_esp32spi_requests.py

tulip sleet
#

I looked in the bundle and found esp_atcontrol; I think esp32spi is not in the bundle (yet?). But those are the only two I found. No use of ure, no use of uerrno in the bundle

solar whale
#

yes -- was going to add atcontol -- esp32spi is in the bundle

raven canopy
#

I can add a check to adabot for these as well. I think there's already one for ustruct vs struct.

tulip sleet
#

oops, my bundle is out of date, didn't pull yet.

#

i'll submit PR's if/when the circuitpython PR gets merged

#

@raven canopy thanks, that's a good idea

solar whale
#

thanks!

idle owl
#

@tulip sleet Can I trouble you for a test build?

tulip sleet
#

sure

idle owl
#

Thanks! It's been a while since I've built, and even longer since I've tried to build off of a PR.

tulip sleet
#

and you got the BluefruitConnect updates too, right?

idle owl
#

@visual valley That type of spam happens so rarely, it's not really an issue. Unfortunately it is possible to spam the channel by starring and restarring the repo, but it has only happened a few times.

#

@tulip sleet I was going to grab that next

tulip sleet
#

and i expanded your test pgm a bit with more packet types

#

which you prob saw

idle owl
#

yah, the test I did was specifically what was requested for the demo, not meant to push the limits of BLE. that was simply a side affect 😄

#

It still prints in a really inconsistent order.

#

I guess that's a limitation of the setup.

tulip sleet
#

I'm not seeing that on ios, so maybe Android is sending some packets more often than others. I can try that

idle owl
#
Acceleration: -0.181959 0.823605 9.92636
Gyro: 0.0127836 0.0127836 -0.00639178
Quaternion: -2.05728 -0.0701371 0.0226006 0.0
Quaternion: -2.06447 -0.0786866 0.0223177 0.0
Acceleration: -0.215478 0.761356 9.65342
Location: 
Quaternion: -2.06307 -0.0734299 0.0164554 0.0
Acceleration: -0.162806 0.727837 9.89284
Gyro: 0.0138489 0.0010653 0.0
Magnetometer: 35.75 -20.875 -24.875
Quaternion: -2.0584 -0.0837094 0.00245338 0.0
Acceleration: -0.023942 0.818817 9.75877
Quaternion: -2.05659 -0.0896345 0.0122784 0.0
Quaternion: -2.05549 -0.0866628 0.0166897 0.0
Quaternion: -2.0482 -0.0905204 0.0122663 0.0
Quaternion: -2.0574 -0.0826448 0.0128198 0.```
#

example

tulip sleet
#

ios:

Quaternion: 0.014149 0.0249647 -0.0515866 0.998256
Acceleration: 0.046936 -0.0336609 -1.00073
Gyro: -0.0170714 0.0383751 0.00283786
Magnetometer: 136.786 182.272 -617.806
Location: 42.361 -71.2199 12.3978
Quaternion: 0.0142927 0.0248066 -0.0515834 0.998258
Acceleration: 0.0444031 -0.0332794 -1.00061
Gyro: -0.017057 0.0404902 0.00176301
Magnetometer: 136.863 182.722 -618.105
Location: 42.361 -71.2199 12.3978
Quaternion: 0.0143671 0.0247119 -0.0515833 0.99826
idle owl
#

hmph.

tulip sleet
#

i'll try my android tablet

#

... which needs charging

idle owl
#

naturally

#

ok so I don't know what to do for the example then if Android is going to bork it all up. I would say save them all to variables and then only print when it has all 4 packets, but then you wouldn't be getting up-to-date data because the accel packet might now be 3 seconds old by the time it gets another gyro packet or whatever.

tulip sleet
#

i don't think it's so bad, or maybe you should file an issue on the Android app

idle owl
#

I guess. Still want to ask Limor if it's satisfactory to her. She seems to have some idea what she wants for this guide.

#

still running though!!

#

for at least 8 minutes

prime flower
#

@solar whale did you end up figuring out the json pkt size issue with ESP32WiFi?

tulip sleet
#

well, my tablet doesn't have a magenetometer , the gyro is sending nothing, so I"m only getting accelerometer data. The location data is "waiting for location data", so not much of a comparison here

#

🤷

idle owl
#

lol

tulip sleet
#

the location data on the screen is changing furiously, but it's a lot slower printing on the nRF side (slower than on iOS). Not sure what's going on with that.

#

the tablet is also downloading updates...

idle owl
#

😄

#

Sounds like the true mobile device experience there.

gilded cradle
#

@prime flower, it’s not a packet size issue, but rather a json parsing issue. There’s an issue open on the ESP32SPI repo with more info.

prime flower
#

@gilded cradle checking it out, thanks

idle owl
#

@tulip sleet The important thing is, it's still running. I'd say the demo issue I'm having lies with the app, not anything we can do in CP or the lib. I can merge everything.

#

ooh thought it crashed there! but then it spammed a bunch really fast and went back to the normal speed.

#

hmm... it slowed

#

and stopped.

#

at 20 minutes.

#

BUT!

#

I could still ctrl+c to reload

#

so maybe my phone dropped connection that time. It didn't crash obviously.

tulip sleet
#

I"m not so sure that's not the app, yeah. I ran for about 15 mins w/no changes with iOS.

idle owl
#

Alright. I want to merge it. I think you fixed the issues. The way it just failed is not like it did before, it didn't crash the board, it simply stopped sending data.

#

Travis failed on the BLE Connect one

#

didn't look at why

tulip sleet
#

it's a lot better than it was. I can do a longer test

idle owl
#

I'm assuming I'd have to keep my phone awake the whole time. I'm thinking it went to sleep.

gusty topaz
#

@solar whale I saw a comment where you mentioned that ESP32SPI is much better than ESP32ATControl. Why is that?. I'm considering using an Argon for a project. I need WiFi and want to do it on CP.

idle owl
#

@tulip sleet I'll merge the CP update. Take a look at Travis on the other one.

tulip sleet
#

pylint

pastel panther
solar whale
#

@gusty topaz the ESP32SPI intrerface is much more reiaible and faster then the UART. I get a lot fewer errors. That said, the ESP32_ATcontrol works best for me on the Argon with the onboard ESP32. I do find it best to keep the baud rate at 460800 rather than the 921600 in some of the examples. If you are just doing basic "requests" I think it will work OK.

#

I would not recommend using an ESP8266 with ESP_ATcontrol since the support for SSL connections if very limited.

gusty topaz
#

Got it. Do you know if there is a mqtt client library/module out there compatible with CP?

solar whale
#

I have not tried it other than the micropython mqtt client that worked on the ESP8266. I'm not that familiar with it.

#

I do thatn now with micropython on an ESP8266 if I need it.

#

but I have moved most of those applications to Raspberry Pi's and use the CP libraries via Blinka. Gives a lot more flexibility for Wifi internet access but allows me to use the CP libraries for sensors.

gilded cradle
#

I suspect that as CircuitPython gets more WiFi stuff, MQTT will become more important. I’ve used it a bunch on the Arduino side. I’m not sure how complicated it would be to write, but it’s something to look into.

solar whale
gusty topaz
#

@solar whale that's a good option, but I'd rather use a single-purpose board for this project instead of a RPi. @gilded cradle yeah, hopefully that's the case.

solar whale
pastel panther
#

@tidal kiln or @solar whale or anyone else, if you have a pyportal or hallowing and can test the bitmap I posted above when you have a second, that would be great

tidal kiln
#

@pastel panther no pp, but do have hallo. anything special firmware-wise?

tulip sleet
#

@solar whale @gilded cradle we were discussing this last night internally. Point made that if HTTP REST is available, MQTT is less important. MQTT more important for reducing data use on cellular, etc.

pastel panther
#

nope, just a regular OnDiskBitmap should be fine

solar whale
#

@pastel panther sorry -- I am away from my hardware until later today -- looks like you have others

gusty topaz
#

@solar whale bummer, that's too bad. I guess I'll have to do it on the Huzzah. Weird thing is that it was giving me some errors and I couldn't get it to allow me to access the repl last time I played with it (it would freeze and the board would restart).

pastel panther
#

I tested beta2 and current master so those are a good targets to test but others would be fine too

solar whale
#

@tulip sleet good point -- that is why I have not found it necessary to look into MQTT myself REST gives me all I want.

tulip sleet
#

@prime flower was part of this discussion - may have further things to say

gusty topaz
#

What do you mean by REST?. Are you referring to the regulat Get/Post requests?

tulip sleet
#

yes

solar whale
#

@gusty topaz I've never had issues like that -- if you can provide examples, I'll try them and see if I can reproduce the issues.

#

@gusty topaz yes (get/post...)

gusty topaz
#

ok, I'm away from the huzzah right now, but will try later or perhaps in a couple of days.

prime flower
#

scrolling up, thanks for the tag dan

tulip sleet
#

@idle owl travis is now happy for Bluefruit_Connect

idle owl
#

merged

#

@tulip sleet released.

solar whale
#

@gusty topaz were you referring to CP on the Huzzah esp8266? I may have misunderstood. It has not worked at all since 4.0- alpha2 I think

#

I don't use it at all anymore.

gusty topaz
#

@solar whale no, I was referring to MP on the Huzzah ESP8266.

#

I did a project some time ago with MP and MQTT and it worked beautifully.. until it didn't.

prime flower
#

@gusty topaz I tried out uMQTT back in September, pre-ESP32SPIWifi work. It wasn't great at the time. The Adafruit IO CircuitPython library (I'm writing it rn) has a RESTClient class, leaving the possibility of adding a MQTTClient open for the future for when we have a MQTT client.

solar whale
#

oh -- OK -- I do have that available and can try it.

#

@prime flower will you make it work with both ESP32SPI and ESP_ATcontrol?

prime flower
#

@solar whale Maybe, I've been working with ESP32SPI's WiFiManager? What's the difference btween the two as far as hardware targets?

tidal kiln
#

@pastel panther can you send code snippet to test

solar whale
#

the ESP_ATcontrol uses a UART interface and works with the ESP32 or ESP8266 (and ESP8285) - @gilded cradle is , I think, planning ot provide a WifiManger for ESP_ATcontrol as well.

gusty topaz
#

@prime flower Do you think uMQTT would work with CP4 on an Argon? (WiFi through ESP32_AT control)

prime flower
#

@median aurora I'm happy to include both the SPI and UART interfaces within CircuitPython_AIO as they come in

#

@gusty topaz not sure, havent tried the argon with ESP32_ATControl, been using a PyPortal for testing

pastel panther
#

offline for a bit, bbl

gilded cradle
#

Yeah, I was waiting for the bugs to get worked out, but was going to basically port the one from ESP32SPI one. @prime flower, if you would like to write it, that would be great. Just let me know if you have any questions.

prime flower
#

🤷 the more hardware support the merrier 😃

gilded cradle
#

Otherwise, I’ll probably work on it this weekend. I’m having to squeeze in dev time where I can this week.

prime flower
#

I could probably start on it tomorrow, depending how far I get with the IO lib. I'll let you know.

solar whale
#

@prime flower @gilded cradle hopefully the only diffence is what is passed to the wifimanager -- an esp32spi or a esp_atcontrol instance.

prime flower
#

if it mimics the .post/.get methods of WiFiManager, absolutely

solar whale
#

If not, we should make it so 😉

prime flower
#

restclient takes in a wifi_manager object

solar whale
prime flower
#

im all for making sure the APIs have similar calls, less code in the lib to handle diffs

solar whale
#

there may be some things in ESP_ATcontrol that need to be tweaked since ESP32SPI has evolved. I'm happy to help make them play together as well.

#

@gilded cradle don't feel bad if life happens! All this can wait...

gilded cradle
#

Thanks @solar whale. It’s frustrating since I love working on this stuff, but have to put it aside for awhile.

solar whale
#

That happens to all of us at times .

gilded cradle
#

🙂

tidal kiln
#

@pastel panther i get the upper left 128x128 (hallowing screen size) pixels of the image

pastel panther
#

and compare it to what you see on your computer

tidal kiln
#

@pastel panther with that one:

ValueError: Only Windows format, uncompressed BMP supported 124
pastel panther
#

hmmm

tidal kiln
#

@pastel panther works. hallowing and PC show same thing.

pastel panther
#

@tidal kiln Thanks 🤔

#

I assume they both look "normal"?

tidal kiln
pastel panther
#

welp, that answers that

#

thanks

tidal kiln
#

np

manic glacierBOT
#

Since you have a JLink, it'd be awesome if you could have a debug build running through the JLink as you work with it. Set a breakpoint on reset_into_safe_mode. It will likely be triggered when the USB dies for you. If it doesn't, you can still control-c it to get a backtrace. You may also want to power the pyportal separately through a stemma connector so that you can unplug usb when it misbehaves. I use gnd and 5v from a grand central or metro to power the pyportal.

pastel panther
#

I'll have to re-test at home with that same exact image but on my hacked together displayio setup the original image was showing up with the reds and blues swapped

manic glacierBOT
tidal kiln
#

in case it matters:

Adafruit CircuitPython 4.0.0-beta.2 on 2019-02-05; HalloWing M0 Express with samd21g18
>>> import board
>>> import displayio
>>> splash = displayio.Group()
>>> board.DISPLAY.show(splash)
>>> with open("/ladyada_crop2.bmp", "rb") as f:
...     odb = displayio.OnDiskBitmap(f)
...     face = displayio.TileGrid(odb, pixel_shader=displayio.ColorConverter(), position=(0,0))
...     splash.append(face)
...     board.DISPLAY.wait_for_frame()
...     while True:
...         pass
... 
pastel panther
#

ya, that seems about right

manic glacierBOT
pastel panther
#

twiddles thumbs until pyportal/hallowing restock

manic glacierBOT
solar basin
#

Does CircuitPython have W5500 drivers?

idle owl
#

@solar basin I don't believe so. What is it?

solar basin
#

I have an old Ethernet Shield R3 that I was going to play with on my Metro M4

idle owl
#

Oh... There was some work on that.

#

I get the impression that it was never finished though.

solar basin
#

hmm

idle owl
#

Search for wiznet in the CircuitPython issues list. There's an issue that discusses it.

#

Well two, apparently.

solar whale
#

not sure which boards it is implmented for

solar basin
#

@solar whale nice!

solar whale
lone sandalBOT
gusty topaz
#

@prime flower @solar whale @gilded cradle Just finished catching up with previous messages. Thanks for the comments on the ESP32_AT control and MQTT. Would love to help on these libraries as I feel like I'm taking from the community and not giving back. The thing is I don't think my Python chops are good enough to contribute on a CP library, and there is the time issue: I only have limited time to commit to it at night.

idle owl
#

@gusty topaz Contributing doesn't have to be writing code. Using the code and letting us know how it's going is a great way to contribute. You write code all day long, but if no one is using it and reporting back to you, you have no idea how you're doing. What you're doing is very important too.

gusty topaz
#

@idle owl If that's the case, then... I'm contrinbuting a lot!!. LOL, thanks that made me feel better.

idle owl
#

You are contributing a lot!

gilded cradle
#

My interest in MQTT is mostly in communicating with openHAB. I wonder if they have a RESTful interface that works just as well.

marble hornet
#

Jonahs-MacBook-Pro:~ jonahym$ brew cask uninstall gcc-arm-embedded
Error: Cask 'gcc-arm-embedded' is unavailable: No Cask with this name exists.
Jonahs-MacBook-Pro:~ jonahym$

#

anyone recognize this?

idle owl
#

Yes

#

It's been removed because it doesn't fit being a cask, and should be a brew formula. It has not been created as a brew formula yet.

#

You need to install it from the installer found on the GCC website.

marble hornet
#

okay.... working on it

gusty topaz
#

@gilded cradle I'm kinda on the same boat: My interest in MQTT is mostly in communicating with Homebridge (running on a Mac mini). There must be a REST interface/plugin for it..

marble hornet
#

@idle owl all i'm finding is targx.bn2 files online, do you have a link? please

idle owl
#

Do you mean tar.bz2 files? That's what I have downloaded. I guess it's not actually an installer. You have to do something else with it. I don't remember what now. Are you unable to unpack the file?

marble hornet
#

i have unpacked it, it looks like it goes in /bin/sh but sh isn;t a directory

main meteor
#

It's probably a shell script, that should be interpreted by /bin/sh (or /bin/bash)?

idle owl
#

Also there were issues with one of the more recent toolchains...

marble hornet
#

crap, i uninstalled it trying to update. so: any suggestions?

idle owl
#

I'm trying to remember what I did.

manic glacierBOT
idle owl
#

@slender iron I don't remember what I did to get gcc-arm-embedded installed from the tarball download. If I even did, now I'm second guessing that.

slender iron
#

it was supported by brew

idle owl
#

Also you may know which version is best for now, because I seem to remember issues with the most recent version.

slender iron
#

and now it isn't

idle owl
#

It's not anymore though.

#

Ok right

slender iron
#

ya, it's stupid

idle owl
#

So you have to download it from ARM right?

slender iron
#

I still had the old version installed from brew. I haven't updated and I don't think travis has been updated either

idle owl
#

Hmm ok.

slender iron
#

ya, at this point I think you need to get it from arm

marble hornet
#

so do i just drag it into the /bin folder? it looks like rmdir and such other commands are in there

#

and ca and sleep and etc

idle owl
#

That doesn't look recent though now that I'm looking at it.

#

Someone else made a brew thing for it. https://github.com/PX4/homebrew-px4 You would do brew tap PX4/px4 apparently. But I don't have any information on that at all.

marble hornet
#

tried it compiling cp sin;t working

tulip sleet
#

don't bother to put it in bin; just make your own ~/bin and add that to yoru PATH. That's a lot safer. Just untargz it somewhere in bin and then do that.

#

you need the q3 7.3.1 version, not the gcc8 version

marble hornet
#

can you go into a little more detail ?

gilded cradle
#

I think the correct directory is /usr/local/share, but get the correct version as dan says too.

tulip sleet
#

download the tar.bz2, unpack it in some dir in your homedir. find the bin dir in the packed dir, and add that dir to PATH in your .bash_profiel (or whtaever it is on MacOS)

#

there's no reason to do anything as root, or put it in /usr/whatever. you can make your own private bin directory for random stuff

#

it's safer if you don't

#

unless you're installing it for other people on a shared machine

gilded cradle
#

True. I was going by the fact that homebrew stuck it in /usr/local/Caskroom, but it's fine either way.

tulip sleet
#

@marble hornet is that still clear as mud? Have you modified your PATH before?

marble hornet
#

no

#

i've seen export but that;s it

#

sorry: yes to mud, no to path stuff

tulip sleet
marble hornet
#

awesome! before i put it into my path i exported it to the envi where i was trying to build cp and this is what i got:

#
Jonahs-MacBook-Pro:atmel-samd jonahym$ make BOARD=pyportal
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
../../lib/tinyusb/src/class/msc/msc_device.c: In function 'proc_builtin_scsi':
../../lib/tinyusb/src/class/msc/msc_device.c:273:7: error: 'strncpy' output truncated before terminating nul copying 8 bytes from a string of the same length [-Werror=stringop-truncation]
       strncpy((char*) inquiry_rsp.vendor_id  , CFG_TUD_MSC_VENDOR     , sizeof(inquiry_rsp.vendor_id));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [build-pyportal/lib/tinyusb/src/class/msc/msc_device.o] Error 1
Jonahs-MacBook-Pro:atmel-samd jonahym$ ```
tulip sleet
#

we haven't brought the tinyusb code up to snuff for compiled on gcc8 yet, so use the gcc 7.3.1 release instead

marble hornet
#

oh 731 not 371

#

i'll try to find it

idle owl
#

Scroll down the page of the link I sent, @marble hornet

gusty topaz
#

Guys, quick question: The only way to interact with Bluefruit boards through BLE is through Adafruit iOS App?. Is there a way to pair the board with a phone and have it change the phone volume or snap a picture, for example? (much like selfie sticks)

idle owl
#

Or click that link too

tulip sleet
#

@marble hornet messing around in .bash_profile and .bash_aliases is a good skill to have. You can add all kinds of aliases to save typing, like I have lots of aliases like:

alias f840-make='make -j4 BOARD=feather_nrf52840_express SD=s140'
marble hornet
tulip sleet
#

@gusty topaz we don't have pairing yet. The BLE app uses the "standard" Nordic UART service, which a few apps implement. BLE HID is high on the list, but not started yet

#

2018-q2, really. they made a mistake and called it q3 in some palces

#

the link I posted above

#

2018 q4 is the gcc8 release, which doesn't work.

#

for us

#

yet

marble hornet
#

kk 😃

#

🔨 ing

tulip sleet
#

afterwards you can check the version:

$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2018-q3-update) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#

it says q3 there and q2 in the download 🤦

marble hornet
#

ooh those alias seem really cool (havn;t tried still reading)

#

or say alias 'git submodule sync; git submodule upade --init --recursive'?

marble hornet
#

where is ~/.profile?

tulip sleet
#

do ls -a and see what "dot" files you have. More likely it's .bash_profile? Have to fire up a MacBook to look

manic glacierBOT
marble hornet
#

where should i run that ?

tidal kiln
#

~ = your home directory

marble hornet
#

so /?

tulip sleet
#

I have Mac with a vanilla install. There is not any .bash_profile, so you can create one.

#

$ cd ~

tidal kiln
#

/ would be the root folder

#

~/ is your home directory

tulip sleet
#

your homedir is /Users/yourusername

manic glacierBOT
tidal kiln
#

echo ~

#

it's just a built in short cut

manic glacierBOT
marble hornet
#

should i restart ?

tulip sleet
#

no, just open a new terminal window, and it will read .bash_profile

#

if you put echo hi there at the top of the profile you'll see it print that proving that it has read .bash_profile

gilded cradle
#

Even more of a shortcut is to just type cd to go to your home directory.

marble hornet
#

r u on mac?

#

(i don;t remember )

#

sorry

tulip sleet
#

well, i have a couple i use for testing, but ubuntu most of the time.

#

cd with no args works on all *ix-style shells

gilded cradle
#

You can also type source .bash_profile if you don’t want to restart the terminal.

tidal kiln
#

my recent fav:

alias dmesg='dmesg -T'
marble hornet
#

okay, so now that this is working i think i found something odd with the pyp ;
also: can i put aliases in the .bash_profile?

gilded cradle
#

Yeah, that’s where I put mine

tidal kiln
#

yep

prime flower
#

@solar whale I think I'm going to PR AIO_CircuitPython in a bit and build hardware for a soak test over the weekend, tomorrow

marble hornet
#

can you have an alias with an input?

prime flower
#

the cheerlights issue you encountered, I havent' hit that yet, but i havent been running this library > an hour

tulip sleet
#

@marble hornet no, but you can write a shell script that processes arguments

#

or write a shell function

tidal kiln
#

and then alias that 😃

marble hornet
#

ahaha

solar whale
#

@prime flower sounds good -- I'll give AIO some exercise over the weekend as well. I try to run cheerlights cointinuouly asa check -- it has hung before and I just rebooted it without looking at the REPL. I'll pay closer attention. It often runs >24 hours without a problem.

marble hornet
#

yay!

solar whale
#

@prime flower will you want the PR approved and merged right away or do you want to wait until after your soak test

pastel panther
#

@marble hornet here are my CP related aliases; some are specific to my setup, others are not. Particularly useful is the last one to activate any changes to my .bash_profile

alias ag='arm-none-eabi-gdb-py'
alias bos='bossac -e -w -v -R -p cu.usbmodem1411'
alias cip='cd ~/dev/micro/circuitpython/ports/atmel-samd'
alias cpf='cd ~/micro/cp_fork/ports/atmel-samd'
alias espflash='python3 /usr/-speed 4000 local/lib/python3.7/site-packages/esptool.py --port /dev/tty.usbserial-A9M9DV3R --baud 115200 write_flash --flash_size=detect 0 '
alias esptool='python3 /usr/local/lib/python3.7/site-packages/esptool.py -c esp8266 -p /dev/tty.usbserial-A9M9DV3R'
alias flf0='cp build-feather_m0_express/firmware.uf2 /Volumes/FEATHERBOOT'
alias flgc='cp build-grandcentral_m4_express/firmware.uf2 /Volumes/GCM4BOOT'
alias flm4='cp build-metro_m4_express/firmware.uf2 /Volumes/METROM4BOOT'
alias gdbs11='JLinkGDBServer -speed 4000 -if SWD -device ATSAMD11D14'
alias gdbs51='JLinkGDBServer -speed 4000 -if SWD -device ATSAMD51G19'
alias gdbsgc='JLinkGDBServer -speed 30000 -if SWD -device ATSAMD51P20'
alias gg='git status'
alias gt='git tag -l --sort=v:refname'
alias mkb0='make BOARD=itsybitsy_m0_express'
alias mkcpx='make BOARD=circuitplayground_express'
alias mkf0='make BOARD=feather_m0_express'
alias mkgc='make BOARD=grandcentral_m4_express'
alias mklb='make BOARD=lil_bitty_m4'
alias mkm0='make BOARD=metro_m0_express'
alias mkm4='make BOARD=metro_m4_express'
alias mkm4p='make BOARD=m4_proto'
alias mks='make BOARD=samd51_proto'
alias mkt0='make BOARD=trinket_m0'
alias mktr='make BOARD=trellis_m4_express'
alias nukesub='git submodule sync; git submodule update --init --recursive'
alias re='source ~/.bash_profile'
prime flower
#

@solar whale dunno, it'll be an initial PR/code review. I'm not going to do a full release until after the weekend, though

pastel panther
#

(apologies for the text dump)

tulip sleet
tidal kiln
#

@marble hornet also, you can type alias to get a current list

marble hornet
#

thank you!

solar whale
#

ok -- on thing that would be good is to change the name of settings.py -- it caused some problems with taht name -- either use aio_settings.py pr esp32spi_settings.py

#

at least needs to be done before release

prime flower
#

@solar whale Not sure if we decided on a final settings.py rename, but I could do that for now

solar whale
#

also all the examples have to change to import settings from the new name

pastel panther
#

steals from Dan's aliases

solar whale
#

do we want one setting.spy for all -- them maybe wifi_settings.py

manic glacierBOT
prime flower
#

was going to do wifi_settings.py and include io API keys in there

solar whale
#

sounds good to me.

#

the complication will come if multiple libraries have exmples with wifi_settings.py unless we have a common "default" since it will get merged into the bundle for each library -- maybe @idle owl has a suggestion

idle owl
#

Leave it in the root directory and it won't go into the examples bundle, if that's what you're referring to.

solar whale
#

hmm - but it does not belong in /lib

marble hornet
#

do any of you have a pyp?

manic glacierBOT
marble hornet
#

can you try some firmware on ur units?

idle owl
#

@solar whale It shouldn't end up in /lib either.

#

@marble hornet Very few people have them.

solar whale
#

@idle owl I guess I don't understand

marble hornet
#

okay

#

here is the thing: i have to versions of teh firmware compiled one with the dispio init and one without. the one without seems to not loose files

idle owl
#

I'm saying if you have it in the same directory as the library file or package, so along side adafruit_esp32spi.py and .travis.yml and setup.py, it shouldn't end up in /lib either. Where and when do you need it? It won't be in the bundle at all at that point, you'd have to get it from the repo. Otherwise, it will end up in the bundle and there will be duplicates.

#

Where is it now? Are there libs in the bundle with them already?

#

You could choose one library to host the wifi_settings.py and then get it from there in the bundle each time also.

prime flower
#

@solar whale On the PyPortal, it sits at the root, so I don't think it will/should be included with the library, it's not part of ESP32SPI. Those examples reference settings as esp32spi_settings

solar whale
#

OK -- it was in the examples folder of ESP32SPI and ESP_ATcontrol -- right we changed the name at @idle owl request for esp32spi -- The only place it is ever imported is in a file from the examples -- I guess we just need to make it clear in the guides how to create it and what goes in it.

prime flower
#

good point - I'll clarify in the guide

solar whale
#

esp32spi_settings.py is in the examples folder for esp32spi.

#

not sure we want or need aio_settings.py and esp32spi_settings.py and espat_settings.py.. all could use wifi_settings.py

solar whale
#

They could all import wifi_settings.py as settings

manic glacierBOT
solar whale
#

or use any file name the user wants since it is in the users code

prime flower
#

@solar whale yeah, I'll do wifi_settings for now, since it'll support both

#

eventually

solar whale
#

that sounds good -- we'll make it work

#

and @idle owl I did NOT swear at you 😉 the bot does not like triple-x and I used that in an example ...

prime flower
#

@solar whale example_file_name.py next time 😄

solar whale
#

@prime flower if you are making changes to the examples -- you can remove all the gpio0 settings -- they are defined, but not used and not needed

prime flower
#

ok

solar whale
#

one less pin tied up

#

one last comment for now regarding the settings.py - the important thing is that some file contains a dictionary named settings and your code has to then 'from your_file import settings .

#

Sorry I think I am way over thinking this. Since its is all example or user code you can nene the dictionary anyway you want... I’ll stop now.

manic glacierBOT
marble hornet
#

could you just have the user pass the dict?

#

for wifi

manic glacierBOT
solar whale
#

@marble hornet that is what happens. I was the one making it complicated.

marble hornet
#

oh, so it will be moved to __init__ ?

manic glacierBOT
#

I duplicated the pyportal board profile and changed the board.c to match the metro m4, thus board.DISPLAY is a Nonetype, and I have not been having the file/folder (and occasional) corruption problem while saving or reloading in addition to far fewer safe mode alerts. The board i am running it on is in spi mode, if relevant.

ladyada, thank you for the feedback you have been giving I have been finding it very useful and I hope I can someday use it in a job. :-)

manic glacierBOT
raven canopy
#

psa: read the translation issue before starting a new one. lest ye go makin th' wrong things translated. 🤦