#circuitpython-dev

1 messages Β· Page 240 of 1

solar basin
#

The line that breaks the updates is line 28 as mentioned before

stuck elbow
#

for instance, can you print the position to the console instead of the screen?

solar basin
#

It's the same value, there is a commented out line of code where I'm doing that...

stuck elbow
#

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

solar basin
#

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.

stuck elbow
#

the amount of data is the same either way

#

it always updates the whole screen

solar basin
#

Hmm

#

Well, that's the difference

#

If I clear the screen, in part or in whole, it stops getting updates from the GPS module.

manic glacierBOT
stuck elbow
#

what if you add a delay before gps.update()?

#

I think timing is the only difference there

solar basin
#

I added the following delays: 0.1, 0.25, 0.5 with no change

stuck elbow
#

where did you add them?

solar basin
#

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

stuck elbow
#

if you comment out line 28 but leave the delay, does it work?

solar basin
#

It works with line 28 commented out period lol

stuck elbow
#

what if you add a delay in place of line 28?

solar basin
#

Interesting, I'll check

stuck elbow
#

next thing to try: move that fill_rect to after you read the position from the gps module

manic glacierBOT
stuck elbow
#

@solar basin I need to go to bed, good luck!

solar basin
#

Thanks! I really appreciate the help

manic glacierBOT
#

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 ...

manic glacierBOT
solar basin
#

Is anyone around to help me with the above issue? I sincerely think it might be a bug

tulip sleet
#

@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.

solar basin
#

@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.

tulip sleet
#

@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.

manic glacierBOT
manic glacierBOT
manic glacierBOT
solar whale
#

@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?

manic glacierBOT
#

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...
manic glacierBOT
manic glacierBOT
#

@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:

![image](https://user-images.githubusercontent.com/2847802/54756...

raven canopy
#

That moment you realize you don't have the math chops for DSP. But man it's fun to read about, even with the equations visible. 😲

pastel panther
#

@raven canopy word

#

tryin' to get there tho

raven canopy
manic glacierBOT
#

I got this working and will do a PR. However, a couple of notes:

  1. On the PCA10056 board, there are P0.09, and P0.10 positions on the black female headers. But these are unconnected unless you move the 0-ohm jumper resistors from R44 to R43 and R46 to R45. That was a head-scratcher for a while; see this Nordic Devzone comment. It's easier to test using the TP17 and TP18 test points near...
lean hare
#

@raven canopy dapguide is a good beginner DSP text

raven canopy
#

I'm enjoying it, certainly. Connecting quite a few dots I've picked up over the years.

manic glacierBOT
#

Fixes #1300. We don't support NFC, so the NFC pins can be used for other purposes. This sets a #define (in the right place) 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...

manic glacierBOT
manic glacierBOT
manic glacierBOT
warm pelican
#

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.

slender iron
#

@warm pelican We haven't tackled it yet and likely won't in the near future.

warm pelican
#

I was hoping for sooner.

slender iron
manic glacierBOT
warm pelican
#

Ok that sounds like an interesting route - there is already a model in MP.

slender iron
manic glacierBOT
#

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)
manic glacierBOT
#

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...
slender iron
#

@tulip sleet I am gonna update tinyusb. it shouldn't be a huge pull. Most is stm code

tulip sleet
#

@slender iron sounds good. I updated nrfx too in a recent PR; we may as well debug any third-party lib issues now.

manic glacierBOT
solar basin
#

The nRF52840 has a RTC, right?

wraith tiger
#

This is pretty cool.

manic glacierBOT
manic glacierBOT
#

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...

solar whale
#

@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.

stuck elbow
#

@solar whale that's an ST7735, same as on the hallowing

solar whale
#

@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.

stuck elbow
#

yeah, the offsets are probably also different, let me check my code

#

the offsets are 24, 24

solar whale
#

Can you point me to an example for the hallowing? -- not finding it.

stuck elbow
#

hallowing has the initialization built in

