#circuitpython-dev
1 messages · Page 233 of 1
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.
How would you go about finding the memory size of objects in CircuitPython? sys.getsizeof seems not to be implemented
@gilded cradle FYI -- with pr_1564 my the featherwing_rtc_simpletest runs with out error on my Particle_Argon!
@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.
@raven canopy so this would be a no-go to get the trinket to play audio out the analog port?
@obsidian dome well, you can but you'll have to remove other things from the build to make space.
@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.
that part has just changed significantly, so i wouldn't be able to help off the top of my head. still learning it myself. 😄
@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.
i can. i told Scott last night that i'd leave it for him, but that list is growing. 😄
@raven canopy Understood. Thanks anyway.
🤞
well, that looks like it broke through the barrier... 🎉
and of course. fails 2 seconds after i type that...
CPX unhappy. 😦
yeah. .2 is failing all the boards too.
all on mp_module_io
well, the weak links for it
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.
yep. net success!
it's the small m0 builds that are failing
well, gemma just passed. 🤷
?? well, I know which ones to test
Thanks for the update @solar whale
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?
You can get new mpy files at https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases
By script that starts automatically, I mean the program that you are writing that you want to run.
Yeah, I always blank mine out to start with.
currently dying on "aout = AnalogOut(board.D1)"
reported error is "OSError: [Errno 5] Input/output error"
Let me see which one that uses...
I do have "import board" and "from analogio import AnalogOut, AnalogIn" prior to that.
I think you also need import analogio
oh nevermind
Perhaps that got trimmed out?
trimmed?
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.
I didn't do any trimming (yet). Just a stock build for the trinket_m0.
Oh nevermind. I see the error. D1 is a digital pin
Oh yeah. I haven't really played much with the trinket. Do you have any ideas @solar whale?
no - and no promises taht file will run with current release -- I'll try it
you'll neeed to put adafruit_dotstar.mpy in /lib
It is there
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
sure. I appreciate any help.
Yeah, I just plugged mine in too
Which version of circuitpython are you now running?
built "master" this evening.
Ok, let me do that real quick...
this runs on my trinket with current master
had to copy neopixel.mpy to the board as well
modify import and call to adafruit_dotstar
Yeah, I saw that it had a different name too
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.
hmmm -- ok -- maybey PR 1564 did fix something
I think it has been merged so try updating to current master and rebuild
REPL reports I am running "Adafruit CircuitPython 4.0.0-beta.2-74-g90bc09a31-dirty on 2019-02-17; Adafruit Trinket M0 with samd21e18"
you mus have made some changes -- "dirty"
Was that within the last 2 hours? I just cloned the repo tonight.
ok. I'm going to just blow away the repo and start over to be sure.
testmain.py runs on it
lol
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....
building the board firmware....
it does not run after a soft reboot -- needs a hard reset
Mine doesn't have enough room to copy all the libraries
I mean all the relevant ones
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?
Yes
Question: How are you formatting that in Discord to create the "block quote"?
put three "backtics" (below the tilde) on a US keyboard - before and after the code
Yeah or for inline just use a single one
interesting issue that it fails after a soft reboot
I found this nice article that talks about discord formatting at: https://support.discordapp.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-
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.
Yeah, I'm getting the line 25 error after soft reset as well. Might be a bug?
taht is the same issue I am seeing
OK, at least I'm not alone.
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)
Same here.
What about AnalogOut? That's what my line 25 has
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
Oh, ok
@gilded cradle They do have a DAC, but I think we omitted the code for space reasons.
Ah, and compiling ourselves got around that?
oh, maybe not
but why would it work after hard reset, but not soft
Maybe something to do with stack size?
the device or driver is not in the right state
Hey, give me something to type and I'll test it 😃
how did you add audioio to the build?
I haven't.
I'll create a simple test script -- just a sec.
Just a clean build of "master" from 10 minutes ago
dropping all references to neopixel didn't help.
Yeah, I did the same. Just a regular build
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)
it's not calling analogio_reset() maybe or something like that on soft reset
probably -- - I'll file an issue
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....
That's the right one. Mine came from the same
But all three of us have the bug
Yeah, but I think the bug is in CircuitPython itself.
Understood. Just out of curiosity, how would I build the contents of that zip file from sources?
It's an automated build, but to create an mpy, I believe you use mpy-cross.
The following test script will execute after a hard RESET, but fails with an I/O Error after a soft reboot
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
...
@gilded cradle Is that a build target somewhere in the source tree?
yes just run mpy-cross sourcefile.py --it creates sourcefile.mpy
It has a list of the CircuitPython Library repos and builds once a day if there were any changes.
you will need to specify the full path to mpy-cross
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. 😦
its the same as 3.x
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.
does it work? i know it has version checking, but couldn't remember if we're past that at the moment.
the mpy format has not changed
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.
it changed from 2.x to 3.x but has not changed since
k.
roger that.
but not a bad idea to regenrate it occasionally 😉
3.1.2 has 'em: https://github.com/adafruit/circuitpython/releases/tag/3.1.2 choose according to OS
ahh. forgot about the Raspbian version. can't get that on Travis. 😆
@obsidian dome has the repo cloned and built so it in in his mpy-cross directory already
true. but, i keep a separate copy outside of my dev dir. options. hehe
Bedtime here -- goodnight all 💤
Yeah, bedtime for me too. Goodnight
- Fix build issues on certain M0 ports.
- Due to increased size of
ure, turn onsamdmodule 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.)
- Also added name
reforure,jsonforujson, anderrnoforuerrno, in the hope these are close to the CPython equivalents. I will double-check this later, but we're trying to get away from theu...names.
Jerry, I and iraytrace (on discord) all experienced this with a fresh build off master on CP. I personally saved using Mu, and I think the others did as well.
@exotic pumice https://github.com/ataradov/mcu-starter-projects
hmm... I thought he had samd51 code as well; I guess not.
doesn't look bitbang-y
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
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
it gets worse if I try 115200 😬
@weary raven What does "FS" stand for here?
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!
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 ...
@tulip sleet can you give an official response to https://forums.adafruit.com/viewtopic.php?f=60&t=147775 apparently my response in https://forums.adafruit.com/viewtopic.php?f=60&t=147757 was not sufficient
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...
FYI - json appears twice in the modules list on bot the feather_m4_express and feather_nrf52840_express
Looks like it's added both through the JSON_MODULE macro and directly in py/objmodule.c.
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
@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.
@solar whale I only see your reply to the ESP32 thread. Was there a response that was deleted?
ok, will narrow the focus. :/
why is the esp32 port even in the repo?
We don't delete unused ports, so that we can continue to merge easily from upstream.
ah -- good to know
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 ...
<@&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!
ok yeah i have seen this lately but i thought it was related to save failing. i noticed that if i opened code.py in Mu and saved it (maybe changing a char and deleting) then it would magically work, or maybe its unreleated
@slender iron thank you for fixing safe mode !
@slender iron could someone use ParallelBus for this, or is it too specific for display IO? https://forums.adafruit.com/viewtopic.php?f=60&t=147642&p=730010
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] = ...
note: removing the r.x = 50 makes it run perfectly
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.
@gilded cradle I've done that too!
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
@raven canopy wanna paste the URL here so we can eyeball it?
or point to it in the repo/
@tulip sleet https://github.com/adafruit/adabot/blob/master/adabot/circuitpython_libraries.py#L261
i've tried multiple variations, to include just circuitpython as the search string. i'm currently trying to hardcode in a failsafe.
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...
@raven canopy I tried this by hand https://api.github.com/search/repositories?q=Adafruit_CircuitPython+in:name+fork:true&per_page=100&sort=updated&order=asc and it seems to work, so maybe have github_requests print out what it thinks the URL is?
did it return the core repo in the results?
you mean https://github.com/adafruit/circuitpython ?
yeah. the search is returning everything (libraries), just not the core repo like it used to.
but "Adafruit_CircuitPython" is not part of that repo's name.
yeah, but the search still returns all sorts of stuff. its not exact. 😄
i guess they changed the sloppy string matching
@tulip sleet I think parallel bus is a bit too specific
but something similar is what they'd need
maybe if we eventually have a pattern generator module or something
tnx for looking - just a thought
@raven canopy I looked here https://help.github.com/articles/searching-for-repositories/#search-by-repository-name-description-or-contents-of-the-readme-file and here https://developer.github.com/v3/search/#constructing-a-search-query I think they just made the matching more strict, out from under you
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!
without this you have to look at two separate schematics to figure out how to hook it up in spi mode
@raven canopy I added "user:adafruit" to the query and that helped
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! 🍴 🏌
Thanks @raven canopy!
I will attach the files but I cannot recreate the issue consistently. also the code is very complex
every now and then when it tries to collect it reloads
ReloadException:
soft reboot
change the pyportal to spi mode via the jumper and run these files
portal backup.zip
TG, i edited to remove the exclaimation points. please keep the issue text and subject lines informative and compact
my apologies, I should have proofread the issue title.
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
kk that makes sense, thanks
Sure!
travis failed due to translation perhaps - so not merging in case something Needs Doing
97aeb19 correct weak module links; samd module only in ... - dhalbert
c1144a2 regularize how module weak links and alternate ... - dhalbert
5c884bf forgot json - dhalbert
339a227 Remove rtc from pirkey_m0 to make TRANSLATION=f... - dhalbert
ba77a9c move non-u names for native modules to circuitp... - dhalbert
pwmout_result_t result = common_hal_pulseio_pwmout_construct(&self->backlight_pwm, backlight_pin, 0, 5000, false);
in Display.c should be changed to 50000, as 5KHz is within hearing range and if you PWM the pyportal backlight you can hear a squeeking noise :)
(i can submit a PR once https://github.com/adafruit/circuitpython/pull/1552 is merged since that's what im working in)
master was broken, and is now fixed. Please try:
git fetch adafruit
git merge adafruit/master
And check that that metro_m0_express build is working. If that's OK, then commit and push, and I believe the build should work. Thanks.
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.)
on other files that are imported, print(__file__) works. in code.py you get NameError: name '__file__' is not defined
fully tested, including making an SD card slideshow - can be merged when ya like
Guys, will there be an Adafruit equivalent to Particle's Argon , but fully compatible with CP4?
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...
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 ...
@finite narwhal for language things take a look at https://docs.python.org/3/
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
@alexwhittemore I think you're right, this is a mistake. It should be the latest commit, and omit that if it matches the latest tag. If you can do a PR, that would be great. Thanks!
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 theu...names.
Did you come to any conclusion?
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) ?
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...
@gilded cradle Q: Does the returned response have an associated HTTP error code?
or does it just get serialized into json
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.
like - response.status would return the error code, similarly to the cpython library
You can look at it in the adafruit_esp32spi_requests.py file
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
yeah, hopefully that doesn't require a big rewrite from the way it's doing it now.
gotta get the 404 😉
Oh, it's within requests..yay
@timber mango Nothing is planned yet. We'll probably circle back to it at some point though
My first open source python program: http://denu.sourceforge.net/
circa 2004
@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?
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.
_AIO would omit the AdafruitIO text, I'd like to keep that. How about Adafruit_CircuitPython_Adafruit_IO?
Either way is fine. I think it works better without the underscore though.
Agreed. Easier to type too. Thanks for the input!
Good afternoon everyone -- lurking here 😃
👋
Wait till you see it on GH in markdown.
<@&356864093652516868> meeting is starting now
lurking
Join the club 😃
No audio today. In a noisy environment...
5th part 😮
Python Discord invite: https://discord.gg/djuFYQA
@idle owl Thank you, joined 😃
Will there be a Pirate translation? ☠ 😉
feel free to add it 😃
"Argh! That pin be invalid."
Travis failing on translations; try make translate and commit and re-push. I think that will work, but if ut fails, you may need to merge from upstream.
"Ye be best to connect to ground, landlubber!"
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!
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.
Last pirate pun, I swear:
Why are pirates excellent software developers?
Because they spend years at C.
Python Essential Reference (4th Edition) [David Beazley] on Amazon.com. FREE shipping on qualifying offers. Python Essential Reference is the definitive reference guide to the Python programming language — the one authoritative handbook that reliably untangles and explain...
(txt plz)
- @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]
No status update for this week
Please ping Dan or I with any issues you would ping Scott with. Thanks!
Wireless Dual Stepper Control with Adafruit IO, Raspberry Pi, and CircuitPython libraries (https://learn.adafruit.com/wireless-stepper-control-with-adafruit-io-circuitpython-raspberry-pi-python)
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
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.
woaaah
@prime flower 👍
@prime flower I'll definitely be testing with an huzzah32; got a project I'm working on that needs to talk to adafruit.io
@slender iron - I recommend checking out the Talk Python to Me and Python Bytes podcasts.
Talk Python To Me is a podcast for developers who are passionate about Python. Learn about the language and related technologies.
Python Bytes podcast delivers headlines directly to your earbuds.
Nina Zakharenko was on Episode #115 of the PythonBytes podcast and talked about CircuitPython, MicroPython, Circuit Playground Express, MakeCode and a few other related topics.
https://pythonbytes.fm/episodes/show/115/dataclass-csv-reader-and-nina-drops-by
Python Bytes podcast delivers headlines directly to your earbuds.
yup! I listen to them both
Ok. Great!
nina and Michael will be at pycascades too
@slender iron I assume you've considered embedded.fm ?
I listen to it as well but haven't met Elicia before
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 Make sure you have a good time
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.rstfile/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.
- Moved the
-
FrequencyIn:
- Brought my seriously out of date branch up to date, and started re-gluing things in.
- Moving from
pulseioto a newfrequencyioto allow for better port/board inclusion.
-
samd-peripherals:
- Re-submitted previously reverted work to move
shared_timer_handler()back toports/atmel-samddir. PR to finish on the core is ready to go once I can update the submodule.
- Re-submitted previously reverted work to move
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: pipand setting up the build as either a matrix or stages. 🤞
🗞
belated HR to @raven canopy for being a superhero
@pastel panther 🙇 its less than it looks. Hehe
Recharge is super good. Oh, and good point on empowerment. Information Czars/single-point-failure == bad!
💯 to @idle owl
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
👋
You got do ity
Thanks everyone! Keep rocking it!
@errant grail I'm going to be thinking about pirate translation all day.
Thanks 😃
Thanks!
When I tell my kids that ANYTHING is my jam, they ask me to stop saying those words.
I'm old...
thanks all!
Please tell me you've said that about actual jam at least once.....
Join the club @old smelt
big club
OLD is relative
relative to my 16 year old
"Annoying you is also, my jam" would be a typical response to my kid.
That's gold @raven canopy
It's a quid-pro-quo relationship. 😉
"Don't open my door. That's my jamb."
3!
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).
My nephew was in it -- and he could not get tickets ...
Just noticed that on my Grand Central. the Neopixel does not show CP status -- is that a "feature" or a bug?
bleh; my git fu is weak; I'll have to fix this when I get home
nevermind -- -aparently my neopixel has a bad solder joint -- works if I press on it...
Also I'm aware that the initial reading in of the header is not right; I think I will probably update it to read in up to the initial bit of the DIB header to get its length and then read more from there.
https://www.teachingpython.fm/ sorry i missed the meeting
but you should check out this
What metro_wing?
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
Nice. I also noticed a doubler or tripler turned sideways is about the same size as a metro, which is why I was wondering.
@gilded cradle Can I hit you with a DM?
Yeah
@idle owl - oh absolutely I have. That and other "hip" youngster vocabulary that is 2-5 years out of date.
@old smelt Eeeeeexcellent. 😄
@solar whale Are you around?
yes
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?
I'd recommend a feather Huzzah ESP32 and an M4 or nrf52840 board
Ok excellent. So the Feather Huzzah could be attached to a Feather M4 and have a somewhat streamlined compact solution to CP and WiFi?
no! can't attach them
Ah ok
not without cutting some pins anyway
that's not an option 😄
Alright, but the two feathers separately will work, wired together specifically?
yes - 6 wires
Right on, brilliant. Thank you
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
Right
I recommended the Feather M4 or nRF52840 if they wanted BLE support, but explained where we're at with it.
you can also use the ESPRESSIF ESP32 Development board ( a few $ cheaper than the Huzzah) I use both
Hmm good to know
I prefer the Huzzah32 because it's a narrower profile
That's what I suggested.
For the DevKit board, I always have to straddle it across 2 breadboards
but I made a mistake -- it needs 8 wires!
np
yw
@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.
kk, sounds good @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.
ya, sooner the better I think
ok, I'll search libraries for that. Maybe we have already done that to make them compatible for adafruit-blinka use
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...
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?)
@tough flax What is the bootloader version showing in INFO_UF2.TXT?
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
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
Neither, it shows that a drive exists, but says it needs to be formatted
maybe try another usb cable first
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 😉
if you can get to the repl with beta1, you can do import storage;storage.erase_filesystem() to get a fresh CIRCUITPY.
Comes up with the "needs formatting" after erase_filesystem
new cord
I shouldn't say yes, right?
Ahhh, so "8 bit addressing" doesn't mean "some clever way of adding an extra bit" - it means "we incorrectly left-shift the true device address when we really shouldn't"
Clear enough, I suppose!
this is very weird, so you can get to the repl when it says "needs formatting"? Is this a win7 or win10 machine?
i'll give you a very fresh uf2, hold on
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
but that's complaining that the file is going missing from c:\Users\billb ...
which is ccompletely weird
Agreed... I'll record what's happening - the timing makes it seem like the board's resetting too soon
i have to cook, but will keep an eye on this
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)
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.
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.
i am getting a different weird error on my windows 10. Do you have a mac or linux box to try?
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
@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.
Or until windows 10 is stable 😉
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 😃
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.
Yeah, I had the same thing happen to me too
@tulip sleet throwing out a guess/question: would the PORT_HEAP_SIZE defs affect the MSC reporting, and were they replaced or just removed? https://github.com/adafruit/circuitpython/commit/7b3f7605b8b36f5d0dbfbee60604ad266cac2645#diff-bf202d4e05f530624aaeeca0f2e2cb6d
still gave the error during copy
I tried to copy beta2 and got file too large for destination system on Windows 10.
what does explorer "report" the drive size is?
Yes - once I got that, I also saw it on beta1 until I unplugged/replugged the device
3MB
and available?
hold on
:holding:
Same for me too
huh. i mean, its bogus numbers anyway, but...windows. 😄
The beta2 file size is only 524kb, so it's pretty weird.
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.
I found something that may be pertinent: https://support.microsoft.com/en-us/help/140365/default-cluster-size-for-ntfs-fat-and-exfat
Describes the default values that are used by Windows when a volume is formatted to NTFS, FAT or exFAT.
i was about to ask if either of you had a USB debugger. MS Message Analyzer can do it, but its a little tedious.
You mean software or hardware?
I do not have a debugger (or a J-Link unfortunately)
either. wireshark is another software tool, but i can't remember if they have a windows version.
@dhalbert Please take another look. I rebased and Travis is happy.
this feels more on the USB reporting side, but the j-link on the hw side may help pinpoint.
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
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 😃
Onward to my first PyPortal project!
glad you're not totally at a standstill @tough flax. thanks for the report!
I'm happy to stay around and run tests, just don't want to kill the board that DID load 😃
always good to keep at least one functioning piece of equipment around. 😄
The board I tried works great on a Mac. It's just windows it doesn't play well with.
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.
Microsoft UF2 broken on Microsoft Windows? Shocker lol
creates en_PIR translation branch ☠ 😆
en_arr
hmmm. that might be better. 🤔
I'll create a ticket so we can track this (MS problem or not 😃 )
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

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...
We're in uncharted territory. There's no iso lang code for pirates
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.
So, for the record - I have an official role for ITLAPD
wha!? awesome!
Search for LessonPix.com on this page http://talklikeapirate.com/wordpress/junior-pirates/
I also tweeted in piratese for a week (it was hard!) http://lessonpix.blogspot.com/2012/09/talk-like-pirate-day-in-school-therapy.html
@nickzoic Are you blocked by anything on this?
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

