#circuitpython-dev
1 messages ยท Page 248 of 1
too late, we can do 4.0.1 next week
@slender iron so I'll delete the 4.0.x branch? I already cleaned up the GitHub branch protection rules.
I'm not sure
I think we'll want a 4.0.x milestone to track bugfix issues
4.x will be features
I'm talking milestones
would we blow minds if we dropped the master branch in favor of 4.x?
I'd do fixes on 4.x. The milestone can still be 4.0.x -- it doesn't have to correspond to a branch name.
kk
if we had a version # roadmap for features, we could have a 4.x instead of master (or 4.1, 4.2, etc.), but we don't. We just have to make sure to merge back and forth as necessary.
x can stand for 0 as well
i'm still thinking about whether what I said makes sense. Trying to remember what we did for 3.0 and 3.1
k, made a "4.x.x - Bug fixes" and "4.x - Features" for milestones
by the way, what is the support policy for released versions?
3.1 was only 3.1.0, 3.1.1, and 3.1.2
now that 4.x is released, is all 3.x unsupported?
We used to only put features in m or m.n versions and keep m.n.p for fixes when I worked on "real" software in a different world
@simple pulsar that's our goal too. we try to follow "semantic versioning"
yes, the last number is a bug-fix number. But with https://semver.org
they all have three numbers
@stuck elbow I'd say technically yes but we won't break 3.x for a bit
(meaning library compatibility)
we're still shipping boards with 3.1.2 and will be for quite some time due to stock. We're not going to reprogram stock
@slender iron I'm more interested in bug fixes, rather than breaking :)
hey, espressif just released a board with usb support!
Espressif announces the release of the โจESP32-S2 Secure Wi-Fi MCU, which is a highly integrated, low-power, 2.4 GHz Wi-Fi Microcontroller SoC supporting Wi-Fi HT40 and 43 GPIOs. Based on Xtensaยฎ single-core 32-bit LX7 processor, ESP32-S2 can be clocked at up to 240 MHz.
@timber mango it says it's "USB OTG", so host mode (only)??
otg means both host and device
ok
@stuck elbow I don't know of any 3.x bugs worth fixing and doubt there are ones lurking since it's been out so long
@slender iron sure, but what is the official policy?
There's "we won't make a new 3.x release", and there's "we won't help you with 3.1.2". The latter will be a while. There's not really a policy (like "we support two versions"). I think it has to do with when we gain confidence in 4.x.
@tawny creek is your translation better described as Tagalog or Filipino? cc @turbid radish
Going back to working on "real" software, the one thing we failed to do (internally) was to publish a calendar of support status dates, e.g. the various phases of EOL. The big s/w houses like Oracle are pretty good at this. I'd imagine even Microsoft do it. Perhaps a lightweight/simple/indicative verison of that is worth considering? It allows your users to plan ahead.
it's scary to base your own hardware on it without such promises
I noticed this has relevance to non critical software the other day. I found a whole load of educational material using MIT Scratch. I wondered whether they had updated it to V3 which has a fairly different user interface. They had and that must have been a non trivial amount of work.
@slender iron The language itself is called Tagalog, but Google and others that refer to it use Filipino
Filipino to me describes the nationality
I see there are two different ISO codes "fil" and "tgl", but I think the first is the major use, is that right?
Do you agree with this? https://learningtagalog.com/articles/tagalog_filipino_pilipino_difference.html
Article on Tagalog, Filipino and Pilipino being one and the same language.
I don't think we can make promises of support as a CircuitPython project as a whole. Board support needs to be done by the creator of the board. What we can do is ensure a process for testing and accepting fixes.
so if I made a board with esp8266, for example, I would now be forced to fork CP and do my own support?
@tulip sleet I agree, It sounds weird to say (even in Tagalog) "I speak Filipino", school classes/courses refers to it as Tagalog too
I feel like I did diligence with the 4.0.0 release because I asked for objections in the meeting (no one had any) and the 4.0.0 milestone was empty.
@stuck elbow yes
Also good reminder! I need to update it with the latest CP, ๐
or with the nrf52832
well, no. you can maintain the port in the circuitpython repo
I'm ok taking prs in to fix things
I don't know of anyone willing to do it for esp or nrf
@tawny creek we are just wondering how to describe it in a sentence. Would you say "CircuitPython now has a Tagalog (Filipino) translation" or something else?
I'd still want it rebrand due to the lack of usb
how much of a warning are we going to get when samd21 is going to be scrapped?
it won't be scrapped as long as someone wants to maintain it. given how many adafruit boards use it I think it's safe to assume that adafruit will maintain it for years
@tulip sleet that sounds pretty accurate to me!
@tawny creek Thank you!
sure, but if it was, for whatever reason, how much time we would get? a week, as with the rc4?
I can speak some dialects that are considered Filipino but isn't Tagalog
who knows. we're not there. I waited until the meeting to check on the 4.0.0 release so it's safe to assume we'll meet before making such changes
so not as extreme as "Chinese", which is meaningless as a language name, but similar
(as a spoken language name); written is diff
Yup, accurate to say it is a Filipino translation but even more as Tagalog :)
sound good, since the language code "fil", the "(Filipino)" will help explain that to the uninitiated
tnx again!
@tulip sleet want to update the release notes?
Anytime!
@slender iron ok, will do!
the website just says Filipino too
@slender iron I was looking at the 3.x.x versions. we did introduce new features in the ..<n> numbers, very minor. They were minor feature additions, usually (serial_bytes_available ,for example)
ya, we can decide as we reach them
@tulip sleet I used to refer my fellow developers to the written policy when they wanted to do that. It worked eventually.
@simple pulsar I think it was a psychological thing about not pushing people to upgrade for very minor things: 3.1.2 instead of 3.2
so what branch did we decide on for bug fixes?
eehhhh
https://github.com/adafruit/circuitpython/pull/1902 needs to merge to it
It is very odd to end up arguing about a numbering scheme and perhaps even stranger for developers who have all agreed to follow a standard to then ignore it, for the case of my former world of software
@tulip sleet how about 4.0.x? 4.x is just there for rtd
ok, that's fine, but we'll need to merge from 4.0.x to 4.x. That's OK.
I was thinking yes, we should have branches that mean something.
but I think our decision long ago to drop "stable" was good, because it was so uninformative
ya, we should pick one to PR fixes and then merge them over to master
I already have at leaset PR for merging into 4.0.x
so we'll have people submit to 4.0.x.
kk
@timber mango, so please submit PR's against branch 4.0.x for fixes
Please redo this as a PR on 4.0.x. That is where we'll tag bugfixes from. We'll batch merge back to master.
Everybody's canonical picture:
What determines the size of tx USB packets for REPL output? Is is the app, the tiny usb library and/or the hardware. It doesn't seem consistent so I'm guess it's not just the app.
@simple pulsar at the low level, it doesn't accumulate characters, so I think it's just the size of the buffer that gets passed down. The dropped characters you're seeing may be USB code or may be higher up
at least I don't think it does accumulate. It will send what you ask it to send
@simple pulsar at some level there may a be circular buffer which overflows because it gets behind: someone is sending faster than the USB drivers can push the characters out
@slender iron I edited release notes for tagalog (and re-alphabetized). Didn't see forum or blog posts yet.
Could this be popleft() to match PulseIn? Instead of returning a negative number on error please raise an Exception.
Where is this bitmap defined? Is it a PS/2 thing? Is it per device?
Would it make more sense to not return anything and have error raise an exception? That way one always gets data from get_byte. Exceptions can also have data in them (like OSError has an error number).
@tulip sleet haven't done them yet so they'll have edits. still waiting on the last travis build to finish
we'll need to improve the release upload process soon. it now takes a lot of job restarting
could polish up the azure stuff at the same time
Do you know if wireshark shows some sort of simplified version of the USB packets by default? I don't think I'm seeing "token packets" but i'm still reading about how all this works.
695 release assets for 4.0.0
@simple pulsar wireshark is from the kernels perspective so you won't see the lowest level
disgraceful
@tulip sleet doing the blog and forum posts now
I don't know how it'd get the lowest level of data
that is what a beagle or other sniffer is good for
@simple pulsar I think it's unlikely there's an issue at the USB transport level. It's far more likely to be a buffering issue
Indeed, it would just be comforting to see what's going on, particularly coz it sounds like in USB land the host has responsibility for asking for data from device
There is plenty of bandwidth in USB land. We have had issues with too-small buffers on the CircuitPython side before.
Is tinyusb library handling all the USB comms including the output from REPL down the serial console thing?
@simple pulsar yes, and there's a layer above tinyusb that does the buffering inside circuitpython
IF I'm seeing output on PyPortal then does that rule out the circuitpython buffering or is that usb specific buffering?
they both do some buffering; I'd have to look at the code
ok, it looks like there's not necessarily buffering writing the string. It's simply that CPy calls tud_cdc_write() over and over until all the bytes are written. This is in supervisor/shared/serial.c
tud_cdc_write() calls tu_cdc_n_write(), which calls tu_fifo_write_n(). If you write too fast, the fifo will wrap around and you'll lose characters. There is this commented out code:
#if 0 // TODO issue with circuitpython's REPL
// flush if queue more than endpoint size
if ( tu_fifo_count(&_cdcd_itf[itf].tx_ff) >= CFG_TUD_CDC_EPSIZE )
{
tud_cdc_n_write_flush(itf);
}
That is in lib/tinyusb/src/class/cdc/cdc_device.c.
So it looks like CircuitPython could check to see if there's enough space in the buffer to write more.
There's no synchronous waiting for the buffer to empty at the tinyusb (tud) level.
So we can fix this.
ok, i'll have a glance at it, I think going from zero to hero in a few hours with usb is perhaps a bit optimistic for me..
The code there that's checking the fifo count could be hoisted up, or maybe we should be calling tud_cdc_n_write_flush(). I'd have to ask Thach about this.
There perhaps should be more API that lets us figure out how much space is left in the buffer
I can ask him when he wakes up (he's on the other side of the world).
don't feel obligated to try to fix this yourself. I'll add notes to your issue.
Diagnosing:
supervisor/shared/serial.c calls tu_cdc_n_write(), which calls tu_fifo_write_n(). If too many characters are written too fast, the fifo will wrap around and characters will be lost.
Note that in ib/tinyusb/src/class/cdc/cdc_device.c, there's this commented-out code:
#if 0 // TODO issue with circuitpython's REPL
// flush if queue more than endpoint size
if ( tu_fifo_count(&_cdcd_itf[itf].tx_ff) >= CFG_TUD_CDC_EPSIZE )
{
tud_cdc_n_write_flush(itf);...
I was working on some testing with the MCP23017 and I noticed that the examples in its Adafruit learn page haven't been updated to reflect it recently being refactored. Is that something I could fix or if not, who should I talk to about this?
@tulip sleet I'm curious about the lack of locking around reads in that fifo code. I'd imagine this is irrelevant for CircuitPython but it looks a bit iffy. Is the code relying on atomic reads for 32 bit quantities? Can you ask author about that too? I see a few places where it's reading multiple values from the fifo structure without a lock but perhaps this is highly optimised so that it's only done when the values changing between statements would be safe with assumption of a single reader
Since the firmware built for ยตGame no longer works, it doesn't make
sense to offer it for download here -- it only makes people confused.
@stuck elbow are you deprecating ugame10 in favor of pewpew?
I'd prefer to return the byte (typically an ACK) because it is kind of out-of band. If you use get_byte()^Wpopleft() to get the response, there could be other bytes there already, and flushing() the buffer before calling send_byte() would not be 100% guaranteed because a byte can arrive between the last popleft() and send_byte(). I agree raising and exception in place of negative returns which current version uses to signal errors.
No, it was arbitrary. More a (hardware) debug tool than anything else.
So far I didn't know/work with a way to transfer file via ble yet. Haven't got any request for this in Arduino
I note Adafruit_CircuitPython_HID is no longer included in the frozen list for Hallowing M0 Express, is that intentional? Full list on: https://forums.adafruit.com/viewtopic.php?f=60&t=143160
In addition to observations on Discord about locking not extending to all the read operations on the values in the fifo that can change (perhaps relying on atomic locks and/or typical style of use).
I see another very minor issue which will probably never get exercised and might well be harmelss even if it was, there's a drop in int precision for bufsize, comes in unsigned 32bit but then used 16bit:
$ fgrep -B 2 tu_fifo_write_n ./lib/tinyusb/src/class/cdc/cdc_device.c
uint32_t...
@tulip sleet @trim elm MCP230xx guide updated. thanks for catching that.
congrats on the CP 4.0 release!
thank you very much for putting effort to look at the issue. The cdc fifo read/write doesn't need mutex protection, since all cdc_read/write are all invoked in main's thread, never within ISR. The mcu never switch the task while calling those API. Mutex is only needed in RTOS environment where preemption is possible.
indeed the uint32_t cast to uint16_t is inconsistent but it shouldn't be an issue since the fifo size is less likely larger than 64KB ( 128/256 in this case).
I am in th...
If this only affects serial writes then I would say it's not overly important to address quickly.
I find it easy to reproduce on REPL and if there's a good way to debug a board where you can see what function is being used that would give away what's going on. For REPL if you keep trying to reproduce it it then the frequency of occurrence dramatically drops, it's almost as if it goes into hiding!
What's the best document(s) to read to understand how the PyPortal display works? I'm more interested in the internals on the code than the current library, partly to understand why it's so sluggish from CircuitPython
high level info here:
https://learn.adafruit.com/circuitpython-display-support-using-displayio/introduction
but for anything performance related, there's not much other than the source code
Do you know what's the absolute max frame rate update for the screen based on its interface? Can the screen take partial updates? I'm curious what upper limits are?
the screen can take partial updates and we aren't doing it now
take a look at arduino examples to know the upper limits
@simple pulsar HID was intentionally removed to save ROM space (its ~9k). The mpconfigboard.mk files define what is frozen in and checking it's history for hallowing can lead to finding: https://github.com/adafruit/circuitpython/commit/ec0388704095a7d3ab0cda65509db2fa0ef589dc#diff-5a5b45acbe24869a4d6c4d41aca9476c
Full history: https://github.com/adafruit/circuitpython/commits/master/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk
Thanks, I was going to rummage just hadn't gotten around to it.
Why remove it when it'll work with the release next week?
For that thing where CircuitPython code can remount CIRCUITPY as writeable but allow access from the host, is there a way to do that so it only remounts a subdirectory writeable to make it less dangerous?
Please don't use OSError because its values already have specific meaning. I only gave it as an example of an exception with state.
Is it important that the reason be programmatically available? If not, you could just throw RuntimeError with a number of different messages. If it is, you can return RuntimeError here and state that the one should call get_errors for details.
I prefer clear_errors because it has a verb (aka action). Without it the name errors sounds like it should be state. clear_errors makes it clear that something is done during the function call and it can still return the error mask as well.
Ok, the pythonic way would be to have different exceptions for each case. Its a bit tricky to define new exceptions in C by the gist is here: https://github.com/adafruit/circuitpython/blob/master/py/objexcept.c#L297 It would be done at the ps2io module level so that they are only built in when the module is.
@simple pulsar no because the mounting is done below the filesystem at the block level
it's a trade-off we make to get the universal support for the usb drive
I can't help wondering how hard it would be to make either two USB drives or two partitions.
I reeeeeeaaaallly don't want to do partitions because they are never the size you need
Point.
I do want to do multiple drives for sd cards at some point but then they have the same concurrency problem
this challenge is another reason to support BLE file transfers because we can do them at the file level rather than blocks
I might modify the NASA code to save to the SD card slot if that's easy
shouldn't be too bad I think
Does PyPortal do bluetooth?
no
thanks @kevinjwalters , we will still need to look at it to see if we could fix it easily enough.
wow the CP 4.0 release is so low key.. not even mentioned on the front page of adafruit.
I expected at least party hats
๐
anyone want to try some experimental display code?
Want to, yes. In a place to, sadly no ๐
k np, should be able to PR it soon
@tulip sleet no, but since the builds for ugame10 are now all broken, I will have to host the firmware for it somewhere else
@timber mango GitHub still has all the old releases; you could point there for now.
@stuck elbow make another PR to the 4.0.x branch and I'll make a release later with it
gets excited
I have a question about busio.SPI.readinto() is it possible to get less bytes than requested? and if so how can I tell how many bytes were read?
@celest zenith spi isnt structured, it will always read the # of bytes that you requested, unlike I2C there's no ack for data
so it would be whatever's on the pin
what if nothing is there? would that raise an exception?
if nothing is on the bus then you'll read random bits
@tannewt this is ready for review now to 4.0.x. Had to shrink CPX pinyin build.
ok folks - we have https://www.adafruit.com/product/4242 in stock
grab em if u want em
wooo!
anyone have time to review a library PR? I think it's at a good state.
@sly falcon I left some comments on the WPA2 Ent. PR you submitted, looks great. I'm planning on testing it on thursday at my university's wpa2-enterprise network.
@prime flower Thanks! I saw those...I have some time this evening to get back to that PR and start looking at things
Yup no rush, it should be functionally fine when I test it. My comments were cosmetic.
@prime flower I hafta admit, I'm embarrassed that I totally biffed it and didn't fully change the thermocouple stuff over to the wifi stuff ๐
@sly falcon heh, no biggie. That's why we do reviews. A bunch of CircuitPython-IoT libraries rely on the ESP32_SPI_WiFiManager (Adafruit IO, Microsoft Azure IoT). This'll be a great thing to have as it'll make them WPA2-Ent compatible "automatically"
Oh wow - that's super cool! I had no idea the ramifications of the changes I'm working on! haha
This all started as a "wouldn't it be neat if I could have the PyPortal display something cool on my desk at work?"
Plus my buddy/co-worker was taking our uni's intro to programming CS class this semester and it's in Python, so I gifted the PyPortal AdaBox to him...figured he might want to use it at work, too
It's awesome, it'll get classrooms internet-enabled with 
@sly falcon I don't have a build environment setup, but I can test against eduroam if you have artifacts I can load on a pyportal (esp firmware & matching .mpy)
@quasi fjord Thanks! Gimme a minute and I can dig up links for you. BTW - the library is just .py files...I have a lot of clean-up and a bit of refactoring before the pull request will be accepted
@quasi fjord Here is the NINA firmware (the attached ZIP file on my initial PR) https://github.com/adafruit/nina-fw/pull/5
I've made some updates to the documentation in the README.md and CHANGELOG to make the build process clear and identify which version of the Espressif IDF the firmware is compiled against.
...
This is the current working (for me), but in need of clean-ups and re-factoring source code https://github.com/docmollo/Adafruit_CircuitPython_ESP32SPI/tree/docs_wpa2_wifimgr
you should be able to toss the .py library files into the lib directory on your CircuitPython device of choice and use them as you would the distributed .mpy files
I didn't create docs or example code showing how to use the WPA2 Enterprise functionality in the WiFi Manager library, but it should mostly just work...you'll need to add some new items to your secrets.py file, which you can find in the adafruit_esp32spi_wifimanager.py file
Also... it's not mentioned anywhere, but the WPA2 Enterprise stuff only works on networks that use a username/password...which is what my campus uses. Certificate authentication isn't supported
@slender iron - get any takers on your experimental display code request?
I confess I did not scour all the messages since you asked.
one person wanted to but couldn't
it appears to be a bit faster with the quote demo
poking the font loading code now
Ok. I'll have some time later tonight if you still need feedback. My PyPortal is at home. ๐ฆ Thought it was here at the office. I need to get my M4/TFT setup going again.
np ๐
Sorry for the bait-and-switch. Not intentional
no worries
So, I put my M4 setup back together, and I am getting errors in the code loading.
File "code.py", line 40, in <module>
File "/lib/adafruit_bitmap_font/bitmap_font.py", line 55, in load_font
File "/lib/adafruit_bitmap_font/bdf.py", line 43, in <module>
ImportError: cannot import name Glyph```
I was going to go and grab the latest release, but this might be a good time to try out something new.
font loading, not code
you'll need the latest core and latest lib
So, the latest S3 release?
Ok. I just installed 4.0.0
Glyph moved from displayio to fontio
is that a core module?
yup
ok
kk, I have a speed-up for the font preload ๐
yup, definitely a speedup
Hi, I'm compiling circuitpython 4.0 for a SAMD21E18 based board so I can get the elf file and debug the calls to new_status_color function. I'm compiling the source code as is, but the elf file I got seems corrupted, I load the elf to the target and halt it on reset, the registers values, the stack pointer are mostly F's. I don't know how to tell what I'm doing wrong, any pointers or tips?
@granite crow seems like those registers could be ok if you just reset the cpu
I had tried by loading the elf and then doing mon halt reset, then mon regs and I see those values, then continue but I'm getting a fault, I'm not in front of my pc right now but I can sent the session output once I get there
try setting a breakpoint at reset_into_safe_mode to catch errors
This changes the displayio pixel computation from per-pixel to
per-area. This is precursor work to updating portions of the screen
(#1169). It should provide mild speedups because bounds checks are
done once per area rather than once per pixel. Filling by area also
allows TileGrid to maintain a row-associative fill pattern even when
the display's refresh is orthogonal to it.
@slender iron - had to run off to some meetings. Iโll give it a whirl later tonight.
@tough flax hey it took many months but i finally got nice molded 3.5mm mono audio cables to clips https://www.adafruit.com/new
Adafruit Industries, Unique & fun DIY electronics and kits : New Products - Tools Gift Certificates Arduino Cables Sensors LEDs Books Breakout Boards Power EL Wire/Tape/Panel Components & Parts LCDs & Displays Wearables Prototyping Raspberry Pi Wireless Young Engineers 3D pri...
might be good for AT stuff - took a while to find a place that would make them the way i wanted em ๐
@slender iron (or anyone with a comment) I was thinking that we might introduce new features in 4.1.0-beta.<n>, and when we consider them all cooked, we can release a final 4.1.0. The PR's could be against branch 4.x or master. We didn't do betas for non x.0.0 releases before, but we could start.
@tulip sleet I'm new around these parts, so take this with a huge grain of salt, but I like this plan. I'm also a fan of the 3rd number being incremented for bug fixes and other minor stuff. Features bumps the middle number, but huge things and breaking changes gets a major number bump
@sly falcon tnx, that has been our intention (https://semver.org), but we haven't been as faithful to that in the past: we've added minor features with the last number. If we can train people to expect the middle number ot increment quickly, I think we'll be fine.
haha...there is a website for everything, isn't there?
@meager fog thatโs awesome! It will be a great way to adapt things on a semi-permanent basis! Thanks for thinking about us!
๐ yep!
i did - also its good for audio projects but specifically i was thinking this would be helpful for quick AT button connects
keep making cool stuff to inspire me ๐
Suppose you made it exclusive. That would be consistent with slice numbering in Python in general, and you'd get to lose a number of - 1s that you added. If you have to explain that it's inclusive a bunch of places, maybe it would be better if it were exclusive.
I don't know what full_coverage means, but it's used several places, here and elsewhere, so an explanatory comment would be helpful where the term is used.
Probably the most powerful is that you can make at switch->HID keyboard/mouse without solder using the cpx!!
While I have your ear... ๐ Iโd love a wing/breakout that has an op amp circuit for better FSR sensing (and other times you need adjustable gain) ๐
The minute op amps are involved Iโm certain my board designs will add too much noise
But so ridiculously useful for AT
You donโt have to life your finger off the switch
Thanks @slender iron, I will do so
@tough flax Is a membrane switch an option?
Another option, a load cell, and a load cell amplifier might be more flexible and accurate, and tunable to a specific user's range of motion.
@slender iron Not sure exactly what you're after, but I'm always happy to test. I have most of the FeatherWing displays.
@fathom basalt the membrane switch has its used but is on/off. Variable input is critical because we can do lots more in the processing dept. we can activate on the differential, denounce better, set multiple actions for hard/soft press etc.
Debounce
Load cells might be useful but I think they needs amps as well right?
Yep, and the amps are readily available.
Iโve used FSRs with just a voltage decider and they work well for some things. But adjustable gain would be very helpful
The load cells are used in just about every scale you can buy.
Divider (new phone is learning electronics)
Load cells are a lot more accurate than FSRs.
Much more consistent and repeatable.
But the ones Iโve seen are much larger
FSRs can slip under a finger
Remember weโre looking at <10g equiv of force
Works with:
https://www.sparkfun.com/products/13879
Ok, those might solve other problems but I donโt see how it gives us adjustable gain or the tiny size of the FSR. Thanks for the input though
Surely. These are very sensitive to change, via the load cell amplifier, and I would expect to be able to differentiate between very small pressures. Postage and kitchen scales can weigh a few grams accurately and repeatably.
I don't believe there are any accurate scales that use FSRs.
I still like FSRs for applications that don't need load cell precision, though.
@tough flax Very detailed discussion of the strain gauge, the heart of a load cell.
https://www.youtube.com/watch?v=lWFiKMSB_4M
Support me for more videos: https://www.patreon.com/GreatScott Previous video: https://youtu.be/pGLUsQozT94 Facebook: https://www.facebook.com/greatscottlab ...
I read "decider" as "comparator" and it basically made sense.
Hi @meager fog, I have a quick question regarding the PyBadge. Do you know if on the LC version that board.NEOPIXEL has a length of 1 or 5? Thanks
1
Thanks
im always here to give #โฃ
@slender iron sure, thanks
@meager fog thank you, but I won't have the time for a bit
Is the TFT on the PyBadge the same one that's on the 1.8" TFT joystick shield? (Product 802)?
yes, ST7735R
Thanks @stuck elbow
So, could I approximate a PyBadge with an M4 Express and that shield?
Tempting to buy one, but I already have a mountain of electronics I'm not using. If I could McGyver something together that's close, it makes for a fun exercise.
...and I already have the shield/M4.
the buttons are handled differently
on that shield they use Seesaw, on the pybadge it's just a shift register
Right - there would need to be some code mods for the joystick and buttons.
you can take a look at how the stage library handles the pybadge and the mini tft wing
@slender iron - great job on the Podcast.init interview. Lots of good background info on the origins and philosophy behind CP. Thanks!
I think it means there are no transparent pixels in that area.
Congrats and thank you everyone for CircuitPython 4.0!
@stuck elbow ping me when you have a new pr please
@tulip sleet beta release sound good to me. I was thinking we'd at least do rc. maybe we do beta -> stable directly for them
@slender iron sure, sorry, still at work
@slender iron https://github.com/adafruit/circuitpython/pull/1904
perfect! looking now
waits for travis
Welcome to GitHub's home for real-time and historical data on system performance.
@stuck elbow FYI I'm waiting on github notifications to work with travis again. Even if I merge your PR I won't be able to release so I might as well wait
@slender iron no worries, I already have a fixed binary to give to people who'd complain
this got me a bit by surprise, because I was at the maker faire berlin, and didn't have a chance to test rc4
we never released an rc4, it was rc3 released 8 days ago
yup, sorry it was a bit quick. thought we were close to the end but know that the overflow check threw some things off
This fixes an OverflowError in the read_palette function.
(cherry picked from commit 4ebcca865cbda4b08dc917581438473f625e2a12)
โ github webhooks are alive again!
Hopefully helps screen readers better understand and navigate the site.
It should echo back unicode characters just fine even if they don't show on the display's terminal.
The rx errors at least arise asynchronously, so no opportunity to raise exceptions, and the error cannot be "handled", so I think moving TX errors to clear_errors() and just report TX errors as RuntimeError's is best.
There are some builds that seem to be failing due to flash size exceeded, mostly international ones. Should I activate the build just for ItsyBitsy M4, which is the board I have, and has flash big enough to fit every int'l build with ps2io included?
probably best to enable only on M4 boards for now, yes :)
fyi I canceled the 4.0.x branch build in favor of the 4.0.1 one
so can we start the 4.0.1 party? ๐
@slender iron - back to the podcast for a moment... My ears perked up when I heard you mention potential long range plans that could include FPGAs. My company operates at the intersection of micros and FPGAs, and I'd love to chat on this topic sometime if you're game.
@old smelt totally. I've got my eye on the open source fpga toolchain stuff
Like Migen? ?
Have you looked at MyHDL at all? One of the main contributors, Chris Felton, is a friend of mine and was just here last week talking about it to some of our team. Cool stuff. Different than CP/MP, but related, IMO, at least as far as the kind of stuff I'm interested in.
@old smelt and the underlying icetools and whatever the newer one is
Automated website update for release 4.0.1 by AdaBot.
mostly interested in a usb peripheral that tinyusb can support
plus a bootloader for the fpga that can drag and drop new configs
I haven't looked at myhdl
Yeah, a drag and drop bootloader would be very cool.
It's one of my favorite things about CP.
Took me 5 minutes to upgrade all my hardware to 4.0
ya, and I'd love to see the fpga SoC tools generate datasheets and some standard register layout machine readable file
nice!
The idea of a "standard" anything across the FPGA vendors is...well...non-standard. ๐
Or, as I have heard it said, "the great thing about standards is that there are so many of them."
haha, ya
something standard for the open toolchains at least
I don't have interest in vendor tools
Understood
would be very cool to have a stable of different SoC images for different things
then most people wouldn't need to generate bitstreams at all
Right. That's a goal I like as well. Give users access to the benefits of FPGAs without needing to scroll into the tools or HDLs.
totally
It's tricksy
and then we could reorganize circuitpython around peripheral implementations instead of chip families. ๐
yup, that's why it's on my way back burner
I can understand that. But I am motivated to push it toward the front - at least for what we are doing - because I love using Python for the micro development. I think it opens the door to a lot of developers who might not even be giving FPGAs a second glance right now.
I'd love it if you'd help get it there. ๐
tagged 4.1.0-alpha.0 so builds off master don't say rc.3 plus some stuff
@sly falcon no love on eduroam with the pyportal. It doesn't seem to even try. The connecting line just repeats as fast as the serial link can show it
@slender iron interesting approach with the areas and masks -- you could probably even use dma transfers for the case of no transparent pixels
Yup, it's meant to track when we've filled in all pixels in an area. (We haven't if any of them are transparent.)
@stuck elbow ya, or a key color if there are. I glanced at the docs for the Chrom-ART in the stm32h750 when brainstorming how to do it. ๐
it also uses the cpu cache much better
I'm not super happy with the extra bitmask for transparency but it's easy-ish to implement and works
same is true for the filesystem cache which is row-associative as well
having to work with 16-bit colors is a drag, otherwise you could have the mask same depth as the data, and really & them while blitting
missing that really hurts because fatfs always loads the full 512b block
I do that for the sprites on the 1-bit oleds
ya, I'm not exactly sure how things will change once we support different output bit depths
and the mask, then xor the sprite data
the blit() function in the last listing on that page
k thanks!
sorry, one-but-last
I'll read it all ๐
I miss Amiga's hardware blitter
we could probably use a module for faster bytearray manipulations
once could xor each byte to each other
or we make a superbytearray
๐
haha, definitely
my original plans for MicroPython were to turn the framebuf into a generic "image container" similar to your area
or neobytearray to go adafruit style
and then to build the scenes bottom-up, by blitting layers upon layers (with overdraw)
ya, that approach would make it easier to do partial transparency too
next on my list after vacation is dirty rectangle tracking
like blending?
one thing I never got to, which is very fun to do, is optimizing the dirty rectangles by merging them
ya, I've spent a long time trying to decide how to do that
basically when the unused corners of the encompassing rectangle are smaller than the overlap, you merge them
I think my current approach is somewhat like a merge sort
hrm, I hadn't thought of it like that. I always assumed I'd make three rectangles out of it
of course the order of merging matters
I think I'll force myself to ignore merging to start
it'll still be faster without it
yeah, it actually doesn't provide much speedup
but it's very fun from the algorithmic point of view
definitely
I'd also love to differentiate overlapping sets of areas to prioritize some for update over others
since we can't push a full frame in one refresh cycle
ugame10 should be fixed with 4.0.1 so I'm closing this.
Thank you for fixing it.
Why is CP 4.00RC3 the first choice? https://circuitpython.org/board/grandcentral_m4_express/
The Adafruit Grand Central features the Microchip ATSAMD51. This dev board is so big, itโs not named after a Metro train, itโs a whole freakinโ station!This ...
@quasi fjord ๐ well that's less than ideal....
and 4.01 the second.. seems weird.
Just a silly idea: if this was a count, instead of a bool, we would have an easy way to keep track of how many pixels are still left.
@quasi fjord regarding the insane repeating of that line, yeah...I thought about reworking that portion of the loop, but left it as-is for now. The non-enterprise version of the loop keeps poking the ESP32 to connect. There is no real equivalent on the enterprise side. You just have to be patient and wait for the ESP32 to do its thing. If you don't turn on debugging you obviously won't see that nearly-infinite scroll, but yeah...I hope to fix that in a later version
because 0 sorts before 1
@quasi fjord regarding the non-working eduroam....I don't have any clues off the top of my head. I can bring my test setup with me to the office tomorrow and give it a shot. I didn't bother trying our eduroam AP. That said, I have no nearby campus I can go to to really test whether the code works in that sort of environment
@sly falcon yeah, I pulled that print out of the loop. I was able to have someone check the admin side of the system and it didn't register any activity from that Mac address. The expresif examples have a _start() call after the _ent_enable()
@swift arrow @sly falcon @stuck elbow https://github.com/adafruit/circuitpython-org/issues/196
WOW!! I am mentioned by name in a Git CP issue!!! I'm someone important now! ๐
@quasi fjord I seem to remember looking at that when working on the NINA firmware side.....let me bring my setup to work tomorrow and see what I can see and then we can go from there
@quasi fjord all that said, I super appreciate the testing and help! ๐
@sly falcon @quasi fjord might this be helpful?
documents my process for custom nina-fw firmware for ESP32SPI and working eduroam code
@slender iron @tulip sleet have you come across a high-level micropython flowchart illustrating the VM/byte code execution by any chance? ๐ผ
@lime trellis hey I just started following you on Twitter! haha... Anyways, I checked out the issue, but I'm sorry - I'm missing what specifically you're pointing to...it is the end of my workday, so it could entirely be my brain is fried heh
@sly falcon I just saw mention of NINA firmware and eduroam but couldn't find your initial convo with @quasi fjord so I threw that out there in case it'd be helpful
@lime trellis no such thing that I know of
there might be something in video talks by Damien, but probably not at that level.
@lime trellis oh, ok, cool! I appreciate it. Looking at your repo, it looks like you're using the version of the NINA firmware where I added the WPA2 Enterprise support and my example CircuitPython code. Glad to hear it's working for you!
@tulip sleet good to know! I guess I'll be making one for a paper I'm writing on CP for use in satellites. Mind if I run it past you at some point to make sure it's correct-ish?
@sly falcon ah! yes I am. Nice work on that!!
working great for folks here
@lime trellis You can, though we actually don't need to know the inner workings of the VM all that well. Also, you might post it in the micropython forum and see if you get feedback there
Seems like the rabbit hole might be deeper than I expected, then. Thanks Dan
@lime trellis thank you!! ๐ ๐
ya, I'd suggest starting with videos from damien @lime trellis
@lime trellis I tried that example script too, but still no love.
When I enabled esp debugging with my PyPortal class based code I get a constant stream of ConnStatus 1 aka NO_SSID which is wierd because a scan picks up at least two APs broadcasting it.
It could have something to do with our WiFi overlords recently requiring TLS1.2 for all authenticated connections
ah-ha. I was able to setup an "eduwander" at home and connect to that, confirming that the esp32 is only doing tls1.0. If I set the minimum TLS version to 1.2 the connection is rejected.
The secondary issue is that the MAC address is printed backwards somehow so I was looking for the wrong one in the production eduroam tool
@sly falcon I think your firmware and library changes would have work perfectly had I tried them a week and a half ago, before they started requiring TLS1.2. So close
ok, the market of homebrew game consoles is now officially overcrowded
what even is this https://play.date/
Airlift board with a EInk board: 2 SPI devices. Can I share the SCK, MISO, and MOSI lines between the devices?
@fading solstice Sure, as long as they have separate CS lines
You could also choose another set of pins for another SPI device: https://cdn-learn.adafruit.com/assets/assets/000/075/654/original/adafruit_products_schem.png?1557700681 will show you free pins that share a SERCOM
In the software then, would there be a shared busio.SPI object provided to control libary objects
yes, you pass in the SPI object when you create the ESP32 library object:
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset)
@tulip sleet I have metro m4 (older model) with airlift and eink 1.54 monochrome. The airlift board queries the IO.Adafruit server and then the value is displayed on the eink board. Both work separately. They also work as a one-shot thing, but when I put them into a loop, the second time thru the loop, the Airlift board can no longer connect and retrieve data. i was looking for ideas to look at.
@fading solstice could be a library bug, could be a latency issue. Update libraries to latest if you haven't already. On the metro m4 you have plenty of pins, so you could try a separate SPI object, so there's no contention. If that hangs there may be some non-SPI issue.
hard to tell without looking at the code in detail, but feel free to post it here or in the forums.
@tulip sleet i will try separate spi channels for now, but one supposed to work. right?
yes, it should work fine, because the spi locking will cause its use to be serialized. So something is violating that, or it's some other issue entirely
While using the cpx, the two buttons crash the entire board after playing a sound. There is no error message and the REPL and serial monitor crash. The buttons are supposed to play a sound when they're pressed. Here is the video of the serial monitor crash: https://imgur.com/O1GLBwN. The board crash is also recorded: https://youtu.be/53wDuqXmbi8. The code that seems to be causing the crash is below
while True:
if cpx.button_a:
cpx.play_file("foo.wav")
elif cpx.b...
@idle owl https://forums.adafruit.com/viewtopic.php?f=60&t=150356 about bundle being too big to copy completely any more. I edited the Guide page in question to remove the suggestion to copy the whole bundle, but that section could probably use more review.
Is there any thought of porting CircuitPython to the announced ESP32-S2 device ? With the promise of native USB it would seem to fit into your board lineup. I teach occasional MicroPython IOT classes at a Makerspace. The ESP8266 Huzzah has been my go to board. But, it really is painful for students to deal with the complexities that come with the USB-Serial converter. This new ESP32-S2 device would appear to solve that.
@brazen oxide The USB version was only announced days ago. It certainly caught our attention. A port to a new chip with its own proprietary peripherals is a major undertaking. Our current Wifi solution is to use an ESP32 as a co-processor. This has the advantage of offloading time-consuming tasks and their scheduling to another processor. It also means the Wifi solution can be changed out if needed. See the PyProtal and our new AirLift line of boards, and there are more coming.
Thanks for the response. I'll stay tuned in, to see where Adafruit heads with this new device.
@brazen oxide Setting up IO, especially with the new ESP32 coprocessor is incredibly quick (https://learn.adafruit.com/adafruit-io-basics-airlift/circuitpython). More iot libraries to come - which will all use this co-processor solution, incl. azure iot
you can also update the binary of the firmware running on the esp32 (wifinina) via a circuitpython script, no usb-to-serial flashing required
Didn't get a chance to ask for reviews on this on S&T yesterday since hangouts was down, but the azure library is ready if anyone wants to review the PR https://github.com/adafruit/Adafruit_CircuitPython_AzureIoT/pull/1
Worth attaching the whole code and all the sound samples too if you're ok with that. Worth a mention of the specific version of CircuitPython and the library bundle you are using too.
@quasi fjord Huh...that's interesting. I'm at work, but I did a tiny bit of poking at the ESP-IDF docs and I didn't see anything that looked like it would prevent TLS 1.2 from working. Even more interesting, is that I can't connect to my own campus' eduroam setup while on my campus. But connecting to our normal WPA2 Enterprise SSID works just dandy.
The guy who manages our RADIUS setup is out on paternity leave for a few weeks, so I'm not going to be able to get info on our certificate setup until he gets back.
Kinda makes me wonder what Stanford is doing different that is allowing @lime trellis's setup to work ๐ค
did you remember to switch your userid to your full email when trying eduroam?
@quasi fjord yup....the Metro M4 just sits there angrily blinking its LED at me ๐ฆ
I'll play around with it either this weekend or next. I want to wrap up the PR I have for the ESP32SPI library I've been working on first...then I'll go back to poking at the NINA fw
@tulip sleet Ok, I'll take a look at the guide.
@tulip sleet There's more to that guide page that refers to copying the entire bundle. I'll have a go at it.
@tulip sleet If you get a chance, can you take a look at the guide page? I made some changes, updated the section that talks about the bundle download, it was still referring to when it unzipped to lib directly.
@idle owl, good point, that was confusing, and the new screenshots and text are good. The red box at the top still talks about updating from 2.x to 3.x. It should probably talk about updating, preferentialy to 4.x, or at least to 3.x
people could stay at 3.x if they want for a while; do you want to say "need". I guess we'll drop it eventually, not sure when
Eh, I don't want to muddy it by saying "Seriously, we're not supporting 2.x but you can stay at 3.x for a while if you want"
I think it's fine. We'll eventually want everyone on 4.x anyway.
yeah, you're probably right. anyone we're supporting with an issue we'll ask them to upgrade first
Yep
Hello all. I hadn't realised the cache.bmp file creation was part of the adafruit_pyportal library. There are two different write block sizes in the code, one for built in flash and one for sd card, i see the built in is 12000 bytes but comments as 12k and the sd card is 512 bytes and a comment mentions the bug. Should the 12000 one be 12000 or 12*1024? And, not important, but what's the bug for the second one? https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/blob/master/adafruit_pyportal.py#L751
Mainly to include a fix for the HID library that prevents negative mouse movements on 4.0.0.
quick question: the library bundle v3 vs v4, what are exactly the difference ? the version of mpy-cross used ? or the release of the libs themselves ?
eg: adafruit_sdcard : is it the same code/API in both bundle ?
ok, is there a prebuild version for CiPy 4.0 ? I didn't found it. I don't even remind where I found the v3x version
that's the bundle, not mpy-cross. Or do you look at the wrong place ?
I may have not been clear sorry
I was looking for the v4 version of mpy-cross
sorry
you will have to compile it, I'm afraid
i could've swore we had a precompiled mpy-cross-4.x at one point. but, i couldn't find it the other day... @tulip sleet am i dreaming?
@slender iron i think i'm really starting to understand the abstraction behind displayio. there are containers (groups) and things that have color and shape (sprites / objects). containers can go inside of other containers .
i went through and designed a spec for tg_gui version 3 without thinking about displayio and then later realized it is the same abstractions as the gameboy / displayio abstraction.
@raven canopy et al - you can use the 3.x mpy-cross - there's been no change in the .mpy format
I'll make some 4.x mpy-cross executables eventually, but I think they'll work identically.
k. i know the previous ones were "happenstance" that the version changes would trip it up. i just could've swore i saw some 4.x before. ๐
okay, i have some cp specific c questions. i'm looking at https://github.com/adafruit/circuitpython/blob/master/shared-bindings/displayio/Display.c and i see taht many of the objects being declared start with mp_ meaning micropython and end with _t. what does the t mean?
or stand for
that they are typedef'd
for example, here's mp_arg_val_t
https://github.com/adafruit/circuitpython/blob/master/py/runtime.h#L47
I was just looking for the API doc on the 're' (regex) package. I looked here:
... and it's not mentioned. should it be?
does anyone know if the supported regex syntax is basically same as described here: https://docs.python.org/3/library/re.html
@strange cargo the module is the same as ure here http://docs.micropython.org/en/latest/library/ure.html
We need to get those into the readthedocs for circuitpython
actually it's here: http://docs.micropython.org/en/latest/library/ure.html, but with the wrong name
thanks!
@tannewt There is a big jump in available space (>2300 bytes) when CFLAGS_INLINE_LIMIT goes from 24 to 23. We can use this when other builds run out of space.
A few mpconfigboard.mk files have language-specific build requirements, like this:
# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
else
CFLAGS_INLINE_LIMIT = 55
endif
However, build_release_files.py doesn't do a clean build for each language for a board. Only the first language is built cleanly: further builds don't do a make clean; make, but just a a make, reusing already compiled sources. This saves a lot of bui...
Some native modules that we've renamed back to their CPython names are still referred to with their u* names in the readthedocs documentation, e.g. circuitpython/docs/library/ujson.rst.
- Rename these files and also fix the module names mentioned inside them.
- Remove caveat language about these modules not being supported or that they may change.
Hey, i'm getting an import error for neopixels on the pybadge, does it not exist for the board yet?
thanks, sorry for the nub question ๐
@tulip sleet @stuck elbow @raven canopy thanks. I'll keep using 3.x for now and eventually recompile properly a v4 later. ๐
On the PyPortal if I connect any powered I2C device to side 4 pin connector, the RTC/time stops advancing and just pauses. The time continues again (does not restart, just picks up where it paused) after disconnecting the I2C device's power. The code I used to just check the time behavior as follows, then just power on/off the I2C device:
import time
i = 0
while True:
i = i + 1
print("time: {0}, counter: {1}".format(time.time(), i))
I know the devices are c...
The entire codebase is here: https://pastebin.com/NT34K32T
The versions of CircuitPython we tried are 3.1 and 4.0.
@raven canopy It doesn't look like Adabot added a PA token to the travis config for the Adafruit/CircuitPython_AzureIoT lib
I added one manually and it built, though.
@prime flower i've never known adabot to add any tokens automagically. you can run it locally with the -t/--token command line arg, and it will prompt for a GH token to apply if the env var isn't set in Travis.
Tokens on the adafruit/ repos haven't required me to create one in the past, not sure why it prompted me this time.
i think its usually part of the repo creation process... but i've only heard fables about that; its a mystical land i've never visited. ๐
ik adfruit uses the mit license but is the company comforatble with gpl code?
i would imagine its a case-by-case situation. certain GPLs can carry some daisy-chain affects (as i understand; could be wrong).
Hi, the "Installing CircuitPython" guide refers 3.x as the latest version : https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython
The BOOT_OUT.TXT file in the zip file says it's beta 7. Could you upgrade to 4.0.1 and try again?
Latest lib release: led_animation, test, tests, and utils (font_to_bin) (and maybe others) are deprecated, or just dropped off the priority list?
@crimson ferry for test, tests, and utils see: https://github.com/adafruit/circuitpython-build-tools/issues/30
let me look into led_animation. i think i came across it in my recent bundle changes, but don't remember where i ended up on it.
Ah, thanks @raven canopy Much of it was a curiosity, font-to-bin is used by framebuf, which I understand is somewhat deprecated though is still included in the library bundle (I suppose for those still running 3.x, and I think the OLED still needs it for now).
The 5x8 font has come in very handy this past year ๐
I've probably missed some things, those were not found in my script that makes a reduced bundle for flash-constrained devices.
@tidal kiln heya for your esp32 wifi code
shall i merge that change? i didnt have time to test it but if you did and it helps solve the issue thats fine by me
there's lots of little failure possibilities ๐
maybe. i didn't make any PRs though. i just ran into same thing and found the current issues and PR(s).
looks like there was one issue/PR that was for something related
but maybe didn't 100% fix things?
here's the one PR that was merged:
https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI/pull/44
but this one wasn't:
https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI/pull/42
yeah
did you want to try https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI/pull/42 ?
ill make the guide live regardless
ok. it still needs some prettying up. products, etc.
and i should PR the code at some point, right now its copy pasta
does the PR42 look OK to you? do you think raising an exception is the correct response?
the other one (PR44) just broke out of the loop it looks like
i think either is ok
you'll get a failure later
i can merge and you can test
if it doesnt work we can revert?
ok merged
you could just use the py for now
you could set it up to run, see if it hangs while u PR the code
ok. let me grab that and test.
cool - we'll keep finding these lil bugs
I have a feeling Ladyada and other staff will pop into work on more Circuit Python stuff....
I'm probably right
Who knows ๐คท
The support matrix shows that pulseio is supported for all SAMD21/SAMD51 variants. Removing warning to avoid confusion.
Thank you! The ground truth for these kinds of settings is in py/circuitpy_mpconfig.*, ports/*/mpconfigport.* ports/*/boards/mpconfigboard.*.
Would you be willing to resubmit this PR against branch 4.0.x? That will get it into a release version sooner. Thanks.
<@&356864093652516868> Here is the notes doc for the CircuitPython Weekly for 28 May 2019. REMINDER: The meeting is on Tuesday next week, NOT Monday. Hope to see you all there. Everyone is welcome! If you can't make it, you can always add notes to the doc and I will read them off during the meeting. https://docs.google.com/document/d/1ErgKcxoebEFgdZWQK-mTj65dnsHfS5dH5e1DNzuxci4/edit?usp=sharing
CircuitPython Weekly for 28 May 2019 Video is available here on YouTube. Join here for the chat all week: https://adafru.it/discord The weekly happens normally at 2pm ET/11am PT on Mondays. Check the #circuitpython channel on Discord for notices of change in time and li...
I do not think the problem is a software problem. I changed the PyPortal voltage output on the connectors to the 3.3V by cutting the trace 5V trace on SJ1 and solder bridging to the 3.3V. The RTC works now when I2C devices are connected.
that moment when you've spent a week building a testing framework from the ground up, and then look deeper into the existing framework already built in. should've done that before starting. ๐คฆ oh well...that was fun at least.
although...i can still push forward on the physical testing aspect (actual GPIO interaction, etc).
Just started with the idea to compile CircuitPython, first because I like learning, and then maybe contribute to a specific board I have.
Problem is that following instructions from the learn page on Adafruit website fails for my Ubuntu 18.10.
E: The repository 'http://ppa.launchpad.net/team-gcc-arm-embedded/ppa/ubuntu cosmic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://packages.microsoft.com/repos/vscode stable InRelease' doesn't support architecture 'i386'
@lethal abyss that ppa does not have an 18.10 release. Hold on and Iโll find the tar file you can use instead
๐
I saw there was no 18.10 so I guess @tulip sleet is right, I need to go on the source/compile way. I get the idea ๐
i was thinking it might be an 18.10 issue. also looks like they've abandoned launchpad/ppa.
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads
Get the 7-2018-q2 release from the link @raven canopy posted. Untar it and isdd its bin directory to your PATH
noted. I go for it. thanks.
iPhone is making a hash of my technical typing
I will post here success or failure. maybe I should write a note from the adafruit learn guide. It may be better to know that not all Ubuntu version can use the ppa way
I think we will give up on the ppa. @raven canopy is right; they seem to have abandoned the ppa
if all is needed is download a tar and use it, that's not a huge issue
Weโll be moving to to the latest version eventually and itโs not in the ppa at all
"that's not the word you want to use, Dan." - Siri ๐
๐
note: Android is no better...
looks like compilation went well, thanks a lot for the help
๐ yay!
note to self: 3 days of conference organization with the last one with a kids means you need to stop and sleep
I can go and sleep with a happy mind
sleep well!
Do we have any support for either LoRa or Bluetooth in CircuitPython?
Yes on LoRa. There are quite guides such as https://learn.adafruit.com/using-lorawan-and-the-things-network-with-circuitpython
Hi @obsidian dome, if you're in the US, you'll want 915MHz. If you're in Europe, you'll want the 433 MHz most likely.
@gilded cradle thanks!
@obsidian dome if you just want basic LoRa communication, there is a library for the rfm9x boards. See https://learn.adafruit.com/adafruit-feather-m0-radio-with-lora-radio-module or https://learn.adafruit.com/adafruit-rfm69hcw-and-rfm96-rfm95-rfm98-lora-packet-padio-breakouts
This adds a make stubs step that generates type stubs using rst2pyi, and then builds a source distribution containing these stubs for upload to PyPI. Type stubs are validated for correct syntax, but there are a number of failures right now due to documentation that does not use valid PEP 484 types, uses method instead of function for module-level callables, or otherwise contains invalid Python syntax. Running make stubs also warns about a number o...
Oops! Meant to do it for 4. Yes, will do.
On the Pygamer trying to detect button presses and not having any luck using the gamepad or gamepadshift modules. Can anyone point me at some example code that detects button presses on the PyGamer? Thanks!
I was looking at the code for seesaw/crikit and I saw that the crikit-hat has USB VID/PID (but not the crikit). I can't find what this would be used for (a bit lost with QP ;))
Any chance that USB could be used to send commands to a crikit from a linux/win PC just as from a RPi/CPX/Feather ?
@lofty nova iirc, the usb on the crikit is only for programming the SAMD09 chip. i'm fairly certain it doesn't contain a full USB CDC/MSC stack.
Hi @raven canopy , I would have expected that crikits have an uf2 bootloader which appears on double-reset (like CPX, Feather...). So the presence of VID/PID in the main code of seesaw/boards let me expect something more.
Still seesaw\source\USBcontains the code for CDC.
So it should be possible to support serial/CDC commands ?
Or better use HID ?
I see that as an interresting opportunity to use the Crikit as an PC I/O extender in CPython. But I don't know where to start from.
yeah, i was just looking at it. i am clearly wrong on the USB front. ๐
And theres a seesaw/source/AOUSB.cppwhich seems to register something in QP. But I've not yet understood how this QP thing is working. I need to read a bit of the doc probably ๐
hehe. also, i forgot crickit uses a SAMD21 vs a SAMD09. in looking at the code though, i'm not sure that the firmware itself has USB available. the bootloader (CRICKITBOOT) to update firmware, has it yes. but i dont see anything activating SERCOM3 in the source; the USB D+/- lines are hooked to SERCOM3. i've gotta run, but hopefully i'm completely wrong and you can make it work.
Good morning all
Is it possible to have more than 1 spi busses open at once
For example, use the feather minitft & a rfm96 module at the same time in circuitpython
Is there any plugin for Atom similar to the one for Mu?
I'm somewhat interested in making one if there isn't one already available
@modest atlas yes, you can also use the same spi bus for both, just use different pins for CS
@stuck elbow will try this, likely the cause of my problem, thank you
improved code legibility, MD for code nested inside a numbered list for the code regarding PWM.
Just verifying my pull request, sorry if I just duplicated it. First time.
@raven canopy Might you have a minute to help me fix a travis/pypi bug?
i can certainly try!
I can't figure out what the issue is here and don't know how to test it without doing a bojillion releases:
https://travis-ci.com/adafruit/Adafruit_CircuitPython_BD3491FS/builds/113334472
it needs the $GITHUB_TOKEN environment variable set in Travis.
it needs the $GITHUB_TOKEN environment variable set in Travis.
like so, in "Settings":
i believe its set to adabot's GitHub token, but i don't have it.
ah, ok. For whatever reason I hadn't done that on previous CP drivers, only the Arduino ones. Maybe I'll update the guide to make it more clear
buh; I must have messed up generating my PiPy creds
@raven canopy is there a way to test the travis "encrypted" PyPi password?
i don't know of any off-hand. there may be something in the Travis CLI tool. or, is maybe something on PyPI?
(resending; discord is having trouble) i don't know of a way off-hand. i don't see anything helpful in the Travis CLI tool...
The support matrix shows that pulseio is supported for all SAMD21/SAMD51 variants. Removing warning to avoid confusion.
@gilded cradle ok i gave u perms for the learn repo, you can now merge
Thanks ๐
oh rad
nice work! that will be handy ๐ publish it somewhere and we'll let people know!
It's not perfect by any means, and my JavaScript is not fantastic, I'll stick it on GitHub and will be happy to accept any feedback from people who know more about this than me haha
indeed!
tag me with the url when ya do - so we can be sure to put it in the newsletter
Okay @meager fog. Have put it on GitHub https://github.com/jos-b/atom-circuitpython !
awesome thank you
I'm going to try improve stability before I put it on the atom package registry
I might need to get some info about how circuitpython devices work on Windows as well, right now I'm just searching in /dev/ for /dev/cu.usbmodem* but I have a feeling this may not be the correct way of doing things
Ah! Found an NPM package, interesting
I've managed to get this data ```json
{ comName: '/dev/tty.usbmodem14101',
manufacturer: 'Adafruit Industries LLC',
serialNumber: 'C48F2034D475E405A413E203F06240FF',
pnpId: undefined,
locationId: '14100000',
vendorId: '239a',
productId: '8019' } ]
I can check against manufacturer right?
actually VID & PID are probably better
are they the same for all circuitpython devices?
there ya go - well they're not ALL the same
Ah, wait
but you can start by adding anything with 0x239A
Okay, awesome
nowadays we do 0x239A (all with that VID) because we come out with boards too fast, and then there's a few others
just be ready to add lots more
Okay, I'll make it something easily configurable in that case ๐
hey, my script stops running after i try to read from any i2c device
no error
when I save a file to the drive it will restart running the script. CircuitPython 4.0.1-5-g63b253c33 on 2019-05-23
doesn;t seem like proper behavior. i can lock and scan but reading data does not work
@marble hornet what board/device -- I am using I2C on that build without issue.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.1-5-g63b253c33 on 2019-05-24; Adafruit PyPortal with samd51j20
>>>
>>> import adt7410_simpletest
0.0
27.7109
27.75
27.7734
27.7344
Hello people!
Hm, this node library is proving to be a nightmare
I'm using a m4 feather and a feather mini tft
I wonder if I can go lower level to discover serial ports
Oh wait, I say that and then it works
Trying to use the example for displayio text but getting an error for no attri it 'DISPlAY'
Attribute *
@solar whale i;m in my tricorder.
it came back for a while then it when away
electrically (excluding the inductors on the internal regulator) is electrically the same as a metro m4 exp
Okay, should have windows support now I guess
finding devices i mean
Okay, pushed latest version, if anyone tries it out let me know of any bugs https://github.com/jos-b/atom-circuitpython
import displayio
import terminalio
from adafruit_display_text import label
ย
display = board.DISPLAY
ย
# Set text, font, and color
text = "HELLO WORLD"
font = terminalio.FONT
color = 0x0000FF
ย
# Create the tet label
text_area = label.Label(font, text="HELLO WORLD", color=0x00FF00)
ย
# Set the location
text_area.x = 100
text_area.y = 80
ย
# Show it
display.show(text_area)
AttributeError: 'module' object has no attribute 'DISPLAY'
Trying the example with a mini tft feather on a m4 feather
please follow this guide
yes?
@meager fog i have that guild open but just trying to add the text demo from the "displayio" guild to display custom text
follow the guide exactly as is first
then you can modify ๐
gotta go!
l8r
I have the mini tft demo up and running, but cant seem to find room to adapt the code for the text demo on displayio guild
@rare geode other than the vendorId HEX being capitalized in Windows it seems to work
Ah, I'll take a look at that, cheers
changing lib\board-view.js#32 to let chosenBoard = ports.find(e => vendorIDs.indexOf(e.vendorId.toLowerCase()) != -1); seems to do the trick
Great, I'll change it and add in a second
also I stumbled on this while trying to figure out why it wasn't finding my pyportal: in disconnect() you should check if this.sp is set before calling close(). It causes an exception when a board isn't detect and connected properly and I think Atom disables the package when it does
Ah, of course
Right, good findd
ah, found out how to define globals in eslint
no more annoying atom is not defined errors
pushed ๐ cheers for the help!
and immediately notice bug after pushing lol
okay awesome
Right, this seems pretty stable now
might be time to stick it on the APM
Okay, since it seems I am inept at using the APM the first version there is 0.3.0 lol
but it is there https://atom.io/packages/atom-circuitpython
@rare geode firstly, awesome!! i will def try it out, as i use atom mostly these days. i would make mention of using it with the fsync-on-save atom package, though. not sure if APM has any dependency type stuff, so a helpful mention might at least save some corrupted file system occurrences.
Ah yeah, I've got that package
I'll have a look at whether I can make it a dependency, and if not, I'll recommend usage in the readme
I think I can require from git
hm, actually that doesn't regisster it with atom
I'll just add a recommendation to the readme
yeah, i'm not seeing anything in the docs... ๐ฆ
I've put a message in the readme ๐
published to the APM
Hm, I'm getting issues installing from the APM relating to node-gyp, looking into it
Hiya - I'm having trouble with my machine seeing my Feather M0 Wifi as a mounted drive. I've read through the docs, tried uninstalling drivers, tried the device cleanup tool (https://www.uwe-sieber.de/misc_tools_e.html) and still struggling - just seems Windows 10 isn't enumerating the drive. Can "double-click" the reset and see that it's in bootloader mode (slowly blinking red light), but still not showing up. Can confirm a CPX works fine. Any last ideas before I give up?
@timber mango does the com port show up in device manager->ports? drivers aren't necessary on Win10.
@raven canopy yes, it does, as a "vanilla" USB Serial Device
can you get to the REPL in a terminal?
since your CPX works, i don't imagine its a Kaspersky AV issue. https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#circuitpy-drive-does-not-appear-20-12
have you tried reinstalling CP? You probably want to upgrade to 4.0.0 anyway. The Feather M0 could be programmed with Ardiuno too, so it could be running an Arduino sketch instead of CP which wouldn't show up as a drive
Thanks both, sorry for delayed replies. @raven canopy how would I do that? @quasi fjord , not clear how I do that w/o access to drive. Sorry, n00b...can you you point me in the right direction?
@timber mango with either Mu (Serial button) if you've been using that to write programs. or with a program like PuTTY.
Ok, will get Mu - should have just listened to @meager fog and installed Mu ๐
oh, you aren't getting the CIRCUITBOOT drive. hmm.
yeah, that's what has me a little stumped too. it would have to be programmed with a rather old bootloader to not have the boot drive show up.
Probably was...I bought these just as they released, and haven't picked up since.
oh..then yeah, that might be it if they were purchased pre-USB bootloader. for the record though, i'm not exactly sure when they would have started shipping with it. Arduino may be your best bet, to get the bootloader up to date.
Mu-ving along...saw "Detected a new CircuitPython device" in bottom tray upon reboot.
...but nothing comes up. Have Arduino...can give that a try
hmm. i've never used the non-express boards, so this may actually be more helpful than me: https://learn.adafruit.com/welcome-to-circuitpython/non-uf2-installation
aha
Looks like I need JLink to restore a new bootloader with Arduino https://learn.adafruit.com/proper-step-debugging-atsamd21-arduino-zero-m0/restoring-bootloader
^ That sounds familiar. I think I did have to use bossa to put CP on my feather m0 lora before I realized it didn't have enough flash to do anything useful and went back to Arduino on it. The non-Express M0 and M4 boards can technically run CP, but you don't have enough space to include pretty much any libraries
That's helpful, @quasi fjord - realizing this board might not meet my requirements anyway, given I want to store some audio files on the board. Looks like an "Express" trip to MicroCenter is in order! Thanks both - learned a lot in a short amount of time! ๐
I was playing around with a circuit playground express and a crickit. I got this error
You are running in safe mode which means something unanticipated happened.
Looks like our core CircuitPython code crashed hard. Whoops!
Please file an issue with.....
with the contents of your CIRCUITPY drive and this message:
Crash into the HardFault_Handler
My code:
`import time
from adafruit_crickit import crickit
#from adafruit_motor import stepper
print("Bi-Polar or Uni-Polar Stepper ...
What version of CircuitPython are you using? boot_out.txt is unreadable, for some reason. Could you paste its contents here if it's readable to you?
[I edited your initial post to reformat the code: you can surround it in triple backquotes and then it formats nicely.]
@gilded cradle heya does that font have other character sets like japanese or hebrew?
It does, but they divided it into separate font files and it could easily fill up the memory on the badge. I just chose the one that supported the most languages in a single file.
ok lemme l00ksee
@gilded cradle do you mind trying hebrew, im actually curious if it handles opposite direction fonts
Sure, I'll see what happens ๐
Japanese should work, but I'll try that too
Ok
The Japanese font is 121 MB
OMG
oh its all
can you get just katakana/hiragana font?
you dont need the entire language
yes, either. Which would be better?
Ok, thanks
well actually you need both
the 'hello' is hiragana (native), the name is katakana (foreign)
im surprised, they dont have a font with both?
Oh, I just relaized these are ZIPs. Lemme see what the font file itself is
yeah, that's probably the biggest limitation
yeah this is massive
odd why is it so big?
the font should only contain the japanese chars
this font is cute
Ok, here's the error I got with Hebrew
Traceback (most recent call last):
File "code.py", line 101, in <module>
File "/lib/adafruit_display_text/label.py", line 79, in __init__
File "/lib/adafruit_display_text/label.py", line 87, in _update_text
AttributeError: 'NoneType' object has no attribute 'height'
I am running adafruit-circuitpython-circuitplayground_express-en_US-4.0.1.uf2 that I just downloaded. the libraries I got from adafruit-circuitpython-bundle-4.x-mpy-20190526.zip. Both downloaded this afternoon.
still honkin large
Yeah, it's still downloading the Google Noto font. I'm not sure why since my connection should be way faster.
well thing is we should just remove the non kana glyphs
Yeah, the cute one is definitely better
one sec
ok
but how...i dont know
I managed to read this off the actual circuitplayground express:
{ D 5 0 9 1 F D A - B B 2 8 - 4 C 5 3 - A 6 4 0 - 6 9 2 F D 9 8 8 0 C B 9 }
if that helps
It can be done with font forge, but I'm not sure which ones are which and it would probably take a while to do manually.
That'll work
any of those look reasonable?
Yeah, I think so. I need to register before I can download, so it'll be a moment.
I got one onto there and am loading it up now...
Ok, I Japanese is working
It didn't center vertically well, but it does display.
Should I look for a different Japanese font that centers better vertically @meager fog or see what I can do to get Hebrew working?
dunno exactly what you mean by verical center?
It just is vertically shifted above the center line whereas the other fonts were vertically centered in the white part
ooh
i think thats ok
thats the "hello" part tho
that goes where the white text is
Ok, well I'll see what's needed to get Hebrew working with labels.
Did you want me to set the Hello text in Japanese for that picture? I did cover changing it to French at the bottom of the gguide page.
Ok
Ok, so I can set the HELLO text to Japanese because it's the same font size as the name, but to change the My Name Is to Japanese, I need to create another BDF file and they're 1.3 MB each and it looks like the PyBadge has 2 MB of memory.
I can try it on the PyGamer since that has 8MB of storage.
There might be enough space on the screen to do it all in the same font size ๐
@gilded cradle does the font you're trying still have a bunch of kanji in it? We could trim various fonts to be just katakana, hiragana, and roman
I'm using one that is just katahana
mel, back from ๐
๐
ok lets just do the name then, not the HELLO text
i thought the one font had both kata and hira
Ok
sorry for the distraction -
I used the Gebamoji one.
oki yeah i think thats fine
@tidal kiln heya if yr around i have a q about ADS1015, its still in my inbox
and not sure if there's anything i can help w/
yep. go ahead.
so i think last we checked, there was a thing of like ADS works, but you can't read from it fast
what happens if you put it in continuous mode, and try reading at like 1KHz?
ah. that. or....this:
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/issues/27
yeah like instead of waiting for the pin to toggle, just read every n ms with delay
and have the delay set to match the freq?
yeah or close enough
you can oversample, as long as you hit it at least as fast as whatever, 868hz
probably worth testing further...looking at what i did....
i think i only tested on a pi zero
maxed out at ~200hz
i think skip the pin, yeah
and set i2c freq to 1MHz
that and a faster pi
i think a zero should be able to do it
i2c freq is what is bottlenecking i bet
100khz is not very fast
half the time is spent on i2c
yep. the i2c traffic is definitely a bottleneck
ok use the library as-is, put it in continuous mode, and read as fast as you can
you'll get duplicate points but so what?
your math still works out
or rather, their
ok. i'll need to setup that all back up for testing.
want me to just respond in that issue thread with results?
no rush, it was in my inbox for a bit
i think try the above then reply
it'll probably work and then you can close all the threads
do it sometime this week
yep
w0rd
ok next up, i also had this note
for this guide
do we want to make a page called WARNING!
or something?
with this info?
https://forums.adafruit.com/viewtopic.php?f=19&t=149906#p743077
I figured out the Hebrew font issue. It didn't have an "M" in the font set that label was looking for. After I added an M, I found out it displays Left to Right instead of Right to Left.
could be on Expectations page? if you want to keep it to an existing page?
but a Watch Out page would make it more explicit
Accounts
@gilded cradle hmm what do you need an M for?
do you mean like for "hello my name is"?
@tidal kiln feel free to add some adorable gfx to that page of a brain
Correct
I added just the M for testing purposes via fontforge