#circuitpython-dev
1 messages Β· Page 284 of 1
hey @raven canopy it looks like the most recent adabot CP libraries report is saying that these two libs haven't been released in quite a while when the both have been released in the last month or week:
https://github.com/adafruit/Adafruit_CircuitPython_BNO055 (334 days)
https://github.com/adafruit/Adafruit_CircuitPython_PyPortal (258 days)
Can you take a look?
despite my own nay-saying I put together an aws lambda for mpy-compiling. I will take it down if there are problems or abuse. https://q41mecz5na.execute-api.us-east-2.amazonaws.com/mpy-cross @tough flax
it uses mpy-cross.static and https://gist.github.com/98dab44c9b21d7a8a759a73686117a3d
in case of errors it seems to just say "internal server error", too bad π
@pastel panther there seem to be some issues with the GitHub API releases endpoint, recently. adabot's daily report has also had issues. if you look at the websites own compare link, it show older commits as occurring after the last release.
eew
hehe
did you check if there's any bugs filed about it?
i imagine the backend on both of their API services is a spaghetti nightmare. i checked the status and blogs friday night. nothing...
gotta run real quick. hmu if anything comes up.
@pastel panther I'm writing a Zephyr guide and wanted to make sure I was following convention
@ionic elk what are the different options you're considering?
Zephyr has a lot of pip installs and the official startup guide recommends virtualenv. I just wanted to make sure there wasn't something out there saying use Conda.
then I guess there's pipenv? Don't know much about that one
eeew conda no
@raven canopy, @pastel panther and I were having issues getting circuitpython_libraries.py to run. I imagine this has to do with the issues you were talking about earlier, but we figured we should let you know anyway. I got a Type Error about string indices needing to be integers, then both Siddacious and I got a Runtime Error which was related to a broken connection. Siddacious was getting a Value Error, which I never got. After I stopped getting the Runtime Error, it went back to the Type Error.
I mean I'm sure it works but it seems like overkill
@ionic elk as far as I know anaconda isn't suggested anywhere in guides except for when using Jupyter notebooks
I've used virtualenv before, but I'm not really a python person so I don't have a particular stake. I hear pipenv is newer and/or better?
not sure myself. I bet @ivory yew would have some good insights
@pastel panther thanks for insight anyhow - will stick to virtualenv unless told otherwise.
solid choice
If you're already comfortable with virtualenv just stick with that.
Oh if you're writing guides yeah def stick with virtualenv.
@trim elm yep. kattni and i discussed that on Friday. the releases endpoint was returning the following, which obviously isn't the JSON the script is hoping for. at minimum, the error could be handled better...
{
"message": "Server Error"
}
Ah, ok
@onyx hinge Nice work on the mpycross service! I can report success using Firefox on Linux Mint and a Circuit Playground Express with 5.0.something. Not that I had any doubts. π
@wind trellis thanks for your report!
.. the documentation doesn't make this clear, but in practice it works to write both of the DATABUF registers at the same time. This should also reduce the amount of wear and tear DMA puts on the system, as the number of transfers is cut in half. (the number of bytes transferred remains the same, though)
In principle, this could cover all stereo cases if audio_dma_convert_signed also learned to 16-bit extend and swap values. However, this is the case that matters for stereo mp3 playback...
@onyx hinge just ran the mpy-cross from MacOS (catalina) Safari -- seems to work well -- I did not execute the .mpy, but "what could go wrong..."
@solar whale hee hee!
Hi folks, a quick announcement: the latest bug-fix stable release of Mu (1.0.3) is here: https://madewith.mu/mu/releases/2020/01/26/mu-1-0-3.html (fixes the rendering bug in OSX Catalina). Sorry it's taken so long, but this is a volunteer effort and it's taken all day to test, prepare and package the release (in addition to the fixes applied over the past month).
Sorry for the delay (very busy at work) .
Thank you @makermelissa for making the initial page.
Please report any problems you may encounter. Thanks. π
@ionic elk hihi
testing meobit
works great
here's a nice demo printing i2csensor data
meowbit sensor
tested by creating display and printing out sensor data - works great, very stable!
comin soon! puttin in for video
Images automagically compressed by Calibre's image-actions β¨
Compression reduced images by 43.9%, saving 7.55 MB
| Filename | Before | After | Improvement |
|---|---|---|---|
assets/images/boards/large/binho_nova.jpg |
272.07 KB | 67.65 KB | -75.1% |
assets/images/boards/large/clue_nrf52840_express.jpg |
382.51 KB | 102.74 KB | -73.1% |
assets/images/boards/large/feather_mimxrt1011.jpg |
7... |
Hey yβall! A question: before I go about potentially reinventing the wheel, Iβm wondering if thereβs currently a CircuitPython library for reading directly from a SPI flash chip. Like not even file system stuff, but rather just reading data from a given address
@fiery silo yeah
i think so
well, there's at least https://github.com/adafruit/Adafruit_CircuitPython_FRAM
you could start that
Awesome, thanks! Iβll take a look
@meager fog thanks for testing! taking a quick CPy break to bang out that Zephyr tutorial BTW
we now have 2 boards that have meow in them: https://circuitpython.org/board/kittenbot_meowbit/
<@&356864093652516868> Here is the notes doc for tomorrow's CircuitPython Weekly. Everyone is encouraged to attend! Please add your hug reports and status updates, even if you'll need attending. It's really helpful! Looking forward to seeing you all tomorrow! Check the pinned messages for this link if you miss this message. https://docs.google.com/document/d/1FqFlX9sNJzdI8y41KqMu7kV0GPW8o7mzWxOoowAwOqA/edit?usp=sharing
now works with slideshow n friends :)
lgtm (but can't merge as actions isn't complete yet)
thanks ya i tested it on a clue :)
https://twitter.com/adafruit/status/1221611527821840384
Thanks a lot for Mu Release @plucky flint π
@obsidian compass no problem. Please let me know if there are any problems.
Hey @makermelissa,
I have done the changes as you requested, sorry for the delay on it.
@timber mango Discord renders Markdown. if a:
use backticks.
One on each side for inline code, three on each side for a codeblock
@lone axle Are you around?
@idle owl I am
@lone axle You're foamyguy on GitHub as well, correct? Same avatar as here?
Yep, that is correct
Alright, I sent you an invite to join our review team.
And I'd like to discuss what that means.
@lone axle This means you have edit/write access to all of the CircuitPython library repositories, which means you have merge access. Under no circumstances should you merge your own PRs. As for merging others, until you're comfortable with it, you can still involve me in verifying that a PR is ready to go, but eventually, you'll get to a point where you're comfortable with it and you can begin merging without a second set of eyes on something. Please be aware that you can now make changes to these repos, so pay attention to what you're clicking on, as the safety net of read-only is now gone. π
This should also mean you that "Edit" link should be available to you now to edit the open PR we were discussing.
Okay, yes I will definitely continue to involve you for now until I get a bit more comfortable with it. The great responsibility along with this great power is noted. I will be very careful with github buttons.
I'm suggesting that based on personal experience π I've clicked merge when I didn't mean to before. It's version control, so it's always fixable, but annoying when needed.
For sure π I will get the one we discussed previously edited later on today. Thank you
Thanks so much for everything you're doing! I really appreciate it. Let me know if you have questions when you get to editing, the GitHub GUI is pretty straight forward, but it's not local editing, so it can still be odd.
Will do.
@idle owl Thanks.
@gilded cradle Good morning. Did you get my email re: changes to my PR?
@pastel panther I just re-looked at the BNO055 release thing. It's not API related. The last PR merged was just an old one. The infrastructure check is using the commit dates, so that's why it shows that it hasn't been released in so long.
@raven canopy ah! good to know, thanks
@gilded cradle Please let me know when you're around this morning. Thanks!
@idle owl also, to follow up: it appears that the core repo might be the only one experiencing release API problems. All my other random tests work...
@lone axle hey I see you are taking on a bigger role in reviewing. thank you!
Because the lib report is failing consistently now. The data for the meeting is old.
Yeah. I should've given it more attention this weekend. It's my priority this evening.
My Python on Hardware poster for PyCon US 2020 has been selected π 
Thank You! @idle owl
this is why "status meetings" work. forces us to verify information before presenting. π
@raven canopy Do you happen to have lib/Blinka data that's more recent from your tests? Not sure what you were testing.
No. I was just calling the endpoints in chrome, with different repos.
If my cell signal would cooperate, I could probably get a useable one...
Cooperative cell signals are a myth.
I depend on my cell for internet, so my signal better cooperate.
@onyx hinge I'm happy to help out where I can π Thank you.
hi these commits seem to be malformed?
https://circuitpython.org/blinka