#

you will need to do it manually here, so use the example for the st7735

solar whale
#

OK -- thanks

stuck elbow
solar whale
#

hmm -- that example looks a bit outdated, but I get the idea -- Sprites and position - no longer work....do they?

tulip sleet
#

@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?

solar whale
#

@tulip sleet yes -- until it disconnected itself

tulip sleet
#

I'll do that, then, since there's a possibility it's USB-stack releated

solar whale
#

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!

tulip sleet
#

thanks!

stuck elbow
#

@solar whale see a pull request on that repo for a refreshed and updated version

solar whale
#

Nice!

gilded cradle
#

Hi @solar whale, what @stuck elbow said was correct.

solar whale
#

@gilded cradle Thanks -- I see it now in the PR -- I must have somehow missed it when I looked at at it earlier.

gilded cradle
#

No problem

solar whale
#

yay - Big red rectangle on my miniTFT!

gilded cradle
#

Perfect. As long as it's not blue.

stuck elbow
#

what's wrong with blue rectangles?

gilded cradle
#

The blue results from it being in BGR mode instead of RGB or maybe the other way around.

stuck elbow
#

ah, that

tulip sleet
#

@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

solar whale
#

@tulip sleet yes it did -- as did I πŸ˜‰

#

when I woke it up, the screen session to the REPL had terminated.

silent herald
#

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?

gilded cradle
silent herald
#

Thankyou MakerMelissa

gilded cradle
#

You're welcome.

silent herald
#

It's working thanks ! ❀

solar whale
#

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

stuck elbow
#

could it be the ondiskbitmap reads?

solar whale
#

hard to say -- since I don't get any feed back

#

Is there a known issue for that?

manic glacierBOT
#

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

manic glacierBOT
manic glacierBOT
#

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...

manic glacierBOT
onyx hinge
#

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.

stuck elbow
#

yeah, maybe the rotaryio :P

#

otherwise you can make something own

manic glacierBOT
raven canopy
onyx hinge
#

@raven canopy that looks like a place to start, thanks so much!

main meteor
#

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.

onyx hinge
#

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...

main meteor
#

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.

manic glacierBOT
tulip sleet
#

@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)

main meteor
#

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.

tulip sleet
#

yeah, copy the counter into a register on a signal, and read from that

main meteor
#

Easy-peasy with even a small FPGA, as well as giving (say) I2C access to the registers.

onyx hinge
#

@tulip sleet I agree, but to my knowledge this isn't packaged up to use from a circuitpython program yet...

tulip sleet
#

@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.

umbral dagger
#

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?

stuck elbow
#

an empty __init__.py probably

umbral dagger
#

It was just a matter of having a better grasp of how the build script looks for things. All working now.

river quest
#
Adafruit Industries - Makers, hackers, artists, designers and engineers!

Make: Vol. 68 April / May 2019 is here! Guide to Boards! Here are some of the highlights that include some Adafruit boards and more! Cover features: Metro Express, Feather and Circuit Playground, a…

manic glacierBOT
manic glacierBOT
#

This PR:

  • adds a socket_recv_into method onto socket so that users can read from a socket without needing to allocate a new bytestring for each read
  • adds a helper function _socket_recv_into to deduplicate code between socket_recv_into and socket_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:

stuck elbow
#

anybody knows where the display gets initialized on the hallowing in 4.x?

#

found it, it's in the board's board.c

wise bough
#

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 ?

gilded cradle
#

I believe this was just updated yesterday and so you may need to make sure you have the latest code.

wise bough
#

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 ?

gilded cradle
#

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.

wise bough
#

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

gilded cradle
#

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.

tidal kiln
wise bough
#

Alright

#

Thank you all for the quick help, i can go back working on my project πŸ˜ƒ

gilded cradle
#

Awesome πŸ˜ƒ

tidal kiln
#

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
manic glacierBOT
river quest
lone sandalBOT
manic glacierBOT
#

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...

