#circuitpython-dev
1 messages Β· Page 240 of 1
for instance, can you print the position to the console instead of the screen?
It's the same value, there is a commented out line of code where I'm doing that...
line 28 doesn't really do anything interesting, you know, it just changes a bunch of bytes inside the framebuf
it has no other side effects
To be honest, I suspect that while GPS is on UART and the screen is on I2C, there seems to be some kind of conflict between the two. Probably having to do with the amount of data.
Hmm
Well, that's the difference
If I clear the screen, in part or in whole, it stops getting updates from the GPS module.
So, I'm past RAM management hurdles; well, it doesn't error out at least.
Now on to the part I really have like no experience in. I was under the impression that with the nRF52840 PDM periph's built-in decimation, I don't need to run it through filter_sample. It should already be in PCM, but as shown below, i don't have full 16-bit samples. I started reading up on the partic...
what if you add a delay before gps.update()?
I think timing is the only difference there
I added the following delays: 0.1, 0.25, 0.5 with no change
where did you add them?
Beginning and end of the loop (which would result in essentially the same thing)
I also tried changing the GPS modules update frequency up and down
if you comment out line 28 but leave the delay, does it work?
It works with line 28 commented out period lol
what if you add a delay in place of line 28?
Interesting, I'll check
next thing to try: move that fill_rect to after you read the position from the gps module
Are there any examples on how to use PixelBuf https://circuitpython.readthedocs.io/en/latest/shared-bindings/_pixelbuf/__init__.html
How does this compare memory-wise with the NeoPixel/DotStar libraries for CircuitPython 3.x?
@solar basin I need to go to bed, good luck!
Thanks! I really appreciate the help
At some point I hope my life becomes less busy, otherwise I'll work on this during sprints at PyCon.
https://github.com/rhooper/CircuitPython_Pixel_Driver is the WIP repo that has neopixel.py and adafruit_dotstar.py drivers. Memory-wise it should be similar to the current implementations, unless you use the single buffered mode that doesn't refresh the brightness of all pixels when brightness is changed. That functionality isn't exposed in the backwards compatible APIs in the above linked ...
Is anyone around to help me with the above issue? I sincerely think it might be a bug
@solar basin Please start a thread on the forum. This is an involved thing to debug. GIve us more info, like which board you're using, which version of CircuitPython, which library versions.
@tulip sleet thanks for the response, but with all due respect, I'd rather talk it out with someone here on Discord. I'm not a forum kind of guy. That being said, I will admit that I forgot that there is help channel specifically for CP as this is a dev channel and I'd be happy to take my issue over there. As for the info you mentioned, it's actually all in the gist I posted, except for library versions, but that's easy enough to add.
@solar basin I'm suggesting the forum as a place to document your setup, so someone can reproduce it and debug it. For instance, I see it's 4.0.0-beta.5, but I don't know which board. DId it used to work in 3.1.2 or an earlier beta, etc.? Stuff scrolls by quickly here, and gets lost if it's complicated. Initially I was going to suggest filing an issue, but it's not clear whether you should file it on the SSD1306 library, the CircuitPython version of framebuf, the GPS lib, or CircuitPython itself.
It seems to me that the way rotaryio is currently written is limited to 1/4 of its possible resolution. On encoder library's for the Arduino the rising and falling of the a and b pins is used to calculate the position of the encoder rather then their states. Is it possible to implement this proposed method?
Ok, I got it to do it twice and is still red at the moment. The last time it happened when I was saving a library file inside of a folder.
Since this is happening on a Feather M4 Express and I'm working on programming feathers, I can't plug in a JLink without soldering. So I'm going to see if I can get this to happen on a Metro M4 Express using Siddacious's MetroWing.
I got it to happen on the MetroM4 as well. I now know what I did. I made a change to the lib. Saved. Made another change, and then saved again within a very short amount of time. Unfortunately I'm just now realizing I didn't compile a version with debug symbols before this happened.
@solar basin what does the GPS command in line 16 of your code do? I donβt see it in any of the examples. FYI - this issue looks familiar but I canβt get to my HW until later today or tomorrow to check. I also agree with @tulip sleet that it would be a lot easier to track this in the forum. If I recall correctly, the issue may have been related to the rate at which gps_update is being called with respect to the sample rate. You could try adjusting the sample rate fo the GPS.
Also, I donβt understand what you mean by the data are present as normal but unreadable.?? If you comment out all OLED usage does the GPS work normally and does your position and date print normally?
The current method is meant for use with detented Gray Code rotary encoders: one count per click. This has the advantage of not needing debouncing. We can add modes for other kinds of encoders, x2 and x4, but you would see more bobbling back and forth unless the outputs were debounced with capacitors. What kind of encoders are you thinking of using?
Just FYI, backtrace even without debugging symbols will have some information that gdb can recover from the .elf file. Belowi is backtrace from a non-debug elf. It has routine names but not arg names or values. Obviously the debug is better, but this can still help. But if you can repeat with a DEBUG build, that would be great.
I forget what OS and editor you're using? Which are they? Are you editing locally and copying, or editing directly on CIRCUITPY?
(gdb) bt
#0 0x00006c60 in...
All USB ports have been tested with no success. Tested dozens of other USB items with no problems.
The new USB midi is just too cool for me to give up just yet.
I have wireshark running. Is there any particular method to get the needed log information?
@makermelissa One thing I find extremely useful while debugging is turning off size optimization by removing the -0s here https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/Makefile#L95
This will prevent annoying things like variables being optimized out when you'd really like to know their values.
Obviously this makes the build larger so will probably only work with M4s and I've only ever tried it with a Grand Central. As the build grows this might stop working as...
To set up wireshark to trace USB traffic, follow the directions here: https://wiki.wireshark.org/CaptureSetup/USB. The critical thing is doing sudo modprobe usbmon. You could then run wireshark as root and not do the other stuff, but it's easier if you're not root.
When you start wireshark with usbmon loaded, you should see a list of usb controllers and see usb activity (there's a line graph showing activity), like this:
 so that the nRF startup code will flip a bit that enables these pins to be used for non-NFC purposes.
Note that on the PCA10056 board, some jumpers must be moved to make the the black female headers for these pins be connected. See section "8.13 NFC antenna interface" in the nRF52840 DK PDF for more information. More info about possible pin limitations as well in in...
I noticed that when using rotaryio, my detent encoder was only registering every other detent as a position change. Based on the c code, I wrote the following script to test a slightly different implementation and it seems to work pretty well for me with full detent resolution. Of course it needs to be ported back to C to take advantage of using interrupts.
...
@KacperLa @papahabla Which boards are you using? The nrf and atmel-samd implementations differ?
@dhalbert I am using the ItsyBitsy M4 Express.
Part of the Issue #484 (AnalogIn) was addressed in CP 2.2 . I am wondering about the very fast block Analog input to an array - It was suggested that it be addressed in CP 4.x . I need this functionality to move a product to CP from MP.
@warm pelican We haven't tackled it yet and likely won't in the near future.
I was hoping for sooner.
I'd recommend posting a job offer for it on https://jobs.adafruit.com/ . We'd be happy to review any submissions. It just hasn't bubbled to the top of the adafruit-funded development list.
Find maker jobs in 3D and CAD, Art, Design, Education, Embedded Development, Engineering, Fabrication, Marketing and Communications, and Web Development
What does it look like if you print it as signed 16 bit numbers? It looks like its swinging around 0. (The long numbers of all ones are negative.)
Ok that sounds like an interesting route - there is already a model in MP.
Nice! Any helpful links can be added here: https://github.com/adafruit/circuitpython/issues/487
I wasn't able to reproduce this. @kevinjwalters can you please post everything needed to reproduce this? Thanks!
I tried this code because it prints long strings:
import time
for i in range(100):
print("h"*i)
for x in range(4):
print("wowo")
print("hellow")
print("woowza")
print("blef")
time.sleep(0.1)
for i in range(100, 500):
print(("h",)*i)
I can easily reproduce this by pasting a long string into the REPL via screen. Will try and fix shortly.
I've only noticed it on certain exception output, not to say it doesn't occur on others, of course.
My first example got zapped when I encountered the #1643 bug :( I may have preserved another, let me go digging.
This did it on the 3rd attempt. Each time I was using up arrow/return to recall and execute the previous command in PuTTY. It's not fully reproducible though:
>>> raise AttributeError("abcdefghij" * 12)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij
>>> raise AttributeError("abcdefghij" * 12)
Traceback (most recent call...
Here's one showing where it stops:
>>> raise AttributeError("abcdefghij" * 12)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError
```
It's also possible this is triggered by some very subtle behaviour across USB to terminal...
I'd suggest leaving this until I can get a more reproducible case.
@tulip sleet I am gonna update tinyusb. it shouldn't be a huge pull. Most is stm code
@slender iron sounds good. I updated nrfx too in a recent PR; we may as well debug any third-party lib issues now.
The nRF52840 has a RTC, right?
I got the DB9 breakout set up and am able to view the communication between my DMM and the QtDMM software.
This is pretty cool.
With current Master
Adafruit CircuitPython 4.0.0-beta.5-17-gfce63b17c on 2019-03-21; Adafruit PyPortal with samd51j20
I have been running the openweather demo on a pyportal. After running for a few hours, it will suddenly drop the USB connection and the program appears to have stopped (not updates on screen. CIRCUITPY is no linger mounted and /dev/ttyACM0 is no longer accessible
It recovers and runs normally after a hard RESET (press RESET button)
dmesg report at the time o...
@gilded cradle Is there an example for using the miniTFT featherwing with displayio? I see your sesaw PR for using the buttons, but I was wondering if the display was supportd yet. Tested and approved the seesaw example.
@solar whale that's an ST7735, same as on the hallowing
@stuck elbow thanks so just a different size display 160x80 and the backlight is via the seesaw. -- I'll look at the recent st7735 stuff.
yeah, the offsets are probably also different, let me check my code
the offsets are 24, 24
Can you point me to an example for the hallowing? -- not finding it.
hallowing has the initialization built in
you will need to do it manually here, so use the example for the st7735
OK -- thanks
hmm -- that example looks a bit outdated, but I get the idea -- Sprites and position - no longer work....do they?
@solar whale I have started openweather on my pyportal with a debugger attached and will see if I can reproduce your crash
did you have the repl connected the whole time?
@tulip sleet yes -- until it disconnected itself
I'll do that, then, since there's a possibility it's USB-stack releated
first time was after an hour or so -- second was six or seven hours....
looking back at dmesg logs -- the first time may have been much faster -- more like 6 minutes after start -- good luck!
thanks!
@solar whale see a pull request on that repo for a refreshed and updated version
Nice!
Hi @solar whale, what @stuck elbow said was correct.
@gilded cradle Thanks -- I see it now in the PR -- I must have somehow missed it when I looked at at it earlier.
No problem
yay - Big red rectangle on my miniTFT!
Perfect. As long as it's not blue.
what's wrong with blue rectangles?
The blue results from it being in BGR mode instead of RGB or maybe the other way around.
ah, that
@solar whale did your host computer go to sleep during the long pyportal test, or did you prevent it from doing so?
just want to duplicate the conditions
@tulip sleet yes it did -- as did I π
when I woke it up, the screen session to the REPL had terminated.
I just got my pyportal and I opened the read me file, I then opened the secrets.py file and entered my details. I saved the file and closed it and now the file is corrupt and will not open.
Where can I find a copy of the default secrets.py file?
https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI/blob/master/examples/esp32spi_secrets.py
Thankyou MakerMelissa
You're welcome.
It's working thanks ! β€
FYI -- I am finding the the PyPortal EventCoundown example causes a (HardFault) reboot to safe mode wit the current CP Master build. https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/master/PyPortal_EventCountdown Warning -- it may also corrupt the FS. I have had varying results with this -- Sometimes it runs but the background disappears. Sometimes it crashes....
running on Adafruit CircuitPython 4.0.0-beta.5-17-gfce63b17c on 2019-03-21; Adafruit PyPortal with samd51j20
could it be the ondiskbitmap reads?
I am finding the the PyPortal EventCoundown example causes a (HardFault) reboot to safe mode wit the current CP Master build. https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/master/PyPortal_EventCountdown Warning -- it may also corrupt the FS. I have had varying results with this -- Sometimes it runs but the background splash disappears. Sometimes it crashes....
Run on:
Adafruit CircuitPython 4.0.0-beta.5-17-gfce63b17c on 2019-03-21; Adafruit PyPortal with samd51j20
The lack of search is really annoying! I just want to find the code for rotaryio: https://github.com/adafruit/circuitpython/search?q=forked&type=Code
:(
@dhalbert not being a fork doesn't affect the ability to work with the main micropython repo. You can still pull and merge between repos that aren't forked.
If CDC USB is connected and then becomes disconnected, serial_write_substring() in supervisor/shared/serial.c will loop forever trying to write a string. The call to tud_cdc_connected() returns true even though USB has been disconnected.
Opening an issue in tinyusb about this.
#1680 discusses a case where PyPortal hangs (no display update, but no crash) after running the OpenWeather demo for a long time. In discussing this with @jerryneedell, the host computer went to sleep duri...
@dhalbert If you run from a "code.py" and never connect to USB will this problem be avoided. That is, do you have to open a REPL session in order to trigger this?
Hmmmm. I have a 10MHz OCXO (high precision square wave for timekeeping). I was hoping that I could use this to keep time in CircuitPython somehow -- every time 10,000,000 pulses come in, I increment my clock by 1s .. including pulses that come in while executing other Python code. But it looks like this is not something that either FrequencyIn or PulseIn are suited to do.
Hope that helps. Can run more captures if needed
@onyx hinge this may eventually help. i do plan on circling back around to FrequencyIn to include this and get it working on nRF.
https://github.com/adafruit/circuitpython/pull/1423
@raven canopy that looks like a place to start, thanks so much!
I'd be tempted to configure a small FPGA as a divide-by-10,000,000 counter with some registers, and have CircuitPython talk to it via SPI, I2C or somesuch.
@main meteor http://www.leapsecond.com/pic/picdiv.htm apparently work quite well
or go all the way back to an AVR arduino, lift the crystal and solder the OCXO onto its input. Then when you use a suitably modified runtime, millis() really will be accurate
I am not aware of how to do this with the atsamd parts and with circuitpython in particular...
It would be tricky with CircuitPython, which is why I thought of an outboard chip. I considered a simple divider, which would require CircuitPython to monitor one or more pins, and there would be some synchronization and delay issues (which seems to me to defeat the purpose of a precision timekeeping source), which is why I figured something with a little more smarts that could do synchronized atomic reads to get timestamps at accurately known points.
Yes, I believe it has to do with being connected and then disconnecting.
Thanks!
@hathach ^^ here's another USB trace, from a different host computer with issues (it's a Rockchip running Ubuntu).
@onyx hinge @main meteor or instead of a divider, just have a counter register of sufficient width that you read often enough, instead of triggering on 1-sec pulses (since we don't have interrupts). (Or maybe that's what you meant)
Yeah, I was thinking of a counter register with either a latch or a trigger or both, that could be precisely synchronized with an event, and would allow reading the register in pieces without danger of having the reads and updates conflict.
yeah, copy the counter into a register on a signal, and read from that
Easy-peasy with even a small FPGA, as well as giving (say) I2C access to the registers.
@tulip sleet I agree, but to my knowledge this isn't packaged up to use from a circuitpython program yet...
@onyx hinge yes, not at all, just idly speculating on hw π
The existing RTC's are pretty good, but maybe not as accurate. I'd guess you know about the RTC FeatherWings and breakouts.
I'm working on a library with 2 .py files. Travis is complaining with: Multiple top level py files not allowed. Please put them in a package or combine them into a single file.
I have both .py files in a subdirectory inside myrepo, and have travis set to look in it.
what else is required?
an empty __init__.py probably
It was just a matter of having a better grasp of how the build script looks for things. All working now.
latest Make: has a lot of CircuitPython, good work everyone! https://blog.adafruit.com/2019/03/23/make-vol-68-april-may-2019-is-here-guide-to-boards-tech-trend-1-the-push-for-python-make-adafruit-circuitpython/
This PR:
- adds a
socket_recv_intomethod ontosocketso that users can read from a socket without needing to allocate a new bytestring for each read - adds a helper function
_socket_recv_intoto deduplicate code betweensocket_recv_intoandsocket_recv
I wasnβt sure whether shared-bindings/socket/__init__.c was the right place to put the helper function _socket_recv_into, so apologies if there is a better place to put this!
Thanks for taking a look :smile:
anybody knows where the display gets initialized on the hallowing in 4.x?
found it, it's in the board's board.c
Hey guys,
I am trying to get the adafruit motor / stepper shield to run on my raspberry pi with no success, by executing the following commands :
from adafruit_motorkit import MotorKit
kit = MotorKit()
i get the following error : AttributeError: module 'board' has no attribute 'I2C'
I2c is enabled smbus is installed and i2cdetect does detect the shield any idea ?
I believe this was just updated yesterday and so you may need to make sure you have the latest code.
i have just installed the libraries using the pip3 install command
and redid a fresh install of everything python related
do you think i might not have gotten the latest version ?
It's possible. I haven't actually played around with CircuitPython on the Raspberry Pi yet (it's on my todo list), so I'm not sure of the exact steps.
I know the Stepper and Motor drivers were just updated to fix a problem and saw that other people were having the same issue you had and I saw a fix for that go in just yesterday.
I see
but aside from a fresh sudo pip3 install adafruit-circuitpython-motorkit ( which i have just done )
what it is you think i can do
The Stepper and motor Shields allow you to pass in an I2C bus now, which you could do with something like busio.I2C(board.SCL, board.SDA)
It's possible the latest fix wasn't updated on PyPi yet.
you need 1.2.7 release of blinka:
https://github.com/adafruit/Adafruit_Blinka/releases/tag/1.2.7
that added I2C to board
Awesome π
but also make sure you have latest MotorKit and Motor, they both got some recent tweaks. MotorKit to allow use of board.I2C, and Motor to fix an issue with PWM freq.
@stuck elbow just tried it out, nice work! https://github.com/deshipu/hallowing-snake
I wrote a CircuitPython displayio driver for the SSD1351 OLED 128x128 display. I confirmed the init sequence works by manually sending SPI commands to the display using the FourWire.send() method. However, none of the displayio commands work.
A closer look with a scope shows that displayio sends 16 bit values when it calls set_column and set_row. The SSD1351 expects 8 bit value for column and row.
Would it be possible to add a command_byte_length parameter to the _displayio.dis...
Due to the way the ST7789 display works, the only way I was able to get it to work was to have the CS briefly go High, then Low between commands. I found this by examining the Arduino Driver and it seems particular to this display. I have confirmed that toggling this in CircuitPython does fix the display working. I am preparing my first PR to fix this and will submit when it passes on Travis.
Just FYI, I have been running the slideshowsd.py example as code.py on a PyPortal with current master with no data connection, just a wall supply. After a few hours, the slideshow stops and I see on the screen that it has rebooted to safe mode. The reason is not displayed. If I then do a hard reset, it restarts the code.py slideshow.
No idea if this is related, but I wanted to report it since this does not involve a USB connection.
The ST7789 requires the Chip Select to toggle High then Low between init commands in order to successfully initialize. I added an option to enable this which is off by default so it won't break any existing configurations. This is needed for the ST7789 displayio driver. This PR fixes #1684
these displays tend to want CS toggled before each command - i'd make it the default behavior rather than the exception
Ok thanks. Easy enough change.
Should I also set it to enabled for the PyPortal, Hallowing, and PyBadge? Those are in the board.c files for each.
yeah, i think it should always do that - its the expected behavior, in fact it may be one of the reasons i've seen gamma not always set.
if something breaks we'll find out soon :)
Curiosity more than anything - no reason I can't connect a SeeSaw breakout to a PyPortal to add more IO right?
@tough flax the only issue might be the voltage level on the I2C connector. It is at 5V by default but there is a jumper for 3.3. The seesaw may need 3.3
I have been running the slideshowsd.py example bleow as code.py on a PyPortal with current master with no data connection, just a wall supply. After a few hours, the slideshow stops and I see on the screen that it has entered safe mode. The reason is not displayed. If I then do a hard reset, it restarts the code.py slideshow normally.
May be related to #1681 but no USB connection is necessary and once started, this code does not write to the REPL.
CP Build:
Adafruit CircuitPytho...
@tough flax it should be fine. The seesaw can connect to an arduino with 5v logic, so it should be fine with the PyPortal. Other options to expand GPIO include the MCP23008 and MCP23017.
@rdagger I noticed there's a comment in CircuitPython with this issue with a "To Do" next to it, so let's leave this open. However, I was able to get a working driver without this change for the SSD1351. As of right now the PR hasn't been merged yet, but you can download it off my repo until it has.
I have tried this a few times. I am consistently seeing the background disappear, but otherwise it hasn't crashed. Does it crash right away, or should I let it run a while?
It looks like I need to test again, as I didn't try non-EN builds.
de_DE and fr tend to be the largest.
Scott:
I just tried set_rgb_status_brightness on a PyPortal running beta 5. With the command in boot.py, it works as expected.
With the command only in code.py (no boot.py) the led stays on when code is started either by powering the PyPortal or by hitting the reset button. The led will be turned off by entering <ctrl>C in the Mu REPL while the code is running, or by re-saving the code while it is running.
I think this is the same as what we saw previously.
Bill
On Mar 12, 2019, at ...
It appears that catwan_usbstick is the only samd21 that isn't disabling CIRCUITPY_FREQUENCYIO (which requires more than 5.5kB).
According to the Circuitpython documentation, frequencyio is not supported on samd21 boards.
Does the catwan_usbstick need this undocumented support, or was the omission of CIRCUITPY_FREQUENCYIO = 0 an accident?
It's almost certianly an accident. frequencyio may have been added after the catwan board was added. Just disable it like the other samd21 boards.
I just checked the CatWAN USB Stick Circuitpython example, and they do not appear to rely on frequencyio.
@dhalbert With the default settings, it does not crash immediately -- infact, it seems to be running OK today,
However, if I cahange the event date to:
14,16c14,16
< EVENT_MONTH = 6
< EVENT_DAY = 28
< EVENT_HOUR = 17
---
> EVENT_MONTH = 4
> EVENT_DAY = 15
> EVENT_HOUR = 9
it crashes immediately on first update. That is, I see the background, then after a few seconds, it crashes.
o/
no longer circuitpython but the project i asked about a couple weeks ago came out pretty well https://photos.app.goo.gl/VLRNNGZoLNb91q8k7
a flag property called visible or something, to quickly hide/show a group would be great, easier than popping/pushing when you have a big group stack?
>>> fontio.BuiltinFont
<class 'BuiltinFont'>
>>> fontio.BuiltinFont.get_bounding_box
<function>
>>> fontio.BuiltinFont.get_bounding_box()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: function takes 1 positional arguments but 0 were given```
not sure what the arg is, other fonts don't require it
very strange -- I run eventcountdown.py on the PyPortal, it runs OK -- I then copied eventcountdown.py to new_copy.py -- When I run new_copy.py it crashes...
a diff of the files does not report any difference.
In all cases, I am running this from the REPL not code.py.
even stranger, any of the examples (that is different dates) run OK if loaded as code.py.....
My head hurts...
I think it might depend on where the file is in the partition table, how it is split into blocks, and other things like that. On a non-express board you could just copy the current.uf2 file to reproduce the whole filesystem exactly, perhaps we could have some tool to dump the filesystem off the flash chip on the express boards as well?
This is merged as _pew already.
I had similar problems while developing the snake game for the Hallowing M0 Express. The code is at https://github.com/deshipu/hallowing-snake
For the PyPortal specificly, what format of 16-bit BMPs do I want? R5G6B5, A1R5G5B5, or X1R5G5B5 ?
Hi, do you need help with the french translation or is it covered ?
@umbral dagger 565 probably looks best but I think I added 555 xrgb
The gamma doesn't work though
By the way, do we have a howto on starting a new language for translation? I can do Polish.
It appears that catwan_usbstick is the only samd21 that isn't disabling CIRCUITPY_FREQUENCYIO
Ooops! Looks like I missed that one when I put in the PR for frequencyio.
Just needs CIRCUITPY_FREQUENCYIO = 0 placed in the CatWAN's mpconfigboard.mk file. I can submit it if not included elsewhere.
@pastel panther thx
I started a translation for Polish: https://github.com/adafruit/circuitpython/issues/1690
the opposite of refresh_soon() :)
maybe a context manager would work for this, pausing the display for the duration of executing the code inside of it
something like:
with display.frame: # pauses the refresh here
...
# unpauses and schedules a new refresh here
@slender iron do you want my notes on what I'm missing in the displayio currently, or should I wait for the 4.0 to be released?
finally an ESP* chip with USB!
@gilded cradle warning i did a scrubbin' of shapes and button - to match the new x/y and allow changing label text
Thanks @meager fog . I'll do a review when I get back home. I don't have my PyPortal with me at the moment and would like to test too.
<@&356864093652516868> Here is the notes doc for tomorrow's CircuitPython Weekly. Please feel free to add your Hug Reports and Status updates, even if you'll be present in voice. It's super helpful! Thanks! https://docs.google.com/document/d/11XbhNHakP7z0zW4vKThrs6bmRLLNy2BPytkB6Z5HlZs/edit?usp=sharing
CircuitPython Weekly for 25 March 2019 Video is available here on YouTube. Join here for the chat all week: https://adafru.it/discord The weekly happens normally at 2pm ET/11am PT on Mondays. Check the #circuitpython channel on Discord for notices of change in time and ...
Remove a period from the error message, so that the same message as in
SPI and other places in I2C can be re-used.
displayio.Group should be iterable, since it has a length and can be indexed.
Not sure if this should be 4.0 or 4.x.
yahh i this would be handy :)
On latest master:
The testg.py file below produces this output, showing that the inner_group[0] has been smashed in some way:
>>> import testg
type(innergroup[0]) <class 'TileGrid'>
type(innergroup[0]) <function>
Minimal example, file testg.py:
import displayio
import board
import time
# max sizes of 4 do not produce error, but 15 and 10 do, as well as 16 and 16.
#
group = displayio.Group(max_size=16)
inner_group = displayio.Group(max_size=1)
od_bitmap = ...
The essence of this bug is described in #1695. I don't know about the hard crashes, but that may be yet some other bug, or else it's a manifestation of the #1695 bug. Could close this in favor of #1680.
preview -- PyperCard (Hypercard like thing for CircuitPython) and/or CYOA ... Choose your own adventure
@meager fog - trying out the new Display_Button lib, and ran across a couple things. First, the simple test example still uses the position tuple with Tilegrid which looks like it has been changed to x, y.
pixel_shader=color_palette,
position=(0, 0)) ```
Wait, I'm already behind?!! Dang...
all good - its only from today
Got it. Also, getting an error with button 3. Index out of range on line 149 of adafruit_button.py. I'd paste the error, but I can't seem to get the REPL back. π¦
might want to have the latest Button PR as well https://github.com/adafruit/Adafruit_CircuitPython_Display_Button/pull/3
Ok. It's odd, though, because I can make the error go away if I add a fill color and outline color instead of passing None. That doesn't make sense to me.
This is a hacky way to show this, but this code errors out:
width=BUTTON_WIDTH, height=BUTTON_HEIGHT,
label="button3", label_font=font, label_color=0x0000FF,
fill_color=None, outline_color=None)
buttons.append(button_3)```
This works:
width=BUTTON_WIDTH, height=BUTTON_HEIGHT,
label="button3", label_font=font, label_color=0x0000FF,
fill_color=0x00FF00, outline_color=0xFF0000)
buttons.append(button_3)```
only difference is the fill and outline colors
Also, I am using a different font than your example. But that seems even less likely of a candidate for the cause.
@makermelissa I tested the SSD1351 driver and the example that you linked above and it doesn't work yet. I don't see how it could until the changes to set_column & set_row byte length are added?
Maybe I'm misunderstanding your post or maybe you have a different revision of the SSD1351? I'm using a generic SSD1351, but the Adafruit SSD1351 datasheet also shows a single byte for column/row start and a single byte for column/row end (page 36, section 10.1.1 & 10.1.2).
Actually, it looks like I only need to set a color for the fill OR the outline.
....to make it work.
Travis failed due to translations in the first subjob.
Could be 4.0.0 milestone or could be 4.x, depending on whether this appears to be necessary.
[Note: @dhalbert requested this issue even though it's really not a bug in CP, but in the XAC]
I spent a great deal of time getting the XBox Adaptive Controller (XAC) to work with CircuitPython. I found that there were a number of issues with the XAC's implementation of HID that I had to work around.
I have reported those issues to Microsoft, but I've heard back that there will not be a quick resolution to them. So, in the meantime, if we want to be able to use CP on the XAC (which I ...
@old smelt could be a bug in the various combo's that are possible - open an issue if u can repro, plz π
butttons are still in progress
Will do. And, I'm thrilled with the changes happening with buttons!
I've updated my project to use them - and ported from the M4/TFT to a PyPortal.
wow looks great!!
But now I need to fix this pesky REPL issue
Can't break into the REPL from Mu.
Thank you!
you should be able to have multi-line buttons but i haven't tried it yet
once we hvae partial-screen updates, the selection code will be usable. right now its a little marginal
This should work just fine. They are all buttons.
But partial screens would be great.
Any known issues with PyPortal and REPL?
what are you running?
4.0.0-beta.5
whats the error?
1.0.0
you need 1.0.1
Thanks for testing @rdagger. It must have been the CircuitPython PR I prepared for this. I'll test it with the PR again.
I was just looking at the Mu website when you responded. π
I'll grab it.
Thanks for your help and all the work on the display stuff. Been away from CP for a couple weeks. Fun to get this running on the portal
π
Is the serial monitor interface different on the PyPortal than an M4 Express or CPE?
Mu update worked. 1.0.2
New Mu Can Do
[Groan] But, c'mon, it's late.
Thank you!
it doesnt 'know' what a pyportal is, later versions are more flexible in how they recognize boards
I see. Oh, and the button inverts colors when selected! That's fantastic.
Thanks again for the updates to this library. This is excellent.
Oh, I didn't address your comment @dhalbert. I'd say it should remain a milestone since it's necessary for displayio to work on certain displays.
@rdagger I swear it was working last night, but it's not working for me anymore, so now I'm trying to figure out what I did so I can duplicate. :)
Sorry, forgot to run make translate again.
This is a pull request to add support for uChip into the Circuitpython environment.
We tested the attached code below and it seems to work with Circuitpython.
If there are any suggestions or changes needed, please let us know!
What is uChip in brief?
A complete USB dev board the size of a narrow 16-DIP package, featuring Atmel SAMD21 Cortex M0+ and onboard switching converters. (OTG compliant and power d...
I ran the example above overnight. It didn't go into safe mode but it did throw an IOError 22 exception on this line in adafruit_slideshow.py:
self._image_file = open(image_name, "rb")
I suspect something got smashed. I'm rerunning with a breakpoint on the lowest-level exception handling so I can catch something like this.
There's something wrong with your pull request. It shows no changed files. I'm not sure why you did the revert in f7febdf, which removed the files you added.
shouldn't this be 0x%04x ?
Good point, @jerryneedell. I should have looked more carefully. @deshipu could you submit another PR?
@deshipu Can you fix the translation conflicts and resubmit? (Maybe after your other PR's are cleared.)
Sure, sorry about that. Looks like those messages are cursed...
I'll redo the pull request, probably I reverted by mistake the uploaded files.
This is a pull request to add support for uChip into the Circuitpython environment.
We tested the attached code below and it seems to work with Circuitpython.
If there are any suggestions or changes needed, please let us know!
What is uChip in brief?
A complete USB dev board the size of a narrow 16-DIP package, featuring Atmel SAMD21 Cortex M0+ and onboard switching converters. (OTG compliant and power delivery up to 1A@5V or 3V3).
For more details refer to the ongoing campaign on ki...
just because it has slightly more comprehensive (and low level) timer/counter support, I ended up switching to micropython on my pyboard. But now I have it counting up based on my OCXO, 10 million counts per second, wrapping at 1 billion counts (10 seconds). It'll let me accurately track the time as long as my main loop is never blocked for >10 seconds.
but this means I can't use the awesome CP libraries for lcd interfacing, making more work to do on that end
Updated as asked in pullrequest #1700
Please make the .travis.yml change in this PR by pushing another commit; I've closed #1701.
Ok, sorry for the mistake.
Moved them all, check it out, there should be no more uChip folder now.
ok, great, we crossed while you were doing the renames.
No problem, sorry for the delay.
The German (de_DE) build failed, almost certainly because of size. Add
CIRCUITPY_FREQUENCYIO = 0
to the end of your mpconfigboard.mk file, and it should be OK after that. See gemma_m0/mpconfigboard.mk as an example.
thanks! @kattni please update the CPX Crickit guide to point to this UF2
<@&356864093652516868> Meeting in approximately 45 minutes! Here's the notes doc for today's CircuitPython Weekly. Please add your Hug Reports and Status updates, even if you'll be there in voice. It's super helpful! Thanks! https://docs.google.com/document/d/11XbhNHakP7z0zW4vKThrs6bmRLLNy2BPytkB6Z5HlZs/edit?usp=sharing
#CircuitPython Weekly for 25 March 2019 Video is available here on YouTube. Join here for the chat all week: https://adafru.it/discord The weekly happens normally at 2pm ET/11am PT on Mondays. Check the #circuitpython channel on Discord for notices of change in time and...
I'm stuck in a telecon that I shouldn't even be in, so I may be late or a no-show. π
@raven canopy π¦ Thanks for letting us know.
I mean...I could multi-con right? π€
Obviously.
We'll see...
I'll be lurking off & on due to doggie-noise
Lurking
No microphone today
Lurking today π
Just listening in, my notes are in the doc.
The project built correctly I think.
Thanks for the support
I have noticed that the translation template still contains all the messages for functions related to WiFi configuration on the ESP8266. Since the support for ESP8266 is getting removed in this version, perhaps we should also remove the messages, so that the translators don't have to do unnecessary work, and to save space?
ok im here
Lurking today.
I am lurking today
Me
rdagger?
@meager fog is the SoundBoard demo working on the latest libs/release?
Lurking, have in the weeds
post-note : would anyone be interested in me streaming/recording building out a lightweight CircuitPython HTTP API wrapper in CircuitPython with ESP32SPI?
@tidal kiln great idea for a guide!
I have been using the following encoder:
These are great for hobby use as they are very accessible and very precise. I believe its a hall effect quadrature encoder, to use it you have to wire it through a logic lever shifter but there are encoders like it that don't require the shifter, like this one that is mounted on the back of a motor:
htt...
@prime flower sounds really fun! and I'd love to watch a stream like that to learn more about http.
I posted some notes - if you want me to talk through them I will, but it's not critical
@tough flax I Can come back to you.
Please post in the weeds here or in the notes doc
@solar whale What size packets are you sending? Possibly similar to the RX issue within RFM9x
Seems like it will be difficult for the displayio.display class to maintain compatibility across all the different LCD displays. I took a look at writing a driver for an older Adafruit ST7565 display. Instead of a set_column command it has set_column_upper and set_column_lower commands. Instead of set_row it has set_page (The display is broken into 8 horizontal pages which are numbered from the center 0 to 3 and 7 to 4).
IN THE WEEDS
- updating frozen motor in CPX w/ Crickit
- library bundle download tie-in to webpage?
In the Weeds - https://github.com/adafruit/circuitpython/issues/1696 - How do we support XAC while Microsoft is broken?
small -- <16 bytes in general
@prime flower but thanks for the reminder -- I will look into that.
Fortunately there is a very limited number of different displays in use in there, and all the new ones follow the MIPI standard, so we could either hard-code the weird ones or simply completely leave them out.
Yes?
scope? global?
Thank you!
Thank you to all! Hope y'all have a great day.
thanks for running the show @idle owl
Thanks everyone and especially @idle owl for running this.
π
Here are the issues I sent to Microsoft (Bryce Johnson) about how they could improve the HID support in the XAC. He thanked me and it's in the pipeline, but honestly it's not going to be a speedy fix.
XBox Feedback.pdf
MSFT has OK'd me posting the feedback I sent them so we can see what the future MIGHT hold π https://github.com/adafruit/circuitpython/issues/1696#issuecomment-476334156
In certain cases such as this display, I think there is enough flexibility to get it working. I had it displaying the other night, but must not have unplugged the display before testing Beta 5, so something was still properly initialized when I tested. I do know it works under the right conditions though.
Per MSFT's request, I've also posted the feedback on their XBox request site. If anyone's interested, please consider voting for it https://xboxideas.uservoice.com/forums/912157-voting-phase-ease-of-access/suggestions/37195975-improve-xac-usb-support
I need to wait for the other pull request to merge, so that I can run make translate β to avoid conflicts.
sorry for the noise
It would be nice to have it, to be able to, for example, sort the sprites by their y coordinate.
Could you merge from upstream? I think your PR may be reverting the updates to the frozen libraries.
It would be nice to be able to rotate the Group in 90Β° increments, and to be able to mirror and vertically flip it. One way of implementing it would be adding an orientation attribute, with eight possible values. One bit would control horizontal flip, one bit β vertical, and last bit would control swapping of the x and y coordinates (diagonal flip). This way we can have all possible orientations.
@tidal kiln heya done w/ enough things today i can look at thermal printer stuff
r u around
yep
During one of the weekly calls a while back, the topic of REPL support for VSCode came up. Did anything come of that? Or is anyone working on it?
what is long living?
@tidal kiln back (monday is sniper day π
ok all are identical to LEFT hand side of https://forums.adafruit.com/download/file.php?id=65419
is that what you want?
I believe so, based on their comment about that photo:
the picture on the right is a good printer and the other one is bad
also - the one i have is like the one on the right
so, yah, the one on the left is the item of interest
I tried this:
sheep@ghostwheel:~/dev/circuitpython/circuitpython$ git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
sheep@ghostwheel:~/dev/circuitpython/circuitpython$ git pull git@github.com:adafruit/circuitpython.git
From github.com:adafruit/circuitpython
* branch HEAD -> FETCH_HEAD
Already up to date.
sheep@ghostwheel:~/dev/circuitpython/circuitpython$ git checkout typo3
M frozen/Adafruit_CircuitPython_BusDevice
M f...
ok @tidal kiln can you place an order
and put FORPHIL etc in it, so i can get you one of these lefty printers
is there anything else you want/need π
cool. thanks. yah, i have a handful of pi related things in the cart already (for pihole work).
I think I got it now. The submodule stuff seems to be somehow tracked outside of the normal repository and is ignored by rebase.
want me to just pull the trigger on that order now?
yep go for it - can always order more π
yep. will do. thanks.
it keeps things around between soft reloads right?
@meager fog order placed
@marble hornet, not sure if you watched the memory heap livestream @slender iron did a few weeks ago, but he explained long living there pretty well.
@marble hornet ^^ that. it's 3 hours long π maybe here?
https://youtu.be/baa5ILZTRkQ?t=818
@tidal kiln ok next up...
wait https://3.basecamp.com/3732686/buckets/6402223/todos/1642666138#__recording_1684838415 is the same thing
was there anything else?
oh right the i2c thing
@tidal kiln and @gilded cradle thank you.
@meager fog stemma / pyportal?
i'll give it a watch, my miss matched object thing just vanished after 3 hours and 37 without any clue as to why. no changes except print statements.
ive seen it sometimes if you have multiple i2c devices, they pull the 3.3V gpio line up
and sometimes the pyportal / samd51 wont boot
so if they're connecting a bunch of external i2c devices, have em cut/solder the vcc pad to 3.3V
iz easy
so it'll be like "if you're connecting a bunch and seeing this do this"
but it happens enough i revised all the shields to pull up to gpio level
yep
you can toss in a FAQ page
yep. perfect for a short FAQ entry.
This pull request is for adding description of uChip board into the circuitpython-org repository.
Files added following the provided template.
already some info here:
https://learn.adafruit.com/adafruit-pyportal/pyportal-hardware-faq
lvoely
seems like adding at the bottom there would work?
yep
@meager fog i think mikeb wrote what was already there.
i just added an alert after the i2c section - good enough?
oh yeah
ok
thanx
i saw that and thought it was you editing while i was looking π
π
that i2c section was new to me too. last time i checked that page, it was just the tft ribbon check.
Could we add a sensor property for weight as a float, in grams? https://circuitpython.readthedocs.io/en/latest/docs/design_guide.html#sensor-properties-and-units
@tulip sleet To add a sensor property, would I just edit that page and PR it in?
Do we need a style guide for messages? I noticed that we have a lot of similar messages, such as "Invalid buffer size" and "Incorrect buffer size", or messages that only differ with punctuation or capitalization.
@timber mango I would like to make a pass through all the messages and clean them up, but it's a lot of work, especially now that there are translations. They could be shortened, e.g. "i must be greater than 0" -> "i must be > 0", etc.
Right now they are huffman-encoded, but they could be lzw-ish encoded with a shared dictionary, and maybe that would save further space. I haven't seen an easy way to do this: all the compression libraries that I could find are very interested in compressing a stream, and not a bunch of strings that share a subsequence dictionary.
@tulip sleet I can do that once I finish the polish translation β I will put it all in a single pull request, to not litter the commit log
@timber mango But I think all the languages might need fixing at once, since you'll need to make them consistent. You're polyglot enough to do most or all of the European languages. Not sure either of us could do Tagalog or Filipino.
@jerryneedell How many images were in your slideshow?
Thanks, I was seeing the exception above within half an hour or so with 13 images; reduced it to 12, and it's running for a couple of hours, but doesn't seem critical. In the bug above, the value passed in instead of the image_name string was the integer 14, which is suspiciously close to 13. Hence my try to reduce it by one and see if I see something similar.
We should remove the esp8266 port from the translation files. However, the strings don't show up at all in anything that's built, because they're port-specific and not included in non-esp8266 ports. So it appears it's a waste of human time, but not flash space.
@tannewt The huffman coding is not dictionary-based across strings, is that right? I looked for a library that does dictionary-based compression across multiple strings with a shared dictionary, but didn't find anything. All the libraries seem to be very stream oriented. I'd think we might do well with a dictionary scheme because the messages have quite a few substrings in common.
There's a link to usb.org in the adafruit_hid.keycode.Keycode section of the documentation:
http://www.usb.org/developers/hidpage/Hut1_12v2.pdf#page=58
This link appears to be deprecated and leads to a Page Not Found error. I did some traversing around usb.org and found the Hut1_12v2.pdf document here:
https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
But I don't know for sure if that is the intended reference.
Also tested Metro M0 with 4.0.0-beta.5 on same Samsung Chromebook as above. Didn't work either, so it doesn't appear to be a crystalled-vs-crystalless difference.
Hey @idle owl I see a bunch of changes in Adafruit_CircuitPython_Display_Button recently... is it sync'd with the latest library and build?
@tough flax, I was the last to merge into that library. Yeah, it should be up to date.
Ok, I will take the new libs & build
Thanks @siddacious. I missed your comment before, but I'm playing around with this now. I soldered a 5-pin header onto the proto area of my Feather M4 with wires so I can connect it to a debugger easily.
There's no chance that the Display Buttons changed the origin from the upper left to the upper right in the latest pyportal build, right?
I've just got a wierd but
bug
This fixes #1683 and allows the SSD1351 display to work with displayio. Please merge #1685 before merging this PR because I kind of built on top of that code.
Ok, I figured it out. I was using && instead of & for bitwise and. Once I fixed that it worked beautifully. Submitted PR so hopefully we'll get that up and running pretty soon.
@tough flax make sure you have the latest shapes and Display text libraries too. Both of those were updated too.
Awesome
@tulip sleet it's mostly copying around existing messages, and changing punctuation
I'm not sure this is going to be reliable, especially on the faster MCUs and with longer wires going to the display β the voltage might have not enough time to grow to TTL levels. I wonder if it wouldn't be better to toggle the CS pin at the start and at the end of the delay later in this loop.
Basically leave the self->set_cs(self->bus, false) here, and move the self->set_cs(self->bus, true) to right after the send commands.
The main reason I have the toggle commands right next to each other is because thatβs how it functions in the Arduino driver.
I originally had it after the send command and it required adding an additional reset for the ST7789 display to function for it to work, which is the main reason I added this. When I moved it to before the send commands based on the comments by @ladyada, it worked much better.
Also, I was testing with relatively long wires hooked up (about 6β or so) using an M4 ...
After thinking about it for a bit, I could dd an arbitrary amount of delay between (1-2ms) between the commands if that would make you feel more comfortable.
Do you want to try to get this done for 4.0 or 4.x (later)?
Includes filtering and sorting on downloads page. Ability to add features to the boards. We should probably limit these somewhat so the UI doesn't become cluttered with too many features. Maybe travis could whitelist allowed features that can be added to boards. Also includes a few various fixes and tweaks.
Fixes: https://github.com/adafruit/circuitpython-org/issues/10

I'm not really aiming at any particular deadline β I'm working on it as I have time. Currently I'm at about 40%, so my guess is that I should finish by the end of this week, but I can't guarantee it.
@tough flax You're good to go?
Yes - needed to remove/replace all versions of the library... seems top/left/bottom/right changed at some point?
When I updated to the latest bundle (with the old adafruit_button, shape, text) it flipped left->right
Odd. I haven't worked with every iteration so I haven't run into that. I know that the "origin" changed, but I'm not sure about left/right
Thank you. It's initialization code, so it doesn't hurt us much if it takes a few ms longer.
I looked in the datasheet to see about minimum CS toggle times, and the minimum times for CS setup are in the tens of nanoseconds, so it seems like this will not be an issue.
Thank you, sorry for being paranoid.
I think it was appropriate, and a small delay is good. Microcontrollers will only get faster.
@tulip sleet, I observe some ... interesting ... features of CP on the Hallowing with 4.0.0 Beta5. Is there something I should know about getting REPL to work with this?
I just posted observations in the help-with-circutpython thread.
I have MU 1.0, downloading 1.0.2 now
@dglaude a minimalistic example:
def main_loop(self):
"""Loop."""
if supervisor.runtime.serial_bytes_available:
input_string = input()
# handle your input
if "mycodeword" in input_string:
# do something special
# do your normal operation here.
# the your_check_input will only be called if there are bytes available...
# so as long as you do not start typing it is not blocking!
for a more 'in context example' have a ...
if supervisor.runtime.serial_bytes_available:
is it possible to check what the last available byte is?
this way i could hack together a non blocking 'input' check...
@timber mango there is a peek functionality available at a low level, but we haven't exposed it. Feel free to file an issue.
In the long run we would like to have a separate serial channel available that's not mixed in with the REPL.
@tulip sleet with separate serial channel you mean that a script could 'register' the need for input and than use something similar to the uart lib inteface?
it would be another COM port (in Windows parlance) or /dev/ttyACM1, etc.
ah - ok - total separation 'hardware wise' - now i understand π
yeah that would be great too!
the USB interface wold provide two channels. That would further confuse which one to connect to π so there are some issues of how to do this smoothly
yes, two CDCs
the confusion could be fine if the second one comes up later - only if the script register it?
i don't know if this is possible from the architecture side...
it has to be there when USB devices are enumerated on plugging in; I don't think it can suddently appear
that would make things interesting for autodetecting the REPL in Mu
humpf....
ok - so CP would have a second one everytime..
@timber mango, yes that's a problem, I don't think we've thought of a detection mechanism yet
it would be a second end-point - so it has a description / id and so on?!
OK, so now I have REPL on the Hallowing. Thanks! Still not sure how to turn the backlight on or off and I haven't foudn example code for how to use displayio.FourWire()
(i think it will be relative straight forward for linux but could get complicated in windows?!)
I'm not sure it has to be another endpoint; it might be able to be part of a composite device
yah, in Linux, maybe the second one is always the non-REPL, but Windows likes to assign COM ports somewhat randomly
@tulip sleet do we have an issue for the debian problems?
ok - iam not so detailed in the usb stuff - so eventually i used the wrong naming..
@slender iron not separately; I added comments in the chromebook one, which could be retitled to be more general
kk
or we could open another one; at the very least I should paste in some of the dialog from last night
mlupo on the forums was seeing something similar
i haven't seen that yet; i'll look for it
its wrongly tacked onto a different issue
I'll reply to rozzie and you can redirect mlupo
https://github.com/adafruit/circuitpython/issues/1642 is the RockChip issue; but the MTO issue could be new. They may all be related.
Some users have been unable to connect to the REPL from Debian Linux machines. This problem may be related to #1642 and #1617.
See @mlupo commenting in https://forums.adafruit.com/viewtopic.php?f=60&t=149291#p737722. MTO in discord #help-with-circuitpython 2019-03-25 also had trouble with two different Debian 9 machines, a Udoo Ultra (x64) running Debian 9.7, and an older laptop running 9.something. MTO did not have an issue with an Odroid HC2 running 9.7.
Hello - I noticed the QSPI pins are hard coded in https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/supervisor/qspi_flash.c Is there a way to re-initialize the pins differently without modifying the qspi.flash.c file? IE can we do that in the board config - the answer I think is no. I guess general question, is it a hard constraint due to hardware - those pins must be assigned that way, or a software constraint as that is just how it is setup? I would like to swap QSPI_DATA[0] and QSPI_DATA[2] assignment on the SAMD51 such that PA08 = QSPI_DATA[2] and PA10 = QSPI_DATA[0].
@dawn rampart are you using those pins for qspi?
Currently I use the default pin assignments and yes, they are used for qspi to my mem chip.
If I can swap DATA 2 and DATA 0, my board layout gets much cleaner.
ah, it's a SAMD51 limitation
Okay - kinda thought so, but wanted to check.
i just asked for this in discord chat:
danh 26.03.2019 18:27 Uhr
@s-light there is a peek functionality available at a low level, but we haven't exposed it. Feel free to file an issue. In the long run we would like to have a separate serial channel available that's not mixed in with the REPL.
he explained in more details that he meant with separate serial channel a second 'com-port' created by circuit python... usable for data-exchange by the script with 'more control'..
@gilded cradle @solar whale Have you been getting a higher frequency of failures/retries with the ESP32SPI library on beta 5?
I've been noticing an increase of failures when init'ing the wifi object. It only happens on it, but seems to fail to recover even with a wifi.reset()
Is the socket module not completed for Beta 5? I am messing around with it on the PyPortal but it does not find the model to load it.
@prime flower, I actually havenβt been doing much WiFi stuff since Iβve been deep in the displays. I can take a look a little later to see if thereβs anything obvious thatβs being missed.
@gilded cradle no worries - was just wondering if someone else noticed it, might be the same as the previous beta version.
@buoyant tendon sockets are working
@meager fog does it use the socket module though?
we cannot because we have SSL managed by the ESP32
and native python sockets don't understand that
kk, I think that is the missing piece for @buoyant tendon
no biggie, they can import as π
yup yup
hm, after a number of iterations, the pyportal quote app crashed
I installed Debian 9.8 on an external hard drive, and then booted it up on three machines:
- Dell Optiplex 7010 desktop
- Dell Latittude 4310 laptop
- Lenovo 110S laptop
In all cases, I was able to connect a PyPortal running 4.0.0 beta.5, and then connect to the REPL via /dev/ttyACM0. So I'm not sure what's going on with the other machines. I've asked @MTO on discord to update to 9.8 to see if that fixes things.
Tagging @hathach
@FutureSharks Our code for modules is consistently structured so it should be easy to find. The layout is described here: https://circuitpython.readthedocs.io/en/latest/docs/common_hal.html
Breaking the fork connection on GitHub will make it less obvious that we are a fork of MicroPython. I want to leave it as a way to make our relationship to the original project clearer.
@slender iron just finished the Debian testing, which was unfruitful. I'll try setting a watchpoint on the Group bug to see if I can glean anything further.
@slender iron @meager fog Ahh, got it. it's not written well in the docs.
@slender iron yeah ... noticed :P. Breaking on socket creation: adafruit_esp32spi_socket.py, lin 68, in init: AttributeError: 'NoneType' object has no attribute 'get_socket'
Ok, thanks for retesting @billr12. I'll reopen because this should be a quick fix. I have a feeling the brightness set isn't triggering an immediate write to the pixel when it should. A quick test would be to infinite loop after setting the brightness.
fontio.BuiltinFont is the type, not the instance. Use terminalio.FONT to get the BuiltinFont used by the terminal.
I expect to experiment a bunch with frame synchronization in 4.x once we can actually update a frame faster than the display does. Thanks for making an issue for it.
Hello. I'm still fiddling around with the MIDI library. It appears to be working well for me but I was writing some test cases and sitcking those in example. Does the library build process include anything that can run the unit tests and produce reports/etc?
Agree with 4.x. I want to lock displayio down now for 4.0.0.
For now please make a fork available that bakes in the other descriptor.
I would like to support this through custom USB descriptors in boot.py in the long run. We'll re-prioritize issues after 4.0.0 and hopefully have a better timeline for this then. I'd like to do it sometime this year because it will close #231, our second oldest bug too.
Note that this is .sort so it happens in place. sorted(group) would create a new object.
@deshipu Does this need to be native? You could make a Group subclass to do it instead.
Would you prefer Group over TileGrid support?
@jpecor I imagine that is the correct document. Mind creating a PR to update it?
Will transfer this to the adafruit_hid repo now since that's where the PR will need to be.
It's a bit difficult to do fast sorting when all you have is access to individual elements...
How about a different approach β instead of having Group as the container, have Group.items that would be a regular Python list β then you get all the list methods for free, including slices and sort.
I have no preference, both work for me, and I suppose TileGrid is a little easier to implement, but having it on Group would be more consistent given that groups already have coordinate offsets on them. Come to think of it, to have it on groups you would need to have it on tiles first, so maybe we can start with that, and add it to the group later if it is needed.
For me the use case is to save on the amount of graphics stored in memory for things that rotate or are animated by mir...
@dhalbert Correct. It's only individual byte frequency.
ngrams could help for unicode characters and common substrings but adds overhead in the encoding of the huffman tree itself.
Another thing we could do is apply the huffman compression to QSTRs. It's more challenging because QSTRs are dynamically added as well as static. We'd save memory by doing of for string objects as well.
Yeah, I can go through and remove the option now. Originally added when I thought it would default to false.
Totally. I plan on adding them. It's just a question of where. Starting with TileGrid makes sense to me.
One challenge will be OnDiskBitmap because reads in one direction are waaaaaayyyy faster than the other.
The challenging bit of C sorting is that the key function will likely be python still. (How would you choose what to sort by otherwise?)
I've thought about making Group more closely tied to list post-4.0.0. I don't like static allocation it does now.
On the Odroid, uname -a reports
Linux hc2-2 4.14.87+ #1 SMP PREEMPT Thu Dec 20 14:41:09 UTC 2018 armv7l GNU/Linux
On the Udoo:
uname output before and after:
Linux OfficeOfMTO 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux
Linux OfficeOfMTO 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
I don't see a change in behaviour: The filesystem doesn't mount, the serial port doesn't respond. Here's dmesg output:
[ 1077.084324] usb 1-1: new full-s...
Here's dmesg from the odroid (which works fine)
[4251594.309299] usb 2-1: new full-speed USB device number 2 using exynos-ohci
[4251594.548350] usb 2-1: New USB device found, idVendor=239a, idProduct=8032
[4251594.553786] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[4251594.561057] usb 2-1: Product: PyPortal
[4251594.564954] usb 2-1: Manufacturer: Adafruit Industries LLC
[4251594.570593] usb 2-1: SerialNumber: B223FB755364933502020213334480FF
[4251594.584428] usb-...
@simple pulsar Travis can usually run unit tests with Python3
On the laptop: A Lenovo Thinkpad X1 Carbon (4th gen) also running debian 9.8
The kernel was already up to date. Dist-upgrade only updated a few libs.
uname output:
Linux CarbonX1G4 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
from dmesg when I plug in the pyportal:
[ 4885.145818] usb 1-1: new full-speed USB device number 90 using xhci_hcd
[ 4885.297839] usb 1-1: New USB device found, idVendor=239a, idProduct=8032
[ 4885.297842] usb 1-1: New USB device strings...
I could keep a helper list on the side, sorting it and updating the group with it, but currently that would involve removing all elements from the group one-by-one, and then re-adding them one-by-one from the list. Slice assignment could be great for this (group[:] = sorted(group)) I suppose.
@slender iron How do I indiate it's a unit test to Travis?
edit .travis.yml to do the shell command for running the tests
Ah, thanks, is the .travis.yml generally kept the same for Adafruit libraries? Is there a concept of a .travis.extras.yml ?
not that I know of. just edit the one you need
Ok. Do you have any good examples of libraries already doing this?
uses pytest
Thanks.
thank you for the midi work!
Taken a bit longer than I expected and I'm now paranoid about every byte I add as I'm running out of memory on CPX.
But other than that it's close to being finished although I'm not sure whether to glue the existing interface for sending data onto my new code.
does your new code handle send as well?
yep, added it more recently, the messages all have constructors and you can just .send() them
interesting!
I'm not wedded to the old API though we'll need to update some examples for a new API
Normally I'd say preserve it but I like chopping stuff out now to save memory. But I'd already spotted existing examples and probably people using it so it seems wrong to break it for them
You can also use A5, C#4 notation too
temporary switching can sometimes be better than having two ways of doing something long-term
as long as it's clearly documented it's not tooooo bad
Is bluetooth (ble specifically) supported on the PyPortal? I found the youtube video with the bluetooth keyboard, but I don't see bluetooth mentioned in the hardware section (or anywhere else).
@lavish nova it is not. The bluetooth keyboard is hooked to an offscreen computer that is typing to the pyportal over usb
Ahh that's what I thought, but I was hopeful π thanks!
I'd love to get there. π I have ps2 keyboard support in a branch of mine.
For those who added TinyUSB to CircuitPython recently, did you see issues with it having a delayed initial connection time between device and host (computer)? I've been emailing with the author of it, but curious how it went integrating this into CP?
@solemn epoch I haven't seen a delay. (I did a lot of the samd work in TinyUSB)
Thanks for the reply @slender iron - have you connected with it from a MacOS machine? I use the "screen" app. Never saw any issues when I was using the ASF4 USB driver, but I do see issues with TinyUSB. I still suspect there's something going wrong with the enumeration process and potentially the descriptor / VID/PID combo is making OSX do something lengthy up front.
yep. using his simple example in the devices folder, with his auto-descriptor setting on in the conf file, and only using CDC functionality.
hrm
I haven't used that example in a while. We have our own descriptor for circuitpython
@slender iron If you want to have a look at how .send() works I just uploaded latest tests. See test_smallsysex_between_notes() in https://github.com/kevinjwalters/Adafruit_CircuitPython_MIDI/blob/master/examples/MIDI_unittests.py
the thing is, after the ~10 sec delay, the output starts coming in (it was buffered somewhere between the device and host), then it works fine. so I suspect the issue is in setup of the connection. after SAMD51 device startup, I go right into main() with his code, so I can't explain any delay
@simple pulsar can you give it a single object?
Yep, single objects or arrays
you could also use **args to take any number of args
accepting an array gives you flexibility to add other kwargs though
@solemn epoch that seems weird. do you have any way of sniffing the traffic?
Indeed, there's an optional channel=X for specifying a particular channel for send() to override one from constructor.
kk, looks good to me then
@slender iron I don't have an easy way to sniff USB traffic, unfortunately.
if you guys never ran into this, then I suspect it's something with the USB descriptor and OS X interacting. The code running is so simple and unmodified, I can't imagine why it would be doing this. I was fine with the ASF4 USB driver, but it's bloated and misbehaves when you put the device to sleep and wake it back up and try to re-init the driver again.
do you have an open issue about it?
with hathatch ?
ya
we haven't done any work to support sleep in circuitpython yet
(and therefore tinyusb)
Nothing on github. Just some emails with him. He basically said: "If you are on either Linux or MacOS, it is the modem manager module, disable it or exclude your vid/pid from the manmodem then it should be no delay."
i don't want to start mucking with the host to make things work, thogh
Right. Are you using something other than screen to connect with your testing devices?
no, I use screen
either way, OS X is using the same driver, so client app shouldn't matter
have you tried circuitpython with your computer?
I have a Feather-M4 express, so I could update it to your latest firmware
circuitpython 4.x that is
I haven't tried since you added TinyUSB. That's a good test
it'll be higher priority for me if you see it with circuitpython π
either way a github issue is a better than email so I can see all the current info you have
I'm doing my own thing on top of FreeRTOS on my D51, just using the nice bootloader you guys wrote as a way to easily load my own image and run it. But I intently follow this CP project and codebase to see how you guys have handled certain things π
we're happy to have it open source so you can
I don't think freertos + tinyusb gets much testing
since we do it bare metal
yeah, makes sense. I'll load CP4 and see if I see any connection delays. I can't imagine I would uncover anything since you guys clearly have tested this from an OS X machine
it's possible you have something installed that makes it misbehave
possible, but I actually just spun up a new mac mini and nothing crazy on here yet. although once you start pulling macports and homebrew things in, you never know. I have a set of those things I immediately put on the machine
you should get circuitpython going on your board too π
It's an awesome project and I've written a lot of python for desktop scripts. So glad you guys did this for the community.
Your next challenge should be to get Golang to run on ARM. Seems it's not really solved, but could be another interesting language to get people into on bare metal
π the rust folks have managed to get it going
oh interesting, ok. i read that Google had a very early prototype of Go on ARM, but stopped working on it
Anyway, getting off topic on your CP topic here. Thanks for your responses - will load CP4 on and see if TinyUSB behaves in that build talking to my machine
Will do
thanks for the link to the Rust on ARM. There's still the religious debate between Rust vs. Go. Go struck me as slightly more interesting to learn, but who knows π
more the merrier
@slender iron FYI, just loaded the CP v4 image on the board and the USB serial connection was immediate ("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable..."). SIgh
you're using your own descriptor and I've tried generating one, btu I don't want all the other endpoints aside from CDC
do you have a debugger? you could use it to see where the code is before serial is active
yeah, I do, a JLink
I have to solder the two JTAG connections though. The board layout put them on the bottom π¦
won't take long, but wish there were easy pins to grab those
hah
time to buy one of those to make this less painful. I get that the express was not geared toward someone needing to debug out of the box
which express?
feather M4
ah ya
I'm trying have ladyada always add a spot for a swd connector now even if it's left unpopulated
yes please!
it's hard on small boards though
plus, as part of the mission of Adafruit to keep teaching people, showing them the joy of debugging is part of the journey...
heh
but i guess earlier than that is the soldering journey, so you can connect things yourself
yup
I tend to be pretty lazy about it though
it's rare that a crash on one board with a samd51 doesn't also crash on a metro
You can get surprisingly far with LED blink debugging and writing to the backup ram with some log info between device resets, plus serial
but not when serial is being a pain.
I haven't tried that before
I'm keeping backup ram in my back pocket for a rainy day π
spend that 8K of RAM wisely
for my project, i map a structure to the start of it with some flags and things I'm tracking globally, plus wrote a logger class that uses a circular buffer on top of that rest of that RAM space. after a device rest (warm, not power off), it boots up and reads flags & other log entries, and can dump things out on serial.
i've found having this makes debugging a LOT easier on a wide range of issues that crop up. but an actual GDB session is probably best to get it right.
that's pretty slick
Ok, this has been cleaned up so that it always has the toggle happen.
Trinket M0 running 4.x beta or HEAD works fine when plugged into a laptop and fails when plugged into a Android phones using an OTG cable. 3.x works fine on the same devices.
@hathach This might be a good lead on some USB issues, and one you could test locally.
how much space does it take/add?
how much space does it take/add?
216 bytes. We have a couple k free even in Crickit CPX build. In Trinket we have about 5.5k free
Bummer! Just got this on yesterday's build:
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.
Gonna wait to see if it happens again
I think I'm officially unstable.repeated plays of .WAV files from the SD card causes out obnoxious noises and hard crash
Ok, with no user code running, and nothing being written by the PyPortal on debug, I get a hard crash consistently at 76 seconds
76 seconds after plugging in the USB cord
Adafruit CircuitPython 2c9fbb5 on 2019-02-24; Adafruit PyPortal with samd51j20
Just updated to Adafruit CircuitPython 4.0.0-beta.5 on 2019-03-17; Adafruit PyPortal with samd51j20
We will see
Ok, with the new (beta5) build, it does not go to safe mode... however, it does blank the screen after the same time.... is this a new watchdog call that sleeps the screen? What do I have to do to wake it?
The touch screen still works
And now the filesystem is corrupted.
I'm done for the night.
Ok, I decided to set up the debugger as described above (except for the Metro M4) and really go to town. Here's the Backtrace @dhalbert:
(gdb) backtrace
#0 HardFault_Handler () at supervisor/port.c:283
#1 <signal handler called>
#2 mp_decode_uint_skip (ptr=0x89000005 <error: Cannot access memory at address 0x89000005>) at ../../py/bc.c:70
#3 mp_execute_bytecode (code_state=0x20002c80, inject_exc=0x67001800) at ../../py/vm.c:1385
#4 0x20029734 in ?? ()
Backtrace stopped: previ...
It probably doesn't matter, but the compiled code was what I had in this PR: https://github.com/adafruit/circuitpython/pull/1708
It didn't corrupt the file this time (maybe because I typed continue), but I hope this helps you trace it.
Just an update - I rebuilt the filesystem, restarted and the screen blanked at 76 seconds and crashed to safe mode at 4min 20 sec. I don't have a debugger (but I'm placing an order for one now).
@dhalbert, if you want, I can also try on my feather M4 express. I modified it using the protoboard area so I can hook a debugger up easily now. :)
Ok, this time I got the Red LED and it corrupted the filesystem. Here's back trace and what happened when I tried to continue:
(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 0x2002ff28 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stac...
@dhalbert I may be hitting the same issue on a PyPortal with latest everything (yesterday's bundle and 4.0 beta5)
Adafruit CircuitPython 4.0.0-beta.5 on 2019-03-17; Adafruit PyPortal with samd51j20
I just thought I'd add a comment that I had seen none of this instability until I started reading the image and sound files from the SD card. The card's not corrupted and works fine in my laptop, but I was just wondering if the SPI bus might be an area to look? When these files were in the CI...
OK fair enough, thanks for the reply @tannewt
Review/merge needed for https://github.com/adafruit/Adafruit_Learning_System_Guides/pull/580.
Hi all ... who can advise me ... I have 5 physical units in which I need to periodically switch pumps ... every 1-60 min for 50-2500 ms..... Simple, it is 5 digital outputs BUT .... I need to implement non-blocking Timers ... will anyone advise me how to implement it in CP? Any good idea greatly appreciated.
@tulip sleet - thanks for the guidance on the HID documentation. I'll create a PR for that USB reference change.
@buoyant wigeon One idea is to keep a sorted list of which output needs to be activated/deactivated next. You can look at the first item in the list and make a decision how long to sleep (or do other activities like loop and wait for buttons to be pressed). Sorting a list with 5 items should not take very long.
I've done it in C, but not (yet) in Python
time.monotonic_ns (4.x / master only) is your best bet for long term accurate counting of time. time.monotonic(), which returns a float, would start to have a minimum precision of 50ms after around 2 days of operation.
(or an RTC, but that doesn't help you with sub-second stuff)
shared-module/TileGrid.c didn't handle some cases where the pixel_shader might be a ColorConverter instead of a Palette. Fixes #1695.
@onyx hinge Thanks for idea... time.monotonic is probably only one function in the CP which can be used in the loop for testing of more timers... It has to be non-blocking system (no time.sleep) because I need also to measure a lot of other things e.g. humidity, temp... the timers may not be absolutely accurate...
You might schedule reading sensors in the same way.
Each task has a deadline, and every time you return to your loop you find the task with the first deadline and perform it. Or, if no deadline is reached yet, you would call some kind of "idle task" which might do nothing or might sleep for e.g., 1ms at a time.
@onyx hinge Yes ... but now I have to write it all π
Hi
Port for Electronic Cats Bast Pro Mini M0
https://github.com/ElectronicCats/Bast-Pro-Mini-M0
Thanks!
@dhalbert I just find out the dcd_samd21 doesn't report disconnection/unplug event to the stack. So yes, if you provide the power via DC jack to Metro M0 then unplug the usb cable. The stack will still think it is connected. Hmm, very tricky is I couldn't find an way to detect such event reading through samd21 family data sheet. The closest thing I could detect is suspend interrupt, which will always happen as part of disconnection, but it can be a standalone bus event (e.g windows when to st...
I was thinking we could detect that a write (and maybe a read) was stalled, and set a flag that says it's disconnected.
Is this only samd21 or also samd51? Is this inherent in the peripheral or is it an ASF4 issue?
@dhalbert STALL is bit signal, same as ACK or NAK. Physical disconnect will cause the bus in SE0 ( D+ and D- in LOW). Somehow It also generate the suspend event (J state for 3 ms) with samd. I couldn't find way to detect usb disconnect with samd21 and samd51, but I am not familiar with them. Maybe you or other may know better.
I don't mean a literal USB STALL, just a write that isn't making progress (zero characters written).
imo, suspend is much better for this. I am looking more closer now. Maybe it is somewhere else, power module or something..
@slender iron et al https://status.travis-ci.com. I am seeing this:
@tulip sleet is on fire this morning!
i wish travis would stop splashing water on my fire
@tulip sleet what should I take a look at now?
i am just starting on issue 1686.
in arduino, traditionally we toggle CS on the beginning of every command
Hi all,
We're nearing completion of the first 4.0.0 stable release. We'll get many more people trying it as a result. Please take a look at translations when you have a chance and make any changes you'd like to see in 4.0.0. We can always update them after as well.
Thanks!
I think this is fixed by #1714. Could you reopen if you are still seeing crashes? Thanks.
1681 is in thach's purview right now.
I'm going to move the internationalization issues to long term
amazing work dan
@slender iron you might take a look #1667, but we need more background, I think
are there C impls of the SD card code that we could just use instead of the flaky Python versions? Not sure if that should be 4.0 or 4.x. We need a native sdcard module maybe
well, there's arduino code, but I don't know if it's better or not. There are several outstanding issues on adafruit_sdcard for later
bill greiman's SDfat code is really solid
if you wanted to use open source code
supports all the weirdo exceptions
thanks! I'll make up some issue about maybe using it
I don't want to do that for 4.0 though
that's fine
kk, good to know
he writes good code π
and he has some interesting options like XSPI
which gives you 3x speed
its a special SD card mode but you have to have exclusive use of SPI i ithink its like DSPI or something
he also has SDIO support
for something like grandcentral where the SD card is on an exclusive SERCOM, it could be a nice boost
its sorta the tinyusb of sd cards - everyone uses it π
sounds great! The current Python library has a number issues, doesn't do good error handling, etc. I created an issue and marked it long term.
@makermelissa What code was running when this happened? The varying stack trace seems to indicate memory corruption. @dhalbert just submitted a fix for memory issues when TileGrid is used with a ColorConverter. Any chance you were using it?
I was running the example code from the ST7735 library and rapidly making changes and saving the file.
Yep verified. It was using TileGrid. I'l try it with the fix.
@dhalbert Do you plan on doing this for 4.0? Seems like we could do this in 4.x.
I'll move it to 4.x. I know what I want to do, but I need to test it too.
@C47D, @sabas1080 when you guys get a chance, can you please check the PR? I might add more things tomorrow (28/Mar/2019).
Regards.
Is this pixel_shader related too?
Great idea. I'll go with that. It will make things even simpler.
@tidal kiln are you running linux?
yep
if so, can you repro this weird effect linux seems to think the pyportal is a modem
modemmanager?
@meager fog not sure about that first image, but second image looks like the known issue with modemmanager:
https://learn.adafruit.com/welcome-to-circuitpython/kattni-connecting-to-the-serial-console
blue info box / apt purge
ok its come up a couple times, can you add it to the pyportal FAQ
mostly cause you can actually see it happening
sure. might be good to restructure that page also?
https://learn.adafruit.com/adafruit-pyportal/pyportal-hardware-faq
make it more FAQ list like
I will try to get the Spanish translations up to day, haven't looked into it in a while.
Redo of pull request due to intervening changes and submodule changes, which messed up the merge. Also had to make pirkey de_DE build fit.
Hi @yeyeto2788 you beat me to it, i was planning to take a look into the translation later today. π
@meager fog added new entry and reformatted page:
https://learn.adafruit.com/adafruit-pyportal/pyportal-hardware-faq
@meager fog ModemManager includes a blacklist. It looks like the Flora is in it but no others: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/blob/master/src/77-mm-usb-device-blacklist.rules#L84
I'm unable to reproduce this with 94822ee2088960e6f68c9d4f05606cdb47c9ba5c built in debug mode on the PCA10056. I loaded it with JLink and then added a blinky code.py (below), made the lib folder and then dragged the lib folder over. I also copied the examples over. It was slow but didn't have errors.
Next I repeatedly ejected the drive, disconnected the usb data lines with an inline switch, reset circuitpython via GDB and verified I could still read files from the drive. Note I was on Mac...
Is this still an issue?
frequencyio is too large to fit on some small builds due to language string size. Turn it off for small builds.
We need to test this again. I don't think we've fixed anything that would necessarily fix this.
@dhalbert just to note, I went with explicit CIRCUITPY_FREQUENCYIO = 0 so that SAMD21 wouldn't include it (I did miss setting it in CatWAN). I still need to go back and test the SAMD21 code that is left in FrequencyIn as an optional build. But, if a future SAMD21 port doesn't explicitly exclude frequencyio, and uses the full build, it will be included.
I can turn it off explicitly in all SAMD21 builds now. I can add a new commit to this PR. Does that make sense?
I would make the changes in mpconfigport.mk and check for SAMD21.
I would make the changes in mpconfigport.mk and check for SAMD21.
why didn't I think of that. haha
CIRCUITPY_FREQUENCYIO = 0 is left in on on samd21 mpconfigboard.mk files because even those builds need it off no matter, for space reasons, even it becomes usable on samd21.
@tulip sleet I think I found the hid issue. not sure why nrf is ok though
@slender iron which hid issue?
@slender iron /dev/ttyACM0 doesn't show up, so it's CDC?
The previous code assumed HID report ids were consecutive. This is
not true in the CircuitPython descriptor where report ids are fixed
for each report type.
Fixes #1617
its a crash that kills all usb
I have a chromebook that doesn't work, so I'll try it!
ya, I found it with my chromebook and an m0
my mac must not read the gamepad hid report
this might be the trouble on the other boards too, if it causes descriptor crashing of various sorts
I found that newer linux kernels were not impacted
it sends back random memory
because it indexes out of bounds
@celest zenith I wonder if newer ones don't read gamepad reports by default
could be -- or are more resilient to bad data
Β―_(γ)_/Β―
I can test on a few different systems in a bit.
the reply will depend on what the memory is after the hid info array
k, did you see my PR?
I did. I won't be able to test till later tonight though
@slender iron I had a few minutes to test. The PR code fixed the problem with my Trinket M0 on CentOS 7. I will test on the chromebook later
@celest zenith great! thanks for confirming
@slender iron once I get the pirkey DE build running again, I'll have you merge that PR and then I'll restart the other builds
ok. ping me if you need a review @tulip sleet
looks like travis is still backlogged
I'll ping you when #1719 is finished, which is the blocker for the others.
OK @tannewt trying yet again to get this to pass CI checks ...
@nickzoic Just saw this issue in micropython: https://github.com/micropython/micropython/issues/4590. Is it relevant to your impl?
Yep, it's dividing down by four to be compatible with the other rotaryio implementations (see #1045 / #1521)
It'd be easy enough for it to be modified not to, perhaps by adding a constructor argument 'divider' which can default to 4. Values 1,2 and 4 are probably pretty sensible for different kinds of encoder.
ie = rotaryio.IncrementalEncoder(board.A0, board.A1, divider=1)
@tannewt what do you reckon?
-----Nick
@dhalbert you mean for the problems with the Ethernet wing like #1500, right?
(I think there was another one too, or maybe that was a discussion on Discord)
I've never been able to successfully replicate those so haven't got anywhere tracking them down.
The Wiznet5K implementation for circuitpython doesn't use LWIP but it might be worth looking at the error handling in wiznet5k_socket_send() and see if there's situations there where we should retry rather than erroring out.
RIght - I didn't know how much of your code was common with the MPy code, if any.
@fierce oar @split ocean want design a circuitpython game boy screen lense? I have some that are missing it
I'm game! @slender iron
it's 1mm thick
Yeah, it is a bit obscure. There's sample code in PR #1534 ... the stuff to update is the \\| stuff in shared-bindings/rtc/__init__.c, right? I probably should have done that as part of #1534 already ...
@slender iron sure!
I think it's printed acrylic or similar
@slender iron https://github.com/adafruit/circuitpython/pull/1719 finally finished successfully. If you can review and approve that, I can restart more. Travis now has caught up and has zero backlog
tnx!
I just tested a build of #1721
It worked fine on Centos 7 and my chromebook.
@sabas1080 Could you merge from upstream and push a new commit? There were additions to .travis.yml (new boards) that are not in the version you pushed. Also, the translations have changed, so you'll want to merge that too.
@sommersoft @tannewt this has now passed travis too.
@tannewt Approved already so you can merge this when travis gets around to it. Turns out travis cleared the travis-ci.org backlog, but travis-ci.com still has backlog.
Hey, can I use the above GitHub bot on my server? Or is it made by adafruit for adafruit?
Webhook?
I believe its just webhook, yeah.
π
Thanks! @raven canopy @feral sage
Ok, I got it to HardFault twice with this:
Breakpoint 1, HardFault_Handler () at supervisor/port.c:283
283 {
(gdb) backtrace
#0 HardFault_Handler () at supervisor/port.c:283
#1 <signal handler called>
#2 0x000064de in mp_execute_bytecode (code_state=0x20002c70, inject_exc=<optimized out>) at ../../py/vm.c:1384
#3 0x20029724 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
However, it did not corrupt the filesystem like before, so defin...
@makermelissa When you have a chance please describe your whole setup. I'll try to replicate it tomorrow.
Ok. I have an M4 Metro with Siddacious' MetroWing adapter on it (it was either that or my modified Feather M4 with debug header), an Adafruit Mini Color TFT with Joystick FeatherWing, and a JLink Edu connected to the Metro.
For software, I had compiled the latest with this https://github.com/adafruit/circuitpython/pull/1708. For CP code and libraries I had the latest ST7735 PR that I had submitted inside the lib folder and was running the example code as code.py. I had a few other misc fil...
Hello guys!
@C47D, @sabas1080, @tannewt
Found some errors on build:


They seems to be regarding other languages and flash size issue, can anyone help me out to get the build working?
Another quick question? Where is the build for the ESP8266 or the ESP32? I do...
Another quick question? Where is the build for the ESP8266 or the ESP32? I don't see it on the CI job
There was never a build for the ESP32, and ESP8266 is officially no longer supported in 4.0 and has been removed.
Should we also exclude extmod/modussl_axtls?
If extmod/modussl_axtls is not used by anything, yes, we could. I think the -prune option for find might help. Was this only for esp8266, or is it used to build micropython-coverage for tests or anything like that?
A quick grep shows that it's only mentioned in PY_EXTMOD_O_BASENAME in py/py.mk and was only used in ESP8266 and ESP32 ports. I can see a bunch of other potentially unused modules in there, like moduselect and moduwebsocket.
However, I am not 100% sure if they are not used somewhere without being explicitly mentioned β for example in the UNIX port...
Hi, your changes to .travis.yml are still out of date, and accidentally remove some new boards that were recently. Check the diff: https://github.com/adafruit/circuitpython/pull/1715/files#diff-354f30a63fb0907d4ad57269548329e3

The easiest thing might be to copy your new board definitions aside, do git checkout master; git fetch upstream; git merge upstream/master, and then create a new branch for this PR. Then edit .travis.yml to add your board, and copy the board definitions back into the the tree.
I notice you're merging from master in your fork. It's somewhat easier if you create a local branch in your fork for any changes. Keep master pristine and the same as upstream if you're trying to track upstre...
@yeyeto2788 Hi - your build problems are probably due to changes from upstream that haven't been incorporated in your PR (we fixed the "too big" errors).
Instead of merging from master in your fork, try keeping your master in sync with adafruit/circuitpython. Do a local branch for your changes. This will be easier. We have a Learn Guide explaining our GitHub workflow here: https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github.
- display boards not in files.json
- clean up unused code
- fix layout of wrapped features in download blocks
@emteeoh Could you try this build on your pyportal, on the various hosts that don't work?
https://adafruit-circuit-python.s3.amazonaws.com/bin/pyportal/en_US/adafruit-circuitpython-pyportal-en_US-20190328-c6e3b17.uf2. This is the build from this PR: https://github.com/adafruit/circuitpython/pull/1721.
@tboie Could you try this build on your Feather M0 Express?
https://adafruit-circuit-python.s3.amazonaws.com/bin/feather_m0_express/en_US/adafruit-circuitpython-feather_m0_express-en_US-20190328-c6e3b17.uf2.
It fixes a USB HID problem that may also affect connectivity. PR for fix is #1721.
fadb5a1 Added option to toggle cs in displayio init seq... - makermelissa
2bb63cb Added new parameter description in displayio RT... - makermelissa
d2a0ec2 Fixed display init on boards with displays - makermelissa
0c33f7f Enable CS toggle for displayio by default - makermelissa
b25c4ba Moving Toggle to before command fixes driver issue - makermelissa
Sanity check please: to send text via BLE from a Feather '840 to the bluefruit app I'm using adafruit_ble.uart/UARTServer.
Advertising, waiting for a connection, then writing. I get ``` File "adafruit_ble/uart.py", line 128, in write
OSError: Failed to write gatts value, err 0x000c
updating CP on my boards, was wondering what the "en_x_pirate" builds are
Pirate translation.
πΉ
fwiw travis is unhappy today too: https://www.traviscistatus.com/
Welcome to Travis CI's home for real-time and historical data on system performance.
that should be entertaining
It came up as a joke, but caught fire. We decided it's an excellent way to involve more people in the community who might not otherwise know where to start contributing to CircuitPython, and it provides tangible results for those contributions. So far, it is, indeed, pretty entertaining.
@nickzoic divider with a default of 4 for backwards compatibility sounds good to me.
Yup, \\| lines are filtered out and treated as an rst file.
@slender iron Moment for a quick q about storage.remount?
nm. Not sure if what I'm doing is right but I guess it'll work.
d550d19 Set up CI with Azure Pipelines [skip ci] - tannewt
2f15d9f Expand git history and install gettext - tannewt
6c023ad Install python deps and disable travis - tannewt
Is there a library to do Gamma correction for RGBW Neopixels?
switching CI?
Should have posted to help-with ... my bad