I'll check them out and submit a pr.
Found missing quote mark in one and other referred to jpg instead of png.
@gilded cradle I believe I have it now. PyLint likes me. π
Yeah, I'm re-reviewing it now π
I am looking for a list of board that have both MicroPython and CircuitPython.
I am thinking about the following (1) Meowbit (2) Pyboard.
Do you see any other board?
@half sedge, I believe the Feather STM32F405 Express does as well
@half sedge Very early MIcroPython samd port done 6 months ago, missing many peripherals: https://github.com/micropython/micropython/tree/master/ports/samd/boards
Also overlap on nRF52840 boards: https://github.com/micropython/micropython/tree/master/ports/nrf/boards
pca10056, pca10059, particle xenon. (Feather52 is nRF52832: we no longer support). It would be easy (but not done) to port MicroPython to the various other Adafruit nRF52840 boards
@lone axle After today's meeting, let's discuss getting you some hardware for testing.
@tulip sleet Until now. I thought porting the full Micropython to other boards would be a good thing. Now, I am not so sure. The only feature I think would be useful that Circuitpython does not already have is interrupts.
@timber mango PyLint is a harsh but fair arbiter
@pastel panther Indeed, she is. I will get better as I get tuned into what she wants. π
Negative scores are barely fair. π
π
Negative scores are a badge of honor!
indeed
Collect em all!
anyone ever got a NaN?
someone needs to make a t-shirt referencing PyLint scores
@tidal kiln no, that would be an achievement worthy of adulation
We definitely made pylint crash several times when I was working on the google client libraries.
@pastel panther "PyLint is a harsh mistress"
<@&356864093652516868> Weekly meeting is in just under an hour. Everyone is encouraged to attend! Please add your hug reports and status updates to the notes doc even if you'll be attending - it's super helpful. thanks! Looking forward to talking to you soon. https://docs.google.com/document/d/1FqFlX9sNJzdI8y41KqMu7kV0GPW8o7mzWxOoowAwOqA/edit?usp=sharing
feeding pylint generated code like
nope
nor can I:
@timber mango yes, that was the reference, though personally I find the "harsh mistress" trope a bit tired
With a Google hiccup, you can try the usual methods of treating it: gargling water, holding your breath, or even scaring it...
sneaks up on Google....then screams... AWS!
DEVALUATION!
just checked -- nope didn't work.
I want my money back -- oh wait, it's free....
@idle owl broke google...
Yeah I see that.
I can't even create a new doc.
We'll figure something out.
Came up for me.
Back up for me too
I have it also.
@ionic elk @pastel panther @solar whale Appears to be back up.
@idle owl sounds good, I'll be around.
Ups, my bad. Reference a jpg instead of a png. I have opened a PR fixing the issue.
Sorry for the inconveniences.
Text only today.
Lurking today for myself.
hope I don't have hiccoughs all through the meeting
Run pylint -- that'll scare them away π
I will have construction through the meeting, so... Might as well cough. π
just voice chatting with @half sedge and I think it wouldn't hurt to mention the meeting time in UTC. except that we americans will get it wrong because UTC is practically metric
UTC? Is that band? π€ͺ
A French Band
Discord needs a local and universal time zone markup code.
@onyx hinge Hopefully if every Monday it is the same time, then I can remember. But sure for newcomer it is a calculation to do. Maybe a PyBoard count down for next meeting (I believe there was a learn guide for that already).
... or a Discord bot-based converter.
I think UTC is a fine idea for all time references -- most of my computers are set to UTC.
@half sedge the day of the week varies sometimes due to US holidays, but the time of day has been consistent. However, we switch summer/winter time at different dates than Europe does, which can also trip things up
@onyx hinge EU is supposed to stop that summer/winter time within a year (or two?).
Interesting -- many states in the US are discussing it too. Timekeeping is a fascinating topic, and timekeeping to serve people even more so
reminds me of a favorite saying time flies like the wind .... fruit flies like bananas
Google is your friend for figuring out time zones.
hmm I had not considered that having a kmk (circuitpython) keyboard would disrupt my normal workflow for developing circuitpython code, since it takes over the CIRCUITPY mount point
@onyx hinge Rename it?
@idle owl hmmm that's a good idea, I think I know how to do that
@onyx hinge Right now, it is undecided if we will go for summer time or winter time. The only time offset EU citizen need to know is GMT (UK/Portugal) and CET (everywhere else).
@onyx hinge It maintains the name unless it gets corrupted.
lurking
yay that works, now it mounts as KEEB
thanks @idle owl I wouldn't have thought of that. just meekly accepted my fate
You're welcome π
We're finishing up an internal meeting, we'll be there soon for the weekly.
Leap year is also a time issue. My calendar gets messy every 100 and 400 years.
Is that UTC soon or EST soon ?
Lurking
Please let us know in the chat if you're lurking. Thanks
Happily lurking π
I'm just lurking
Lurking
lurk-o-rama
I noticed the RTC module in either the m4 or the nrf52, I forget which one, doesn't implement the divisible-by-100 rule of leap years
Brb.
lurking
Lurking today
Since 2000 was an exception -- no one cared....
Text only, no mic.
another 400 years to correct the algoritms
Is there audio now?
Loud and clear @idle owl
actually 2100 will be the next test case....
@solar whale I don't think I'll be working on those bugs
UTC leap seconds are concerning, too. They are added non-algorithmically.
wow, the list doesn't fit on my screen
trying out this new emoji i just added 
Dope 
looks like Lisa Simpsons hair....
this is
ing up to be a great meeting
Forever!
@onyx hinge - that works great!
also added 
Open Hardware Summit prototypes! 
https://twitter.com/QwertyEmbedded/status/1220097577015603200
Speaking of... 2020 Open Hardware Summit #ohsummit20 topic on Adafruitβs Discord AND logos/art for the event with CircuitPython