manic glacierBOT
#

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.

manic glacierBOT
#

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.

manic glacierBOT
tough flax
#

Curiosity more than anything - no reason I can't connect a SeeSaw breakout to a PyPortal to add more IO right?

lone sandalBOT
manic glacierBOT
solar whale
#

@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

manic glacierBOT
#

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...
gilded cradle
#

@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.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

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 ...

manic glacierBOT
carmine kestrel
#

o/

manic glacierBOT
manic glacierBOT
umbral dagger
#

For the PyPortal specificly, what format of 16-bit BMPs do I want? R5G6B5, A1R5G5B5, or X1R5G5B5 ?

lofty nova
#

Hi, do you need help with the french translation or is it covered ?

pastel panther
#

@umbral dagger 565 probably looks best but I think I added 555 xrgb

#

The gamma doesn't work though

stuck elbow
#

By the way, do we have a howto on starting a new language for translation? I can do Polish.

manic glacierBOT
umbral dagger
#

@pastel panther thx

stuck elbow
manic glacierBOT
stuck elbow
#

@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!

meager fog
#

@gilded cradle warning i did a scrubbin' of shapes and button - to match the new x/y and allow changing label text

gilded cradle
#

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.

idle owl
#

<@&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

manic glacierBOT
lone sandalBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

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 = ...
river quest
old smelt
#