Upgraded to bootloader 0.2.8, tho...
On Windows 7, trying to copy via drag and drop shows this error:

Re-created as https://github.com/adafruit/Adafruit_nRF52_Bootloader/issues/46, closed here, since it's a bootloader issue.
Even after #1554, which makes the atmel-samd and nrf builds extremely similar, -flto still produces an empty output file on nrf. So my guess is that the interrupt vector is not dragging in everything else as it does on atmel-samd. But I don't know why; I already tried a bunch of things to get it to work.
hmm, not sure your question but i think your datasheet is probably confusing, and has the '8 bit' address which includes a 0 for the lowest bit (left shift one). we use the 'raw' address, same as Arduino and Linux, which does not pad the LSB
https://www.i2c-bus.org/addressing/
maybe that helps?
Yes - that's exactly it. I never realized the difference. Thanks for walking me through it!
@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"
🤣
@raven canopy Hilarious! And to think I was just joking! Hope you can work walk the plank in there somewhere.
Joke or not, I think it's a great idea! walk the plank might be difficult, but we'll see.
Is the device connected to your computer via USB? Any write activity your host does will cause a reload.
@TG-Techie Please reopen if this is an issue still.
Could we drop the modules all together that the stdlibs implement?
What is your motivation for supporting them? It doesn't seem very useful because they will use a bunch of resources.
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?
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...
Hi Scott! I got sidetracked trying to work out the weak reference thing. See comments at end of #1046.
Perhaps Dan's changes to make system will avoid this problem? It is very curious that it is a problem with -O2 set and not -O1, and very much repeatable.
I'd like to move this discussion back to a place that's more visible instead of a closed PR, maybe #1155 or a new issue. I'll start there, and try to summarize the discussion up to this point.
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 thanks!
Right now, this is just
osandtime, though there could be more.
These are also extended:
collections is also a likely candidate.
- The
_xxxversions could possibly be confusing to novice users,though they won't see them except by doinghelp('modules').
...
@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.
Hi, I was looking at https://github.com/adafruit/Adafruit_CircuitPython_MIDI/blob/master/adafruit_midi.py and was wondering if there was any sample code showing how to use the in_channel ? I'm about to load up latest beta of 4.0.0 to have a play with this
I don't know if this is controversial/discussed before/following some other existing api but I put this ticket re: MIDI channel numbers https://github.com/adafruit/Adafruit_CircuitPython_MIDI/issues/2
@slender iron do you have a minute for a question? or maybe more than a minute, I never know.
sure
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.
right, you'd like the property to make sure the value is valid
yeah, but it's not a normal property because it's a register line.
right
ok
I doubt there is much you can do
the property or register can't tell the difference between two constants of the same value
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
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
ok
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
alright. thanks
couldn't you class them (class sensor.Gain)? Still, I'd consider it wasted memory
even then its usually just an integer constant in the class
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.
You can use enum to enforce type
Where are all of my changes now?
I think they have become overrided in commit c17f147be95e7490e5207c747add2da1cc8b167f
That's so sad.
Partly fixed by https://github.com/adafruit/Adafruit_CircuitPython_BluefruitConnect/pull/10, but there's still a hard fault sometimes on the CircuitPython side. Still debugging that.
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])
i was running code that worked perfectly before but after updating to the most recent master it started hard crashing and then wiped itself
working on reconstructing the lost code as an example
Adafruit CircuitPython 4.0.0-beta.2-97-g0dc260058 on 2019-02-20; Adafruit PyPortal with samd51j20
it only runs main when main is saved
@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.
@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.
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...
@raven canopy Awesome -- and that'll give me time to brush up on how translations are structured (and refresh the basics of github).
it's done it two more times.
iv'e been working on:
https://github.com/TG-Techie/pyportal_gui
i wish i could be more specific, this is mostly reconstructed code
we are on live video shows 😃
More MIDI fun: https://forums.adafruit.com/viewtopic.php?f=59&t=147909
nice, i saw that they pushed some new midi stuff in, cewl to see its working
ah, i just tried it with 4.0.0-beta.2-36-g66b0c67f5-dirty on 2019-02-12 and it happened again hrmmmm (i saved an old compile)
Fixes #1572
This is based on code from the unix port:
https://github.com/adafruit/circuitpython/blob/0dc2600587f1ee75ee20da0d24219d415ab0f1ac/ports/unix/main.c#L125-L127
I think I know what this might be. I might have messed up declaring MICROPY_PORT_ROOT_POINTERS in the big refactor. @ladyada
Will investigate further
Two problems with BLE:
- Used a lock instead of critical section in an interrupt routine, causing a deadlock.
- Needed to make the
ble_drvlinked 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.
Use original CPython names for ure, ujson and uerrno. These libraries are all strict subsets.
Hi,
README.rst says the Adafruit Feather M0 Bluefruit LE is part of the supported boards.
Use the release for the M0 adalogger. It has pin D8 defined and is needed as the SPI chip select.
@tulip sleet do you think it is isolated to the pyp or applies to all of them?
@tannewt yes it is plugged in but i was not saving. i would ctrl-d to make it reload then as it was running it would reload on it's own.
where is displayio declared fora board, i could not find it in the ports/atmel*/boards/pyportal
?
It's in shared-module
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.
@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?
Hmm, that I don't know
@dhalbert will both modules continue to be available? If not some libraries will be broken.
@jerryneedell I intend to fix the broken libraries with try-catch on the imports. There seem to be very few to fix(like one or two). There is probably also Learn Guide code to fix.
@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.
Not sure if it’s on your list, but ESP32SPI uses ujson.
@tulip sleet FYI ESP32SPI is one lib that imports ujson in adafruit_esp32spi_requests.py
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
yes -- was going to add atcontol -- esp32spi is in the bundle
Thanks - my bundle was out of date.
I can add a check to adabot for these as well. I think there's already one for ustruct vs struct.
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
thanks!
@tulip sleet Can I trouble you for a test build?
sure
Thanks! It's been a while since I've built, and even longer since I've tried to build off of a PR.
@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
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.
I'm not seeing that on ios, so maybe Android is sending some packets more often than others. I can try that
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
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
hmph.
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.
i don't think it's so bad, or maybe you should file an issue on the Android app
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
@solar whale did you end up figuring out the json pkt size issue with ESP32WiFi?
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
🤷
lol
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...
@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.
@gilded cradle checking it out, thanks
@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.
I"m not so sure that's not the app, yeah. I ran for about 15 mins w/no changes with iOS.
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
it's a lot better than it was. I can do a longer test
I'm assuming I'd have to keep my phone awake the whole time. I'm thinking it went to sleep.
@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.
@tulip sleet I'll merge the CP update. Take a look at Travis on the other one.
pylint
can someone with a displayio capable device setup test this bitmap for me?
@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.
Got it. Do you know if there is a mqtt client library/module out there compatible with CP?
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.
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.
probably this is a good resource https://github.com/micropython/micropython-lib/tree/master/umqtt.robust
@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.
along with https://github.com/micropython/micropython-lib/tree/master/umqtt.simple -- unfortunately it warns that it is not CPython compatible so porting may be a challenge and I have no ide if it can be made to work with the ESP32SPI library.
@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
@pastel panther no pp, but do have hallo. anything special firmware-wise?
@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.
nope, just a regular OnDiskBitmap should be fine
@pastel panther sorry -- I am away from my hardware until later today -- looks like you have others
@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).
I tested beta2 and current master so those are a good targets to test but others would be fine too
@tulip sleet good point -- that is why I have not found it necessary to look into MQTT myself REST gives me all I want.
@prime flower was part of this discussion - may have further things to say
What do you mean by REST?. Are you referring to the regulat Get/Post requests?
yes
@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...)
ok, I'm away from the huzzah right now, but will try later or perhaps in a couple of days.
scrolling up, thanks for the tag dan
@idle owl travis is now happy for Bluefruit_Connect
@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.
@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.
@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.
oh -- OK -- I do have that available and can try it.
@prime flower will you make it work with both ESP32SPI and ESP_ATcontrol?
@solar whale Maybe, I've been working with ESP32SPI's WiFiManager? What's the difference btween the two as far as hardware targets?
@pastel panther can you send code snippet to test
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.
@prime flower Do you think uMQTT would work with CP4 on an Argon? (WiFi through ESP32_AT control)
@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
@tidal kiln this should work except Sprite needs to be TileGrid
https://circuitpython.readthedocs.io/en/latest/shared-bindings/displayio/OnDiskBitmap.html
offline for a bit, bbl
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.
🤷 the more hardware support the merrier 😃
Otherwise, I’ll probably work on it this weekend. I’m having to squeeze in dev time where I can this week.
I could probably start on it tomorrow, depending how far I get with the IO lib. I'll let you know.
@prime flower @gilded cradle hopefully the only diffence is what is passed to the wifimanager -- an esp32spi or a esp_atcontrol instance.
if it mimics the .post/.get methods of WiFiManager, absolutely
If not, we should make it so 😉
restclient takes in a wifi_manager object