https://2020.oshwa.org
https://discord.gg/8RVyqnk
https://www.dropbox.com/sh/8v0h6uariv04osr/AABHJ1wnEu0TOQ_mk0SivOtAa?dl=0
Mu version 1.0.3, 1.0.3 is a bug-fix release with no new features 
https://madewith.mu/mu/releases/2020/01/26/mu-1-0-3.html
Speaking of... Sponsor Nicholas Tollervey on GitHub Sponsors 
https://github.com/sponsors/ntoll
CircuitPython in HackSpace Magazine: Serpente 10 out of 10, and more... Three ways to blink an LED: Use CircuitPython to handle intermittent tasks by Ben Everard page 74 and 75.
https://www.tindie.com/products/arturo182/serpente-a-tiny-circuitpython-prototyping-board/
https://hackspace.raspberrypi.org/issues/27
Lurking
π
Winners of the Take Flight with Feather contest!
The Open Book Feather - An open hardware reading device and more!
https://hackaday.com/2020/01/22/winners-of-the-take-flight-with-feather-contest/
https://youtu.be/iJqkwLt4Bik?t=54
CircuitPython + Open Book progress is here: https://twitter.com/josecastillo/status/1221622996353331202
Itβs hard to beat the fidelity and durability of printed text on paper. But the e-paper display gets pretty close, and if you couple it will great design and dependable features, you might juβ¦
To show and share your project at 7:30pm today, view the chat or in discord https://adafru.it/discord and look for the JOIN link to join.
For best results be on a wired connection and have a headset and mic!
I like that discord has one account that is shared across servers
All a board! New boards on CircuitPython.org
Some of the latest boards to appear on circuitpython.org/downloads. The total is now 103+ boards!
https://circuitpython.org/board/aramcon_badge_2019/
https://circuitpython.org/board/kittenbot_meowbit/
nRF52840-Based Smart Badge with Bluetooth, Thread Mesh Network, 2.9β ePaper Display, Neopixels, built-in MP3 Sound decoder and more!Features: Nordic nRF52840 Cortex M4 Module(E73-2G4M08S1C) 2.9 inch e-paper glass display(GDEW029T5) IΒ²C Accelerometer(LIS2DH12) 16MBit Se...
These stats always make me nervous...
Speaking of... CircuitPython goes purrrfect with Meowbit
https://youtu.be/YFTbBri0rpc
We're getting close to adding support for a new STM32F4 board to CircuitPython. This is the KittenBot Meowbit, its microbit-like at the bottom but has a display and d-pad for Microsoft Arcade games. And now it even works with CircuitPython! Stay tuned for when the PR is merge...
That make 3 Meow...
Grade 11 CS final project, Astroids clone, made with CircuitPython
https://ics3u-asteroids-davin.readthedocs.io/en/latest/
https://youtu.be/gHuDd-Jwamo
"Plug and Play Python (PnPP) on hardware IoT under 5 mins" ... "took less than 2 minutes and 40 lines of code!"
https://twitter.com/iAyanPahwa/status/1220810606862712833
π
CLUE works with Bright Wearables
https://youtu.be/dx3qUkAB1ok
Bright Wearables bags and backpacks contain a colorful circle of light that you control with code, works with micro:bit, and we wanted to make sure it worked with the upcoming board, CLUE.
One cool thing with CLUE is kids could drag and drop any image they want, like a Power...
@obsidian compass we don't have any google summer of code plans. We end up mentoring folks in our community as the opportunity arises rather than participating in a formal program.
All this and more in the DRAFT, please make an issue/PR for any updates, goes out 11am ET tues via adafruitdaily.com
https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2020-01-28-draft.md
Thanks PT
If you are not subscribed to the newsletter, go to www.adafruitdaily.com and sign up - they go out Tuesday mornings.
negative 2 issues not assigned a milestone?
@idle owl I am interested in starting to look at PRs for libraries. Does that have a list of all libraries with PRs?
@timber mango this page has a list of the currently open ones: https://circuitpython.org/contributing
@lone axle Thank you.
late, but lurking/text only
Low audio.
Lurking for hug reports
π
I have a hug report
Is audio gone? I do not hear anything.
@timber mango I have audio
try restarting
@obsidian compass would you like to be in circuitpythonista's? that way you'll get pinged with meeting info
@slender iron sure
cool, done!
Restarting worked.
@onyx hinge mute please
@obsidian compass I apologize for skipping over you, I was going off the notes doc and should have been looking at the list in the voice channel as well
unless you are running status updates π
@onyx hinge no worries, I shall add to notes as well π
Thanks @obsidian compass, I missed typing one of your hug reports
Did I miss my turn? Had a day-job issue
your hug was read off
Great - thank you!
@gilded cradle added in the doc π
π
dream big, and nibble some things off the infinite list
Dark Magic π
I can't tell you how many of those "would be nice" items on the infinite to-do list have had the most impact. I wonder how I've gotten by without them.
@tough flax the gaming folks are in pittsburgh right? that is where pycon is the next two years
@slender iron - AbleGamers (who we're releasing w/this week) has a presence in Pittsburgh
Yes, we should plan to play there
(Technically they're in West Virginia, but Steve Spohn is in Pitt)
ah neat. super happy you are doing stuff together
Very cool stuff releasing this week - save room on the blog π
That's pretty cool @obsidian compass
@slender iron I would like to talk to you about the keyboad.
we always have room for it π
@inland tusk nice! sounds like you are getting ahead of me on the project
Thanks @gilded cradle , it's really cool, fun and easy π
Excellent to hear
Need to rush, thanks everyone π
Circuitpython reminds me of a steam roller, the way it has taken off, along with the Feather ecosystem. Awesome stuff, Adafruit!!
Re: BeagleBone Green https://github.com/adafruit/Adafruit_Python_PlatformDetect/pull/60
yay! both good things
Frustratingly Fun. I'm in the same space, @solar whale!
My Funometer and Frustometer generally track each other.
The frustrations make finally getting it working feel like more of an accomplishment.
@onyx hinge audio is very low.
@gilded cradle I closed this PR as my BBG conflicts with it
https://github.com/adafruit/Adafruit_Blinka/pull/201
I need to open a new one once I refactor how to add support for PWM on the BeagleBone Black
I need to modfiy src/adafruit_blinka/microcontroller/am335x/sysfs_pwmout.py so that it uses these deterministic /dev/pwm entries in order for there the correct mapping between the P8/P9 pin and the corresponding peripheral.
@wraith tiger The intensity of the buzz I feel when getting a really difficult problem solved is much higher.
@timber mango I'll work on it after the meeting
It would be great to be able to compile from .py to .mpy on CircuitPython M4 hardware. Even if it does not solve your problem.
I have to step away for a few minutes
Gotta drop - was staying for that @onyx hinge note - but I have a stupid health insurance meeting for my employees (the horror!)
Out of curiosity, why is circuit python voice flooded?
@gilded cradle i've created this if you can assign to me https://github.com/adafruit/Adafruit_Blinka/issues/240
@median ledge we have a weekly meeting every monday
ah
you are welcome to listen in π
Meeting notes are available here: https://github.com/adafruit/adafruit-circuitpython-weekly-meeting/blob/master/2020/2020-01-21.md
Join here for the chat all week: http://adafru.it/discord
The weekly happens normally at 2pm ET/11am PT on Mondays except when US holidays occu...
those are the recordings
We have many outside guide authors. We have not contracted them for extended support so Adafruit does the best they can
eek that's not a happy cat
neat
when I used to work at boeing, the machining floor also had monday meetings to give an outline for the week, works pretty well
We had "Tier X Meetings" Tier 1 was something that could be done by the worker bees, Tier 2 needed a management decision, Tier 3 was Deprtment level, and so on.
cool
time to admit it's a 90 minute meeting
Thanks for another awesome meeting, catch y'all next time!
Thanks everyone!
Great meeting folks. I never did find the Notes doc though
Notes should be sorted by time now. I have one timestamp missing (search FIXME). @idle owl
@serene warren Click the "pushpin" icon at the top for a pinned messsage with a link to the doc
π
π
π
π
Thanks @tulip sleet , I'm always leary of pushing buttons
@half sedge Thanks!
π
Thanks
π
@slender iron I hav a q re remote service characteristics when you are back
I brought DeviceInfoService up to date (mostly adding a service kwd arg, but when it binds to the remote service it attempts to match all its characteristics with the remote, and some are missing, and it throws an exception
trying to decide what the right thing to do here is
@slender iron @tulip sleet perhaps we could consider a small C interrupt handler to capture RFM9x/69 packets - the maximum packet size is ~250 bytes --- I'll think about this more and make a specific request/proposal if it seems like a reasonable way to go. The code to handle them would not be very much since the "ACK" packet is a fixed response. Something to consider....
@solar whale I'm open to that.
@solar whale I wonder if this could be generalized into a "do this SPI transaction on interrupt"? Might be useful for other devices as well. If the transaction doesn't need to change based on something, yes, if it's dependent in some way, then no.
@tulip sleet back now
so I think the DIS on the HRM does not have all the characteristics
Thanks -- I'll think about it and get back to you.
def _ensure_bound(self, service, initial_value=None):
"""Binds the characteristic to the local Service or remote Characteristic object given."""
if self.field_name in service.bleio_characteristics:
return
if service.remote:
for characteristic in service.bleio_service.characteristics:
if characteristic.uuid == self.uuid.bleio_uuid:
bleio_characteristic = characteristic
break
else:
raise AttributeError("Characteristic not available on remote service")
else:
bleio_characteristic = self.__bind_locally(service, initial_value)
service.bleio_characteristics[self.field_name] = bleio_characteristic
@tulip sleet shouldn't that cause the attribute error when the service's characteristic is first accessed by user code?
oh, wait, you're right. I was looking at the wrong line in my user code. I thought it was the conn[SomeService] line, but it's not. I was working on this during the 1pm meeting.
ok, nvr mind
sri
@half sedge The missing time code was earlier in alphabetical order - that person's hug report was in two places. One time coded, one not.
@lone axle and anyone else interested in contributing on PRs: please make a comment on a PR if you are going to be testing it. Having multiple people testing the same PR is great, but it's also great if there are other PRs that someone could test that we get more PRs reviewed as well. So make a note when you begin testing, but feel free to test the same PR as someone else as well if that's the one you're interested in/able to test.
Will do.
hmmmm if there are both .py and .mpy, it seems .py is preferred
(at the same directory level)
Yes
@arturo182 Mind if I merge this? I know it's not perfect but I'd like to get it in so it doesn't grow stale. I'll happily follow up with changes to work with the bootloader and other fixes.
I guess it's fine, even though I haven't had time to test it yet. The Adafruit Feather boards were delayed a week, so I will test this when I'm bringing them up later.
Just a few things. Thanks for getting this going!
Please rename spi so that it's clearer what it is. The name was fine when it was private but now it's not. Maybe supervisor_flash_spi_bus?
Does this break the PWMOut API? I was thinking that Display would take a kwarg to invert brightness rather than changing PWMOut at all.
Does this file have a license? It looks like it is copied from somewhere.
Ok, thanks! Let me know what needs to be fixed. I'll try to get a feather from @ladyada when she has some.
- Fix return value for
PacketBuffer.packet_size - Fix some documentation issues. It doesn't seem possible to use backticks in function signatures: they get included literally in the signature. If you know how to fix this let me know.
Correct me if I'm wrong, but doesn't this make the header and trailer fixed at PixelBuf construction? While this is fine for Dotstar, what if some other protocol needs to manipulate the header or trailer? (Not that this is necessarily a bad thing).
If this has no unexpected side effects this is a nice little cleanup!
While we're abstracting things, perhaps we should move this kind of initialization to another function or method. It's always bothered me that the base PixelBuf has to know the details of DotStar, rather than having a subclass or implementation that provides this.
Looks great! Thanks for testing this and improving it.
Thanks for the fixes! I don't know how the ticks work. Feel free to merge after the CI is happy.
Can we close this for now? Should we have an issue for it instead? It could link to this branch.
will get back to this at some point, but not right now. when I do, it'll need to be pretty completely re-worked, so I'll open a fresh PR.
Let's close this one up too. It needs to be heavily reworked with #2552 in, as outlined in my comments there.
@raven canopy Apparently Adabot is including archived, read-only repos in the list of libs that have commits since last release. I think we've only very recently had any read-only CircuitPython libraries, so this is a new situation.
I'll file an issue but I assume we need to add something to have it ignore archived repos.
was supposed to exclude archived repos... but, i'll verify. π
oh. wait. circuitpython.org's adabot submodule does still need to be updated. so if that's where you're seeing it, that's why.
PR imminent
Thanks!
Excludes archived repos from results for contributing, via adabot PR 126.
Thanks for updating this!
@raven canopy Missed that your comment was half question there. Yes that's where I was seeing it.
hehe. all good.
@idle owl are you around still? I'm about to work on editing the file for that PR we were discussing previously.
I expect side effects so they won't be unexpected. :-) We can hunt them down as they come up.
It does fix it. We can deal with other protocols when we find one that needs it.
@lone axle For a bit yes. Dinner will happen eventually.
Ya, I agree this is weird. I don't really want to tackle it now though. My main concern was the buffer management.
@idle owl Okay, I think I'm all set now. I went to the file, clicked edit. I've made my changes and now I have a box at the bottom to type a commit message and button labeled "Commit Changes"
There should be an option to "create a branch and start a PR" or some such
Okay, yep I see that one
Do that.
Yup, in fact I need to add this. Otherwise we'll always allocate it because the constructor calls it. Will do now. :-)
Should create a "patch" branch and try to merge it to the PR
I pushed the green button at the bottom and thought for a second then took me to github 404 page =x
Tried once more just incase it was a weird github fluke but same results
So you clicked "Propose file change" ?
and it 404'd?
Hey!
It did for me too.
that's new and fun.
yep.... uh oh
Hmph.
I guess make a comment on the PR that you have the fixes for it but GitHub is acting up.
I tried on another repo, and same thing.
Caught it in the inspector the second time around I can see that the POST to change the file is getting back the 404 response. But not much else in the way of helpful info unfortunately.
Ok, will do.
Actually, try one more thing for me:
Add your changes and commit directly, since you said you had access.
Don't create a PR
it will run the CI testing on your changes if you commit directly to a PR
so it's not ideal, but it doesn't mess with anything
Ok, leave the radio button on " Commit directly to the master branch." then for this one right?
Yes. Click the button.
We'll see if the GitHub GUI is entirely broken, or if it's only the PR creation
done. It seems to have worked that time.
Alright! It worked.
So now we let the CI run and see where we're at.
once it passes, I'll tag Scott again because he reviewed it last.
Thank you!
Yep your welcome, thanks for the help working through it.
Alright, there's some pylint errors. Which is how it goes π
probably need to add the attributes to __init__ and define them as something, possibly None. But you'll want to test that it doesn't break anything.
Do you see how to get to the Pylint errors?
Presumably yes since you've fixed some already.
Yep, found it
Under normal circumstances I would have you setup Pylint locally if you haven't already, but now we're working in the GitHub GUI unfortunately, so it means letting the CI do its thing.
Make your changes the same way and commit them to master the same way.
Okay, I can clean those up
Ok, this is updated. I confirmed with gc.mem_frees and a large number of pixels that the allocation happens once brightness is set to something besides 1.0.
Hmm, although two of them are referencing self.x and self.y. I didn't create those, they would have come from the Group superclass I think?
hmm.
They're called x-self and y-self in the property
and in the setter, x and y . Is that right?
_anchor_point I did create, and I do have it defined in init. Perhaps I'm not understanding what the pylint error means.
No, I think you're understanding it properly.
ah, yes you are right x-self
But I'm wondering if it's not quite right.
Actually pylint shows the errors on lines 199 and 200, which don't use the x-self and y-self
Right.
Oh, I understand the issue with _anchor_point actually. When I copied over my code I put in all 4 methods but not that line from the init function
π It happens
The x, and y ones I'm not sure what to do about though
Does it work as is?
I can try setting self.x and self.y to 0 in the init but I don't quite understand all of the displayio / group system, not sure if thati s going to cause trouble
As far as I can tell it is working (once I put the line back in the init function)
Alright, add the line back to init. Beyond that, this is a case where pinging someone who is more familiar with displayio might make sense. I would suggest pinging Scott or Carter on that PR to ask for feedback.
@tannewt or @caternuson on GitHub.
To find out whether it's ok to simply initialise x and y, or if something else should be happening there.
Okay I've got that line added back in. It is now the same as my local copy is working for me. I'll go ahead and add a comment with the test code that I used as well.
Sounds great!
To build on what Paul is saying, our MakeFile isn't able to even read .o file, so I'm sure we're just doing something wrong in converting our C++ code into a library that the C can read. Do you have any recommendations on creating a static .o file out of C++ code that can be integrated into CircuitPython?
@lone axle Once you're done with that, let me know and we'll go over what other PRs you want to test that you need hardware for.
Or it might have to wait. Dinner prep is starting.
@lone axle I may be back later, or we'll go over it tomorrow. I'll ping you later if I make it back. Otherwise, I'll ping you tomorrow and let you know when I'm around.
Can you add some extra rules to the global Makefiles so that you can compile the .cpp file(s) with g++ and produce a .o as is already done with .c? You;ll need to provide C-style linkage to the symbols you need in the C++ code.
@idle owl ok sounds good.
I am still having a HUGE problem between Circuitpython (5.0.0 beta.4) and the Arduino 1.8.10 IDE. I do not know whether this is a problem with the IDE or Circuitpython or something else.
This message appears after the device is reset after programming.
@timber mango what shows that warning?
the BOOT drive disappears after the device is programmed and is reset
I think it is something from Circuitpython.
circuitpython can't show a warning on your desktop
It is like it is catching the reset and wanting to go to bootloader mode.
I do not know where the message is coming from then.
so you're flashing an Arduino program to a board, after it previously had CircuitPython firmware flashed onto it?
sometimes computers complain about the boot drive disappearing. it's not a problem because the bootloader knows when it is safe to reset
@raven canopy Yes, a Feather M0 Express.
I can only get very small Arduino programs to run.
It does seem to be a problem in my case though. I have tried after a fresh reboot of my computer.
have you tried programming it in the normal mode (not "FEATHERBOOT")?
the ide can trigger the bootloader
It seems to be triggering the UF2 bootloader.
I do not know though.
What would trigger Linux to show that FEATHERBOOT message?
@timber mango when you plug in another drive like a flash drive or external hard drive, does it automatically open up a window showing you the files?
It does that when I plug in a Circuitpython device or any device that can be mass storage.
I think that is the culprit. The board is going into bootloader mode for a few seconds while the IDE writes your program to it, then switching back to non bootloader.
Your OS sees the bootloader drive exist for a second and tries to open up that window for you. But by the time it's ready to show you the files the drive is gone already because it has switched back to normal mode
Possibly. The delay is enough to upset running the Arduino program.
I would probably try to disable the auto launching window of plugged in drives all together or at least on the bootloader drives if you can choose them by name or something
If I could do that, and I do not think I can except maybe globally, I would probably have to manually mount my Circuitpython drives. If that could work it would potentially mess other things up too. Is this what you are referring to (disable automount for everything)?
Ideally not disabling the automount, just the UI window that pops up trying to show you the files
I am pretty sure I do not have that kind of control.
What kind of Linux / UI are you using?
Raspbian Buster on a Raspberry Pi 4.
Everything used to work, but not anymore since I plugged a Circuitpython device in at the same time as a device I use Arduino with.
@timber mango I don't think it has to do with circuitpython. Its the new UF2 bootloader which shows up as a storage device. The previous bootloader was serial only
I think this thread might be talking about a setting that should be relavent: https://www.raspberrypi.org/forums/viewtopic.php?t=159739
a few posts down someone talks about disabling "Show available options for removable media when they are inserted "
it's a few years old so the name could have changed or where to find it perhaps. But I bet there is setting like that around somewhere still. If you can find it I think it would stop the pop-up about failing to find the drive from showing. However as you noted it would affect all USB storage, so you'd always have to explicitly open the filemanager when you want to look at files on a USB device.
@slender iron i also noticed on sunday they deployed a new interface
@lone axle I am two versions later in my Raspbian and I do not see any of those options in my GUI. I do not use the standard Raspbian GUI.
I am going to have to google around and see what program might do that for me,
On macOS Mojave and Feather M4 Express with CircuitPython (something between beta 3 and 4) when I download a file the main gets loaded twice.
Hi, I made this to promote my talk at Fosdem'20: https://twitter.com/DavidGlaude/status/1221954266887270402?s=19
Could it be used to put in the newsletter of tomorrow?
This Sunday 2nd February 12H30 in Brussels at #FOSDEM an introduction to IoT with #CircuitPython.
Countdown on a PyPortal running CircuitPython.
Hint: additional reasons to come are visible in the picture...
https://t.co/xHN61xzGWp
I was able to turn off automount for all disks, but that did not have any effect on the FEATHERBOOT message. π« I need to give up on this for tonight as my funometer is not high enough.
That FEATHERBOOT message must be classified as an error.
We are trying to modify the ports/atmel-samd MakeFile to include the new object file:
LDFLAGS = $(CFLAGS) -nostartfiles -fshort-enums -Wl,-nostdlib -Wl,-T,$(GENERATED_LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs LIBS := -lgcc -lc -ldetumble LDFLAGS += -L/Volumes/CircuitPython/circuitpython/ports/atmel-samd
where the new LDFLAG is the directory of where we have put the the new object file (.o) that we are generating elsewhere, but this is giving us the error:
...
To add a .o file, you could just add
OBJ += something.o
You can find the other additions to OBJ in the Makefile.
But, a C++ object file may need libstdc++ or other libraries. And, if that .o may need to have been compiled with other switches that define how subroutine linkage is done, etc. So supplying a .o without knowing how it was built is not necessarily going to succeed. That is why I'm suggesting compiling the C++ code with the same flags, not separate...
Does CircuitPython have SBUS support?
This PR adds support for Particle Ethernet FeatherWing based on WIZnet W5500 chip for Particle Argon/Boron/Xenon.
Usage:
import board
import busio
import wiznet
spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO)
eth = wiznet.WIZNET5K(spi, board.D5, board.D3)
# For some reason DHCP doesn't seem to work in my case
eth.ifconfig(('192.16...
I think a chip would be required.
I don't know too much about it except that in RC control it sends 8 PWM signals on one connector.
It seems that FrSky X8R and XM+ are a popular choice
What is Sbus? I suspect it's not the one I'm thinking of
CircuitPython - The easiest way to program microcontrollers
https://circuitpython.org/
https://youtu.be/40gZBLdDSZA
CircuitPython is a programming language designed to simplify experimenting and learning to code on low-cost microcontroller boards!
Check it out on https://circuitpython.org
Here you can see the best boards that you can use to make projects. The download page now has over a...
So learn guide exists on 1 board out of all(see: https://circuitpython.org/board/circuitplayground_express/). The other way of creating the learn guide is adding a section to the right side of the page(ref: file. look at the right hand side). Which way should I go about to add the learn guide across all board? I feel the first one, that is already there for Circuit playground express board on the website will work better in terms of quick readability, fast access(without the viewer having...
Wow, new contributors coming in! Some of em are attendees from CP day we celebrated in Delhi last year π
Great to see them creating issues
@timber mango That message is really nothing to worry about, though it's a nuisance. I'll try to reproduce it. For what it's worth, I don't see that on Ubuntu 18.04 running cinnamon desktop. It may have to do with the file manager that you are using on Raspbian. Are you using the standard Raspbiran desktop or something else?
@rasponicc thanks for taking this up. I would like to see the approach in the screenshot having a dedicated button attracts the eye and visitor will not have to skim through a lot of texts where eyes often get lost. Also you may try both? Hyperlinking under Tutorials tab and making a dedicated session as can be seen in the screenshot, also I was thinking of hyperlinking the main board cover photo with the learn guide. We can have all three maybe!
The tutorials tab (on the left) may in futu...
It's from Micropython - it doesn't have anything, as per the linker files. Do you want me to put one in there?
Nope, I wasn't complete enough in my original testing of PWMOut - ST counts pulses as logic lows, so this change actually brings all of PWMOut in line with the rest of circuitpython. I was used to the open drain system and didn't notice the API specified it was the proportion logic high.
Still might be a good idea to add that kwarg, but maybe just when we come to it.
Why supervisor? Wouldn't board be more appropriate?
@simple pulsar I suspect you and I are thinking of the same (Sun) SBus (which I designed this card for in the past), but I think you're right that it's not the one under discussion here.
RC receivers these days outputs SBUS/IBus/CRSF kind of digital serial signals
PWM and CPPM are kinda outdated now IG
"SBUS is an inverted UART communication signal."
looks like one transistor or not gate, and you are good?
Yeah, More or less,
100000 baud rate, 25 bytes message
It was developed by Futuba IIRC which is an amazing RC transmitter manufacturer company, itβs quite reliable
by the way, are you Chumanista?
No Iβm not
I see, sorry, that's a guy who has a youtube channel called "code and solder"
Aah, I didnβt know that. I go by my name Ayan Pahwa | codeNsolder on YouTube and across web.
Also @slender iron has developed some drone flight controllers in the past so he should be knowing a lot about Rc stuff π
Thanks for catching this. I think the logic needs to be changed where if the link is empty, it doesn't show.
@onyx hinge I've been working on a pure tone generator project, but last night switched back over to looking at SDcard. I switched to another Class 10 card and the time for a random read took 2-3 ms longer. Do you have a criteria for SD cards for audio?
@bright aspen no, I've just been using whatever adafruit stocks, https://www.adafruit.com/product/1294
afk for a thrilling visit to my dentist
@onyx hinge Ah, I might have one somewhere. I switched over to this one: http://adafru.it/2693
It says SanDisk Ultra 10 GB MicroSDHC I Class 10 A1. A1 is supposed to be good, right? And the I, that's good, too?
@obsidian compass Though it might not help with your current task, I think adding pin polarity to UART is a reasonable enhancement suggestion, should you want to make it. (I have no idea what implementation problems might be, though.)
wow, the new photos/landing page on the website came out great
@ivory yew congratulations on talk selection at PyCon. Iβm really excited for that talk
Hope I can make it to the conf π
@tidal kiln We ran into issues trying to add new files to that PR, so if you approve it, I'll merge it and we can start a new PR for the example. @lone axle
@tidal kiln I realised after commenting that you had an active change request still, so I didn't want to merge it out from under you without approval from you first.
@idle owl is the PR urgent? if not, will suggest one more minor thing.
It's not urgent, but bear in mind that FoamyGuy is editing everything through the GitHub GUI because the original author is not currently involved. So if it is a change to anything but the currently active file, it will require a new PR.
Otherwise, suggest away π
@idle owl meh. just made it a comment suggestion. approved.
Fair enough! Thanks π
would it make sense to enable this for the circuitpython.org website repo? https://github.com/marketplace/imgbot
@obsidian compass thank you!
@lone axle I will be around in about 15 minutes until a 1:15 meeting that will likely not be more than 30 minutes, and then I'm pretty free for the rest of the day. If you're around today, we should chat.
@obsidian compass If you end up making it out to PyCon, make sure to let us know so we can meet up.
@idle owl yes, thatβs the plan π
@idle owl Works for me, ping me when you're ready.
@obsidian compass it has been a while since I've done RC stuff π
@slender iron haha yeah, Iβve used your fc stack on one of my freestyle build in the past π
oh man. I hope it worked ok
It does for a while and then I crashed into a river, was flying real low :p
@gilded cradle FYI -- just got blinka up and running on an old beaglebone black that had been gathering dust -- just hooked up my first I2C device -- working well so far. Very nice!
Thanks @solar whale, @fierce girder has been doing most of the work maintaining that board.
@slender iron quick question - I've been looking at the guide for the hallowing m0, but there doesn't seem to be any example code for actually using the screen. What's the intended access method, once you've defined it in board.c?
@ionic elk what do you mean? Usually you have it in board.DISPLAY and can use it with displayio
@ionic elk here is a snake game for the hallowing, maybe that will work as an example? https://github.com/deshipu/hallowing-snake
@ionic elk as @stuck elbow said, the Display object is available via board.DISPLAY
@indigo wedge hihi ok good news - the PCBs i got dont have a 3.3-GND short
Thanks! This looks great. Note that we will likely move the Wiznet support out of the core and into a Python library with CircuitPython 6. That will make it easier to maintain and improve.
Nah, it's from micropython then it is fine.
I'd do supervisor because it's the supervisor that initializes it. It is only in board when something else is on the bus besides the flash.
@meager fog yeah my pcb fab admitted it's on them and they're remaking them for free but they won't ship until friday
@indigo wedge you wouldn't by any chance have a PDF/PNG stuffsheet would u
ive never used kicad so it would be an adventure 4 me
Stuffsheet?
Like assembly drawing?
I can send you PnP, bom and assembly drawings when I get home in a bit
I'm trying to get up the learning curve on kicad too. found out the engineering college is having a tutorial session on it tomorrow, but I can't make it π
@lone axle If you're around, I'm free.
@meager fog I think master is untested right now on the feathers so might require some tinkering to get it to work, same for the uf2 bootloader, I'll look at it on Monday when I get the pcbs and assemble the first one
@idle owl I am here
Hello!
Ok.
Let's talk PRs. What PRs are you interested in reviewing but don't have hardware for?
Ah ok. I think it's simpler to change the polarity when you initialize the timer then.
I think I could handle testing these if I had the hardware. I've added a brief note about my understanding of what would need to be done
https://github.com/adafruit/Adafruit_CircuitPython_BME680/pull/18
Gas sensor. Test the sensor on CircuitPython with and without the changes from this PR. Test sensor with Arduino to compare results.
https://github.com/adafruit/Adafruit_CircuitPython_VL53L0X/pull/12
ToF Distance sensor, adding support for multiple sensors via I2C. Changes need test with multiple sensors.
Fix for issue: #12
(Or partial fix. Gas resistance is still a little slow to change and there's still some variance in the values compared to other libraries.)
Alright excellent.
As long as my understanding is correct then I'm pretty sure I can handle the testing for them
Ok, first one has been merged it looks like.
Second one, your assessment seems accurate.
Oh, yep looks like some more work has been done on it since I went through them and made my list
Ok, I'll explain how this works via DM.
@slender iron one other quick question - what should I pass in instead of NO_BRIGHTNESS_COMMAND? All the example boards seem to have auto brightness set but I just want the meowbit to default to 1 for now.
Auto brightness defaults to 1 now. Brightness command is only for oleds
@main meteor Ping me when you're available for a chat.
ok
This pulls in the following from upstream:
- Merge pull request #23 from jepler/trailing-dot
- Merge pull request #22 from arturo182/master
My jlink is returning 0xfffffffe in ?? () anybody run into that before?
I can't get it to do anything else, even on reset
is displaying text items just really memory intensive? I see that each character gets its own TileGrid, which is maybe this 84 byte structure whose allocation keeps failing in my program?
I think text is generated in RAM so that would make sense
it's bumming me out right now.
π¦ π¦ any spares?
nope
free memory goes from 55264 to 12224 displaying this text-based menu of a few hundred characters. eek.
"""Display a menu and allow a choice from it"""
gc.collect()
print("***", gc.mem_free())
board.DISPLAY.auto_refresh = True
scroll_idx = sel_idx
glyph_width, glyph_height = text_font.get_bounding_box()[:2]
num_rows = min(len(seq), board.DISPLAY.height // glyph_height)
max_glyphs = board.DISPLAY.width // glyph_width
labels = [adafruit_display_text.label.Label(text_font, max_glyphs=max_glyphs)
for i in range(num_rows)]
cursor = adafruit_display_text.label.Label(text_font, max_glyphs=1, color=0xddddff)
base_y = glyph_height//2-1
scene = displayio.Group(max_size=len(labels) + 1)
print("-> ", gc.mem_free())
for i, label in enumerate(labels):
label.x = round(glyph_width * 1.5)
label.y = base_y + glyph_height * i
label.text = seq[i][:max_glyphs]
scene.append(label)
print("-->", gc.mem_free())
always returns
#0 0xfffffffe in ?? ()
#1 <signal handler called>
can't get it out of that, no matter how many flash erases and resets I try
you de-powered them both, and restarted gdb and jlinkgdbserver programs?
20 labels, total 313 characters, uses 43kB RAM
does it store each of them as a tiny duplicate bitmap or something?
I don't know the specifics of how adafruit_display_text.label.Label works
however, I THINK that each character from the font which is loaded is a separate Bitmap, each Label is a Group of some size, and each item in that Group is a TileGrid which shows one of the bitmaps from the font. It ends up being a lot of fairly bulky items
@ionic elk they'll surely get you a fresh meowbit, they're in stock
granted that may leave you a bit stuck for a few days, which is why I've been recommended to always get 2 of something I'm working on
@onyx hinge you could try using my heap analysis script
@slender iron good idea
its fun π
that seems kinda high to me since the bitmaps for characters should be deduplicated
as a starting point, is this a shocking amount of memory for something "simple"? I'm not just miscalibrated, am I?
but then again displayio is designed to minimize how much is transmitted to the display
this started causing regular MemoryErrors in jeplayer after that "other" buffer got doubled from ~2.3k to ~4.6k so apparently I've been close to an edge
I don't know. One failed memory allocation said 84 bytes.
(gc allocs in 16 byte chunks)
the areas could be pretty big
you could use a debugger to stop when an allocation fails
can you send me that link about how to use the script? I'm not finding it right away.
analyze_heap_dump.py ?
To dump ram do this in GDB: dump binary memory ram.bin &_srelocate &_estack
found this little note
ah yup
that's all literal text to type?
ya
back to the debug-cave where I keep my segger
π
that will output the ram memory range into a .bin file
it is definitely hacked together
but it'd be good to get you ramped up on it
learning is good
oh, and I think I was counting words so 128 bytes per tilegrid sounds about right
if the font is monospace then you could use a single tilegrid
it seems like (A) a GlyphCache font has one Bitmap per loaded glyph, and (B) a label has one TileGrid per displayed character
which (B) adds up to a lot
ya, I believe it
but because the glyphs are spread over multiple bitmaps I don't think an approach with a single tilegrid will pan out
are they different fonts?
no, but a bdf font creates a bitmap each time it loads a glyph .. I think ? https://github.com/adafruit/Adafruit_CircuitPython_Bitmap_Font/blob/master/adafruit_bitmap_font/bdf.py#L150
ah, ya it does. we could have it load it into one if its monospace
thats what the internal font does
if the glyphs could all be in one big long bitmap, but then you'd have to size the bitmap at the outset
or have .. disjoint bitmaps?
or let each TileGrid cell refer to a different bitmap?
"can load up to 256 8x8 glyphs" e.g.
right
I can't directly write to the terminalio's grid, can i?
I'm shifting between "what can I do for jeplayer" and "what can I do for everyone" mode here
no but you can create your own terminal
which uses one tilegrid under the hood
terminal just handles the input stream
looks like there's no "go up and start typing on the top row again" type code
I can reset cursor X via an escape code but not cursor Y
This spot should be the same as it is checked in. Change the polarity in the init instead. It is why you are seeing it be low when it is in the active portion.
standalone test for pygamer or probably any board: https://gist.github.com/953c4fceae40614effe693fcb13c9dd2 typical output: https://gist.github.com/d25e003a46b0ffdf9509c0b1a4765ef4
displaying a 32 character string takes about 3462 bytes
@slender iron I'm not sure that adafruit_display_text can do better without changes in the core (I don't know what those changes are though). should I file any issues, and if so, where?
Β―_(γ)_/Β―
what do you expect it to do?
it's a constrained system. at some point you'll hit the edge of what it can do
"Shelly's application needs a way to display hundreds of characters on-screen, with RAM usage per additional on-screen character on the order of 1-4 bytes, not 100 bytes"
@slender iron how do you tend to trace drops to the reset handler that don't pass through hardfault? trying to track a crash related to initializing fourwire in board.c
I don't have a MTB set up and that seems kind of like overkill. Is there some way I could just step until Reset and dump the results into a file?
@onyx hinge @slender iron is there some kind of flattening operation that could occur, where the raw aggregate of several layered bitmaps is stored and the components are discarded?
I've gotta go meet a friend. I'll be back later.
@slender iron when you get back: the reason that we can't do a board.c initialization of the screen is because the internal_spi bus doesn't actually exist at that point. So unless we want to introduce a way for board.c to be executed after the initialization of the SPI used in the filesystem, the meowbit will need the screen manually defined. I think.
Hi, have in mind that someone made a LED animation library. I was thinking it was fancyLED, but it is not. Maybe the library I am looking for does not exist. My souvenir is that it was demonstrated on a xMas tree... Was it @idle owl or someone else? Did I dream or misunderstood? Do I confuse with _pixelbuf?
It would be something that "work" in the background and help doing asynchronous thing because you don't have to handle the animation once launched.
If anybody knows, please tag me.
@half sedge you may be thinking of https://learn.adafruit.com/circuit-playground-bluefruit-neopixel-animation-and-color-remote-control
@slender iron I found a way that my code can use terminalio and memory usage is much lower as we expected.
Yes, there is animation stuff. And I guess it is there to simplify handeling both BLE stuff and LED stuff in parallel.
(a bunch of 1-line terminalios have much lighter memory usage and the fact that I can't work across multiple lines is just fine in that case)
@half sedge That was my xmas tree. I haven't posted it anywhere, it used a combination of an unpublished version of the LED Animation Library and Pixelbuf. You didn't dream it, but it's not posted anywhere. Pixelbuf is now in flux to fix it, and there's no point in trying to get the LED Animation lib updated until that is complete.
@idle owl I have a good memory, but I distruss my understanding of oral english, so it was not clear exactly. Is that animation stuff writen in C because that is the only way to do parallel processing?
@half sedge The pixelbuf portion of it is written in C. I do not understand it well enough to explain it in detail, but essentially C is faster, so it moves all of the LED processing to C. So the animations are significantly faster as they are being processed in C.
@ionic elk terminalio requires that the font be a "BuiltinFont". A BuiltinFont's glyphs all reside in a single Bitmap and so you can display any of the characters in a single TileGrid. So, basically, a bunch of intermediate Python objects required by the Label class aren't needed, but you can't use a font loaded from disk
The animations themselves are written in Python. But the LED processing behind the scenes is written in C.
@onyx hinge that sounds like a problem that could be solved, if there's need for it
Well, I really think this should be published and documented. It sound great. Of course with the breaking that _pixelbuf did, it may have to wait.
I can get that moving things in memory can go faster in C.
That is the plan, but until pixelbuf is completed, it must wait.
I have some colorfull reflexion. I found that FancyLED that can produce palette, and in the MLX thermo camery example I did, I build palette for displayio using a totally different way. So I was wondering if I needed to replace thing.
Then in many example, there is that function that produce "rainbow" (or transition from red to green to blue in circle) that is used for anymation.
There is that wheel function that is used and copy pasted in various example.
As far as I know, it's built into pixelbuf. So you can call it without the function. I may be misremembering that as something someone wanted and it didn't get added.
Maybe that should be put somewhere (the wheel function) and reused. Or use FancyLED to do similar effect.
The plan was to build it into pixelbuf so you can call pixelbuf.color_wheel or some such and it works.
I'll look at the code one day. I am supposed to know C and be able to write code in C. At least I did that in the past. π
Great plan.
Having the Python version is still good for education, and then say that the library is doing that in C for whatever reason.
@odd flax Interesting news https://blog.particle.io/2020/01/28/mesh-deprecation/. See the end where they recommend installing CIrcuitPython 
The Python version is in many guides for posterity.
I guess many CircuitPython user have Python as their first language.
CircuitPython was my first language. π
Mine was FORTRAN π
It is good to learn another (or multiple other) languages. This give a perspective as a single language might limit your vision.
I have a feeling I'm still un-learning habits picked up with 80s home computer BASIC, which is where I started.
Python is my last language, but I have not learned it a Pythonic way, so I am affraid I writte Python code with C style (not using iterator, using index in table, ...).
I would love to find a way to forget the easy way (for me) to write code and learn how it is supposed to be written in Python.
Habits are difficult to break π
Except that they removed GOTO and that help avoiding it.
Ok, I'll stop playing with LED and figuring out about those various lib. This does not have an direct use for my presentation, so it can wait for after that.
Thank you @idle owl , and by the way, nice Xmas tree. π
You're welcome. And thank you!
Sad news about Particle Mesh. But that was a very well constructed "why", and the store credit is about as much honest-dealing you can ask for from a company.
Thanks @jepler. Like you said, the integration can come later...
@raven canopy and the xenon works very well with CP.
Are there anmy benchmarks comparing CP on the Feather M4 Express and Feather nRF52840 Express?
@umbral dagger That would be a great item on a comprehensive comparison chart of Feather/Express boards.
@onyx hinge I don't think you want terminalios. You just want tilegrids that are more than one glyph (which is what terminals use). It'd be cool to have the bdf loader create one bitmap or have tilegrid store a bunch of bitmap pointers. then you could load monospace fonts off of the disk
Did the CircuitPython newsletter go out today? I normally get it shortly after 10:00am CST, but not today.
@old smelt nope, they debugged it and are waiting to see if it goes out tomorrow
@slender iron I agree with the sentiment, what I implemented is not a good technique that we would want people to use generally. For now, I may have to stick with terminalio for now as a matter of pragmatism. Would you like me to file an issue with the long-term milestone about the problem, while the discussion is fresh in our minds?
I don't know what the milestone would be. TileGrid takes memory because it allows you to do a lot of things like per-glyph positioning, rotation, and indexing into the bitmap.
It should be straightforward to use a single TileGrid instead of terminalio. Is the confusing part mapping a character to an index into the bitmap?
My original used Adafruit_CircuitPython_Bitmap_Font + Adafruit_CircuitPython_Display_Text, and now I am using the in-memory font and terminalio.Terminal. It's true, I might be able to use in-memory font and my own TileGrid class.
The issue would say, "we need to provide a way that Adafruit_CircuitPython_Bitmap_Font + Adafruit_CircuitPython_Display_Text can get memory usage almost as low as terminalio (plus the actual storage of the font)", though I don't think we know exactly what hte best course is
in-flash font
I don't think that is concrete enough. I also don't think it's easy
terminalio saves memory by assuming that the font glyphs are a uniform size. The Bitmap Font and Label classes don't make that assumption
@idle owl https://gist.github.com/FoamyGuy/0455545c888aaa408cdcbc54fd33774e I took a look through both lists and was able to find a few additional ones. Ping me tomorrow when you are around.
If I'm not proposing a concrete solution you'd rather I didn't file an issue at this time.
I think there are some options
- add the ability in bitmap font to produce a single bitmap for a set of characters
this will allow for tilegrid to show multiple characters from a loaded font
- In core, add a stripped down version of TileGrid that only works with a single bitmap. (Or split the implementation so that unneeded stuff is in a second allocation.) This will only get you down to 32b or more per object though
I do now see what you said, that Display_Text supports non-monospace fonts
and is orders of magnitude harder with layout
I think that the fact that a font has a get_bounding_box() method made me think they were monospace only
nope π
I really want to get joeycastillo to create awesome text layout for us
would love to do other directions
There have got to at least be ideas they can share with us
if a font is a BuiltinFont then is it monospaced? Or is that not true either?
Re: benchmarks. Here is is for PyStone:
Adafruit CircuitPython 5.0.0-beta.4 on 2020-01-22; Adafruit Feather M4 Express with samd51j19
Pystone(1.2) time for 500 passes = 0.34375ms
This machine benchmarks at 1.45454e+06 pystones/second
Adafruit CircuitPython 5.0.0-beta.4 on 2020-01-22; Adafruit Feather nRF52840 Express with nRF52840
Pystone(1.2) time for 500 passes = 0.683998ms
This machine benchmarks at 730996 pystones/second
Does anyone know when the Mu patch for Mac is going to come out that fixes the issue of text not being the right color, dark mode not working...?
@short phoenix are you using the latest version? one was released over the weekend
@short phoenix itβs out now.
Okay, thank you
@slender iron uhhh..., in the nrf port, we have this:
void common_hal_mcu_disable_interrupts() {
}
void common_hal_mcu_enable_interrupts() {
}
and those routines are called various places. That might explain some issues ... oy
no reponse needed; just π€¦
π
Hi all
Can I have some navigation help in the code base? I'm slowly working on rotaryio for the STM32 feather, but a total newbie to C and the circuitpython code structure. I see pertinent looking files in .../ports/stm32f4/common-hal/, is that the correct location?
@umbral ice shared-bindings contains the Python interface to the native modules. shared-modules contains port-independent code that implements various modules. port/<someport>/common-hal contains port-specific implmentations of native modules. So you would add ports/stm32f4/common-hal/rotaryio
@tulip sleet Thank you. What is the equivalent workflow to python REPL?
i'm not clear on what you're asking
Incremental guesses at seeing if I have the code right. I have the build environment set up. Do I just compile and see if it builds?
The iterative/testing process is what I'm unfamiliar with
yes, you build it, get a .uf2 and load that onto the board and try it. But we use J-Link debuggers and gdb to debug issues all the time. You could use an STlink with the stm32
here is an old guide that talks about samd21, but the J-link part is relevant to stm32 as well: https://learn.adafruit.com/debugging-the-samd21-with-gdb
we don't use OpenOCD, in general
<reading... many thanks for the resources>
what is your host computer?
https://learn.adafruit.com/circuitpython-samd-debugging-w-atmel-studio-7 talks about Windows, but I essentially never use Windows. I use Linux for development, Scott uses MacOS, but in a command-line way
Linux, it's been a while but nice to return
do you have an STlink or J-Link?
or if you have one of the supported STM dev boards, they have integral STlinks, so that would work
I don't have ST/J-Link. It looks like the J-Link is cost prohibitive for me EDU mini is affordable.
One of the supported dev boards? I have one of the feathers, is that what you're asking?
@umbral ice No, I thought perhaps you had one of the STM Discovery boards.
The EDU Mini is a good choice because it works on STM and SAMD and nRF and many others.
You could get an STlink cheaply as well but it's meant for STM only.
(sri my attn was diverted)
you will also need https://www.adafruit.com/product/2743
because the Feather doesn't have an SWD connector on board. You'll need to solder some jumpers to pads on the bottom
though i am not sure the 752 box header will fit. However, I have trimmed off the end of one on another board to make it fit against the pins.
A debugger is not the same thing as a logic analyzer, right?
The box headers are a bit tricky to solder if you don't have SMD soldering experience. Use plenty of flux and feed new solder in. My success rate is not 100% on those. Soldering to the SWDIO and SWCLK pads near the SD socket would be easier.
no, not at all. a logic analyzer can be useful to check pin states on output. I use a Saleae sometimes, but I use gdb with the J-Link almost every day, and the Saleae every month or two
OK. I'm a chemist by training, some data science after college, now python and automation are part of my duties
sounds like you are leaping into the frying pan a bit π
RE: SWDIO and SWCLK pads, would I only need those two?
you need to also connect GND and the 3V pin to the 2743 SWD adapter above. Potentially RESET too, but that seems to be unnecessary nearly all the time. Do you have a breadboard and jumpers?
Yes. That is much easier than the SMD, and more forgiving for breadboard use!
this shows an example of jumpers to the SWD adapter: it's for a different Feather board, but the idea is the same: https://learn.adafruit.com/how-to-program-samd-bootloaders/feather-m0-m4-wiring
Often I don't solder actual wires to the pads, but just a little piece of header, like this:
(looking for picture...)
then i use female jumpers on the header pins
but most people use wires
Either would work for me. I have a little breadboard dedicated to the project, I can add the debugger breakout
Thanks! This has been a good start
This is surprising :
I have a few unpacked Particle Xeonon boards
Guess will now use em all with CircuitPython xD
Yes -- same thought here. I was looking forward to learning more about mesh, though.... oh well - the Xenon works will with CP.
@solar whale yeah I wanted to learn more about mesh too, especially the openthread implementations.
Is BLE supported under CP for xenon?
Is there a cat-m or lte solution with ethernet? I have some remote modbus devices I need to IoT π
@gilded cradle Ping me if/when you're around please. Thanks!
@obsidian compass yes, BLE is supported on the xenon. Same as the other nRF52840 boards
That's amazing, now I just need to source a Jlink debugger
@tidal kiln Maybe you know: how do I test something that is adding code to use bitbangio if busio SPI is not available? which is to say, what uses bitbangio?
And not busio.
to test is busio.SPI is available - could try import and catch if it fails
Right, the code exists, how do I test it?
Someone put in a PR to add this to DotStar
and I have no idea how to test it
Is there a particular microcontroller I need to use or..?
let me look at PR...
yeah......
so I'm wondering if this is even needed?
The original PR comments that it's way faster on every board, or some such.
Which I have no way to comment on
HW SPI is fast.
so?
yah, typically it's the other way around. HW is faster than bitbang
hmph.
maybe something in blinka land
Bleh.
gemma m0?
No HW SPI there? hmm
chip has it, but not broken out, since there are so few pins
hmm fair enough
https://learn.adafruit.com/circuitpython-essentials/circuitpython-dotstar doesn't mention that.
Did I miss something there then?
I probably didn't test the example on a Gemma...
Ah bugger, they're out of stock too.
I left a comment on the PR, no idea if the submitter is still active or not.
yah, probably worth pinging submitter to try and get more context
That's what I did.
the current dotstar lib essentially falls back to a bingbang spi already:
https://github.com/adafruit/Adafruit_CircuitPython_DotStar/blob/master/adafruit_dotstar.py#L241
The original PR said that bitbangio was faster than _ds_writebytes...
whatever that means.
So... we'll see.
well, the above is bitbanging in python, so i can see how it would be faster to use bitbang from the CP firmware, i.e. bitbanging in C
@tulip sleet are you online?
yes, just got on after doing some paperwork "errands"
got a second for a quick bootloader conversation?
sure
amelia?
@ionic elk ok back sorry
@tulip sleet A question in #general-tech that you may be able to answer about BLE and CircuitPython, whether we've done a specific example.
@tidal kiln Their response: @kattni i needed this on a trinket 5V with a WS2801 strip, where the Hardware SPI was already used by something else bitbangio was much faster than the _ds_writebytes() implementation ... how are they using CircuitPython then?
Hi @idle owl, I'm around now
@gilded cradle Excellent timing. What hardware is needed to test these two PRs? https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display/pulls
I'm setting FoamyGuy up to test PRs, and he tried but gets an error with the hardware he has, and I'm not sure if the error is a problem with the PR or him having the wrong hardware.
Ah, ideally it should be tested on each of the displays that RGB Display supports and a Raspberry Pi. It could be done with breakouts and/or PiTFTs. Let me get a list of supported displays
Yeah, eventually. I keep having high priorities fall in my lap. The reason I haven't tested it yet is because I think it will take a while to properly test. I think those PRs were focused on one display and affect the other displays as well, so I will probably end up coming up with a bunch of changes.
@gilded cradle Ok, I'll leave those to you then. Sounds like it's way more involved than it looked like at first glance.
Yeah
Right on. Thanks!
yw
@tidal kiln I'm not missing something with the Trinket 5V am I? There's no way that lib is being used on a 5V trinket?
if trinket 5v = PID1501, then yah, no way it's running CP
same for PID2000, aka the "pro" trinket
lib wise, yah, there is this:
https://github.com/adafruit/Adafruit_CircuitPython_WS2801
@tulip sleet The question is from SilverAdept at 11:13amET. I don't know the answer, but you might.
@tidal kiln Yah I commented about that too.
oh @tulip sleet one other question - do you have a quick command to get the jlink to just flash a file, without opening the gdb server? All I see in the manual are UI tools
@idle owl ni will look now
Thanks!
Can someone do a quick typecast an int to hex and check the type of hex variable for me?
>>> type(a)
<class 'int'>
>>> b = hex(a)
>>> type(b)
<class 'str'> ```
hex() returns the hexadecimal string representation of an integer
oh, I assumed you were away from the computer
there is no diffeerence between a decimal and hex integer. It's all binary under the covers
Thank you @ionic elk , I wanted to double check π
you can read and write an integer as a decimal number, a hex number, a binary number ,etc. but it's all the same number
they're all ints
@tulip sleet makes sense , I need to tweak the code
I use https://www.rapidtables.com/convert/number/decimal-to-hex.html for long ones when I'm lazy
Decimal to hex number conversion calculator and how to convert.
but obviously if you're already in python just use hex()
@tulip sleet I have a hex string "4800ff"
I need to append 0x
should I use "0x" + string
?
or hex(string)
do you want to print it or convert it to an int?
I want it in a format which I can use it with "pixels.fill(val)"
which is int I guess
you can give a base and use int:
>>> x = "4800ff"
>>> int(x, 16)
4718847
@tulip sleet thank you! trying this now
or are you just wanting to do this?
val = 0x4800ff
pixels.fill(val)
is it a string you read in from elsewhere or did you write it yourself in your program?
then what dan said, but curious why you are dealing with a string?
ok, what dan said then
it's confusing, and languages like javascript don't help. like, how horrible is this?
$ node
> "3" + 4
'34'
> "4" + 3
'43'
> 3 + "4"
'34'
> 3 - "4"
-1
>
@xmeow I'd still be interested in what the 0x194 value is in the linker file
RAM (xrw) : ORIGIN = 0x20000194, LENGTH = 96K - 0x194
I notice it isn't in https://github.com/mmoskal/uf2-stm32f, and that value isn't referenced in your source code anywhere else. Do you have any comment on what that's being used for?
^^ i think i saw a talk on that