@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)) ```
meager fog
#

@old smelt check latest PR πŸ˜ƒ

#

test if you can!

old smelt
#

Wait, I'm already behind?!! Dang...

meager fog
#

all good - its only from today

old smelt
#

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. 😦

meager fog
old smelt
#

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.

manic glacierBOT
#

@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).

manic glacierBOT
old smelt
#

Actually, it looks like I only need to set a color for the fill OR the outline.

#

....to make it work.

manic glacierBOT
#

[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 ...

meager fog
#

@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

old smelt
#

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.

meager fog
#

wow looks great!!

old smelt
#

But now I need to fix this pesky REPL issue

#

Can't break into the REPL from Mu.

#

Thank you!

meager fog
#

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

old smelt
#

This should work just fine. They are all buttons.

#

But partial screens would be great.

#

Any known issues with PyPortal and REPL?

meager fog
#

what are you running?

old smelt
#

4.0.0-beta.5

meager fog
#

whats the error?

old smelt
#

Actually, that's more of a serial monitor problem than a REPL issue, technically

meager fog
#

oh i haven't used Mu

#

try putty

#

what version of Mu?

old smelt
#

1.0.0

meager fog
#

you need 1.0.1

manic glacierBOT
old smelt
#

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

meager fog
#

πŸ‘

old smelt
#

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!

meager fog
#

it doesnt 'know' what a pyportal is, later versions are more flexible in how they recognize boards

old smelt
#

I see. Oh, and the button inverts colors when selected! That's fantastic.

#

Thanks again for the updates to this library. This is excellent.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

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!

uChip.zip

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...

#

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...

onyx hinge
#

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

manic glacierBOT
manic glacierBOT
manic glacierBOT
idle owl
#

<@&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

raven canopy
#

I'm stuck in a telecon that I shouldn't even be in, so I may be late or a no-show. 😞

idle owl
#

@raven canopy 😦 Thanks for letting us know.

raven canopy
#

I mean...I could multi-con right? πŸ€”

idle owl
#

Obviously.

raven canopy
#

We'll see...

turbid radish
#

I'll be lurking off & on due to doggie-noise

old smelt
#

Lurking

gilded cradle
#

No microphone today

modern wing
#

Lurking today πŸ˜ƒ

wraith tiger
#

Just listening in, my notes are in the doc.

manic glacierBOT
modern wing
#

πŸ€

#

☠

meager fog
#

ok im here

errant grail
#

Lurking today.

inland tusk
#

I am lurking today

gilded cradle
#

Me

tulip sleet
#

rdagger?

gilded cradle
#

πŸ˜ƒ

#

Right

tough flax
#

Listening in - Hugs to all.

#

I can answer any questions re:XAC if that comes up.

tough flax
#

@meager fog is the SoundBoard demo working on the latest libs/release?

marble hornet
#

Lurking, have in the weeds

prime flower
#

post-note : would anyone be interested in me streaming/recording building out a lightweight CircuitPython HTTP API wrapper in CircuitPython with ESP32SPI?

tidal kiln
solar whale
#

@tidal kiln great idea for a guide!

manic glacierBOT
#

I have been using the following encoder:

https://www.amazon.com/Signswise-Incremental-Encoder-Dc5-24v-Voltage/dp/B00UTIFCVA/ref=sr_1_2?keywords=encoder&qid=1553538276&s=gateway&sr=8-2

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...

marble hornet
#

@prime flower sounds really fun! and I'd love to watch a stream like that to learn more about http.

tough flax
#

I posted some notes - if you want me to talk through them I will, but it's not critical

idle owl
#

@tough flax I Can come back to you.

tough flax
#

Yup

#

Thanks

idle owl
#

Please post in the weeds here or in the notes doc

prime flower
#

@solar whale What size packets are you sending? Possibly similar to the RX issue within RFM9x

manic glacierBOT
#

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).

tidal kiln
#

IN THE WEEDS

  • updating frozen motor in CPX w/ Crickit
  • library bundle download tie-in to webpage?
tough flax
solar whale
#

small -- <16 bytes in general

#

@prime flower but thanks for the reminder -- I will look into that.

manic glacierBOT
marble hornet
#

Yes?

tidal kiln
#

scope? global?

old smelt
#

Thank you!

modern wing
#

Thank you to all! Hope y'all have a great day.

tidal kiln
#

thanks for running the show @idle owl

gilded cradle
#

Thanks everyone and especially @idle owl for running this.

wraith tiger
#

πŸ‘‹

manic glacierBOT
tough flax
manic glacierBOT
tough flax
manic glacierBOT
stuck elbow
#

sorry for the noise

manic glacierBOT
#

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.

meager fog
#

@tidal kiln heya done w/ enough things today i can look at thermal printer stuff

#

r u around

tidal kiln
#

yep

meager fog
#

ok i have 3 USBprinters here

#

let me look & see if any are the ones you want to test

tidal kiln
#

awesome. thanks.

#

need the PID/VIDs to look for?

old smelt
#

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?

marble hornet
#

what is long living?

meager fog
#

@tidal kiln back (monday is sniper day πŸ˜ƒ

#

is that what you want?

tidal kiln
#

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

manic glacierBOT
#

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...
meager fog
#

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 πŸ˜„

tidal kiln
#

cool. thanks. yah, i have a handful of pi related things in the cart already (for pihole work).

manic glacierBOT
tidal kiln
#

want me to just pull the trigger on that order now?

meager fog
#

yep go for it - can always order more πŸ˜„

tidal kiln
#

yep. will do. thanks.

marble hornet
#

it keeps things around between soft reloads right?

tidal kiln
#

@meager fog order placed

gilded cradle
#

@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.

tidal kiln
meager fog
#

@tidal kiln ok next up...

#

was there anything else?

#

oh right the i2c thing

marble hornet
#

@tidal kiln and @gilded cradle thank you.

tidal kiln
#

@meager fog stemma / pyportal?

meager fog
#

yah

#

so i should have levelshifted the I2C

marble hornet
#

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.

meager fog
#

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

tidal kiln
#

yep.

#

wanted to make sure about the conditionality of it

meager fog
#

yeah

#

it doesnt always happen

tidal kiln
#

so it'll be like "if you're connecting a bunch and seeing this do this"

meager fog
#

but it happens enough i revised all the shields to pull up to gpio level

#

yep

#

you can toss in a FAQ page

tidal kiln
#

yep. perfect for a short FAQ entry.

orchid basinBOT
tidal kiln
meager fog
#

lvoely

tidal kiln
#

seems like adding at the bottom there would work?

meager fog
#

yep

tidal kiln
#

@meager fog i think mikeb wrote what was already there.
i just added an alert after the i2c section - good enough?

meager fog
#

oh yeah

#

ok

#

thanx

#

i saw that and thought it was you editing while i was looking πŸ˜„

tidal kiln
#

πŸ˜ƒ

#

that i2c section was new to me too. last time i checked that page, it was just the tft ribbon check.

prime flower
#

@tulip sleet To add a sensor property, would I just edit that page and PR it in?

stuck elbow
#

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.

tulip sleet
#

@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.

manic glacierBOT
stuck elbow
#

@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

tulip sleet
#

@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.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

@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.

tough flax
#

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?

gilded cradle
#

@tough flax, I was the last to merge into that library. Yeah, it should be up to date.

tough flax
#

Ok, I will take the new libs & build

tough flax
#

Anyone know a non-exception way to check if a file exists?

#

os.path doesn't exist

manic glacierBOT
tough flax
#

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

manic glacierBOT
manic glacierBOT
gilded cradle
#

@tough flax make sure you have the latest shapes and Display text libraries too. Both of those were updated too.

tough flax
#

Yes just figured that out. Thanks!

#

I am working again

gilded cradle
#

Awesome

stuck elbow
#

@tulip sleet it's mostly copying around existing messages, and changing punctuation

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

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 ...

manic glacierBOT
orchid basinBOT
manic glacierBOT
idle owl
#

@tough flax You're good to go?

tough flax
#

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

idle owl
#

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

manic glacierBOT
manic glacierBOT
obsidian dome
#

@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.

stuck elbow
#

it should work

#

make sure you have a recent version of Mu

obsidian dome
#

I have MU 1.0, downloading 1.0.2 now

manic glacierBOT
#

@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 ...

timber mango
#

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...

tulip sleet
#

@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.

timber mango
#

@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?

tulip sleet
#

it would be another COM port (in Windows parlance) or /dev/ttyACM1, etc.

timber mango
#

ah - ok - total separation 'hardware wise' - now i understand πŸ˜ƒ

#

yeah that would be great too!

tulip sleet
#

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

timber mango
#

yeah-

#

a second end-point

tulip sleet
#

yes, two CDCs

timber mango
#

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...

tulip sleet
#

it has to be there when USB devices are enumerated on plugging in; I don't think it can suddently appear

stuck elbow
#

that would make things interesting for autodetecting the REPL in Mu

timber mango
#

humpf....
ok - so CP would have a second one everytime..

tulip sleet
#

@timber mango, yes that's a problem, I don't think we've thought of a detection mechanism yet

timber mango
#

it would be a second end-point - so it has a description / id and so on?!

obsidian dome
#

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()

timber mango
#

(i think it will be relative straight forward for linux but could get complicated in windows?!)

tulip sleet
#

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

slender iron
#

@tulip sleet do we have an issue for the debian problems?

timber mango
#

ok - iam not so detailed in the usb stuff - so eventually i used the wrong naming..

tulip sleet
#

@slender iron not separately; I added comments in the chromebook one, which could be retitled to be more general

slender iron
#

kk

tulip sleet
#

or we could open another one; at the very least I should paste in some of the dialog from last night

slender iron
#

mlupo on the forums was seeing something similar

tulip sleet
#

i haven't seen that yet; i'll look for it

slender iron
#

its wrongly tacked onto a different issue

#

I'll reply to rozzie and you can redirect mlupo

tulip sleet
manic glacierBOT
#

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.

dawn rampart
#

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].

slender iron
#

@dawn rampart are you using those pins for qspi?

dawn rampart
#

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.

slender iron
#

ah, it's a SAMD51 limitation

dawn rampart
#

Okay - kinda thought so, but wanted to check.

manic glacierBOT
#

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'..

prime flower
#

@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()

buoyant tendon
#

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.

gilded cradle
#

@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.

prime flower
#

@gilded cradle no worries - was just wondering if someone else noticed it, might be the same as the previous beta version.

meager fog
#

@buoyant tendon sockets are working

slender iron
#

@meager fog does it use the socket module though?

meager fog
#

we cannot because we have SSL managed by the ESP32

#

and native python sockets don't understand that

slender iron
#

kk, I think that is the missing piece for @buoyant tendon

meager fog
#

no biggie, they can import as πŸ˜ƒ

slender iron
#

yup yup

manic glacierBOT
ruby lake
#

hm, after a number of iterations, the pyportal quote app crashed

manic glacierBOT
#

I installed Debian 9.8 on an external hard drive, and then booted it up on three machines:

  1. Dell Optiplex 7010 desktop
  2. Dell Latittude 4310 laptop
  3. 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

tulip sleet
#

@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.

buoyant tendon
#

@slender iron @meager fog Ahh, got it. it's not written well in the docs.

slender iron
#

@tulip sleet k cool

#

@buoyant tendon all of our networking stuff is early days

buoyant tendon
#

@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'

manic glacierBOT
simple pulsar
#

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?

manic glacierBOT
#

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.

#

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-...

slender iron
#

@simple pulsar Travis can usually run unit tests with Python3

manic glacierBOT
#

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...

simple pulsar
#

@slender iron How do I indiate it's a unit test to Travis?

slender iron
#

edit .travis.yml to do the shell command for running the tests

simple pulsar
#

Ah, thanks, is the .travis.yml generally kept the same for Adafruit libraries? Is there a concept of a .travis.extras.yml ?

slender iron
#

not that I know of. just edit the one you need

simple pulsar
#

Ok. Do you have any good examples of libraries already doing this?

slender iron
#

uses pytest

simple pulsar
#

Thanks.

slender iron
#

thank you for the midi work!

simple pulsar
#

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.

slender iron
#

does your new code handle send as well?

simple pulsar
#

yep, added it more recently, the messages all have constructors and you can just .send() them

slender iron
#

interesting!

#

I'm not wedded to the old API though we'll need to update some examples for a new API

simple pulsar
#

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

slender iron
#

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

lavish nova
#

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).

slender iron
#

@lavish nova it is not. The bluetooth keyboard is hooked to an offscreen computer that is typing to the pyportal over usb

lavish nova
#

Ahh that's what I thought, but I was hopeful πŸ˜ƒ thanks!

slender iron
#

I'd love to get there. πŸ˜ƒ I have ps2 keyboard support in a branch of mine.

solemn epoch
#

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?

slender iron
#

@solemn epoch I haven't seen a delay. (I did a lot of the samd work in TinyUSB)

solemn epoch
#

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.

slender iron
#

ya, I use mojave

#

are you using the example for testing?

solemn epoch
#

yep. using his simple example in the devices folder, with his auto-descriptor setting on in the conf file, and only using CDC functionality.

slender iron
#

hrm

#

I haven't used that example in a while. We have our own descriptor for circuitpython

simple pulsar
solemn epoch
#

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

slender iron
#

@simple pulsar can you give it a single object?

simple pulsar
#

Yep, single objects or arrays

slender iron
#

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?

simple pulsar
#

Indeed, there's an optional channel=X for specifying a particular channel for send() to override one from constructor.

slender iron
#

kk, looks good to me then

solemn epoch
#

@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.

slender iron
#

do you have an open issue about it?

solemn epoch
#

with hathatch ?

slender iron
#

ya

#

we haven't done any work to support sleep in circuitpython yet

#

(and therefore tinyusb)

solemn epoch
#

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

slender iron
#

modem manager is a pain

#

I wouldn't expect it on mac though

solemn epoch
#

Right. Are you using something other than screen to connect with your testing devices?

slender iron
#

no, I use screen

solemn epoch
#

either way, OS X is using the same driver, so client app shouldn't matter

slender iron
#

have you tried circuitpython with your computer?

solemn epoch
#

I have a Feather-M4 express, so I could update it to your latest firmware

slender iron
#

circuitpython 4.x that is

solemn epoch
#

I haven't tried since you added TinyUSB. That's a good test

slender iron
#

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

solemn epoch
#

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 πŸ˜‰

slender iron
#

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

solemn epoch
#

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

slender iron
#

it's possible you have something installed that makes it misbehave

solemn epoch
#

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

slender iron
#

you should get circuitpython going on your board too πŸ˜‰

solemn epoch
#

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

slender iron
#

πŸ˜ƒ the rust folks have managed to get it going

solemn epoch
#

oh interesting, ok. i read that Google had a very early prototype of Go on ARM, but stopped working on it

slender iron
solemn epoch
#

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

slender iron
#

πŸ‘

#

please file an issue on tinyusb if it's the only thing with the issue

solemn epoch
#

Will do

solemn epoch
#

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 πŸ˜ƒ

slender iron
#

more the merrier

solemn epoch
#

@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

slender iron
#

do you have a debugger? you could use it to see where the code is before serial is active

solemn epoch
#

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

slender iron
#

ya, I usually use a metro for debugging for that reason

#

it has a nice header

solemn epoch
#

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

slender iron
#

which express?

solemn epoch
#

feather M4

slender iron
#

ah ya

#

I'm trying have ladyada always add a spot for a swd connector now even if it's left unpopulated

solemn epoch
#

yes please!

slender iron
#

it's hard on small boards though

solemn epoch
#

plus, as part of the mission of Adafruit to keep teaching people, showing them the joy of debugging is part of the journey...

slender iron
#

heh

solemn epoch
#

but i guess earlier than that is the soldering journey, so you can connect things yourself

slender iron
#

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

solemn epoch
#

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.

slender iron
#

I haven't tried that before

#

I'm keeping backup ram in my back pocket for a rainy day πŸ˜ƒ

solemn epoch
#

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.

slender iron
#

that's pretty slick

manic glacierBOT
lone sandalBOT
tough flax
#

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

tough flax
#

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.

manic glacierBOT
#

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...
tough flax
#

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).

manic glacierBOT
manic glacierBOT
#

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...

manic glacierBOT
umbral dagger
buoyant wigeon
#

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.

old smelt
#

@tulip sleet - thanks for the guidance on the HID documentation. I'll create a PR for that USB reference change.

onyx hinge
#

@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.

main meteor
#

I've done it in C, but not (yet) in Python

onyx hinge
#

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)

manic glacierBOT
buoyant wigeon
#

@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...

onyx hinge
#

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.

buoyant wigeon
#

@onyx hinge Yes ... but now I have to write it all πŸ˜”

manic glacierBOT
manic glacierBOT
#

@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...

tulip sleet
slender iron
#

@tulip sleet is on fire this morning!

tulip sleet
#

i wish travis would stop splashing water on my fire

slender iron
#

yup, keep cruising through things

#

it'll catch up eventually

manic glacierBOT
manic glacierBOT
slender iron
#

@tulip sleet what should I take a look at now?

tulip sleet
#

i am just starting on issue 1686.

manic glacierBOT
tulip sleet
#

1681 is in thach's purview right now.

slender iron
#

I'm going to move the internationalization issues to long term

meager fog
#

amazing work dan

tulip sleet
#

@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

slender iron
#

I don't think so

#

I wouldn't do it for 4.0.0

#

sdcards are tricky themselves

tulip sleet
#

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

meager fog
#

bill greiman's SDfat code is really solid

#

if you wanted to use open source code

#

supports all the weirdo exceptions

tulip sleet
#

thanks! I'll make up some issue about maybe using it

slender iron
#

I don't want to do that for 4.0 though

tulip sleet
#

that's fine

meager fog
#

noooo

#

much later

#

but i used it recently and its pretty sweet

slender iron
#

kk, good to know

meager fog
#

he writes good code πŸ˜ƒ

#

and he has some interesting options like XSPI

#

which gives you 3x speed

meager fog
#

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 πŸ˜ƒ

tulip sleet
#

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.

manic glacierBOT
meager fog
#

@tidal kiln are you running linux?

tidal kiln
#

yep

meager fog
#

if so, can you repro this weird effect linux seems to think the pyportal is a modem

tidal kiln
#

modemmanager?

meager fog
#

ok its come up a couple times, can you add it to the pyportal FAQ

#

mostly cause you can actually see it happening

tidal kiln
manic glacierBOT
tidal kiln
celest zenith
manic glacierBOT
#

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...

manic glacierBOT
slender iron
#

@tulip sleet I think I found the hid issue. not sure why nrf is ok though

tulip sleet
#

@slender iron which hid issue?

slender iron
tulip sleet
#

@slender iron /dev/ttyACM0 doesn't show up, so it's CDC?

manic glacierBOT
slender iron
#

its a crash that kills all usb

tulip sleet
#

I have a chromebook that doesn't work, so I'll try it!

slender iron
#

ya, I found it with my chromebook and an m0

#

my mac must not read the gamepad hid report

tulip sleet
#

this might be the trouble on the other boards too, if it causes descriptor crashing of various sorts

celest zenith
#

I found that newer linux kernels were not impacted

slender iron
#

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

celest zenith
#

could be -- or are more resilient to bad data

slender iron
#

Β―_(ツ)_/Β―

celest zenith
#

I can test on a few different systems in a bit.

slender iron
#

the reply will depend on what the memory is after the hid info array

#

k, did you see my PR?

celest zenith
#

I did. I won't be able to test till later tonight though

slender iron
#

k, np

#

thanks for testing!

celest zenith
#

@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

slender iron
#

@celest zenith great! thanks for confirming

tulip sleet
#

@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

slender iron
#

ok. ping me if you need a review @tulip sleet

#

looks like travis is still backlogged

tulip sleet
#

I'll ping you when #1719 is finished, which is the blocker for the others.

manic glacierBOT
#

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.

slender iron
#

@fierce oar @split ocean want design a circuitpython game boy screen lense? I have some that are missing it

split ocean
#

I'm game! @slender iron

slender iron
#

it's 1mm thick

manic glacierBOT
fierce oar
#

@slender iron sure!

slender iron
#

I think it's printed acrylic or similar

tulip sleet
#

tnx!

manic glacierBOT
manic glacierBOT
manic glacierBOT
steady pivot
#

Hey, can I use the above GitHub bot on my server? Or is it made by adafruit for adafruit?

#

Webhook?

raven canopy
#

I believe its just webhook, yeah.

steady pivot
#

Oh ok

#

Need to get a HOwTo

#

Thanks

raven canopy
feral sage
raven canopy
#

πŸ˜†

steady pivot
#

Thanks! @raven canopy @feral sage

manic glacierBOT
manic glacierBOT
#

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...

manic glacierBOT
#

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...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

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...

manic glacierBOT
#

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...

manic glacierBOT
#

@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.

orchid basinBOT
manic glacierBOT
#

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

umbral dagger
#

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

manic glacierBOT
upbeat plover
#

updating CP on my boards, was wondering what the "en_x_pirate" builds are

idle owl
#

Pirate translation.

upbeat plover
#

😹

slender iron
upbeat plover
#

that should be entertaining

idle owl
#

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.

manic glacierBOT
idle owl
#

@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.

manic glacierBOT
#
[adafruit/circuitpython] New branch created: azure
#
[adafruit/circuitpython] New branch created: azure\-pipelines
lean hare
#

Is there a library to do Gamma correction for RGBW Neopixels?

exotic pumice
#

switching CI?

lean hare
#

Should have posted to help-with ... my bad

exotic pumice
#

no worries

#

Idk if there's library support but it's fairly easy to do with a lookup table