#circuitpython-dev
1 messages · Page 241 of 1
phew, finally this is fixed :+1: :+1:
6b743e2 Build everything and run tests - tannewt
Works after a quick test!
@mgithubreq Could you try this build on your Trinket M0?
https://adafruit-circuit-python.s3.amazonaws.com/bin/trinket_m0/en_US/adafruit-circuitpython-trinket_m0-en_US-20190328-c6e3b17.uf2
It fixes a USB HID problem that may also affect connectivity. PR for fix is #1721.
@umbral dagger the bluefruit app should work - make sure all the libraries and CPy are up to date. Try the echo example in Adafruit_BLE
@exotic pumice working on it
Wahoo! CIRCUITPY mounts, and I can talk to it on the console!
It is seeing some garbage on the console somehow, causing errors, but I'm pretty sure that's host side. Once I'm on the console and hit CTRL-D it runs normally.
Could we get a build for the neoTrellis too?
Just look for the same commit number c6e3b17 (or later) on the Amazon S3 site above for other builds.
The garbage you are seeing could be due to modemmanager running on your host (especially if you se "AT" in the strings. Just uninstall it -- it doesn't have much purpose nowadays.
Sorry? I'm stoked. New platform to learn! 😁
ya, looks promising so far
can we get more simultaneous builds on azure, or are you hoping to split across travis and azure?
yup 10 concurrent
and can do multiple jobs which allows for splitting commands more easily
moving circuitpython will free up travis for libraries too
@slender iron can you use Ubuntu 18.04, or they only have 16.04?
only 16.04 unfortunately
1f7509d Tweak python package installs - tannewt
858a836 Fix sphinx version and continue on doc and tran... - tannewt
Thanks!
The neoTrellis works too with c6e3b17!
removing modemmanager fixed the garbage, too.
Please rebase this so it doesn't include the chip select changes. Thanks!
On Fri, 29 Mar 2019, at 03:30, Scott Shawcroft wrote:
@tannewt approved this pull request.
Tweaked one old comment and looks good otherwise. Will merge after Travis gives the ok. Thanks for your persistence on this!
Thanks Scott! Yeah, getting languages to merge is a bit of a bear, eh ... every time I think it's working they get out of date again!
(I do think multilingual support is a great feature though, I just wish it was easier to merge!)
dcbba98 Fix translation check and tweak continue but fail - tannewt
That would be fantastic!!!
not coincidence at all, but i've been looking to give myself certificate fees for edX for my bday present. today i was this close to starting Microsoft's DevOps one which is ofc Azure based. 😆
aae8bda Make sure we fail even if we continue - tannewt
Ya, I looked into having a smarter merge but didn't see any great options.
77f307c starting on #1046 rtc for nRF - nickzoic
69cf33e more fake RTC code ... adafruit/circuitpython#1046 - nickzoic
b09d2c3 enable NRFX RTC adafruit/circuitpython#1046 - nickzoic
ff6395f workaround for problem with adafruit/circuitpyt... - nickzoic
28254de adafruit/circuitpython#1046 handle overflows in... - nickzoic
83b06ac Fix build and reorder builds - tannewt
@idle owl do you have a blurb about the open space at pycon? we should add it here: https://us.pycon.org/2019/events/open-spaces/
Looks like Travis is failing with "git submodule update --init --recursive". Any ideas?
@makermelissa The lwip server is unhappy. Waiting and then retry should work.
a9e28b6 Dump env and tweak build jobs - tannewt
Please create a new repo named "Adafruit_CircuitPython_SSD1331". Thanks
isn't it just great how many test commits it takes to set up CI? 😛
@slender iron I think we might consider doing a beta.6 Friday just for support reasons, since it fixes significant bugs that are causing support issues, especially for PyPortal.
releasing on a friday? bold
@tulip sleet yup, good idea
@dhalbert Thank you! Unfortunately, I can't test this right now. We have only one Trinket and I already passed it on to the team doing further integration into our target device...
I believe I've encountered an error in the PyPoral Library that supports the code.py that retrieves Adafruit famous quotations. After an estimated 72 hours of "burn-in", I found the screen in text mode with a stacktrace-looking stream of text:
rieving data...Reply is OK! (beginning of that has scrolled off screen)
Couldn't parse JSON
The actual "text" value appears truncated, and there is no attribution.
The mentioned locations are:
File code.py line 33 in <module>
File code.py li...
I tried this on an Amazon Fire, and it no longer seems to crash. Unfortunately, the HID keyboard presented by the Trinket prevents the on-screen keyboard from appearing, and there was no obvious way to allow the on-screen keyboard to appear. I'm going to close this for now, because it sounds similar to the other scenarios for #1721.
I let this run overnight, unconnected to USB, and it didn't crash. There are still problems related to USB connect/disconnect (#1681), but #1721 or other fixes may have fixed the underlying problem here.
@deshipu thanks for the info, anyway to get lastes available realease for ESP8266 and ESP32?
@dhalbert I;ll read it and fix it. Thanks.
@slender iron I'm gonna start on the release notes for a beta.6 as a draft release in github
Wujuuuu! Finally working. Sorry for the mess.
Re releases:
The latest working ESP8266 release is 3.1.2: https://github.com/adafruit/circuitpython/releases/tag/3.1.2
There has never been a CircuitPython ESP32 build. There is a MicroPython ESP32 build.
@slender iron beta.6 release notes draft is pretty much done, unless more is merge
@slender iron https://github.com/adafruit/circuitpython/pull/1708 could be merged but the other PR's are not ready (and not vital).
@tulip sleet Do you want me to merge it?
no, scott should vet it one last time, since he was in on the discussion
https://twitter.com/BlitzCityDIY/status/1111646888137314304 awesome vid by blitzcitydiy about porting btween arduino and circuitpython
⚡️NEW VIDEO 🎶 Let’s Talk About the MSGEQ7: Porting Arduino Code to @CircuitPython 🐍
LINK👇
https://t.co/tZLfCQqUHm
Instead of using bswap and shifts here, put the data declaration inside the if and change it to uint8_t. That will isolate the individual values and make it clearer to read.
c3329e2 Added Single Byte Boundaries option for certain... - makermelissa
cc96c39 Fixed wrong operator - makermelissa
a54493b Added small delay inside toggle for edge cases - makermelissa
5f0e71c Merge branch 'master' of https://github.com/ada... - makermelissa
f4cede4 Removed parameter so CS is always toggled - makermelissa
What is the best way to expand the GPI O on a py portal
I2c?
Good morning everyone!
Good point on readability. I was just hoping it would make the program a little smaller when I did it this way. Thanks for merging it in. I can make the readability improvement for the next release.
There are handy I2C expander chips like https://www.adafruit.com/product/593 (8 ports) and https://www.adafruit.com/product/732 (16).
@modest atlas Seesaw is another option for more extensive expansion (7 GPIO, but lots of other goodies) https://www.adafruit.com/product/3657
@tulip sleet The BLE echo example works fine.
@modest atlas @main meteor Seesaw is fine, but as mentioned has other things which may or may not be useful. It is on a nice breakout, though. The 23017 will give you 16 digital I/O lines but there isn't a breakout afaik. It's usually my goto expansion ship, especially in a custom build.
@modest atlas @main meteor I designed and did a custom board for a 32-bit I/O UNO format shield using the SOIC version of the 23017. My smarthome node uses one for configuration jumpers and a digital expansion port (for things like switches, relays, etc).
@umbral dagger the error you're showing with BLE UART might be due to not being connected. Is your code very different from the BLE echo example?
Seeing travis errors:
../../locale/pl.po:849: 'msgid' and 'msgstr' entries do not both end with '\n'
../../locale/pl.po:1141: 'msgid' and 'msgstr' entries do not both end with '\n'
@tulip sleet ```
from adafruit_logging import LoggingHandler
from adafruit_ble.uart import UARTServer
class BLEHandler(LoggingHandler):
"""Send logging output to the BLE uart port."""
def __init__(self):
"""Create an instance.
:param uart: the busio.UART instance to which to write messages
"""
self._advertising_now = False
self._uart = UARTServer()
self._uart.start_advertising()
def format(self, level, msg):
"""Generate a string to log.
:param level: The level at which to log
:param msg: The core message
"""
return super().format(level, msg) + '\r\n'
def emit(self, level, msg):
"""Generate the message and write it to the UART.
:param level: The level at which to log
:param msg: The core message
"""
print('connecting')
while not self._uart.connected:
pass
print('connected')
data = bytes(self.format(level, msg), 'utf-8')
print(type(data))
self._uart.write(data)
@tulip sleet It's all looking fine up until the write. data is bytes just like the result of read in the echo example.
@umbral dagger could you replace the triple single quotes with triple backquotes?
how long is the string you're trying to write?
@tulip sleet my bad
@slender iron I'm seeing BLE problems with latest master (these are not the same problems as @umbral dagger is seeing above)
@tulip sleet I'd still publish beta 6
because more people are hitting the usb issue than are using ble
BLE is completely unusable; I'm bisecting. I think if you revert the nrf RTC PR it will work; just confirming
i have to leave in 10 mins for the rest of the evening
Or I can do it tomw. If you revert that PR, build a feather 52840 build, load it, and try this:
>>> from adafruit_ble.uart import UARTServer
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_ble/uart.py", line 34, in <module>
File "adafruit_ble/uart.py", line 56, in UARTServer
OSError: Failed to change softdevice state
it should NOT get that error
it is definitely that PR
according to bisect
or, let's revert, wait for the builds, and I'll retest tomorrow and publish beta.6 tomorrow
depends on your schedule now as well
@slender iron I submitted our Open Spaces to PyCon for consideration.
@slender iron OK, I"m going to revert #1534 now
0653bca Revert "Circuitpython nickzoic 1046 nrf rtc" - dhalbert
Reverts adafruit/circuitpython#1534.
This breaks BLE:
>>> from adafruit_ble.uart import UARTServer
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_ble/uart.py", line 34, in <module>
File "adafruit_ble/uart.py", line 56, in UARTServer
OSError: Failed to change softdevice state
We'll need to check this out more thoroughly. Reverting so we can release a beta.6 with other fixes.
@tulip sleet ok, I'll check the builds and release if it's ok.
Sounds good! ttyl. leaving in 2 mins
no need to work over the weekend 😃
you know me :), but yes, I might take something of a break
ya, it'll give you less excuse to at least
@idle owl If you have time - could you add the DymoScale RTD to the CircuitPython project? I just added you and adabot as maintainers- https://readthedocs.org/projects/adafruit-circuitpython-dymoscale/
@prime flower Please send me an email, I'm in the middle of something.
np
@prime flower I have a Travis hash for you for DymoScale.
@tulip sleet The strings are ~20 characters in the test, although there shouldn't be a limit.
@hard dove heya did you try the SSD1331 with arduino
The git server has also been flaky so this removes our dependence on it.
Merged because one build was ok. The LWIP git server isn't happy.
We don't need to wait for this since it passed here: https://travis-ci.org/tannewt/circuitpython/
No, I’ll give that a try @meager fog . Thanks for the suggestion.
<@&356864093652516868> anyone have time to review: https://github.com/adafruit/circuitpython/pull/1727 ?
@slender iron I can review it.
@slender iron have not heard of lwip. wish i could be of service
Nevermind, lol
😁
thanks @gilded cradle !
Yw
@meager fog its in the m4 still but uses the ip stack on the wiznet I think
we can always add it back later
@meager fog, I tried on both an Arduino Due and Arduino Mega with no luck. Thanks for the suggestion . I'll try that first next time.
Automated website update for release 4.0.0-beta.6 by AdaBot.
New boards:
- uchip
New languages:
- pl
Look at @adabot
getting in on the discord action! She's so awesome.
@tulip sleet This sort of works: ``` data = bytes(self.format(level, msg), 'utf-8')
for i in range(len(data)):
self._uart.write(data[i:i+1])
It eventually fails with: ```Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "ble_test.py", line 21, in go
File "adafruit_logging.py", line 188, in warning
File "adafruit_logging.py", line 161, in log
File "ble_handler.py", line 68, in emit
File "adafruit_ble/uart.py", line 128, in write
OSError: Failed to notify or indicate attribute value, err 0x0013
@umbral dagger this is indeed a bug in UARTServer. It should buffer the write. Only 20 bytes can be written at a time, and we need to wait for an ack to come back before writing more. https://github.com/adafruit/Adafruit_CircuitPython_BLE/issues/10
Code runs for variable amount of time, then hard crashes, doesn't matter what the except tries to catch.
One example:
You are running in safe mode which means something unanticipated happened.
Looks like our core CircuitPython code crashed hard. Whoops!
Please file an issue at https://github.com/adafruit/circuitpython/issues
with the contents of your CIRCUITPY drive and this message:
Crash into the HardFault_Handler.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafrui...
Thanks for the report.
- Could you use beta.6 instead of this intermediate build? Thanks.
- What is typically a "variable amount of time": seconds, minutes, hours?
- Could you confirm that your pyportal library is up to date?
- When running, are you connected to the REPL? If so, does your host computer go to sleep, and then the crash happens?
I'm running your code on a PyPortal, same except I didn't have your background image, so I'm using a different one.
I was on adafruit-circuitpython-pyportal-en_US-20190327-df79e9a.uf2
but I also tried adafruit-circuitpython-pyportal-en_US-4.0.0-beta.5
and adafruit-circuitpython-pyportal-en_US-4.0.0-beta.6
The daily seemed to crash within minutes at most.
beta 5 I didn't let run all that long
beta 6 crashed a couple times right away, but then has been running for 30 minutes so far.
nature.bmp.gz
My computer hasn't been going t...
@slender iron I don't suppose we want displayio to support 4bpp displays?
@stuck elbow my goal is to support all the way down to 1bpp. Not by 4.0.0 obviously though
oh wow
because I just got an SSD1327 breakout to work, and it's a pretty nice 128x128 16-grays OLED display
would be nice for gameboy-like games
and since it's 4bpp instead of 16bpp, it's going to be 4x faster :D
(admittedly, 160x144 would have been even nicer, but you can't have everything)
@slender iron, do you know if we're planning on eventually supporting I2C displays too?
I think it shouldn't be hard, there already are two different protocols, adding a third one wouldn't be that hard
Yeah, that's what I figured.
especially since the displays use the same command set both for spi and i2c
Good point
with just some hack for distinguishing data and command bytes
(usually they add a first byte in front that tells if it's a data, a command followed by data, or all commands)
Most likely it would target CP 4.X
I think CP4.0 is pretty much in a feature freeze by now
Yeah, that's what I meant
I got a couple display related items in there that will allow me to support a bunch of the displays, but I think we're really close now.
I really can't wait for the badge wing and for displayio doing dirty rects -- then I can write some proper games
What do you mean by dirty rects?
I think right now it's pretty much updating the whole screen every time
but it has those "dirty" flags on the objects
so it could only update parts of the screen, and be much faster
Yeah, that would make certain slow screens much more responsive.
I'm doing that with my µGame thingy, and it's enough to have 12fps on 128x128 screen
it's an older project for games with real graphics
Ah, ok
Nice
I basically wrote something similar to displayio back then, but more limited
only 16x16 sprites and tiles, 16-color palettes, etc.
Yeah, it would be nice to add some way to hook displayio drawing functions to hardware accelerated functions if available, but I imagine that being a ways down the road.
those cheap displays don't have much in the way of hardware acceleration
some have scrolling
that is way out of my budget
Yeah, but it would be nice to have displayio working on it.
what I would love is a display that would have nice big pixels (say, 128x128 with 3" diagonal), 4-bit pixels with a 16-color palette, hardware scrolling horizontally and vertically, and fast SPI interface — that would practically be total bliss
the biggest physical pixels I could find is the 1.8" 160x128 ST7735
If you find something like that, let Adafruit know.
by the way, I found something awesome just now
transparent OLED displays
Smarter Shopping, Better Living! Aliexpress.com
the frame spoils it a little bit, since you can't make a LED cube out of them this way
but you can still make HUDs or stack a few and have some depth
Perhaps you could remove the frame and glue them together?
I suspect that frame has a purpose
Probably to prevent it from falling apart, but perhaps as a conductor/shield?
But they are a bit on the spendy side.
Yeah
but maybe in a few years if they get more popular
there will be ready breakouts with a voltage pump and they will be cheaper, who knows
Yeah, perhaps
@gilded cradle I'm trying your ST7789 display driver now, it should work now right?
Yes, with Beta 6.
I'm only getting a black screen, but the breakout I have is not the Adafruit one
Ah ok. I've only tested with the Adafruit one. Can you link me the one you have?
Also, does yours work with the Arduino driver?
Smarter Shopping, Better Living! Aliexpress.com
I haven't tried
I haven't seen it working yet, so not sure if it's not broken
oic
your example should show a red screen, right?
@gilded cradle which arduino library did you use for testing?
I have reproduced some kind of hang after running this for a number of hours. I've restarted it with a debugger to see what I can catch. It was running unattached to USB (power-only cable), and I'm repeating that.
@stuck elbow , I used the ST7735 and ST7789 driver. However, be aware that it only runs on an arduino and not a SAMD proc.
I'm using circuitpython on a custom made arduino zero board. I've got it all working and using the circuitpython version 3.1.2 for arduino zero.
but when I try to import bitbangio, I get this error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: no module named 'bitbangio'
what is the solution to it?
@gilded cradle ah, that would explain why it didn't work for me
Use
busioinstead?
Does busio allow SPI on any pin?
bitbangio is omitted from the Arduino Zero build for space reasons. The Zero uses 64kB of internal flash for CRICUITPY, so flash state is very tight, as with Gemma M0 and Trinket M0 It would be possible to add bitbangio back and remove something else to make room.
busio does not allow SPI on any pin: there are restrictions based on the SPI peripheral on the SAMD21. But if you choose your pins carefully, you can get hardware SPI, and then not need bitbangio. See the big table in th...
I let it run overnight, using beta 6, and it has now run without error for 14 hours. Maybe it was fixed by beta 6.
<@&356864093652516868> Meeting is tomorrow at 11am Pacific here on Discord. All are welcome to attend. Here is the notes doc: https://docs.google.com/document/d/1GYn61v_NmOaPwdyI2xt5zhOw8llz9E3L26ph8eSs50E/edit?usp=sharing
is there something I need to do for the builds for the ugame10 to be available on circuitpython.org? the links from don't exist https://circuitpython.org/board/ugame10/
A tiny game console programmable with Python, which lets you easily re-createthe classic titles. Just draw your sprites in 16-color BMP files, generatesounds...
@stuck elbow i would guess that it's because µgame isn't built with Travis, so it's never added as an asset in the releases.
👍
the site is made with jekyll right?
@marble hornet yep
on a related note... for: https://circuitpython.org/downloads i'll talk about this at the monday 2pm chat
CircuitPython Organization
we can add "features" we just need to make sure we do not add too many, battery charging was a good suggestions @marble hornet
@river quest a) isn't Jekyll great! B) I agree, especially if they are shared amongst many -> most boards, like native USB. Or the Nrf's user button
Just a quick readability fix of #1708. Functionality should remain the same.
What's the touch controller on pyportal?
I believe it connects to some analog pins and uses the https://github.com/adafruit/Adafruit_CircuitPython_Touchscreen library.
Thanks, but I'm curious to see a model # or datasheet
You can find some more technical info here: https://learn.adafruit.com/adafruit-pyportal#downloads
Is this it? https://www.adafruit.com/product/1571
MI0283QT-11?
Yeah, sort of. It uses the ILI9341 display, but the touch is handled by the M4 Proc itself.
2.8"?
3.2"
Oh
The only google result for the model # on that one is adafruit
Guess I'll just go off the lib
What are you trying to do?
Help someone build a library for the touchscreen in Rust
Ah, which touchscreen? The one on the PyPortal?
Yep
Yeah, it basically checks the analog signal and uses that to determine where it's being pressed. Like you said, following the library would probably be the best course. 😃
Yeah, I just like to get it from the source you know?
Exactly. Plus you have all the numbers
I port stuff from Arduino to CP using a similar strategy.
Sometimes there is stuff in the datasheet not in the code, but yeah, working off code is nice too
True. I used 2 different arduino libraries plus the datasheet when I made the RA8875 driver, plus that was my first real CP library.
Cool
Does the same code work for resistive and capacitive touchscreens?
No, it's just for resistive in this case.
FYI -- current master failed on the "pl" build for the hallowing for me -- are others seeing this as well?
Build hallowing_m0_express for pl took 16.39s and ESC[31mfailedESC[0m
make: Entering directory '/home/jerryneedell/projects/adafruit_github/circuitpython_master/ports/atmel-samd'
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
-4 bytes free in flash out of 253696 bytes ( 247.75 kb ).
24704 bytes free in ram for stack out of 32768 bytes ( 32.0 kb ).
Too little flash!!!
Makefile:308: recipe for target 'build-hallowing_m0_express/firmware.elf' failed
make: *** [build-hallowing_m0_express/firmware.elf] Error 255
make: *** Deleting file 'build-hallowing_m0_express/firmware.elf'
make: Leaving directory '/home/jerryneedell/projects/adafruit_github/circuitpython_master/ports/atmel-samd'
@solar whale, what is the command for doing the "pl" build?
jerryneedell@Ubuntu-Macmini:~/circuitpython_master/ports/atmel-samd$ make TRANSLATION=pl BOARD=hallowing_m0_express clean
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
rm -rf build-hallowing_m0_express
jerryneedell@Ubuntu-Macmini:~/circuitpython_master/ports/atmel-samd$ make TRANSLATION=pl BOARD=hallowing_m0_express
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
QSTR updated
FREEZE ../../frozen/Adafruit_CircuitPython_BusDevice ../../frozen/Adafruit_CircuitPython_LIS3DH ../../frozen/Adafruit_CircuitPython_NeoPixel
-4 bytes free in flash out of 253696 bytes ( 247.75 kb ).
24704 bytes free in ram for stack out of 32768 bytes ( 32.0 kb ).
Too little flash!!!
Makefile:308: recipe for target 'build-hallowing_m0_express/firmware.elf' failed
make: *** [build-hallowing_m0_express/firmware.elf] Error 255
make: *** Deleting file 'build-hallowing_m0_express/firmware.elf'
jerryneedell@Ubuntu-Macmini:~/circuitpython_master/ports/atmel-samd$ make TRANSLATION=en_US BOARD=hallowing_m0_express
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
2308 bytes free in flash out of 253696 bytes ( 247.75 kb ).
24704 bytes free in ram for stack out of 32768 bytes ( 32.0 kb ).
Converting to uf2, output size: 502784, start address: 0x2000
Wrote 502784 bytes to build-hallowing_m0_express/firmware.uf2.
just add TRANSLATION=pl to (default en_US) build
Ah, ok. Thanks
I usually just run the "build_release_files.py" in the tools folder and it builds all the translations.
I wonder why Travis didn't catch it
@solar whale are you sure you're on latest? all of the last few Travis builds seem to build HW PL fine...
That is whY i posted it -- I did a pull/update before the build....
🤔 that would make sense. 😉
I see a "pl" .uf2 in the S3 folder for hallowing_pl but it fails for me.
i'm bringing my VM up to see if we can get 3 replicants.
Not sure what Travis has that I don't have 😉
I'm getting a different error. Probably related to me doing something different:
melissa@Melissas-MacBook-Pro-839 ~/D/c/c/p/atmel-samd> make BOARD=hallowing_m0_express TRANSLATION=pl
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
QSTR updated
FREEZE ../../frozen/Adafruit_CircuitPython_BusDevice ../../frozen/Adafruit_CircuitPython_LIS3DH ../../frozen/Adafruit_CircuitPython_NeoPixel
xargs: /Users/melissa/Developer/c/circuitpython/mpy-cross/mpy-cross: No such file or directory
make: *** [build-hallowing_m0_express/frozen_mpy] Error 127
hmm - does order matter ? try make TRANSLATION=pl BOARD=...
also do make clean first
same error
but that looks like a path issue...
It might be. Let me try default first.
Yeah, it didn't like that either. I've only compiled for feather m4 and metro m4
they may not have "frozen" modules so don't need to find mpy-cross in your path.
did you make -C mpy-cross before?
before meaning, when you setup the toolchain to build.
Oh, I think I had before, but then I recently repulled the entire repo and may have deleted it before that
waiting on my slow VM to finish a test build
💤
right? i've been dev'ing on linux the last few weeks. it has spoiled me.
well, i got an extra warning and a larger build. yay?
vagrant@ubuntu-xenial:~/source/circuitpython/ports/atmel-samd$ make BOARD=hallowing_m0_express TRANSLATION=pl
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
QSTR updated
FREEZE ../../frozen/Adafruit_CircuitPython_BusDevice ../../frozen/Adafruit_CircuitPython_LIS3DH ../../frozen/Adafruit_CircuitPython_NeoPixel
fatal: no tag exactly matches 'c0ed34813a608b64ed044826553918ddbad12f0c'
-80 bytes free in flash out of 253696 bytes ( 247.75 kb ).
24704 bytes free in ram for stack out of 32768 bytes ( 32.0 kb ).
Too little flash!!!
Makefile:308: recipe for target 'build-hallowing_m0_express/firmware.elf' failed
make: *** [build-hallowing_m0_express/firmware.elf] Error 255
make: *** Deleting file 'build-hallowing_m0_express/firmware.elf'
cool! I don't feel so alone...
try ```git submodule foreach --recursive 'git fetch --tags'
re-doing the submodule game to see if i can get that fatal to vamanos.
and maybe git submodule sync
i only did sync and update earlier. running foreach now...
Ok, I got mpy-cross compiled, added to path, and resulted in a build with -44 bytes
Let me switch to master branch...
Eh, still -44 bytes for me
hmm -- still od that Travis succeeded ...
Could you remove this comment which was about Metro M4 and is long obsolete?
back. i'm down to -48 bytes...
@gilded cradle @raven canopy sorry to "kick the hornets nest" then run, but I need to get to bed -- been a long day. I'm glad it was noit "just me", but puzzled by the variations... let mw know if you want me to open an issue -- or go ahead and open one.
Hi @solar whale. Yes, please open an issue. It's better than it falling between the cracks, so to speak.
ok -- will do
Thanks
I tried running the tools/build_release_files.py on the current master and get one failure
Build hallowing_m0_express for pl took 16.39s and failed
make: Entering directory '/home/jerryneedell/projects/adafruit_github/circuitpython_master/ports/atmel-samd'
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
-4 bytes free in flash out of 253696 bytes ( 247.75 kb ).
24704 bytes free in ram for stack out of 32768 bytes ( 32.0 ...
goodnight!
During discussion of this on Discord, I replicated the above. However, I get a slightly different build size.
vagrant@ubuntu-xenial:~/source/circuitpython/ports/atmel-samd$ make clean BOARD=hallowing_m0_express; make BOARD=hal
lowing_m0_express TRANSLATION=pl
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
rm -rf build-hallowing_m0_express
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase bu...
Goodnight @solar whale
My bad, I thought there was one for the ESP32 but also with the ESP8266 one is good for me. Sad that is not supported now from 4.0 on.
Keep it up and if there is anythig I can help with, just let me know.
Regards.
bitbangiois omitted from the Arduino Zero build for space reasons. The Zero uses 64kB of internal flash for CRICUITPY, so flash state is very tight, as with Gemma M0 and Trinket M0 It would be possible to addbitbangioback and remove something else to make room.
busiodoes not allow SPI on any pin: there are restrictions based on the SPI peripheral on the SAMD21. But if you choose your pins carefully, you can get hardware SPI, and then not needbitbangio. See the big table ...
Hello all, anyone can help me: Is rotaryio supported for the Trinket M0 yet?
it should be easy to check if you have a trinket m0 at hand
@hoary hill It does not appear to be. For core modules like that, you can check supported boards here:
https://circuitpython.readthedocs.io/en/latest/shared-bindings/index.html#support-matrix
rotaryio = SAMD51, SAMD Express
a Trinket M0 is a SAMD21 non-Express
@hoary hill it is not supported only for space reasons. It would be possible to create a custom build that removed something else in favor of rotaryio
Thanks @tulip sleet and @tidal kiln , good to know the reason is space, I’ll see what I can do without of, in meantime will use the SAMD51 based board to prototype
we actually made a bunch of room in the non-express builds in other ways, and might consider adding rotaryio for 4.0 if it's not too big.
<@&356864093652516868> and any who wish to join in: Weekly Meeting in about 15 minutes or so. Docs are here: https://docs.google.com/document/d/1GYn61v_NmOaPwdyI2xt5zhOw8llz9E3L26ph8eSs50E/edit?usp=drivesdk
No not until at least next year.
lurking
Text only today.
@gilded cradle @pastel panther Congrats!
🎉
@gilded cradle @pastel panther 'gratz and welcome!
Woo hoo @gilded cradle and @pastel panther !
😃
send the phantom bugs to the phantom zone
thats cool phil
I'm just tidying up a library to try and get it past Travis and sphinx-build is surprising me with a failure. I'm sure I can work this out eventually but if anyone immediately recognises the problem here it would be very useful Warning, treated as error: autodoc: failed to import module 'adafruit_midi'; the following exception was raised: Traceback (most recent call last): File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/sphinx/ext/autodoc/importer.py", line 232, in import_module __import__(modname) File "/home/travis/build/adafruit/Adafruit_CircuitPython_MIDI/adafruit_midi/__init__.py", line 53, in <module> class MIDI: File "/home/travis/build/adafruit/Adafruit_CircuitPython_MIDI/adafruit_midi/__init__.py", line 61, in MIDI def __init__(self, midi_in=usb_midi.ports[0], midi_out=usb_midi.ports[1], *, File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/sphinx/ext/autodoc/importer.py", line 70, in __getitem__ return _make_subclass(key, self.__display_name__, self.__class__)() File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/sphinx/ext/autodoc/importer.py", line 90, in _make_subclass attrs = {'__module__': module, '__display_name__': module + '.' + name} TypeError: must be str, not int
might be that the midi_in and midi_out are objects
Try making them None
(I don't think usb should be the default)

sorry
np
HUG to Dan H for forum help
@slender iron ok, i'll have a look at that, file is https://github.com/adafruit/Adafruit_CircuitPython_MIDI/pull/9/files#diff-803837656257872cbf8394f85a24d349 - it's now adafruit_midi/__init__.py rather than adafruit_midi.py
Group hug to the team and community today for inspiration and collaboration.
Any update on this?
I'm trying to write to a ring of 16 pixels to show the position of an encoder when it is turned by a human. Currently the lag makes it feel quite unresponsive on my Itsy Bitsy M0:
num_pixels = 16
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.1, auto_write=True, pixel_order=(1, 0, 2, 3))
for i in range(num_pixels):
pixels[i] = (encoder_position, 0, 0, 0)
Currently it takes about 250ms to fill the whole ring.
hug to @timber mango for PR 101 to add support to Blinka for PocketBeagle
shark, turn off auto_write, also use fill()
and hug to Gustavo (hulkco) for noticing the built-in LEDs were not working on BeagleBone when using Adafruit Blinka
https://github.com/adafruit/Adafruit_Blinka/issues/96
@FutureSharks Besides the _pixelbuf work described above, in progress:
-
Set your
brightness=1.0(or omit the arg: it defaults to 1.0) which will speed things up, and make the color values smaller to compensate. Whenbrightnessis not 1.0 the pixel values must be copied before sending out the data. -
Set
auto_write=false. Set the pixel values in thatforloop, and then after the loop, dopixels.show(). That will suppress sending any data until it's all ready to send.
Your question is probably better placed in the forums.
Try auto_write=False and after the for loop do a pixels.show(). What does the 4 tuple do, I normally see those as (red, green, blue) values? Also if you want it even quicker use brightness=1.0 and control brightness by reducing the values you are setting.
- @MakerMelissa, @jerryn, and @siddacious for joining the moderator group.
- Group Hug
Nope
It was HIDden
To-Date: Took a break from CircuitPython to work on a couple of Eurorack module kits. Was nice to focus on therapeutic through-hole soldering again. Walked through some fun PyPortal projects, too.
Returned to CircuitPython this weekend to finish a collection of fundamental MIDI note utilities. The helpers translate a note descriptor string ’C#5’ to a note value (0 to 127), note values to a descriptor string, and a single helper that combines the two translators to permit “free-form” entry of either input form (note-to-name; name-to-note). I also threw in two more helpers for note-to-frequency and frequency-to-note calculations. https://github.com/CedarGroveStudios/MIDI_Util
To-Do: Next on the list is to complete one more rack module kit (mostly SMD soldering – fun, but not as therapeutic as through-hole) and do some CircuitPython coding.
Expect to wrap up a MIDI message decoder library using the full (memory-hungry) standard protocol stack and an optional lower-calorie version for essential messages. The decoder will include filters and triggers so that that only certain messages or sequences are decoded -- as an option to the default mode of processing all messages. Would be handy to be able to isolate or ignore a System Exclusive message block, for example. The decoder is the essential algorithm for analyzing received messages and will first be used in a 2nd-generation portable MIDI signal sniffer. With some tweaking, the decoder will also form the foundation of a general-purpose message builder for transmitting MIDI message sequences. Big thanks to the authors of “Data Structures and Algorithms in Python” for helping me achieve an enlightened approach to transforming the MIDI protocol into a Python-digestible structure. https://www.amazon.com/gp/product/1118290275
I've been watching his repo. Great progress!
BTW, sigrok has a MIDI protocol decoder: https://sigrok.org/wiki/Protocol_decoders
shark, turn off auto_write, also use fill()
Thanks @ladyada but I don't want to fill the whole ring with the same colour. The ring is supposed to show the position of the encoder to a human so if the ring is all one colour it doesn't show anything.
I tried disabling auto_write but performance is the same:
while True:
for i in range(num_pixels):
pixels[i] = (100, 0, 0, 0)
pixels.show()
for i in range(num_pixels):
pixels[i] = (0, 0, 1...
Thanks @wraith tiger ! Wasn't aware of sigrok before. Time to get acquainted.
raised by @timber mango. We are exploring some options to avoid being root to run Blinka on BeagleBone/PocketBeagle. @gusty kiln may be interested in this.
what is the recommended hardware to use with sigrok?
Move the .show() out of the loop:
pixels[i] = (100, 0, 0, 0)
pixels.show()
I am planning to test I2C and SPI sensors in order to consider the support for PocketBeagle complete
https://github.com/adafruit/Adafruit_Blinka/issues/100
@gilded cradle ssd1331 also had some CS weirdness, iirc
ya, she added support for it I think
wasn't that ssd1351?
ah maybe
I added support for the SSD1351, but the SSD1331 is still in progress.
I think the fix works for both though.
@errant grail I put node decoding into adafruit_midi, see https://github.com/kevinjwalters/Adafruit_CircuitPython_MIDI/blob/master/examples/midi_simpletest2.py#L33
hih back but not on audio
@slender iron did you want every EPD display to have a unique repo?
@wraith tiger I only do that every time
@errant grail my implementation is unidirectional though
@meager fog do you want to do status updates or hug reports? We're nearly to the end of status updates at the moment.
@gilded cradle wanna take over the EPD library to split em up
Yeah, I have a couple EPDs so far
@simple pulsar -- but a bit more elegant and library-oriented than my approach.
@idle owl sure! hug report to @gilded cradle and @pastel panther who are working on more stuff with us - is exciting 😃
@gilded cradle another thing that would be super helpful is checking the arduino RA8875 repo and checking all the issues/PRs - there's probably some good fixes in there and i haven't had time to check it out. then travis'in it up
Ok, sounds good. I'll go through those and test.
@wraith tiger fwiw, with PySerial be sure to make note of the EOL character while debugging. You can set a EOL character in PySerial, suuuuper useful
😃
Last Week:
-
nRF PDMIn: Changed buffer management to use a "static" double buffer in PDMIn.c for 2 reasons. 1) to test if my previous buffer management using the object's buffer was the reason for unusable output, and 2) to enable more inline manipulation for things like 8-bit samples (nRF periph is 16-bit only). The buffer switch caused no change for #1, so I took a break to complete some edX coursework on C pointers; wanted to make sure my shaky understanding wasn't the cause.
-
adabot "updated libraries" list: started formulating a plan for this.
This Week:
- PDMIn: Will start to implement the sinc filter to see if it fixes the output data.
gotta run, have a great day all
@errant grail I've become slightly paranoid about memory usage as there's a constant bloat-o-battle between my application code and the midi library on a CPX (M0) board
Thanks everyone. Congrats @MakerMelissa and @pastel panther!!
Thanks @raven canopy
@errant grail Can you let me know how to get to your midi stuff
phone keyboards... 😁
BTW, I found a usb breakout board to try. It's not a finished product, but a pcb you can order from OSH Park ($7.60 for three pcbs).
Yes -- congrats @gilded cradle and @pastel panther
@simple pulsar Yeah, I can appreciate that. For my sniffer code, memory isn't a primary issue. For performance, it becomes critical. I first designed the sniffer for the M0 (had a bunch of existing Trinket M0 MIDI projects), but am unapologetically moving to M4Ex boards now. I'm a Python beginner, so memory management is a basic challenge.
@simple pulsar https://github.com/CedarGroveStudios/MIDI_Util
@errant grail I've put together a lot of the factors that affect memory use in fourth post on, the import order is the most curious one: https://forums.adafruit.com/viewtopic.php?f=60&t=148334
Yes, when testing, I throw in a system status block to watch import order and the size of dictionaries and tables (that are usually too verbose given my coding style): ```python
display system status
gc.collect() # clean up memory
print("crunchable test 2019-01-01 v06 M4.py")
print("GC.mem_free: %0.3f" % float(gc.mem_free()/1000), "KB")
print("CPU.freqency: %0.1f" % float(mcu.cpu.frequency/1000000), "MHz")
print("CPU.temperature: %0.1f" % mcu.cpu.temperature, "C")
volt_mon = map_range(AnalogIn(board.VOLTAGE_MONITOR).value, 0, 65520, 0, 6.6)
print("Voltage Monitor: %0.1f" % volt_mon, "V")
anyone have code for facebook fan page like counter for the pyportal?
@slender iron Has anything change in sphinx-build world? It seems to be related to the array subscripting on those ports
@simple pulsar I started reviewing your PR on Saturday but noticed you were still fighting lint so I held off. There are some Sphinx related things I saw. If you give me a couple hours, I'll put them on the PR.
@raven canopy Yes, i've made a few changes since, i'm still a bit puzzled over the spinx-build aspect but i think it should pass the rest now
@raven canopy Travis doesn't seem to be doing his/its thing?
@raven canopy The gist of the code hasn't changed but I did tidy up one of the big class methods as pylint didn't like it and it had a reasonable point
@marble hornet i made a helper lib that uses displayio, i like both your graphics lib and displayio but i think im gana start using just this
"""
Demo tested with Feather M4
"""
import time
from adafruit_mini_tft_joystick_featherwing.minitftpad import wing, displayio
# print value of all buttons
print(wing.button_up, wing.button_down, wing.button_left, wing.button_right, wing.button_sel, wing.button_a, wing.button_b)
time.sleep(2.3)
# displayio use example
splash = displayio.Group()
wing.display.show(splash)
time.sleep(2.3)
color_bitmap = displayio.Bitmap(160, 80, 1)
color_palette = displayio.Palette(1)
color_palette[0] = 0x00FF00
# background
bg_sprite = displayio.TileGrid(color_bitmap,
pixel_shader=color_palette,
x=0, y=0)
splash.append(bg_sprite)
@slender iron any idea why release_displays wouldn't release the DC pin?
>>> import displayio
>>> displayio.release_displays()
>>> import ugame
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "ugame.py", line 51, in <module>
ValueError: DC in use
could be a bug @stuck elbow
ok, I will make an issue
thanks
hmm, looks like it only happens in the REPL
weird
ok, that is my fault, the pin is actually used by my code, and I added it to the list of pins to not be cleared after a reset
so it's my own code conflicting with itself
sorry for the alarm
but it looks like I will have to modify _stage to use the FourWire for everything
@upbeat plover is group variable length now?
Hello all. For sphinx/reST class documentation, what's best technique for documenting something that can be an int or str? I'm also interested in the case of an object or sequence of objects
@marble hornet number of items in group, scale, offset for groups i think
@simple pulsar probably just in the text
I've tried or in the :param but it just gets confused
ta
ROTARYIO_MODULE mistakenly omitted from MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS. This caused rotaryio to be unimportable.
Also, alphabetized PEW_MODULE in #ifndef checks.
@nickzoic Want to take a look at why this broke BLE? Totally ok if you don't have the time.
The BLE soft device uses RTC 0. Just a hunch. See my earlier comment on
github.
Bernhard
On Mon, Apr 1, 2019 at 3:03 PM Scott Shawcroft notifications@github.com
wrote:
@nickzoic https://github.com/nickzoic Want to take a look at why this
broke BLE? Totally ok if you don't have the time.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/adafruit/circuitpython/pull/1534#issuecomment-478764317,
or mute the ...
Why? Those boards exist has much as the haxpresses do.
@hoary hill more details: rotaryio was omitted from 3.x for space reasons. rotaryio will be in 4.0 - we made room. But, there was a bug and it was mistakenly not included. There's a pull request for the bug, and there'll be a build soon that includes it, when the PR is merged.
@tannewt those are examples for disallow, i'd probably not display some of them until we had more info so there are no "unknown" slots without photo/image/text that do not link to anything, one specific example "feather_radiofruit_zigbee" unfinished board and will not have anything for a long time.
On Tue, 2 Apr 2019, at 09:13, Bernhard Boser wrote:
The BLE soft device uses RTC 0. Just a hunch. See my earlier comment on
github.
Yeah, I saw that one (thanks!) but didn't get around to following up (sorry!)
A quick google suggests you're correct ...
https://devzone.nordicsemi.com/f/nordic-q-a/5235/usage-of-rtc0-as-time-basis-system-time-possible
https://devzone.nordicsemi.com/f/nordic-q-a/305/rtc0-rtc1-and-the-app_timer-with-softdevice
https://devzone.nordicsemi.com/f/nordic-q-a/229...
@raven canopy sry. late hug report. thanks for this release:
https://github.com/adafruit/Adafruit_CircuitPython_DRV2605/releases/latest
i forgot to 😦
In ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk, set CIRCUITPY_BITBANGIO = 1. If the build then overflows flash, you'll need to turn other things off by setting them to 0. But see if it fits first.
OK so I've changed it across to RTC2 and it works from the point of view of the RTC, has anyone got some code which demonstrates it not working with BLE which would work with BLE stuff I might have lying around?
See the example in https://github.com/adafruit/circuitpython/pull/1726. Try that. If that doesn't cause an immediate error, then doing something like https://github.com/adafruit/Adafruit_CircuitPython_BLE/blob/master/examples/ble_uart_echo_test.py with the Adafruit Bluefruit LE Connect app on the other end would be a simple test.
Also, take out the MP_WEAK attributes on the functions. That should not be necessary. If they ever were, they are not needed now.
@tidal kiln no worries! and, yw.
OK that UART example works with nickzoic/micropython@48f056647f which now uses RTC2. Thanks for the pointer, I hadn't tried using BLE for anything yet.
You mean the MP_WEAKs in shared-bindings? Does the new build system avoid building the shared-bindings for non-existent modules now? It'd be great if we didn't need them any more, but I don't know about the other ports?
Ah, thanks Dan, I missed the cross-reference to this one! I'll make a new pull request ...
@gilded cradle 'PyPortal Max' (M4 + 3.5" TFT wing), PyPortal, and 'PyPortal Mini' (M4 + 2.4" TFT wing) ...apologies to any Adafruit trademarks... all running same displayio test code. No surprise, but it's great when all the bits come together. Thanks! 😄
why does PulseIO return an error over 6MHz?
that one i can't readily explain. i'd have to look deeper than i have...
@exotic pumice i'd say its related to setting the TC's TOP value: https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/common-hal/pulseio/PWMOut.c#L233
TC is on DFLL @ 48MHz
Max prescaler = 8
48,000,000 / 8 = 6,000,000
TOP = 6,000,000 / frequency
6,000,000 / 6,000,000 = 1
so anything over 6MHz would require a change to the highest prescaler available. say...4 instead of 8.
hah. and i missed the - 1 at the end of the equation.
¯_(ツ)_/¯
ok
Yes, we don't compile the source files for modules that are turned off. But rtc.RTC was the only one that ever used MP_WEAK. I'm not sure why it was done that way to begin with. If you grep for MP_WEAK, you'll find very few uses. You don't need the NotImplemented versions. But a use or two here or there may need to check #if CIRCUITPY_RTC.
Or maybe I am all wrong about this, but looking at the uses of RTC, it does not seem to need fallback routines.
That looks great @crimson ferry.
@exotic pumice the best I could even think of at the moment is that it might be related to using the TCs in 16-bit mode. i'd have to run more mathing though...
quick math:
48,000,000 / 4 / 6,000,000 = 2
2 << 16 = no bueno for a 16-bit number
thanks for brainstorming anyway
err...wait. i was reading that line wrong. it isn't shifted. disregard.
yeah I wasn't sure what you were doing there
to be fair, I haven't read the code closely
OK so this is another go at #1046 rebased onto master.
It now uses "RTC2" channel to avoid interfering with BLE (see #1726 ) and also gets rid of the MP_WEAK references entirely.
Hopefully it should also provide the functionality for #1561
it may have just been a design decision, not necessarily a limitation. but i don't have that answer. smarter people than i probably do, though.
thanks
G'day Melissa! PR #1534 did not turn out as well as I'd hoped but hopefully the PR #1736 should address this ...
Yep, I've removed them altogether since both atmel-samd and nrf ports have RTC anyway.
@raven canopy one thing I've noticed is that when I output a fast clock to a pin, it's already a bit dim
maybe that's related?
any chance I can get some help with why I can't install anything using Adafruit GPIO due to "ensurepip" error
"NameError: name 'ensurepip' is not defined" - msg received when running setup.py. Platform: Raspberry Pi 3 B with fresh Rasbian Stretch 06-27 install. Adafruit_Python_GPIO was cl...
the datasheet seems to indicate this register is write-only
https://github.com/adafruit/circuitpython/blob/367f6584aea0791334cca734eebc39dc1b01af37/ports/atmel-samd/common-hal/pulseio/PWMOut.c#L256
nevermind
I found a comment in the rust I'm working off of
while count.status.read().perbufv().bit_is_set() {}
// the SVD erroneously marks swrst as write-only, so we
// need to manually read the bit here
while count.ctrla.read().bits() & 1 != 0 {}
any ideas why mpwm is used instead of npwm?
I just had my lib directory get wiped out on Beta 6 with this same pesky error. Unfortunately I didn't have my debugger running at the time. Now that I know the bug still exists in Beta 6, I'll hook my debugger up.
it looks like the tradeoff is half the channels or minimal period control
I guess pwm needs period control
Ugh, it wiped it again, but this time I got a backtrace:
(gdb) backtrace
#0 HardFault_Handler () at supervisor/port.c:283
#1 <signal handler called>
#2 memcpy (dst=<optimized out>, src=<optimized out>, n=<optimized out>, n=<optimized out>, src=<optimized out>, dst=<optimized out>)
at ../../lib/libc/string0.c:61
#3 <signal handler called>
#4 0x00000004 in ?? ()
(gdb) continue
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
write_flash (address=<op...
With the ST7735 example still? This smells of memory corruption to me. Were you interacting with the drive a bunch also? If not, it may reproduce ok.
should fix issue with pc going into suspend mode. Since SAMD doesn't distinguish between suspend and disconnect. tud_umount_cb() is never triggered, tud_suspend_cb() is instead in both case : disconnect and suspend (e.g pc sleep mode).
If enabled by host which is most likely for HID device, tud_remote_wakeup() can be used to wake up PC from sleep mode. Though it require this PR for usb descriptor https://github.com/adafruit/usb_descriptor/pull/7
funny i was adding ST7735 to the CPX and getting a lot of hardfaults too, just running the simpletest thought it was me :/
I wanna master Python lol
hmm, probably mess up with submodule and cause conflict, not sure how to resolve this though
@ladyada What code were you running? I'll try and track it down tomorrow.
Actually, this time I was working on the SSD1331 library. Possibly displayio init code? It happens when I rapidly edit and save.
Has anyone thought about animating the images for the pyportal weather station?
use gifs instead of bmp?
I wonder if that's even possible lol
i was doing that with each frame a bitmap and just pop and load next frame
there are quite a few bmp
ill give you a bit of helper code
i'm bored with the weather station....tempted to make a stock ticker with a similar view to the weather station
someone is working on a python-based gif library out there
never mind i guess i lost that example
yeah i don't know the limits of this little guy...it's probably less than a raspberry pi
right now it's slow, but there is room for optimization
further versions of circuitpython will surely improve that
I would love to be able to stream a live video but it probably isn't powerful enough for that
for uncompressed video it would require pretty much as much power as animated gifs
I was thinking more along the lines of streaming a webcam or a security cam
perhaps instead of streaming the video, it could just take snapshots every 5 seconds
@bold wind There's GIF support with Arduino right now for PyPortal, but we haven't sorted it in CircuitPython yet. It's on the radar though.
nice, thanks for the update kattni
I use this thing at my desk at work but we don't have WPA wifi
the nearest access point without captive portal is eduroam and i have credentials but EAP isn't supported yet
I'm tethering via my cellphone lol
the gif idea is just to wow my co-workers when they visit my desk lol
@bold wind You could make a text-able status display for your desk, too, if you wanted
As a desk-display, showing a bunch of data on it (stock ticker, some message/fortune/saying, etc)
for the camera, you can definitely stream images to it (if you have them stored somewhere retrievable online), and display the images on the PyPortal
that would be easy 😃
@hathach I can make another PR that has these changes. I also need to fix #1681, which requires some other code changes (add calls to check tud_cdc_connected() during the string-write loop).
I don't think we need a control for this on the website side. Either we should get photos/info from folks or disable building the board from CircuitPython (which will prevent it from appearing on the website).
Datalore is @TG-techie, cp32 is @siddacious, gb_m4 is mine and the pca10040 is nRF supported by 3.x.
As someone who made one of those it sounds fine to me. If some wants their
board up on the site and has started distributing the board it would seem
reasonable to reach out to the admins on discord to enable it building.
On Tue, Apr 2, 2019 at 1:13 PM Scott Shawcroft notifications@github.com
wrote:
I don't think we need a control for this on the website side. Either we
should get photos/info from folks or disable building the board from
CircuitPython (which will prevent it from appe...
FYI -- in case this comes up again -- in #help-with-projects someone was having problems with a DHT11 on a PyPortal - using the JST connector . I tried it on mine and found that a DHT22 worked fine, but a DHT11 was very unreliable (note, I have a 10K pullup on the data line - using D3). I then tried the DHT 11 on a PyPortal with the VCC jumper for the JST connectors set to 3.3V (instead of the 5V default) and now the DHT11 works very well (as does the DHT22) .
More to come .... but a little nod to the recent release of new Twilight Zone episodes...
Tried building with CIRCUITPY_BITBANGIO = 1 and got the following error.
`Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
In file included from ../../shared-bindings/bitbangio/init.c:32:0:
../../shared-bindings/bitbangio/init.c:88:50: error: 'MP_QSTR_bitbangio' undeclared here (not in a function); did you mean 'MP_QSTR_rotaryio'?
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_bitbangio) },
...
8b4ca24 Improved readability of Single Byte Bounds code - makermelissa
8e9f75b Merge branch 'master' of https://github.com/ada... - makermelissa
f1e4a2f Removed unnecessary bit-ANDing - makermelissa
2dda3df Merge pull request #1731 from makermelissa/ssd1... - tannewt
@dhalbert yes please do it. I only bump up the tinyusb submodule to latest and add 2 stub for suspend and resume callback. Ah also delete the tusb_hal_millis() as well, it is not needed any more :)
@slender iron would you have a chance to review https://github.com/adafruit/samd-peripherals/pull/20 ? When that's in I can revise https://github.com/adafruit/circuitpython/pull/1735, which you approved already. Tnx!
@tulip sleet I already did
I see https://github.com/adafruit/samd-peripherals/pull/20 as still open.
You did review 1735, but it needs a submodule update
oh, i see the review, I did not see that in email for some reason. sri
I was messing around in python, for fun, and noticed that there was no error message for trying to make a bytes instance of a negative number. instead of saying 'ValueError: cannot convert negative number to bytes' it just raises 'ValueError:'.
this is copied from the repl on mu.
>>> bytes(-5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError:
running: os: macos, cirpy: beta4 built on the first of april from master.
Please reopen if this happens again with Beta 6.
Has anyone seen it with a built-in display? Or is it only when code.py is initing?
if it's a choice of having builds or not, i'd rather have the builds so folks can use/test their hardware. ideally the board url would be available like: https://circuitpython.org/board/feather_radiofruit_zigbee
but would not be displayed on: https://circuitpython.org/downloads
until we allow it when there are photos from the maker, etc.
does that work?
Is there any work on a I2C implementation for displayio (e.g. displayio.TwoWire) ? I assume something like that would be needed for the ssd1306 featherwing: https://www.adafruit.com/product/2900
I haven’t tried on a device with a built in display.
the soundtrack for implementing PWM https://www.youtube.com/watch?v=pm4kpWXkjAo
A politically charged, sample-heavy tune out of the ordinary for Coulton, and a unique move for his third Thing a Week song. Features heavy samples of George...
"ddddo your duty"
"duty duty duty duty"
@umbral dagger I liked the idea of adafruit_circuitpython_itertools and so tried out the example simpletest.py. I placed the adafurit_itertools folder under lib folder. I got an error in repeatfunc() line 277. I changed the import statement from "import adafruit_itertools as it" to "import adafruit_itertools.adafruit_itertools as it" . Now works great. Thanks.
how do I calculate the maximum duty value for pwm?
@slender iron do you remember? I guess it's been a while since you worked on this
I tried 65535 and it asploded
then I worked out something based on some math I saw in circuitpython but idk if it's right
my pwm code isn't dddddo'ing it's duty
@fading solstice That doesn't sound good. It should be in the bundle soon. I'll check it once it is.
@fading solstice There are some fun tool in there.
Hi folks. did somebody of you already put CircuitPython onto a MKR WAN 1300? Tried to found out which pins ar connected to the LoRa Module... But i didn't found any schematic online.
4a5c52f starting on #1046 rtc for nRF - nickzoic
f88f9fd more fake RTC code ... adafruit/circuitpython#1046 - nickzoic
f846fa1 enable NRFX RTC adafruit/circuitpython#1046 - nickzoic
6206fa9 adafruit/circuitpython#1046 handle overflows in... - nickzoic
6afe23d There isn't really a good way to calibrate this... - nickzoic
@umbral dagger yes, check it out. mind expanding stuff in there.
I managed to reproduce a HardFault on an M4 (pybadge) but it is very touchy. If I insert assembly the problem goes away.
I think the best approach will be reproing on the M0 and then using the micro trace buffer to see what was done recently. Will try that after I take a break.
i started translation for CircuitPython Chinese simplified, I failed chinese in highschool so dont expect much from me, also i was only taught traditional not simplified. crowdin did most the work i just fixed a few errors when i noticed them like translating things that should be like
时间.struct_time() 需要完全 1 参数
``` to
time.struct_time() 需要完全 1 参数
you can find by searching CircuitPython CN on crowdin.com
so...for TileGrid, is the idea that the resulting grid is a repetition of the same tile?
@tidal kiln the idea is that it maps into a bitmap full of tiles
like a sprite map?
hmmm. still might not get it.
want to video or audio chat about it?
sure. now?
ya, easier than typing
cool. give me 5. i'll get some stuff opened up...
kk
MicroPython (and by inheritance also CircuitPython) has many places where it throws exceptions without error messages, or re-uses more generic error messages than regular Python has. This is a trade-off, necessary to keep the binary small. It seems to me that in this particular case it's relatively easy to realize what the reason for the error is.
After updating firmware and demo files for pyportal
Using adafruit-circuitpython-pyportal-en_US-4.0.0-beta.6
last part of traceback is
```File "adafruit_pyportal.py", line 480, in set_text
This was executed from the adafruit quote code.py (not seeing anything wrong there)
I can see that line on Github but can't really tell how to fix or if this was already reported somwhere ... not sure to file issue under Adafruit_CircuitPython_PyPortal or circuitpython
I was thinking about this. I have code.py loading the library that I was editing. Perhaps it had something to do with attempting to execute the file at the same time it was writing to it?
Create a group with numerous entries. Insert a new item at N. Everything N+1:end becomes a copy of the N+1 entry.
Just happened to be chatting with @tannewt when I hit this so was able to demonstrate to him. He found the cause in 0.3 secs:
https://github.com/adafruit/circuitpython/blob/19278e0284f0339576b7fe9e0bdd6ad312da208a/shared-module/displayio/Group.c#L75-L78
Anywho, here's an example:
ress any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0...
@terse kayak I think you just need to update the libraries also (in addition to firmware). There was a change. It looks like it should have printed a warning about that:
https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/blob/master/adafruit_pyportal.py#L60
@tidal kiln I think I did ... I will double check ... maybe I didn't move everything over or Windows cached the update... ya ... I'll delete everything.. copying again .. and eject the drive .. tomorrow 😁
ok. sry that happened. pretty sure it's just a matter of syncing everything up, libraries + firmware.
if you still run into issues, let us know
im over halfway done with pīnyīn chinese CP translation, kinda getting burnt out been at it for like over 7 hours 😪
=] np
@hard dove heya do you want to pick up a 480x128 display to try it
they're kinda nifty
Hi @meager fog, do you happen to know know which one works with the RA8875?
Like this one maybe? https://www.crystalfontz.com/product/cfaf480128a0039tn-480x128-bar-type-tft-lcd-display
Part Number: CFAF480128A0-039TN 480x128 bar-type, TFT LCD. Perfect for 1U applications or products requiring a wide-screen.
11 hours later, ready for testing ugh... i think ill throw it on CPX
@slender iron do you know how the parallelbus compares to fourwire in terms of speed in the current implementation?
Fix for #1739. Just a change of direction. Checks out:
Adafruit CircuitPython 4.0.0-beta.6-22-g19278e028-dirty on 2019-04-03; Adafruit PyPortal with samd51j20
>>> import board, displayio
>>> from adafruit_display_shapes.circle import Circle
>>> group = displayio.Group(max_size=10)
>>> board.DISPLAY.show(group)
>>> circle1 = Circle(30, 30, 5, outline=0xFFFFFF) ; group.append(circle1)
>>> circle2 = Circle(50, 30, 10, outline=0xFFFFFF) ; group.append(circle2)
>>> circle3 = Cir...
@stuck elbow I haven't measured it recently but would expect it to be faster
@slender iron I see, thanks
it's not really the bottleneck at the moment
would be nice to be able to schedule partial updates manually, but I suppose you want to compute dirty rectangles automatically instead
I think this may be related to exceptions because if I break the example and then fix it, it crashes on the second reload. I'm still chasing it down though.
hey @slender iron I'm seeing some strange behavior on windows where when I first plug in my feather m0 with beta 6 it complains about an unsuccessful descriptor request and then fails to do anything past that.
strange thing is that if I hit the reset while it's still plugged in it works as expected
stranger still, if I unplug the usb (nothing else was attached) and hit the reset button a few times it will go back to the "can't descriptor" error.
@gilded cradle yeah pick up one of those, also grab a https://www.buydisplay.com/default/3-8-inch-color-bar-tft-lcd-iot-display-480x80-pixels-for-drone-controls
ER-TFT038-1 is 3.8"colo tft lcd display 480x80 pixels,ideal for drone controls,LoT devices,outdoor intercom systems,auto/aviation/marine equipment,POP,security.
if I don't hit the reset while unplugged, it will keep working like normal; I can unplug and replug and it still works
@stuck elbow ya, I was planning on it being automatic
@pastel panther what version of windows?
windows 10
hrm, please file an issue with 4.0.0 milestone
ok
Ok @meager fog, both displays are now ordered.
thankx - they're kinda cute 😃
Yeah
@gilded cradle after all the issues/PRs on the RA8875 are cleared, lets get the library travis'd
let me know when you're ready for that, its annoying the first time
Ok, sounds good. Just one left.
yay! displays!
I'm stumped by the cause of a build breaking error I'm getting: ```/tmp/ccd3WjbM.ltrans26.ltrans.o: In function memset': <artificial>:(.text.memset+0x0): multiple definition of memset'
/usr/local/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memset.o):memset.c:(.text.memset+0x0): first defined here
collect2: error: ld returned 1 exit status
Makefile:311: recipe for target 'build-grandcentral_m4_express/firmware.elf' failed
make: *** [build-grandcentral_m4_express/firmware.elf] Error 1
Latest from master + what I'm working on (a new extmod)
Adds awesome link to header, and renders the awesome readme from the submodule.
Fixes #92.
From my experience with what I think is the CircuitPython audience (I teach technology to designers), I don't think message queues are easier to understand than other approaches, and are probably harder in many cases. As @siddacious says, concurrency takes a while for newcomers to wrap their heads around no matter what the method.
I also think it's important to distinguish between event driven needs and parallelism. In my experience, the most common need amongst my students is doing multi...
Python and the Internet of Things Hack Chat
happening now:
https://hackaday.io/messages/room/2369
video here:
https://www.youtube.com/watch?v=RMNeRk3mcyA
Could it be that the exception object survives the reload (to be displayed) but refers to line numbers in the original file, which might have been just overwritten?
builds without errors
Ubuntu terminal without errors
but on the displayio characters get swapped for other stuff, tried
`from adafruit_bitmap_font import bitmap_font
font = bitmap_font.load_font('t0-12.bdf')`
but same thing
I'm not gana be working on chinese translation anymore, I hope it was enough of a start to get something going.
@upbeat plover it's great, I'm sure there will be people willing to pick that up
watching the hackchat after the fact, enjoying the hal discussion
some HALs are definitely higher level than others
i just started myself...
the rust hal story is particularly interesting because there's a master set of traits (function/struct declarations without defintions) that every hal implements, and they're very high level
so all the drivers work across the entire embedded rust ecosystem
forgive the self-plug
I just love talking about it
There are two pieces to this because I found the file system issue and thought it might be the issue.
First, a double free of the terminal's TileGrid was freeing the heap from the supervisor. The flash cache could then allocate over the heap and corrupt it.
Second, the flush is tweaked so that the cache is maintained while a VM is running. This also ensures the cache is released even when no current sector is loaded into it.
is there any way to get the number of colors for a displayio.Palette instance?
This looks like the only case where you don't keep the cache. So would it make sense to always keep the cache, and just have this routine release the cache explicitly? (Make release_ram_cache() not be static (and rename it to supervisor_.... ?)
So we chatted about this and agreed we should add a boolean in the front matter that can cause a board to not appear on the /downloads page. The full link would still be available.
Hey, any idea why the image at the top isn't loading? https://circuitpython.org/awesome
Hey, any idea why the image at the top isn't loading? https://circuitpython.org/awesome
The address is the github page address. Should be the raw address? https://raw.githubusercontent.com/adafruit/awesome-circuitpython/master/awesome_circuitpython.png
Ok, updated. Please take another look.
@slender iron i think my font issue was the font i picked in repo, cause using "dylex" displayio works so i guess that issue is resolved???
i just couldnt stay away from the translation, everytime i look in the zh.po i find errors i made
I know what that feels like.
if i update the file im wanting to add on my github thing i wont need to do another pull request until after merge?
thank you everyone for the help
I got chinese to work fully, with displayio and everything, had to make custom font "/tools/Tecate-bitmap-fonts/bitmap/dylex/6x10pinyin.bdf" im not sure how to do try to merge it
@main meteor accomplishment is what im feeling now woot
Anyone want to hack the Arturia key step to run circuitpython? Stm32f103 with 256k flash and 64k ram 😃
Tested on a PyPortal with:
Adafruit CircuitPython 4.0.0-beta.6 on 2019-03-30; Adafruit PyPortal with samd51j20
Test code:
import board
import displayio
COLORS = 16
palette = displayio.Palette(COLORS)
palette[0] = 0x000000
palette[1] = 0xFFFFFF
bitmap = displayio.Bitmap(320, 240, COLORS)
bitmap[(100, 100)] = 1
bitmap[(100, 101)] = 1
bitmap[(101, 100)] = 1
bitmap[(101, 101)] = 1
tile_grid = displayio.TileGrid(bitmap, pixel_shader=palette)
group = disp...
@tidal kiln len() maybe?
hey i have a TCS34725 and a raspberry pi i want to turn off the led how can I do that ?
G'day @dhalbert interested in your thoughts on the approach in the new branch above (nickzoic/micropython@625bd0 etc) ... I've split the actual page access off as per your suggestion and allocated some address space for the NVM explicitly in the boards/*.ld configuration ... only problem is, that doesn't really work with the CIRCUITPY_INTERNAL_NVM_SIZE approach. I took the space out of the text segment instead of the FATFS segment so that an upgrade to a board with an existing FATFS woul...
There's a potential fix in the patch above, but I haven't tested it yet ... mostly because I can't find the rotary encoder I was testing with last time! I'll get to it in the next couple of days and put a PR in.
@nickzoic I don't think it's important to preserve the existing file system, as long as we warn people on upgrade. It would only matter to PCA10059 and other boards without external flash for CIRCUITPY. It's better to be consistent with the other boards.
I skimmed the refactoring you did to handle the SD-safe NVM writing. Looks good!
working on zh_CN.po, that's simplified chinese
Is your code equivalent to the 16-byte transitions table I used in the atmel-samd code? https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c#L121.
Could we unify the two implementations? It seems like they do the equivalent thing. Common routines could be put in shared-modules/rotaryio/ -- that's the style for lower-level code that's port-independent.
I looked at a lot of encoder code when I was writing that. There's a lot o...
Submitted this PR: https://github.com/adafruit/awesome-circuitpython/pull/9
Updates the url for the image.
@stuck elbow thanks. good idea. i didn't even think to try it. looks like it's not implemented though :(
Adafruit CircuitPython 4.0.0-beta.6 on 2019-03-30; Adafruit PyPortal with samd51j20
>>> import displayio
>>> palette = displayio.Palette(123)
>>> len(palette)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: object of type 'Palette' has no len()
>>>
woot two Chinese translations done, i already had most of simplified chinese finished from doing pinyin
@tidal kiln I think it's something we may want to add
I am looking for help or programmer reference for displayio, but can't find any on readthedocs. Does anyone have a link they can share?
@opaque patrol there will probably be a guide at some point, but still in the works. for now, there's the RTD:
https://circuitpython.readthedocs.io/en/latest/shared-bindings/displayio/__init__.html
I see why I couldn't find it. RTD has some issues that are aggravating. It defaults to 3.x and I don't see any links to 'latest'
it's probably because 4.x is still in beta
I found it, I never noticed the dropdown menu at the very bottom of the left panel
@tidal kiln I wonder if we could use regular lists or arrays for palette and group's item list, so that you get all the usual methods and operators for free
maybe? seems like something in the core internals. maybe there's a reason tannewt hasn't done that already? not sure.
omg i dont think simplified chinese will be used, the bdf fonts file sizes im finding are like 0.5mbs to 3mbs
this is best one i could find, maybe it could be used on raspberrypi?
I don't know how those 23k glyphs are going to fit in some microcontrollers. Maybe it would make sense to subset the font to extract the Pinyin characters and omit the KJC radicals?
yeah i was just wonder what they do in china lol, i guess they dont use simplified and they have a sepecial font that has been used for like 50 years its traditional chinese, font is called big-5 took 5 companies to make it 🙀
Big-5 is an encoding, not a font. But yes, the whole KJC character set is larger and more complex than most phonetic alphabets, and now I find myself wondering how they supported it back when big ROMs were expensive.
@stuck elbow @tidal kiln mostly out of expedience. can take a look at it later
@gilded cradle when you asked about the keyboard were you curious about the button structure?
Yes. Particularly how you got it to invert so quickly.
ah, i should have ->ed you to the button class. as all the keys are just instances of the button class. would you like a link?
Yes, thanks.
I merged this, but the site doesn't appear to have been rebuilt. Did we miss something about forcing a rebuild?
okay, so:
- pointable objects:https://github.com/TG-Techie/tg_gui/blob/cba0715ed9623b45b5f08c0ad05be8ffd6f98ef0/gui.py#L484
- the button specifically (just a graphics side, pointing is handled by it's parent class): https://github.com/TG-Techie/tg_gui/blob/cba0715ed9623b45b5f08c0ad05be8ffd6f98ef0/gui.py#L1176
- the specific buttons used in keyboard (makes pointdown act like press): https://github.com/TG-Techie/tg_gui/blob/1d24e863e0aadb8c6ba4d989820ec88d71684659/programs/keyboards.py#L38
Status: 1.x stable. needs documentation . Contribute to TG-Techie/tg_gui development by creating an account on GitHub.
Status: 1.x stable. needs documentation . Contribute to TG-Techie/tg_gui development by creating an account on GitHub.
@gilded cradle
Thank you. I’ll take a look at this in a bit.
You'll need to update the submodule in the site's repo. We should probably have adabot do that every release automatically.
@main meteor i found this http://www.eran.io/the-dot-factory-an-lcd-font-and-image-generator/ takes characters you type from any font and makes it into c code like this
// @22 '好' (11 pixels wide)
0x40, 0x00, // #
0x47, 0xC0, // # #####
0xF0, 0x40, // #### #
0x50, 0x80, // # # #
0x51, 0x00, // # # #
0x91, 0x00, // # # #
0x97, 0xE0, // # # ######
0xD1, 0x00, // ## # #
0x21, 0x00, // # #
0x51, 0x00, // # # #
0x83, 0x00, // # ##
maybe i could load each character onto my I2C FRAM and do like you said convert pinyin to the characters... i doubt i could do it without a lot of help
I've been doing a faintly related task myself, but decided to roll my own in Python because I'm that kind of a bear.
FRAM is a good choice: I was thinking an SD card, but that could get slow when rendering a bunch of characters.
fontio does do some preloading/caching, but it is a big character set.
yeah chinese is huge, i fail chinese in highschool, speaking part wasnt hard, but remembering how to write everything is crazy... you have to be dedicated and write each character over and over many times till its like muscle memory
It turned out that it was a double free of supervisor managed memory for the TileGrid that is used for the terminal. The exception causes a run without the first allocation and the second free then frees the heap. This makes way for the flash cache to end up on top of the heap and thus corrupt it. Should be fixed now.
Cool. Hopefully this was the last of the memory issues.
I can't wait to get started with circuit python.I recently bought a ItstyBitsy M0 and am waiting for it to arrive. Are there online emulators to try circuit python while I wait?
I'm not sure where you want "zh_Latn_pinyin", do you mean the file should be called "zh_Latn_pinyin.po"?
I think it is ready to merg.
@shy elm not that I know of.
but you can try regular python
and then all the circuitpython-specific stuff is hardware related
@shy elm You will notice that some core modules have subsets of function (keeping the code lean and mean for small micros): https://circuitpython.readthedocs.io/en/3.x/shared-bindings/index.html#modules (or https://circuitpython.readthedocs.io/en/latest/shared-bindings/index.html#modules for the 4.x beta)
Anyone still worried about this or can I close it?
FYI - The mentioning of displayio.Palette is a red herring. It's simply triggered by the value_count parameter when creating the Bitmap instance. Anything above 16 creates the behavior.
Also, direct indexing vs. using (x,y) tuple does not matter.
This is dependent on https://github.com/adafruit/samd-peripherals/pull/21, so I'll make this a final PR once that's accepted. This draft is being submitted so you can see the changes on the CPy side.
Unlisted stats page on /stats. Uses github api to parse and populate the stats. Rework a bit of the css to share it a bit better.
Want to ifdef protect these so the handler isn't linked in if the module is off?
Right, that was the whole point :blush:
The previous one (in the previous PR) definitely was: this one works correctly on the whiteboard but I haven't tried it in hardware! I'll find a rotary encoder and give it a go (all it's really doing is code-golfing your state transition table down to logical operations: note that in some of the 'bad transitions' the counter is both incremented and decremented) I need to write an explanatory comment in there before it's ready to PR
I agree, we could have the common-hal code call back into...
@river quest does a folder have to have a _ infront of it for it to be a liquid variable in jekyll?
Remote physical debugging: I built the latest push on your fork branch, and it works with my rotary encoder (while you're looking for yours).
Oh, great! I'm not totally confident with the workings of common.ld so it's a bit of a wild stab ... but I thought it was clearer than having the FATFS use logic something like:
real_fatfs_length = __fatfs_flash_length - CIRCUITPY_INTERNAL_NVM_SIZE
nvm_origin = __fatfs_flash_origin + real_fatfs_length
... although that'd be okay if we want to support nvm size configurable by CIRCUITPY_INTERNAL_NVM_SIZE.
@slender iron the second travis subjob on CPy is taking like 39 minutes; the next slowest is 33 minutes; if you're going to push another commit for your latest PR soon, maybe shuffle some boards in .travis.yml? I thought I counted them up, and they were all at 8 boards before pybadge was added, but maybe I was wrong. Some displayio boards could be mixed with non-display. The nrf builds are also much faster.
ya, and the boards can vary a bit in build time too
right, m4 vs m0 non-express, etc.
No worries from me ... I know how to open an issue if it comes back ;-)
On Fri, 5 Apr 2019, at 08:05, Dan Halbert wrote:
Remote physical debugging: I built the latest push on your fork branch, and it works with my rotary encoder (while you're looking for yours).
Thanks! I'll pick one up from somewhere, and in the meantime do some code cleanup to get that ready for PR!
Unfortunately, I've found another bug that leads to hard crashes and appears to be memory corruption. I'm seeing it on the pybadge which is an m4. I looked a few days ago and swapped to the M0 to debug. Unfortunately I fixed a different issue.
Will track this one down. Let me know if folks want details. I'm using the celeste.py code for it so the repro case isn't small.
@tulip sleet feel free to have someone else finish your review. I'm out the rest of the night (getting my parents from the airport and then hardware happy hour)
sure, thanks; I'm trying out the new USB-disconnected code from Thach. It looks like it can detect disconnect and reconnect nicely.
nice!
i'm switching a switchable data/power cable.
ok, have a nice night; you have plenty to show off!
yup! byeee!
Also check for disconnect while writing a string, in case a disconnect happens during writing.
This is great thank you for your work. A friend of mine is also using the feather m4 express with several encoders, we are both looking forward to being able to get the full resolution of the quadrature encoders we are using.
I was trying to compile the .u2f file with your code for the feather m4 express, but I get an error when I try to import rotaryio. I am sure I am doing something wrong. I understand that this is still in development but would it be possible to get a copy of the curr...
Just submitted a PR to the NINA firmware to support WPA2 Enterprise.
I'm out of time tonight, but I'm going to clean up the matching Adafruit_CircuitPython_ESP32SPI code I've got tomorrow and hopefully submit a PR for that before the end of the day
@deshipu I turned off rotaryio on pewpew10 to make its de_DE build fit. rotaryio was already off by accident; this just turns it off deliberately for that board. If you think you want it, we can try decreasing CFLAGS_INLINE_LIMIT. The German translation could probably also be made skinnier.
Guys, I just wanted to share my latest project with the community. Thanks to @solar whale and @gilded cradle for their help while I was working on the code part >
nice project @gusty topaz
@gusty topaz nice! Thanks for sharing it!
Thanks for sharing @gusty topaz. It's always nice to see the end result.
@tannewt This is ready to merge. No one else is around; I can wait for you.
Guys, I'm trying to add my project to be featured on the next CP newsletter edition. I forked the repo
and made the changes to the draft file. How so I do a PR to the main adafruit repo? (first time doing it, sorry).
@gusty topaz this might help: https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github/create-your-pull-request
I have a feather m0 express with Beta 6 that when first plugged into my windows 10 machine will show a "USB device not recognized" popup. In the device manager under usb controllers it shows up as "Unknown USB Device (Device Descriptor Request Failed)".
If I single press the reset, it boots as normal with the mass storage drive and serial port.
Once working, if I unplug and replug right after it will show up as expected but if I wait approximately 20 seconds after unplugging before replug...
Changing from draft to ready for review didn't trigger a build :(
@siddacious does it happend with metro m0 express as well, I have the metro, could help to troubleshoot this.
Was able to trigger a build by closing and reopening.
@siddacious Could you try other ports on that host and other machines, if possible?
PSA: if you're going to "clone" issue text that references A LOT of other repos...don't. started working on some more
enhancements. I apologize for any spammage and confusing references to sommersoft/adabot-travis-test spread about the GitHubisphere. 🤦
repo deleted. that cleans up the GitHubisphere. :phew:
c9571fe ROTARYIO_MODULE mistakenly omitted from module ... - dhalbert
cdd77b5 remove CPy-specific EIC handlers from samd-peri... - dhalbert
2528b67 update samd-peripherals - dhalbert
29df593 #if EIC handlers; turn off rotaryio in pirkey f... - dhalbert
682e83a Turn off rotaryio on pewpew10 so de_DE will fit - dhalbert
The SSD1331 likes everything sent as commands. I could format the INIT data as all commands, but that gets lengthy, so it would be nice to just pass a parameter to allow this to happen automatically. Additionally all of the boundary parameters need to be treated as commands too.
I think all displays want parameters as commands. Data is strictly only for pixel data.
why build MicroPython external C modules capability was removed?
interest in a PR for it?
very cool and nice and neat @gusty topaz How do you transfer the GPS coordinates to your pics?
I really need a 3d printer..
Sorry @gusty topaz I reread the article and see you tell how. Very nice article as well.
Nothing was removed. Could you point to the MicroPython PR you have in mind? You're talking about an import of a native module, right? We haven't merged from upstream in several months.
Just to be clear, the boolean would be on the unknown.md file?
These boards are only listed in the _data/files.json from the build process and do not have their own board files to selectively toggle display on/off in the front matter.
We could also create simple placeholder board.md files each time a board is added to the build process, but it would likely need to be automated to keep ahead of it.
@dhalbert you should also merge this PR for usb descriptor https://github.com/adafruit/usb_descriptor/pull/7
and bump it up in this pr as well
@dhalbert you should also merge this PR for usb descriptor adafruit/usb_descriptor#7
and bump it up in this pr as well
Done! I didn't see that.
Nice! Thanks for the fix. And now my hacks to adafruit_imageload seem to be working better also :)

Doesn't this assume that size_t is uint32_t?
Also, shouldn't we also be checking that it's a power of two when < 8?
@slender iron I'm having a brainstorm about the "Libraries" link on circuitpython.org. If you have time to chat sometime today, I'd like to discuss it with you.
@hathach I wasn't able to reproduce it on a metro m0 using the same port and cable.
@tannewt or @hathach This is ready for approval and merging (finally).
@dhalbert I tried on one of the front ports (previously it was a rear port on my optiplex 7020) and I can get it to happen there as well.
After many plug-unplug cycles it appears that the best way to get it to happen is to slowly insert the micro usb so that the board is powered before the plug is fully seated. I'm guessing this is because it boots before the D+/- has a solid connection.
I think we should require a new .md file for the board. The flag would live in that file and basically designate it as a draft.
I'm ok with unknown.md being displayed as a way to see what needs to be supported. For boards we want as draft, we an add an .md before the release includes it.
Ok great!
I just tested on my mac and a dramatically slow insertion was enough to get it to not enumerate correctly and show "AppleUSBHostPort::disconnect: persistent enumeration failures" in dmesg. Hitting reset makes it show up as expected.
By "dramatically slow" I mean going slow enough to stop as soon as the charge light comes on, waiting for 5 seconds or so and then continuing to plug in.
@idle owl ready when you are
@slender iron vid or audio?
Ok we can vid
getting hardfaults on boot and whenever i KeyboardInterrupt while trying to init a display on CPX built with displayio support
I want a PyPortal and one of those amazing lux sensors from kattni to play with, also want a tinyfpga bx to start learning verilog.
ugh i ran-out of flash trying to put chinese on hallowing.... says -28 bytes so close... i guesss ill have to use a different font then the huge one i made
@upbeat plover there are squeezy things to do to make it fit; hold on
ooooo cool id like to learn
in ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk, you can turn off some features, and you can also lower CFLAGS_INLINE_LIMIT. Try about 5 at a time. Lower than 35 or 40 can be a problem. But, for instance, you could set CIRCUITPY_ROTARYIO = 0 to take that out, and make room, or CIRCUITPY_SAMD (which only has specialized uses), etc.
see the other mpconfigboard.mk files for ideas about what to turn off
oh cool yeah the first suggestion to remove would be good for me i dont use that ever
there are lots of options
9d43a25 update tinyusb to fix disconnect/suspend issue ... - hathach
e5e9d2b @hathach's changes; check cdc connected during ... - dhalbert
4f20196 Merge remote-tracking branch 'adafruit/master' ... - dhalbert
50d72ed shrink sparkfun_lumidrive to make room for larg... - dhalbert
5f057d1 move pybadge to faster subjob - dhalbert
@slender iron tnx!
@tulip sleet I think I know the answer to this, but is there a way we could also disable any certain translation(s) per board?
no way now, we're trying to make sure all translations work on all boards
That's what I was thinking. Agree with the desire, just wasn't sure on the technically feasible part.
The messages could be slimmed down in various ways, and we might be able to use a more sophisticated compression scheme, though I haven't found a ready-made library yet (I've asked: https://softwarerecs.stackexchange.com/questions/57255/in-memory-dictionary-based-compressed-strings-library)
im getting an error when trying to build hallowing with CIRCUITPY_ROTARYIO = 0
make BOARD=hallowing_m0_express TRANSLATION=zh
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
QSTR updated
FREEZE ../../frozen/Adafruit_CircuitPython_BusDevice ../../frozen/Adafruit_CircuitPython_LIS3DH ../../frozen/Adafruit_CircuitPython_NeoPixel
/tmp/ccEB7Gdo.ltrans18.ltrans.o: In function `EIC_Handler':
<artificial>:(.text.EIC_Handler+0x10e): undefined reference to `incrementalencoder_interrupt_handler'
collect2: error: ld returned 1 exit status
Makefile:308: recipe for target 'build-hallowing_m0_express/firmware.elf' failed
make: *** [build-hallowing_m0_express/firmware.elf] Error 1
is that a transaltion error?
@upbeat plover that has been fixed in the latest master; fetch and merge, and update submodules; it wasn't possible to turn off rotaryio. If you don't want to do that now, turn off CIRCUITPY_SAMD instead.
https://github.com/adafruit/circuitpython/pull/1745 is now merged
or lower CFLAGS_INLINE_LIMIT
okay ill try just the limit cause im only needing 28 bytes
just lower it by 5 and it will probably work
OK, thought you were talking about https://github.com/micropython/micropython/pull/1627 or similar. That PR is after our last merge from micropython. I see this is a build-convenience mechanism: you still need to know how to implement native modules.
Our build structure is slightly different these days, so there would need to be some changes on the original MicroPython PR. If you'd like to work on a PR, that would be fine, maybe with a sample module as well. Do you have an existing special...
this is probably a super dumb question, and someone will point that out quickly 😛 but my googlefoo seems to be failing me... how does one define an interrupt in CP?
@frail moon we don't have interrupts or something like that (yet). MicroPython does, but there are severe restrictions, and we'd like to come up with a better way. There's discussion about this if you're interested: https://github.com/adafruit/circuitpython/issues/1380
We DO have native modules that use interrupts behind the scenes (e.g. PulseIn)
oh... well drat. 😕 (guess I should figure stuff out like that BEFORE I design an element of my project around it. 😦 )
thanks
@frail moon what are you trying to do?
@slender iron I have one of the audiofx boards and when it's playing a sound the ACT pin goes low... so it was going to tell my board to keep the LEDs at full brightness until it stops playing, at which point they can go back to pulsing
maybe I don't need the interrupt though
polling the pin should work too. it just may not be quite as responsive
@tulip sleet to get the auto-close from github you need the "fixes #123" in a commit message, not a pr comment.
It works if it's in the original (top) comment. I put that in by hand anyway for xref purposes, not expecting it to work. But thanks for the definitive answer.
I think that is true because the top comment is used in the merge commit
Is it worse than you'd expect on the Windows 10 box (i.e., does it happen all the time), or is it just you were plugging in slowly at first? We could add a small delay somewhere before we bring up USB. The M4 is too fast :smiley: .
Why is this in a for loop rather that one call for all of the data? Is it because CS needs to be toggled?
(Please add the explanation as a comment if it is needed.) Thanks!
I checked the ST7735R datasheet and it says parameters are data. (See the D/C column below.)

@jwcooper @tannewt this is great, would it be possible to display them by top downloads per group?
How does it assume uint32_t is size_t?
It's probably better to modify this check to check for 24 bit and fail. We can rely on shared-bindings to do power of two below 8 and multiple of 8 above. I just didn't want to support packing/unpacking 24-bit values.
Well, it actually assumes 32 <= size_t <= 40. I guess I'm trying to understand why you replaced uint32_t with size_t earlier on, when you still hard-code the supported sizes.
@kevinjwalters I am experimenting with adjusting the TC count when the duty cycle is modified, to make smoother transitions. Would you like to try this UF2? I haven't tested it myself.
cpx-smooth-pwmout.uf2.zip
It's a build of https://github.com/dhalbert/circuitpython/tree/smooth-tc-pwmout
Just to clarify, this is with an m0
I only started paying attention because It happened several times during normal use. At first I thought it was always the first time I plugged it in after boot but then discovered more ways of making it happen.
Temporarily remove boards as listed in issue: #106.
New downloads_display flag in front matter on board files. If not set, boards will display. Set to false to exclude a board.
@ptorrone what would the group be? Board? Release?
hmmm
File "../../tools/uf2/utils/uf2conv.py", line 32
print "Skipping block at " + ptr + "; bad magic"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Skipping block at " + ptr + ")?
Makefile:318: recipe for target 'build-ugame10/firmware.uf2' failed
I guess it's for python2 not 3
yes, it should be updated
should I make a pull request?
You are right, I tested it with DC=0 and it doesn't work on that display then. Sorry for the assumption.
oh, I see, I had the old submodule checked out, sorry
Looks like the extra bytes are causing the same issue with #1733 to pop up again and travis is failing. What would be the best strategy to fix this?
In ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk, lower CFLAGS_INLINE_LIMIT to 50, and/or turn off some features (e.g., CIRCUITPY_SAMD = 0)
Do a local test with the pl build to vet the change.
Thanks Dan. Adjusted the limit and local PL build succeeded. Trying again.
the download column per group, that way each group is by top downloads?