im all for making sure the APIs have similar calls, less code in the lib to handle diffs
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...
Thanks @solar whale. It’s frustrating since I love working on this stuff, but have to put it aside for awhile.
That happens to all of us at times .
🙂
@pastel panther i get the upper left 128x128 (hallowing screen size) pixels of the image
@tidal kiln can you try this one?
and compare it to what you see on your computer
@pastel panther with that one:
ValueError: Only Windows format, uncompressed BMP supported 124
@pastel panther works. hallowing and PC show same thing.
@pastel panther
np
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.
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
This allows writing to the filesystem from the host computer and
CircuitPython by increasing the risk of filesystem corruption.
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
...
ya, that seems about right
More details please. When are you typing ctrl-d? If main is running you'll need to ctrl-c then ctrl-d.
twiddles thumbs until pyportal/hallowing restock
@ladyada want to PR this or should I?
I'll be free at 3 to do so until 4. I do not know what a debug build is nor am I super experienced with a Jlink. Is there a guide you know of ?
#if CIRCUITPY this too if you are doing it elsewhere.
if you dont mind doing it, im going to try to focus on testing PR's with the time i have today
This is the one I used; I hear the author went on to do great things
https://learn.adafruit.com/debugging-the-samd21-with-gdb/overview
JLinkGDBServer -speed 4000 -if SWD -device ATSAMD51P20 is the gdb server command I use for the GC which I think is the same for the pyportal?
Does CircuitPython have W5500 drivers?
@solar basin I don't believe so. What is it?
I have an old Ethernet Shield R3 that I was going to play with on my Metro M4
Oh... There was some work on that.
I get the impression that it was never finished though.
hmm
Search for wiznet in the CircuitPython issues list. There's an issue that discusses it.
Well two, apparently.
@solar basin does this give you what you need ? https://github.com/adafruit/circuitpython/pull/1236
not sure which boards it is implmented for
@solar whale nice!
looks promising https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk#L20
@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.
@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.
@idle owl If that's the case, then... I'm contrinbuting a lot!!. LOL, thanks that made me feel better.
You are contributing a lot!
My interest in MQTT is mostly in communicating with openHAB. I wonder if they have a RESTful interface that works just as well.
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?
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.
okay.... working on it
@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..
@idle owl all i'm finding is targx.bn2 files online, do you have a link? please
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?
https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads is where I got it from.
Download the GNU Embedded Toolchain for ARM, an open source suite of tools for C, C++ and Assembly programming for ARM Cortex-M and Cortex-R families.
i have unpacked it, it looks like it goes in /bin/sh but sh isn;t a directory
It's probably a shell script, that should be interpreted by /bin/sh (or /bin/bash)?
Also there were issues with one of the more recent toolchains...
crap, i uninstalled it trying to update. so: any suggestions?
I'm trying to remember what I did.
disable_concurrent_write_protection is listed as a new arg here for mount(), but it's not implemented. Did you mean to add it as with remount(), or is this a typo?
if FSUSER_CONCURRENT_WRITE_PROTECTED is set to true, then this will always be true. I don't think that's what you meant to do here. Maybe &&?
@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.
it was supported by brew
Also you may know which version is best for now, because I seem to remember issues with the most recent version.
and now it isn't
ya, it's stupid
So you have to download it from ARM right?
I still had the old version installed from brew. I haven't updated and I don't think travis has been updated either
Hmm ok.
ya, at this point I think you need to get it from arm
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
@marble hornet You could try this: https://gist.github.com/joegoggins/7763637
How I installed GCC ARM on my Mac 10.9 Mac Book Pro - install and add gcc arm to PATH.sh
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.
tried it compiling cp sin;t working
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
can you go into a little more detail ?
I think the correct directory is /usr/local/share, but get the correct version as dan says too.
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
True. I was going by the fact that homebrew stuck it in /usr/local/Caskroom, but it's fine either way.
@marble hornet is that still clear as mud? Have you modified your PATH before?
See the "Setting PATH in Shell Profile" on that page. This might be a bit clearer: https://www.cyberciti.biz/faq/appleosx-bash-unix-change-set-path-environment-variable/
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$ ```
we haven't brought the tinyusb code up to snuff for compiled on gcc8 yet, so use the gcc 7.3.1 release instead
Scroll down the page of the link I sent, @marble hornet
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)
Or click that link too
@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'
? i dont see q3
@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
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 🤦
ooh those alias seem really cool (havn;t tried still reading)
or say alias 'git submodule sync; git submodule upade --init --recursive'?
where is ~/.profile?
do ls -a and see what "dot" files you have. More likely it's .bash_profile? Have to fire up a MacBook to look
Yup, a bug. I thought I had fixed that but probably forgot to save.
where should i run that ?
~ = your home directory
so /?
I have Mac with a vanilla install. There is not any .bash_profile, so you can create one.
$ cd ~
your homedir is /Users/yourusername
I don't think so. True means the bit is set. This tests that the bit is 0 and short circuits the subsequent check when the concurrent bit is 0 aka off. (It is a bit confusing because the Python API is "disable" and its inverted internally in shared-module to "enable".)
== 0 was staring me in the face but I missed it :)
should i restart ?
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
Even more of a shortcut is to just type cd to go to your home directory.
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
You can also type source .bash_profile if you don’t want to restart the terminal.
my recent fav:
alias dmesg='dmesg -T'
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?
Yeah, that’s where I put mine
yep
@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
can you have an alias with an input?
the cheerlights issue you encountered, I havent' hit that yet, but i havent been running this library > an hour
@marble hornet no, but you can write a shell script that processes arguments
or write a shell function
and then alias that 😃
ahaha
@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.
alias submod='git submodule sync; git submodule update --init --recursivealis'
alias clone_cp='git clone https://github.com/adafruit/circuitpython; cd circuitpython; sudmod'
yay!
@prime flower will you want the PR approved and merged right away or do you want to wait until after your soak test
@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'
@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
(apologies for the text dump)
and mine
@marble hornet also, you can type alias to get a current list
thank you!
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
@solar whale Not sure if we decided on a final settings.py rename, but I could do that for now
also all the examples have to change to import settings from the new name
steals from Dan's aliases
do we want one setting.spy for all -- them maybe wifi_settings.py
consistently when in the repl
was going to do wifi_settings.py and include io API keys in there
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
Leave it in the root directory and it won't go into the examples bundle, if that's what you're referring to.
hmm - but it does not belong in /lib
do any of you have a pyp?
can you try some firmware on ur units?
@solar whale It shouldn't end up in /lib either.
@marble hornet Very few people have them.
@idle owl I guess I don't understand
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
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?
I thought the issue was that settings.py was an alias for boot.py
You could choose one library to host the wifi_settings.py and then get it from there in the bundle each time also.
@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
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.
good point - I'll clarify in the guide
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
They could all import wifi_settings.py as settings
or use any file name the user wants since it is in the users code
@solar whale yeah, I'll do wifi_settings for now, since it'll support both
eventually
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 ...
@solar whale example_file_name.py next time 😄
@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
ok
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.
try these two firmwares, I find the one without init does not have the problem
wout_init_firmware.uf2.zip
firmware.uf2.zip
@marble hornet that is what happens. I was the one making it complicated.
oh, so it will be moved to __init__ ?
TG, when commegnting on issues - please add more information so we know what you're doing and what the firmware you are posting does: what 'init code'? how did you verify 'it does not have the problem' during test? we cannot debug, read, or analyze uf2 files :)
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. :-)
ok thanks - next up, when you get safemode alerts what are they saying? do you have a screenshot? they have the reason for safemode
Your OS may be doing stuff on the drive in the background. If you see reload errors when usb isn't connected please reopen. Otherwise, this is as expected.
Ooops! I'm sorry @Tasm-Devil I'll fix that up.
psa: read the translation issue before starting a new one. lest ye go makin th' wrong things translated. 🤦