#circuitpython-dev

1 messages · Page 238 of 1

manic glacierBOT
#

Thanks tannewt
This clarify why "myfile( ...128 bytes...)" (obviously slightly larger than 128 bytes) fails.

In the meantime I found a menu in uPyCraft to force the board to be considered as a microbit which enforce a smaller transfer chunk (64 bit). Forcing this mode seems to make the file transfer reliable.
I was about to report this tonight.

May be we could add a short comment in https://circuitpython.readthedocs.io/en/latest/ports/atmel-samd/README.html (Connecting ... serial...) ...

#

Was attempting to use this to interface with a PC game over USB serial, where the game was designed for Arduinos and only expected LF, and would break on commands ending with CR/LF. However, after discussing it with the developer, they have since updated the game to be compatible with CR/LF.

It did eat up many hours of debugging efforts before I discovered that CircuitPython was silently doing this conversion. Certainly didn't help that count = sys.stdout.write("foo\n") returns 4, ev...

manic glacierBOT
#

I thought this must have come up in MicroPython before, and sure enough, yes: https://github.com/micropython/micropython/issues/1260

A feature was implemented in MicroPython to do raw output, sys.stdout.buffer.write(), but it's not turned on right now in CircuitPython (nor for most board in MicroPython, it appears). I'm not sure whether just enabling this will work or whether we need to reimplement it a bit, but I think this is the way forward to solve this.

idle owl
#

@tidal kiln Do you an RPi setup and also a BMP388?

tidal kiln
#

yes and checking...

idle owl
#

Thanks

tidal kiln
#

...and looks like no 😦

#

sry

idle owl
#

No worries, thanks for checking

solar whale
#

@idle owl I have a BMP388 and RPi? Need something tested?

idle owl
#

@solar whale I'm writing up the guide for it, and I need to make sure that it works with the RPi before including that in the guide. Can you verify it works? I2C and SPI both?

#

I haven't done the Fritzing diagrams yet.

solar whale
#

OK - will set up a test . May not be done until this evening.

idle owl
#

That's absolutely fine! Thank you so much! I have something going on in a little bit here anyway so I'll be finishing it up tomorrow.

manic glacierBOT
solar whale
#

@idle owl That was much easier than expected -- both i2c and spi worked as advertised

idle owl
#

Thanks! Do you mind if I send you the fritzing diagrams once I get them done to verify that they're correct?

solar whale
#

sure. glad to I need some Fritzing experience!

idle owl
#

Thank you!

solar whale
#

I expected adabot to object to that 😉

prime flower
#

@solar whale thanks for testing! (theres some more PRs in that repo if you wanna test 'em...including the NEw ip-based localtime api)

#

that pr was the most urgent tho, as esp32's new header encoding messed up IO

manic glacierBOT
solar whale
#

@prime flower sure -- I'll take a look this evening. I saw that there was s bunch of activity.

umbral dagger
#

That feeling when you type some python code into the REPL and get a syntax error and you look and you've typed it in as lisp.

solar whale
#

@prime flower tried to test the PR19 in adafruitIO but when I pull it , it reverts the changes in PR17 and nothing works -- not sure how to test it.

#

I have to go AFK for awhile -- will try again later

prime flower
#

@solar whale I just rebased the pull request onto master, should have the changes in PR17 now

manic glacierBOT
slender iron
#

@tulip sleet removing network from feather frees 10k

raven canopy
#

@slender iron should i go ahead and create 5.x milestone, and move mixervoice to it?

slender iron
#

sure! add a note that its for API breaking changes only

#

we'll sort through 4.x to make a 4.1

raven canopy
#

k. 👍

slender iron
#

wonders if we should remove the numbers and just classify which part of the version it impacts

manic glacierBOT
#

FYI I came across this testing code of mine:

p = displayio.Palette(2)
p.make_transparent(0)
p[1] = 0xff0000
w, h = terminalio.FONT.get_bounding_box()
tilegrid = displayio.TileGrid(terminalio.FONT.bitmap, pixel_shader=p, x=10, y=0, width=30, height=3, tile_width=w, tile_height=h)
print(tilegrid.x, tilegrid.y)
t = terminalio.Terminal(tilegrid, terminalio.FONT)
t.write("terminal test\r\nover\r\nother text")
g.pop(1)
g.append(tilegrid)

While it doesn't display Circu...

raven canopy
meager fog
#

oi @gentle bronze knows that best, when he's around he'll let you know

#

if you search thru learn - doe sit come up anywhere else?

raven canopy
#

i can run through them in a bit. jus lettins ya know, and wondering if you knew off the top of your head.

#

only discovered it because i thought i had already done this with my DK...but apparently not? 😆

manic glacierBOT
#

This should be the last API changes before 4.0.0.

  • I removed networking from M0 builds in order to fit it.
  • Changed TileGrid to use x and y instead of position and also adds subscript support for changing tiles.
  • Group can now take x and y in it's constructor too.
  • TileGrid and Group were updated to always use native_foo helpers to ensure we pass the native object to shared-module.
  • I updated the docs for displayio, FourWire and ParallelBus.
manic glacierBOT
meager fog
#

@pastel panther heya i know you're not around quite yet but let me know when you are and we can poke the INA260 repos

manic glacierBOT
#

ah, ya. I have a PR out to change position to separate x and y. So position will work now and x and y in the future.

g is the group you want the terminal to be in. Terminal really just modifies the TileGrid for you.

This is my full file but it has extra stuff:

import adafruit_ili9341
from adafruit_display_text import text_area
from adafruit_bitmap_font import bitmap_font
import terminalio
import board
import displayio
import struct
import time
import supervisor

...
manic glacierBOT
lean hare
#

After a few days with CP (Trinket M0 and a 0.56 7-Seg Backpack) I am pretty impressed. I would like to be able to use CP to access CPU registers and Interrupts - Polling switches just seems ... bad 😉

manic glacierBOT
tulip sleet
raven canopy
#

@tulip sleet i'm kind of looking into PDM on nRF. read that it uses EasyDMA; do you foresee any conflicts DMA wise? i haven't dug into the nRF[x] to the extent i have with SAMD yet.

tulip sleet
#

everything on the nrf uses EasyDMA, so I don't think it's an issue. EasyDMA only works to/from RAM (even writing out)

raven canopy
#

ok. i'll read more, just saw you pop in so seized the opportunity to ask. 😄 thanks!

tulip sleet
#

the nrfx drivers are fairly straightforward, so think I you may have an easier time, actually

raven canopy
#

they're...foreign at this point. but does look to be less, <can't find the word>.

tulip sleet
#

less asf4-like

raven canopy
#

definitely. 😄

lean hare
#

@tulip sleet Thanks for that - I've used msgQ's in a previous VxWorks programmers life. My main concern is that it would be nice to progress with my students (STEM/Robotics at HS level) and I don't want to get to a point (too early) where I have to say ... 'To solve this problem we now have to change languages, IDE etc.'

tulip sleet
#

@lean hare we do really want to provide something, but it needs to be beginner-friendly in some way. Our solutions for necessary async processing up to now have been to hide what's going on inside the native modules (PulseIn, etc.). MicroPython has interrupts but makes severe restrctions on what you can do in an interrupt routine due to storage management.

Message queues is just one idea. The things further down in that issue are other interesting alternatives. We want something, but we have to be careful not to just add mechanisms (e.g., interrupts) rather than consider what problems we're really trying to solve.

pastel panther
#

hey @meager fog sorry, I just got home.

meager fog
#

@pastel panther np all good!

#

im still up! 😄

pastel panther
#

I've uh... been thinking about stuff 😉

meager fog
#

all good!

pastel panther
#

but I'm ready to rock

meager fog
#

no rush from us

pastel panther
#

strangely the printfs compiled fine for me; I wonder if I hacked something previously to make them work

meager fog
#

it depends what you compile with 😃

pastel panther
#

the arduino ide? 🤷

#

I'll switch things around and re-push

meager fog
#

@pastel panther yeah some compilers have printf

#

IDE uses different compilers/cores

pastel panther
#

just spent 15 minutes to figure out that my breakout wasn't plugged in 🙄

meager fog
#

thats good hardware times

modern wing
#

....I never did that with an ethernet cable trying to connect to a server. Nope. Never will admit to trying to ping it endlessly, rebooting my machine, getting a coworker's machine to verify it wasn't my NIC....

pastel panther
#

sorry @meager fog almost done but I have to inflate my cat

meager fog
#

cat needs to be bigger

#

no rush

#

needz chonk

#

cat's probably dying

#

its never eaten

manic glacierBOT
marble hornet
#

@main meteor thank you for the $1 help yesterday, it is very cool! i have a further question. do you know if i can take my script and turn it into a command? like tinyapio build for anywhere w/out the .sh?

main meteor
#

Yeah, the .sh extension is not required. As long as it's executable, you should be able to run it (the magic #!/bin/bash line at the beginning tells the computer that it's a shell script).

marble hornet
#

ah! it tis working, thank you.

#

now i can: tinyapio build ./test and it works! thanks

marble hornet
main meteor
#

You might want to consider implementing the suggestions @simple pulsar made as well.

manic glacierBOT
#

3.x - OK
4.x - Not working

UF2 Bootloader v2.0.0-adafruit.9 SFHWRO
Model: Feather M0 Express
Board-ID: SAMD21G18A-Feather-M0-Express-v0

User: root

Initial USB connection dmesg:
[ 212.866387] usb 6-1: new full-speed USB device number 2 using ohci-platform
[ 213.058283] usb 6-1: New USB device found, idVendor=239a, idProduct=8023
[ 213.058317] usb 6-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[ 213.058338] usb 6-1: Product: Feather M0 Express
[ 213.058358] ...

#

I just using 4.0.0-beta.3-25-g2169a6240-dirty for a few minutes and then left it. When I came back and tried to connect to the serial (over USB) it didn't work. The drive (on Windows) was no longer showing up with the typical spaced used but just marked as FAT and opening it in explorer showed it as empty. It responded to reset button but that's left me with an CIRCUITPY drive that's missing my code! I've only got some wavs, a README, .fseventsd and .Trashes. I did a power cycle...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I've decided to go back to 4.0.0 beta 3 to see if that's stable. I put that on and this popped out when I connected to serial console afterwards:

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

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 a...
solar whale
orchid basinBOT
meager fog
#

@tidal kiln hihi wanna add featured prods to the guide u wrote?

#

ill make it live

tidal kiln
#

sure. got specific PIDs in mind?

meager fog
#

put in all the raspi's

#

that way itll show up in those product feeds

#

its live now - blog when ya like (after featured prods are added)

#

@umbral dagger ok w.r.t. logging guide - is that ready for me to review?

umbral dagger
#

@meager fog Guide is. Gettign finasl code tweaks past travis

#

And working on getting it in the bundle

meager fog
#

ok i think that'll work out

#

is now a good time for you to do any edits?

umbral dagger
#

yes

meager fog
#

like, of usage

#

next, does it work on M0 or just M4?

umbral dagger
#

Other than memory limits, it should work fine on M0. It's actually pretty lightweight.

meager fog
#

ok please verify that and make it clear you dont need an M4

umbral dagger
#

time is the only thing it pulls in

meager fog
#

next - have you tried it with nrf52840 to send debug over BLEUart?

#

because then you can do Really Interesting things

umbral dagger
#

verified

#

Those are neat ideas, and are just the matter of writing appropriate handlers

meager fog
#

yeah you could do one with wifi, but i think doing a basic demo with nrf52840 is worth adding to this guide

#

because that takes it from "hey this is a logger just like CPython" to "here is something you can only do with CircuitPython"

#

(also we could use more BLE exampels) you can use our BLE UART code

#

wanna try it? if it dbecomes a struggle we can ditch

umbral dagger
#

nRF52840 crashes on call to time.localtime()

#

In retrospect, using dtae & time isn't generally useful. Only really of value for a long-running process.

#

I'll have to give that some thought. Maybe revisit that along with Wifi/BT handlers.

meager fog
#

how about logging a random number for now?

#

oh you mean for the timestamp

tidal kiln
#

@meager fog PIDs added, blog post in the tube - publish now?

meager fog
#

go ahead 😃

#

thanks @tidal kiln !

#

@umbral dagger the localtime isnt really trustworthy - do you want to try monotonic() instead for now?

#

like, we dont know the time really

umbral dagger
#

That's what I'm thinking

tidal kiln
#

@meager fog done! thanks for reviewing.

meager fog
#

👍

manic glacierBOT
slender iron
#

@pastel panther thanks for releasing register. next time please make sure to use three numbers in the version so that it's proper semver. (1.7.0 instead of 1.7)

meager fog
#

do we have to delete it?

slender iron
#

yup np, I just retagged it

meager fog
#

ooh ok

#

we'll be more diligent!

slender iron
#

the artifacts should populate once travis gets to it

umbral dagger
#

@meager fog OK, it use3s monotonic now, and runs on the '840. Guide updated to reflect that

meager fog
#

nice thank you!

umbral dagger
#

Still thinking about an opening image

meager fog
#

yeah thats probably for the best, otherwise a lot of things occur at 1970 😉

umbral dagger
#

yup

meager fog
#

@umbral dagger ok please try it with logging to BLEUart - it could be really fantastic if it works

meager fog
#

@umbral dagger do you want to rename it adafruit_logging or something and then import ... as

umbral dagger
#

hat's doable, sure

meager fog
#

just if it solves your problem...

#

maybe 😃

umbral dagger
#

It would likely solve the sphinx problem

#

I'll wait to hear back from @idle owl to see if there's an easier in-travis fix.

raven canopy
#

@umbral dagger I peeked at it a little while ago. Looks like it is grabbing CPython's logging. mocking the import in conf.py might make Sphinx happy, but I'm not sure it will build the API docs. adafruit_logger might just be the best solution.

umbral dagger
#

We're trying the conf.py approach first

manic glacierBOT
raven canopy
#

Flash-in-the-pan thought: try and force api.rst with .. automodule:: .logging. Check Sphinx docs for syntax though...

#

@umbral dagger ^

opal forge
#

looks like it's trying to send a header's value over the socket in one chunk and fails because it's too big.

#

(i notice from the debug logs that it chunks the sending of header name separate from value, but doesn't take into account that value might be too big to go over in one chunk?)

mild oyster
#

@opal forge ...is that you old friend?

umbral dagger
#

@raven canopy trying a rename...

#

@meager fog Working on a rename to adafruit_logging. If that works out I'll make the tweaks to the guide to match. I'm also workign on BLE logging, but IMO that can be done as an update to the handler page.

meager fog
#

kk

opal forge
#

hey @mild oyster it absolutely is

simple pulsar
#

@tulip sleet Did you see my final comments in https://github.com/adafruit/circuitpython/issues/1626 ? That last uf2 you suggested (4.0.0-beta.3-25-g2169a6240-dirty) for testing fixed the PWMOut instantiation bug but my CPX world turned to hell shortly afterwards

tulip sleet
#

@simple pulsar I did see that -- I don't think the PWM fix I made is causing the filesystem issues -- that's a different problem, and if you see it again, could you file a new issue for that?

manic glacierBOT
#

Apparently 3.1.2 has it:

Added runtime.serial_bytes_available. Returns True if any bytes are available to read on the USB serial input. Allows for polling to see whether to call the built-in input() or wait. (read-only). Thanks to @ATMakersBill.

https://blog.adafruit.com/2019/01/06/circuitpython-3-1-2-released-adafruit-circuitpython/

PS: Any sample code using this is welcome... I feel I need this feature.

tulip sleet
#

@simple pulsar Other people have reported filesystem scrambling in unrelated circumstances, and we need to track that down too.

simple pulsar
#

with beta 2 / beta 3 or in general?

tulip sleet
#

I'd say beta 2 and after, but it could be earlier. The 4.0 betas are being used much more extensively than earlier 4.0 builds, so we really don't know. It could be a bug elsewhere that's scrambling up flash writes, etc.

simple pulsar
#

I've got beta 3 back on my CPX, just turned it on, i'll give it a bit longer and do a soft reset from REPL to see what it does. I'd not had any problems with beta 2 and had briefly used beta 3 without problems

#

What's the significance of Crash into the HardFault_Handler. popping out on the next boot

#

Actually the next boot with the new image as I'd gone back to beta 3

manic glacierBOT
#

I was using a variant of CircuitPython 4.0.0 beta 3 (4.0.0-beta.3-25-g2169a6240-dirty) which initially looked good and then started seriously misbehaving with a lot of things disappearing from the file system and it failing to soft reboot, i.e. control-D from the REPL over serial over USB.

The first thing I noticed from a Win8.1 host was that the application on the Circuit Playground Express board I was using (it reads MIDI over USB and changes PWMOut properties) which had worked earlier...

simple pulsar
#

Is there a passive fsck type command that can be run from REPL to check health of the file system?

gilded cradle
#

@umbral dagger, did you need something merged?

gilded cradle
#

Thanks, I’ll take a look.

slender iron
#

@simple pulsar I usually just do os.listdir("/")

simple pulsar
#

Is there a way to do a low level check though? (I don't know how it's actually stored under the covers)

slender iron
#

not that I know of

umbral dagger
#

@gilded cradle Thanks

gilded cradle
#

You’re welcome

manic glacierBOT
umbral dagger
#

@meager fog Looks like the repo, bundle, and guide are ready. I'm still working on a better image for the overview page, but that can be easily replaced... it'd be nice to get it live for tonight 😃

#

@meager fog I'm back to working on BLE logging now.

simple pulsar
#

If I'm varying the duty_cycle on a PWMOut is there any reason why it might briefly go to a burst of high (e.g 65535) even if I'm only going to 57344

stuck elbow
#

How long is that burst?

slender iron
stuck elbow
#

So much for "we use fatfs because it's proven, tested and bug-free" argument

slender iron
#

nothing is bug free

simple pulsar
#

@slender iron There might be one exception to that

umbral dagger
#

Do we have any '840 BLE uart example for sending and not receiving?

#

I.e. there are a few projects that receive commands from the app.. I need to send strings to the app.

stuck elbow
#

Empty files are

#

Empty directories not so much, as you can see ;)

simple pulsar
#

@stuck elbow Not sure, it's long enough to see it as a brief line on my CRT oscilloscope and i'm doing audio with it so i hear it too

stuck elbow
#

So longer than one cycle?

simple pulsar
#

possibly not, I've got it running at 440 Hz and it looks like one cycle

#

I'll slow it down further

manic glacierBOT
#

I've been using PWMOut for audio use and I heard a few anomalies on 4.0.0-beta.3. I've looked into it briefly and it appears that very occasionally there's a high blip on my PWM. @deshipu asked if it's one cycle on Discord and I think it is although it's difficult to tell on my traditional (non storage) oscilloscope. It can be recreated with this code on a Circuit Playground Express (CPX):

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.3 on...
simple pulsar
#

@stuck elbow I think it is one cycle and it does it on board.A6 but not board.A1

manic glacierBOT
stuck elbow
#

Possibly a clock counter getting reset before the end of a pulse

#

So two pulses get smashed together

simple pulsar
#

Any reason why A6 would be affected and not A1?

stuck elbow
#

No idea

#

Maybe that timer has different settings

raven canopy
#

well on the CPX, A6 (PB09) is a TC only, where A1 (PA05) is a TCC only. so, that could be a vector to dive into.

tulip sleet
#

I agree w/ sommersoft

#

@umbral dagger the BLE UART ("NUS") examples can transmit both directions

umbral dagger
#

@tulip sleet link/pointer?

umbral dagger
#

@tulip sleet Thanks. I'm doing the same thing with respect to the ble use. When it connects and tries to write I get nothing send and this error: ``` File "adafruit_ble/uart.py", line 128, in write
OSError: Failed to write gatts value, err 0x000c

tulip sleet
#

Does the test program work?

tulip sleet
#

(maybe it broke)

manic glacierBOT
tulip sleet
#

@umbral dagger Make sure it is really connected before you try to write .connected is True. It should be possible to write even if unconnected (because you might want to set the value in advance), but that might not be true right now).

umbral dagger
#

It should be ok: ``` self._ble.start_advertising()

    while not self._ble.connected:
        pass

    self._ble.write(bytes(self.format(level, msg), 'utf-8'))```
manic glacierBOT
tulip sleet
#

@umbral dagger how long is the bytestring you're sending?

#

(starting a meeting, so I'll be erratic)

umbral dagger
#

@tulip sleet 20ish

tulip sleet
#

i'll test it again; thanks for the heads up. feel free to file an issue with code

umbral dagger
#

The first one should be 20 bytes

tulip sleet
#

@umbral dagger what app are you using on the BLE central side?

manic glacierBOT
umbral dagger
#

@tulip sleet uart

tulip sleet
#

i mean, you're using the Bluefruit app, and on iOS or Android?

umbral dagger
#

Ah, yes, on iOS

tulip sleet
#

ok, that's my standard test, so i'll try later. But an issue with the whole code (or a stripped version that doesn't work) would be helpful -- thanks.

manic glacierBOT
#

Here is the code I tested with:

import os
try:
    os.rmdir("/tmp/bar")
except OSError:
    pass
try:
    os.rmdir("/tmp/barfoo")
except OSError:
    pass
try:
    os.mkdir("/tmp")
except OSError:
    pass
try:
    os.mkdir("/tmp/foo")
except OSError:
    pass
print(os.listdir("/tmp"))
try:
    os.rename("/tmp/foo", "/tmp/foo/bar")
except OSError as e:
    print(e)
print(os.listdir("/tmp"))
os.rename("/tmp/foo", "/tmp/bar")
print(os.listdir("/tmp"))
os.r...
ruby lake
#

ugh, still too sick to show up on camera ~_~

errant grail
#

@ruby lake Bummer. Get well!

manic glacierBOT
manic glacierBOT
pastel panther
#

@slender iron oops! Sorry, will be more diligent next time

umbral dagger
#

@meager fog Nothing on BLE logging yet, but I have a PyPortal logging to AIO.

solar whale
#

tried to run the EventCountdown and get ```
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.3-34-g494a9d382 on 2019-03-13; Adafruit PyPortal with samd51j20

import eventcountdown
ESP firmware: bytearray(b'1.2.2\x00')
Set background to /countdown_background.bmp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "eventcountdown.py", line 29, in <module>
File "adafruit_pyportal.py", line 252, in init
File "adafruit_pyportal.py", line 363, in set_background
TypeError: extra keyword arguments given

manic glacierBOT
#

I think the latest changes to displayio have broken the PyPortal lib call to TileGrid

I tried the PyPortal EvnetCountdown example with latest build and it fail


Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.3-34-g494a9d382 on 2019-03-13; Adafruit PyPortal with samd51j20
>>> 
>>> import eventcountdown
ESP firmware: bytearray(b'1.2.2\x00')
Set background to  /countdown_background.bmp
Traceback (most recent call last):
  File "<stdin>",...
solar whale
#

confirmed by reverting to yesterdays build

manic glacierBOT
#

As I work through this, a couple things are becoming apparent that will need to be addressed with regards to SAMD vs nRF differences:

  • nRF PDM, with its baked-in structure requires much less setup and thereby less user configuration than SAMD. So, should I approach shared-bindings with weak links & ignored args, or #ifdef accordingly. For example, SAMD takes both bit_depth and oversample kwargs during construction; nRF is 16bit only and has aforementioned decimation negating overs...
umbral dagger
slender iron
#

@solar whale yup. position is now separate x and y

meager fog
#

@umbral dagger niiice!

meager fog
#

@pastel panther ok im making edits to your INA260

pastel panther
#

too many register bits?

#

or the board?

meager fog
#

oh the board

#

making it more compact, mirroring VIN+ and VIN- on top and bottom with more vias

pastel panther
#

that makes a lot of sense

meager fog
#

next q - the tssop package is a little odd

#

i want to use one of our standard package

#

do you have your library?

#

i could copy out the symbol

pastel panther
#

ya

#

Pretty sure that's it

meager fog
#

kool

pastel panther
#

Is it too wide? I kinda thought it might be but I tried to follow the datasheet as close as I could

meager fog
#

lemme finish routing and you can look

#

pads seem to close together

pastel panther
#

also that; they're kinda wide

#

when it's a standard package like that should I just use whatever is in microbuilder?

meager fog
#

one sec

#

yeah

#

@pastel panther ok next up whats the terminal block

#

seems smaller than most 5.08

pastel panther
#

lemee check; I think I got it from the sparkfun lib because it fit a bit one I found

#

you wanted a part number?

meager fog
#

hmm ok im gonna change to the 5.08 we stock

pastel panther
#

ok

#

I think I chose that one because it's > 15A though not by much

meager fog
#

yah np

#

ok lemme swap tht tssop now

#

hmm no ina260 in there

#

i can extract it

pastel panther
#

oh sorry, I think I converted it to a managed version

meager fog
#

@pastel panther np ok here's my new symbol

#

note the pins have 'types' like in/out/pwr

#

that will help avoid mistaks

pastel panther
#

ah

meager fog
#

also, dont create NC pins

pastel panther
#

ok

#

and you just connect 1-3 to the same pin when making the new device version?

meager fog
#

yeah you append the connections

#

so you get multiple pads per pin

#

makes for less mistakes - cleaner layout

pastel panther
#

makes sense

meager fog
#

ok donz!

#

ill commit and you can look

pastel panther
#

verra naas

#

"polish" 😉

meager fog
#

all good - believe me thats the easy part

#

i didn change anythin, just sorta pushed it arond

#

ok im going to get the other boards ready

pastel panther
#

ok

meager fog
#

ok im sending em and then 💤

pastel panther
#

ok! Have a good sleep

stuck elbow
#

hmm, no pull downs for the address jumpers?

manic glacierBOT
orchid basinBOT
manic glacierBOT
#

Does sound similar but you mention "virtual drive fills up" in the ticket's title. I think people will read that as problems occur if the CIRCUITPY is filled up, is that what you mean?

In my case I don't believe disk fills were part of cause as I have a lot of spare space on CPX. I have been doing a certain amout of power off / power on and have not been diligent about unmounting the file system. I've caused a mess with Windows delayed writes in the past (https://forums.adafruit.com/vi...

orchid basinBOT
manic glacierBOT
slender iron
#

10 issues plus translations until 4.0.0-rc.1!

slender iron
#

@stuck elbow do you have test code for using the SWD pins?

stuck elbow
#
import board
import digitalio
p = digitalio.DigitalInOut(booard.P0)
slender iron
#

on samd21 right?

stuck elbow
#

on the pewpew, where P0 is PA31

slender iron
#

kk, thanks

stuck elbow
#

no idea how it is mapped on other boards

#

ones that use it

slender iron
#

I can just refer to it directly

#

microcontroller.pin.PA31

pastel panther
#

@stuck elbow there are pulldowns between the jumpers

stuck elbow
#

oh, I see now, they merged with the fill for me

plucky flint
#

Hi folks, has anyone had any trouble with the PyPortal board and serial based communication with Mu (e.g. using the serial button or the plotter?). I've someone in the Mu Gitter channel who can't make it work (they can connect via screen), but looking at the code I can't see any problem. Would be good to isolate this to their machine/setup, except I don't have this board available at the moment. Does anyone here have one they can just try with Mu in Adafruit mode, connecting via serial..? Thank you in advance! 😃

idle owl
#

@plucky flint Hey! Let me see what I get.

plucky flint
#

@idle owl awesomeness on stilts! Thank you! 👍

slender iron
#

@plucky flint we have a couple issues open around USB but working in screen but not Mu is weird

idle owl
#

Needed to update first.

plucky flint
#

@slender iron yeah... I'm just going through that process of elimination to get to the nub of the bug.

idle owl
#

@plucky flint Works fine for me!

plucky flint
#

@idle owl so it works, but you needed to use the latest release of CircuitPython for it to work properly

#

???

idle owl
#

No I was updating Mu.

slender iron
#

what OS are the other folks on?

plucky flint
#

They're on OSX Mojave 10.14.1

idle owl
#

@plucky flint I'm on a 4 March 2019 build of CP.

#

And Mojave.

#

And the latest version of Mu.

plucky flint
#

@idle owl aha... ok. Well, I believe that's what this user is on too. Looks like something specific to them.

idle owl
#

I am running 10.14 apparently. So maybe that x.x.1 matters, but I doubt it.

plucky flint
#

In which case, we're looking at a very deep rabbit hole... 😃 🐇

#

yeah

#

OK... I think I have enough proof it's something on their side of things.

idle owl
#

Ok 😃

plucky flint
#

I've seen some virus checker type products block Mu from accessing USB, depending on how locked-down the laptop is. But that's only been on Windows (so far).

#

OK.... as always, many many thanks for your help...!

#

-> back to Gitter and the Mu user.

idle owl
#

I have a lot of connections locked down on this machine, but not a virus checker.

manic glacierBOT
simple pulsar
#

@plucky flint I have witnessed some buffering issues with output to the serial console on 4.0.0. That could mess up anything reading the data. An interactive user might just hit return as I did and see the data pop out. Could that be related? https://github.com/adafruit/circuitpython/issues/1639

plucky flint
#

My guess is he's on an older version of Mu (before we added the latest Adafruit boards). But he says he's on the latest version. I'm making sure we get that checked. If not that, then I'm not sure what it could be apart from to suggest he updates to the latest CircuitPython build and try again. 😕

#

@simple pulsar aha... I'll keep that in mind and thank you for pointing it out. 😃

simple pulsar
#

@plucky flint v4 specific

plucky flint
#

+1

#

I must say, this is a weird situation.... I'm sat in a sort of waiting room at my youngest son's Victorian era music school. He's off in a rehearsal somewhere and I'm connected via shonky school wifi. Opposite me are a bunch of nervous looking teenagers who appear to be about to take some sort of assessment (it's all very dentist's waiting room) and from the other room I can hear what sounds like a beginner level dixieland jazz combo honking their way through "When the Saints Go Marching In".... Next to me is another dad who is gently snoring while he naps while waiting for his kid to finish.... and yet here I am able to chat with you and this other chap on the other channel. The disconnect between IRL and this is making me smile. 😃 Have fun!

slender iron
#

😃

idle owl
#

@plucky flint Have a good one! In your hilarious waiting room.

gilded cradle
#

@plucky flint, in case it helps, I’ve been using the latest pull of Mu off master and it’s working very stable. I had no problems with PyPortal, but did experience the symptoms you described with the Mini Sam M4.

manic glacierBOT
tulip sleet
#

@plucky flint - "Latest" could mean different things: I'd ask what the version number is at the top. We had some links to beta versions in the Adafruit Learn guides, but I think we got rid of all of those. But people following those links thought it was the "latest"

carmine kestrel
#

\o/

#

query

#

is utime not part of the normal install ?

tulip sleet
#

@carmine kestrel in CircuitPython, it's time, not utime

carmine kestrel
#

ok

#

seems to have lead me astray

#

i just want us ticks -_-

#

(trying to find where my i2c is going slow

tulip sleet
#

where did you get the link to "test-circuitpython.readthedocs"

#

that's not the regular RTD link.

carmine kestrel
#

searching

#

"circuitpython high precision timer" in google

#

top result

tulip sleet
#

we should get rid of that, then, we don't want it available from google

plucky flint
#

@gilded cradle thanks for the feedback. A new ESP mode is about to land in master in the next few days.

tulip sleet
#

you can use time.monotonic(), a float, or time.monotonic_ns()

carmine kestrel
#

so can i not get a us timestamp then

plucky flint
#

@tulip sleet absolutely... I've been explicit about 1.0.2 when chatting with him since "latest" could mean anything (as you say).

tulip sleet
#

@carmine kestrel the ns gives you the equivalent. We are trying to be a subset of the CPython module, not adding additional non-standard functionality to time

carmine kestrel
#

ok

#

TY

tulip sleet
#

the time.monotonic() will also give you results in floating-point seconds, but it becomes increasing more granular as the time increases, due to it being only single-precision floating point

carmine kestrel
#

ok

#

well this i2c seems to be ~100x slower than expected based on rough math

#

hmmz

#

3x 16 bit registers x 5 devices

#

should take roughly 1ms

#

if i add overhead

tulip sleet
#

default i2c bus speed is 400kHz

carmine kestrel
#

even at that

#

(i told it to run at 1.2MHz too)

tulip sleet
#

what device?

carmine kestrel
#

seeing >10ms

#

it's the itsybitsy m0 express

#

a 40 MHz clock should be more than enough

tulip sleet
#

i mean what i2c device?

carmine kestrel
#

oh

#

it's an accerometer

carmine kestrel
#

MMA8451

#

i'm just trying to read it at it's max sample rate

#

of 800Hz

tulip sleet
#

have you seen it run faster in MIcroPython? Also, device may not return values immediately. Try the same sequences in Arduino, for instance. And if your code is allocating lots of storage, that could be a slowdown.

carmine kestrel
#

i can turn on this FIFO thing an gain some overhead losses but seems to bottlenecking early enough might be something else i need to fix first

tulip sleet
#

Feel free to post your code, also maybe see our accelerometer libraries

carmine kestrel
#

yeah i'm borrowing the driver code for int -> floats

#

might skip that

tulip sleet
#

Python is compiled to byte codes and interpreted, and the M0 only has software floating point.

carmine kestrel
#

ah

#

no NEON then

tulip sleet
#

"NEON"?

carmine kestrel
#

it's the arm floating point stuff

#

well i guess vector FP

#

too

#

but anyway

#

thanks 😃

#

was trying to keep this in circuitpython since i was passing off to someone else less technical and would be easier for them to see what was up

#

i can convert this to compiled C no problems

tulip sleet
#

The M4 boards have a subset of the NEON instruction set, but there's a lot of other overhead going on, so yes, if you want the ultime maximum speed, Arduino, etc., is what you need

carmine kestrel
#

just had this mostly working

#

except for the speed thing

tulip sleet
#

we also have the adafruit-blinka library, which lets you use the same code on an RPi, but that may not be fast enough either

#

you run in native RPi Python, and it uses Linux I2C support under the covers

carmine kestrel
#

k

#

in other news i did make the I2C go ~3m

#

😃

tulip sleet
#

we now regularly write the CircuitPython libraries first, before the arduino libraries, so hopefully your code can serve as a model for the C code

carmine kestrel
#

cool

#

wonder if other people will care about high speed I2C like this muxing 5x of the same sensor

#

lols

#

thanks though guys

#

was hoping the thing did JIT was part of this

#

so the interpreted stuff wouldn't be as bad

#

/fail me

#

😃

tulip sleet
#

no room in the RAM or firmware for JIT, especially on an M0

#

MicroPython has native code generation optionally, but it's mostly just calling the interpreter routines, it's not like PyPy or anything like that.

#

ok, good luck!

manic glacierBOT
gilded cradle
#

Thanks for the heads up @plucky flint. The only thing is the Tidy button crashes it, but that may be because I just dumped the files into the 1.0.2 app folder rather than compiling it.

manic glacierBOT
solar whale
#

@tulip sleet I am getting a lot of corrupted /erased file systems on pyportall with current master -- have you been using it?

orchid basinBOT
carmine kestrel
#

progress @tulip sleet ported to C

#

won't give me usb serial ?

#

nvm?

manic glacierBOT
carmine kestrel
#

@tulip sleet that got me to ~ 3ms which i can work with 😃

idle owl
#

@solar whale Did you have to do anything special with the BMP388 to get it to work? I assume not since you said it was quicker than you expected... I can't get mine to show up on a Feather using I2C or SPI. 😕

orchid basinBOT
tulip sleet
#

@solar whale I have not done extensive testing - @slender iron might have some comment as well

idle owl
#

@solar whale Nevermind. Unplugged the whole thing and plugged it back in the same and it's fine.

tulip sleet
#

@carmine kestrel are you the same person as zamfi on github?

carmine kestrel
#

no

#

i'm the same on the github

tulip sleet
#

ok, see above - someone was talking about something similar

plucky flint
#

@gilded cradle hmm.... I'm not sure I understand. (likely). When you say the "tidy" button crashes it, can you share your log file around where the crash happens? I'm not sure what you mean when you say you dumped files into the app folder.

#

Ahhh.... just figured it out.

#

Are you saying you've just copied the files from current master into the OSX app folder.

gilded cradle
#

Yes

plucky flint
#

Aha.... so you'll also need to have the black package "installed" in the app

#

i.e. so black is on the Python path for the version of Python packaged in with Mu.

gilded cradle
#

Ok, I’ll look into that. I figured it was because of my non-standard method

#

Everything else works great

plucky flint
#

Hehehehe... "non standard" I like it. 😃

gilded cradle
#

😀

idle owl
#

@solar whale Let me know when you're around, I have fritzing images for you to verify.

plucky flint
gilded cradle
#

Thanks Nick

idle owl
#

Ooh bookmarked!

plucky flint
#

The installers are not made if master has failing tests and other rather severe checks. So they should be relatively stable.

gilded cradle
#

Yeah, other than the tidy function, what I have is more stable than 1.0.2

plucky flint
#

Good to hear.

idle owl
#

@plucky flint Unrelated - I created https://github.com/adafruit/PyCon2019 to post the example code for the Open Spaces, but also to collaborate on the initial CPX demo. I filed issue 1 to start collecting ideas, and soon I'll write up something and PR it for more collaboration.

raven canopy
#

@tulip sleet while learning/thinking about how to handle the nRF EasyDMA, PDM recording, etc. i have a question i want to run by you. while i don't see much currently utilizing EasyDMA, i also don't see anything at a "global" scope to dynamically handle selection of the DataRAM pointer to use. i know that prioritization will handle access, but would it be beneficial to have a mechanism to query & grab an available address? wonders, after the fact, would it be better to create an issue on this?

plucky flint
#

@idle owl aha.... that's great

#

I'm watching it

idle owl
#

@plucky flint Excellent 😃

plucky flint
#

Right.... I'm off to sleep.G'night folks! Keep building awesome stuff. 😃

idle owl
#

Goodnight!

manic glacierBOT
gilded cradle
#

Good night

slender iron
#

@solar whale I haven't been testing pyportal and haven't seen corruption on other devices

tulip sleet
#

@raven canopy the EasyDMA is used by the nrfx drivers, so you won't see us using it explicitly

raven canopy
#

@tulip sleet hmm. i may be misunderstanding the sheet then. PDM, appears to me, to require software setting/handling the pointer in DataRAM in SAMPLE.PTR, and the maximum length in SAMPLE.MAXCNT. i haven't gotten to a build state yet, so maybe i'll learn something with the failures that are sure to happen. 😄

tulip sleet
#

@raven canopy that's right, that's what I'd expect. We do have code that copies from ROM into RAM if necessary.

raven canopy
#

misunderstanding the sheet & nrfx*

tulip sleet
#

I just meant that the setup is taken care of by the nrfx drivers

#

is there a PDM driver in nrfx that you've looked at?

raven canopy
#

yep. have both nrf and nrfx on split screen. 😄

tulip sleet
#

so as long as you copy the data (if necessary), it should be fine. There's some code for another peripheral somewhere that does this, I think, I'll look for it.

#

it might be in tinyusb

#

example:

                            spim_control_block_t        * p_cb,
                            nrfx_spim_xfer_desc_t const * p_xfer_desc,
                            uint32_t                      flags)
{
    nrfx_err_t err_code;
    // EasyDMA requires that transfer buffers are placed in Data RAM region;
    // signal error if they are not.
    if ((p_xfer_desc->p_tx_buffer != NULL && !nrfx_is_in_ram(p_xfer_desc->p_tx_buffer)) ||
        (p_xfer_desc->p_rx_buffer != NULL && !nrfx_is_in_ram(p_xfer_desc->p_rx_buffer)))
    {
        p_cb->transfer_in_progress = false;
        err_code = NRFX_ERROR_INVALID_ADDR;
        NRFX_LOG_WARNING("Function: %s, error code: %s.",
                         __func__,
                         NRFX_LOG_ERROR_STRING_GET(err_code));
        return err_code;
    }
#

that's nrfx code, not ours

raven canopy
#

these are the bits from the sheet that lead me to think that PDMIn will have to select the pointer. I also don't see anything in nrf_pdm or nrfx_pdm that suggests they select an address, though i understand they're a bit obfuscated.

To ensure continuous PDM sampling, it is up to the application to update the EasyDMA destination address pointer as the previous buffer is filled.

The address pointer for the EasyDMA channel is set in SAMPLE.PTR register. If the destination address set
in SAMPLE.PTR is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or
RAM corruption.

The PDM acquisition can be started by the START task, after the SAMPLE.PTR and SAMPLE.MAXCNT registers have been written.

i'll keep plugging away and see what i break.

tulip sleet
#

that RAM restriction is true for any peripheral using EasyDMA. Maybe they're implying it's double-buffered? I'm not sure I understand your distinction between pointer and address and data. It's always a pointer to a buffer

raven canopy
#

i thought i read explicitly that it is double-buffered, but i can only find inferences. the terminology confusion...probably all on me, sorry. appreciate the vectoring. gotta run out for the evening...

manic glacierBOT
solar whale
#

@idle owl you can send the fritzing files anytime. I won’t be able to look until later tonight or tomorrow morning.

idle owl
#

Ok sounds good.

solar whale
#

@slender iron @tulip sleet I’ll keep an eye on the pyportal FS issue.

slender iron
#

thanks!

manic glacierBOT
manic glacierBOT
pastel panther
#

@slender iron I've also seen the occasional FS issue about a week ago but haven't had the time to track it down. I'll put in some time this weekend to crank on it a bit.

solar whale
#

@idle owl for the SPI fritzing - the SPI pins are not correct - also INT does not need to connected. It is not used.

#

for the SPI the wires are on the right 3 RPi pins, but the order from the top is MOSI,MISO SCK = MOSI goes to the SDI , MISO to SDO, SCK to SCK - same as the BME280

#

The I2C looks good.

solar whale
#

@meager fog just a heads-up -- a few of the PyPortal demos in the Learning Guides are also are broken by the TileGrid position change - (PyPortal_Openweather,pyportal_weatherstation)

solar whale
#

Do you want try/except on all these changes or just change them to the new kwargs?

solar whale
#

@tulip sleet @slender iron @pastel panther The symptom I am running into with the PyPortal FS is that I am running some tests of new code (fixing TileGrid calls) and if the it often fails with at TypeError if I have not updated it yet. When I copy over the new code and do a control-D to reboot, - it display "soft reboot" then hangs. If it press the RESET button it comes up in Safe mode (HardFault) and the FS is hosed. I erase and reload and it works OK, but this has happened several times.

#

not sure if the initial error is part of the issue or not

tulip sleet
#

@solar whale I saw this once also, but can't remember if it was on the PyPortal or some other board.

solar whale
#

and I always do a "sync" after copying files over.

tulip sleet
#

i saw it after shortly after updating the uf2, and was a bit confused

#

COuld you add it to #1643, or I will, crediting you?

solar whale
#

OK -- I'll just copy the above note if that is helpful.

tulip sleet
#

I started to do that, and then decided you could do it directly, and I'll also confirm.

manic glacierBOT
#

Some additional observations:
The symptom I am running into with the PyPortal FS is that I am running some tests of new code (fixing TileGrid calls) and if the it often fails with at TypeError if I have not updated it yet. When I copy over the new code and do a control-D to reboot, - it display "soft reboot" then hangs. If it press the RESET button it comes up in Safe mode (HardFault) and the FS is hosed. I erase and reload and it works OK, but this has happened several times.
Not sure i...

pastel panther
#

That sounds similar to what I was seeing

manic glacierBOT
tulip sleet
#

@pastel panther feel free to add to that issue

solar whale
#

bed time --- 💤 Good night all!

tulip sleet
#

thanks for the precise characterization. gn!

solar whale
#

yw

raven canopy
#

@tulip sleet i think i'm better understanding my nRF woes now. focusing less on the sheet. but i think the bigger issue i was having was that i was thinking hal/nrf_ should be used instead of drivers/nrfx_ . reading nrfx_pdm.c paints a better picture; i was only looking at nrfx_pdm.h. hard to shake that ASF experience i guess.

tulip sleet
#

ooh yes, there's nrf and nrfx. asf4 with its hal, hpl, and hri is even more layered

raven canopy
#

i also noticed that our nrfx is behind release-wise. we're on 1.3.1; upstream is on 1.6.2. i noticed some USBD fixes in the change logs; does that only affect the TinyUSB side? i'm sure thach is on top of that side of things...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I tested several host computers, with Windows 10 and Linux Mint 18.3/19.1. Same results.

"Drive fills up" means, the fuller the virtual drive gets (regardless what data, may be Python code, random test data), the more likely the read errors appear.

As I said, a single Circuitpython file may run without an error indefinitely, but as soon as you copy additional files to the virtual drive, the errors appear. If the drive is nearly full, the errors occur inevitably.

#

@kevinjwalters What I wanted to say is, the fuller the drive gets, the more likely those errors appear.
With just a single main.py file, and maybe even a library or two, the code may run for some time without an error (or not), but if you add additional files (may be random test data), the error becomes more likely.

To repeat this behaviour:

  • Put a single main.py file on the drive, that does a simple task, like blinking an LED, and/or printing something to the REPL.
  • Let it run
  • Cop...
mild grotto
#

hi all, has anyone an idea to convert the unique id of the processor obtained by "microcontroller.cpu.uid" to ascii or utf-8

#

ubinascii is not there

manic glacierBOT
stuck elbow
#

@mild grotto Maybe something like ''.join(hex(x) for x in microcontroller.cpu.uid)

#

or ''.join('%x' % x for x in microcontroller.cpu.uid)

manic glacierBOT
#

Based on @uhrheber comments it suggests the file system code is one canidate here, has it changed? Also interesting to note that it doesn't appear to depend on what the application is doing as such a trivial tiny main.py was used.

Does the whole code base go through static code/dynamic analysis checks for buffer overflows and the like? I'm just wondering if this could be some bug that's been around for a while but one hasn't trashed anything important in the past.

I've been problem ...

mild grotto
#

@stuck elbow thanks that should work

manic glacierBOT
#

I tested all official releases since 4.0.0 Beta 1, and they all behave like that.
I think that the older releases are somewhat more stable, but this might as well be coincidence.

The thing is, it's somewhat of a hit and miss, I have one pca10059 dongle, that I use as a USB password typer, and it uses both the USB HID and the TouchIO library. It was originally on Beta 1, and I later updated it to Beta 2. I'm using it on my PC since about 2 months, plugging it several times a day, and it ru...

manic glacierBOT
#

If you want to test it yourself, here's my code (needs the libs adafruit_ble and adafruit_bluefruit_connect).
It can be used with the Bluefruit app, to use the colourpicker to change the colour of the RGB LED on the pca10059 dongle.

``
import board

from adafruit_ble.uart import UARTServer
import board, digitalio, pulseio
from adafruit_bluefruit_connect.packet import Packet
from adafruit_bluefruit_connect.color_packet import ColorPacket
from time import sleep

ledr = pulseio.PWMO...

lethal abyss
stuck elbow
#

m4 is not a challenge

lethal abyss
#

I know, but I always think that younger kids needs a way to play with nice hardware too

#

but if same things as arcade.makecode works on it, it will be even better

#

challenges with M0 boards, like this one or yours are for me 😉

manic glacierBOT
lethal abyss
#

or without such a wonderful screen as the nice pew pew

manic glacierBOT
orchid basinBOT
stuck elbow
#

pewpew is actually targeted at less skilled programers

idle owl
#

@solar whale Wow not sure how I messed it up that badly. I knew which pins they were supposed to go to, I tested it on the Feather. Oi! Here's a new one. And I checked it multiple times but that doesn't mean much. Could still have borked it.

idle owl
#

Minus the int pin. Forgot to delete that.

solar whale
#

@idle owl Much better! without the INT it should be all set.

idle owl
#

Thanks!

#

Perfect timing too, I am one step away from adding that diagram to the guide 😄

slender iron
#

anyone want to veto me doing a beta 4 release today?

raven canopy
#

crickits

solar whale
#

@slender iron It would be good to get the pyportal lib PR released as well or it won't work with beta 4

slender iron
#

right, it's a chicken or egg problem

solar whale
#

its backward compatible

#

it works with current releases as well

#

display_text also need to be released, the PR for tilegrid was alreday merged

idle owl
#

@slender iron Sounds good to me.

#

@solar whale Does it simply need a release? Or are there still PRs outstanding on it?

solar whale
#

@idle owl Display_Text is ready for release -- PyPortal need Review and approval.

idle owl
#

@solar whale I don't have time to test it. You ok with me merging it as is?

solar whale
#

I also put in a PR to fix two of the pyportal Learning guides

#

@idle owl they work for me -- @meager fog approved and merged Display_text, not sure if there is a reason why PyPortal was not also merged. Perhaps she should give a go ahead,

idle owl
#

@solar whale If you tested it, I'm sure it's fine. Sometimes things get skipped over, is likely what happened.

solar whale
#

I'm happy with them

#

I have to go for awhile -- back later

idle owl
#

@solar whale @slender iron Both libs are set and released.

slender iron
#

thanks @idle owl !

idle owl
#

Np. I would love to see another release, so if I can unblock it, I'm on it.

slender iron
#

👍

#

my plan is to catch up on email, go for a run and then do the release this afternoon

idle owl
#

👍

tulip sleet
#

@slender iron the next thing to work hard on is the apparent filesystem instability, so maybe caveat that in the release notes

slender iron
#

ya, that and usb

#

it's not clear to me that the filesystem is worse than before

tulip sleet
#

i am seeing, say, CPX, come up in safe mode sometimes just on plugging in

slender iron
#

what sort of safe mode?

manic glacierBOT
tulip sleet
#

also the hanging on a soft restart - I did not see these things before

#

let me scroll back and look

#

power dip

#

this was on a simple "plug it in". I didn't bobble the USB connector or anything

#

it's a CPX connected to a crickit board; the crickit board was not powered

slender iron
#

I think it is the soldering

#

you would know better though

tidal kiln
#

@slender iron thanks. responded. agree. either soldering or wiring.

slender iron
#

thanks @tidal kiln !

#

(one of the dropbox links is a photo)

tidal kiln
#

ah. thanks. scanned past that.

slender iron
#

a closer up photo is probably warranted though

tidal kiln
#

close enough for now. response updated.

#

thanks for pointing out that link

slender iron
#

np

#

thanks for responding 😃

manic glacierBOT
slender iron
tulip sleet
#

I thought I had approved that! I must have been waiting for Travis an then forgot. Sorry!

slender iron
#

np @tulip sleet I do that too

tidal kiln
#

@idle owl i have a BMP388, i think i was checking order history logged in with a different account. still need help with it?

idle owl
#

@tidal kiln Don't think so! I wrote up the guide for it, but I had it pulled up and tested, so I think it's good to go. Jerry tested it on Pi for me and verified the fritzing.

tidal kiln
#

cool. back to the salt mines then....

solar whale
#

@idle owl Thanks for getting the releases done!

manic glacierBOT
manic glacierBOT
tidal kiln
#

the new CP website / download stuff looks niiiiice! 👍
that's gonna help a lot.

slender iron
manic glacierBOT
#

In the #1639 comments there's mention of a change in a USB library for 4.x. Could that be doing something different at soft reboot time compared to the previous releases? Given that writing files to the CPX triggers automatic reboots if that new USB stack does something different which ends up preventing the final writes (#111) to the file system from being applied that might explain this?

meager fog
#

@slender iron are you blocking on that default-files issue for anything 4.x

slender iron
#

@meager fog I think it'd be good to have for stable but that is a few weeks out probably

#

that's the point where we'll try to get everyone to update

meager fog
#

ok i can try starting the process this weekend - yesterday i was shot

slender iron
#

ya, no rush

meager fog
#

i have Q on how we want to do text centering

#

are you busy now

slender iron
#

about to stream releasing beta 4

#

but can push that a bit

#

so ask away

river quest
#

@slender iron looks like 2 of the pull requests i did are for the same image replacement, so feel free to delete the identical one

slender iron
#

k np

tulip sleet
#

@slender iron @dusty fog just a note that i love being able to point users to a download now via circuitpython.org. Thanks!!

#

makes it so easy

slender iron
#

waits for brew to update stuff

river quest
#

@slender iron i'll prolly add some text to some of the boards on downloads that do not have it over the next week or so

slender iron
#

perfect!

river quest
#

most of the rest of the photos will be done next week for boards that are on the way, and anything else will see what we can do

slender iron
#

sounds good

manic glacierBOT
#

Just adding info. I'm not able to recreate this. Ubuntu 18.04.2 LTS. CircuitPython 4.0.0 beta 3:
adafruit-circuitpython-feather_m0_express-en_US-4.0.0-beta.3.uf2
on a Feather M0 Express.

[Fri Mar 15 13:42:29 2019] usb 2-1.7: new full-speed USB device number 89 using ehci-pci
[Fri Mar 15 13:42:29 2019] usb 2-1.7: New USB device found, idVendor=239a, idProduct=8023
[Fri Mar 15 13:42:29 2019] usb 2-1.7: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[Fri Mar 15 13...
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 4\.0\.0\-beta\.4
prime flower
#

@solar whale an email from one of your circuitpython PRs snuck it's way into a video for a learn guide 😄

manic glacierBOT
river quest
#

good release and work folks <@&356864093652516868> @tulip sleet @idle owl @slender iron blinka

manic glacierBOT
#

@hathach Here are two Beagle traces when plugging a Trinket M0 into my Samsung Chromebook. One is CircuitPython 3.1.2, which does appear as /dev/tty/ACM0. The other is CircuitPython 4.0.0-beta.4, which does not appear. The Chromebook is a Samsung XE303C12, running 32-bit Chrome OS, the latest version available for this: 72.0.3626.122.

[circuitpython-4.0.0-beta.4-trinket-m0-samsung-chromebook-usb2.tdc.zip](https://github.com/adafruit/circuitpython/files/2973268/circuitpython-4.0.0-beta.4-...

slender iron
#

Thanks @river quest will post the video on adafruit YouTube after it transcodes

river quest
#

rad, i'll grab and add that to newsletter and show stuff for next week after i see it on youtube

meager fog
#

@slender iron hiya i had to go to some meetings earlier

#

can i ask u about the text thing and also shapes, now?

slender iron
#

I’m on my phone but can try to help. Getting dinner before choir dress rehearsal. Concert tomorrow night!

meager fog
#

ooh ok so basically we have Label

#

id like to have some way to have an auto-centering label wrapper object?

#

like just adjusts the origin of the group - does that make sense?

#

or am i looking at it wrong

#

some superclass of label in textarea repo called like CenteredLabel?

slender iron
#

For now maybe just add a property for origin or anchor to label?

#

It could be a separate object but that might be more than we need

meager fog
#

im ok with that. probably eaiser

slender iron
#

Yup. Can always split it out later

meager fog
#

im not 100% sure of how that would work tho

#

thinks

#

like you would have an origin property you could change?

#

how is that different than the native x and y?

slender iron
#

Ya though I think anchor is more common

meager fog
#

i may need more help than phone can do

slender iron
#

Anchor would be an enum like left, center or right

meager fog
#

so i'd do like label.anchor = Label.CENTER?

slender iron
#

Ya

meager fog
#

ok and then it would change the x and y to refer to center

#

by calculation

slender iron
#

Ya of the subgroup

meager fog
#

ok ill draft something

slender iron
#

Well x and y are locate at the anchor

meager fog
#

so the default anchor is CENTER_LEFT?

slender iron
#

Ya

meager fog
#

ok ill have to add that calculation code...

#

thats fine

#

alright next q if you can - about shapes & bitmaps

#

i wanted to make shapes that have fills and outlines - can Shape do that? i am using a bitmap w/3 color pallete

slender iron
#

Not in a single one but you can stack two

meager fog
#

which do you think is more efficient?

slender iron
#

I’m not sure happy with shape atm but I think it’s good when you don’t want to store a full bitmap

meager fog
#

how about we keep as is then - in case you want to change Shape

#

its easy to understand as is

#

i would like to release it soon since people are making buttony projects

slender iron
#

Ya that’s ok.

meager fog
#

implementation is opaque

slender iron
#

It’s all under the hood of the library so it should be easy to change

meager fog
#

indeed

slender iron
#

Perfect!

meager fog
#

ok i think thats it then

slender iron
#

Great! Nice work

meager fog
#

for text anchor i'll add center and right, people can later add like, baseline or top_right or whatever

slender iron
#

Kk

meager fog
#

alright anything else you need?

slender iron
#

Nope. Weekend now then usb and FS bug fixing next week. I’m out Friday and Monday next week going to Michigan for a birthday

meager fog
#

oki

tulip sleet
#

i will do some looking on filesystem problems but scott is the expert on this

meager fog
#

later!

manic glacierBOT
wraith tiger
#

It took a bit of doing, but I got sigrok-meter working with my DMM.

#

I had to hack the RPM spec file to enable building of the python bindings for libsigrok and the creation of a libsigrok-python subpackage and then figure out how to get it to build python3 bindings instead of python2.

#

I'm running this on Fedora 29, btw.

lone sandalBOT
fierce girder
#

I am wondering if it is possible to have CircuitPython on a ATSAMD51G19A without external SPI flash. It does have 512KB internal flash.

My neighbor Johannes designed this board and we are hoping that we might be able to run CircuitPython on it:
https://github.com/dadamachines/doppler/blob/master/README.md

umbral dagger
#

@fierce girder Should be fine. You may have to pick and choose what libs you put onboard.

#

@fierce girder You'll need to do a special build for the flash configuration, but other than that it should be much like the Feather M4 Express build. Pin config/names will need tweaking as well.

fierce girder
#

Thanks

manic glacierBOT
tulip sleet
#

@fierce girder We had internal flash only for the SAMD51 before we got SPI and QSPI flash implemented. A good guide would be to look at the atmel-samd/boards/trinket_m0/mpconfigboard.* or other non-Express boards. You'd need to set LD_FILE = samd51x19-bootloader.ld (and double-check that file, which hasn't been used for a while and might need updating) and also set INTERNAL_FLASH_FILESYSTEM = 1.

fierce girder
#

@tulip sleet great thanks!

#

This is the board BTW. It would be interesting to get CircuitPython on it as there is also an ice40 FPGA that can provide interesting peripherals to the SAMD51 over SPI

manic glacierBOT
raven canopy
#

@tulip sleet are there any undocumented tricks to debugging nrf w/gdb? i'm getting the following:

>$ gdb build-pca10056/firmware.elf
...periphery text...
Reading symbols from build-pca10056/firmware.elf...done.

(gdb) target extended-remote :2331
Remote debugging using :2331
warning: while parsing target description (at line 10): Target description specified unknown architecture "arm"
warning: Could not load XML target description; ignoring
Truncated register 16 in remote 'g' packet

JLinkGDBServer runs without complaint using -device nRF52840_xxAA.

tulip sleet
#

@raven canopy you need to use arm-none-eabi-gdb

#

just like arm-none-eabi-gcc

raven canopy
#

ahh. 🤦

tulip sleet
#

i have an aliases file so I don't have to remember all the different settings for the different boards

#

(is really named .bash_aliases)

raven canopy
#

yep. thanks! now that i'm leaving the cozy space of Atmel Studio these will def come in handy. 😄

manic glacierBOT
manic glacierBOT
#

On my feather_nrf52840_express with beta4 doing a Soft Reboot after copying a file to the board results in a disconnect of the screen session followed by a boot to safe mode (HardFaultHandler).
Resettng remounts CIRCUITPY, but all files have been erased. Only boot_out.txt remains.

This is reproducible:
Boot -- open screen session
copy a file to CIRCUITPY
issues control-D
Screen disconnects - board boots to Safe Mode
RESET board
Files system mounts but it is empty (except for boot_...

solar whale
#

FYI adafruit_slideshow is also broken by TileGrid change -- working on a PR.

meager fog
#

@solar whale thankx

#

im almost done with my project which is wifi streaming mp3 player 😃

#

anyone want to try it?

solar whale
#

sure -- may take me a bit to get configured

meager fog
#

yeah its arduino actually

#

cause its native mp3

solar whale
#

ah -- what board?

meager fog
#

pyportal

solar whale
#

Why do we have the "long-line" limit in pylint? Is it really important to readabllity?

meager fog
#

yeah i think to keep the lines from going off a lot

#

i have seen beginner code that is excessive in packing onto a line

#

i try to use it sparingly 😃

solar whale
#

I'll be happy to give the streamer it a try -- is pyportal suppored by SAMD BSP or is it special install

meager fog
#

its in there

solar whale
#

yup -- just found it

meager fog
#

pyportal audio isnt great as expected, but it should work

solar whale
#

OK -- I'll give it a try

#

what lib is CIrcularBuffer.h from

#

arduino build fails looking for it -- I installed NINA and adafruit_mp3

meager fog
#

oh that's from the library manger

solar whale
#

dod you use the Agileware or Luis Llamas lib?

meager fog
#

aglile

solar whale
#

hmm -- I get Class Adafruit_MP3 has no member named 'pause'

#

using adafruit_mp3 -- v 1.0.1

#

ah -- looks like I need 1.0.2

#

has not shown up in lib manager yet

meager fog
#

yeah

#

you can clone it manually instead of lib manager

#

i had to fix a bunch of bugs cause it was written for SD cards

solar whale
#

ok

manic glacierBOT
meager fog
#

@solar whale no rush, im gonna 🌮

#

hard to get non-strereo-128kb streams

#

we can't seem to keep up with those

solar whale
#

@meager fog it's working!!

meager fog
#

you can try const char *stream =

#

er

vernal lichen
#

I'm working on a little project for my PyPortal. I 3D printed the case from Noe&Pedro and have taken their code from the view master project. I am making a slideshow of animals from A-Z and advancing the image every 5 seconds. It appears I can pull slideshow.current_image_name. I am going to try and create audio files of the animal sounds as .wav files that match the .bmp filename and try to play audio with the image. I have sound working with the coin.wav as images advance. Now just have to work on my Circuit Python skills to parse filename and try to open the new .wav file in the loop. If anyone has tried using slideshow.current_image_name let me know if you got it working. Plan is to use it at events at the Wildlife Refuge to showcase animals found on the Refuge.

solar whale
#

@meager fog the bbc link gives me mp3 errors

meager fog
#

jer - yeah oddly sometimes it chokes, try restarting

vernal lichen
#

@meager fog, thanks I will take a look. I didn't think to check that project. I was looking at just PyPortal examples.

solar whale
#

@meager fog my favorite station const char *stream = "http://ice1.somafm.com/thistle-128-mp3"; works 😃

manic glacierBOT
#

Scenario is:

  1. run_code_py() in main.c is called the first time. filesystem_flush() is called, which calls spi_flash_flush_keep_cache() indirectly. It does not call flush_ram_cache() in external_flash.c because there's no RAM cache.
  2. I write a file in CIRCUITPY.
  3. Reload is requested, and happens. run_code_py() gets run a second time, calls filesystem_flush() again.
  4. This time flush_ram_cache() is called. It gets a hard fault at line 400, calling:
           ...
manic glacierBOT
meager fog
#

@solar whale heya are you tgetting stuttery audio

#

or does it mostly work?

solar whale
#

it varies -- the bbc was pretty stuttery - and thistle was better, but still stopped occasionally

#

I put one of the 8 ohm oval speakers on the pyportal -- it worked but got pretty hot!

#

@tulip sleet trying your PR now

meager fog
#

@solar whale interesting - ok!

solar whale
#

it was not great sound quality -- much better with speaker

#

@tulip sleet still crashes on feather_nrf52840

manic glacierBOT
meager fog
#

@solar whale i removed the usb debugs (put behind an ifdef) and it solved a lot of the ticking

#

check latest commited version

#

im using this code to test the new Metro m4 wifi board 😃 😃

manic glacierBOT
solar whale
#

@meager fog may be tomorrow before I can test mp3 more. Sounds like an improvement.

#

@tulip sleet I’ll try the fix tomorrow but sounds like you got it. No need to wait for me.

meager fog
#

jerry, np its a toy

manic glacierBOT
solar whale
#

@meager fog did a quick test - definatley improved - bbc and podcast worked much better - but still stuttery on the 128k channels -- will try more tomorrow. Thanks for letting me try it.

manic glacierBOT
#

When running on a CircuitPlayground Express with:

Adafruit CircuitPython 4.0.0-beta.4 on 2019-03-15; Adafruit CircuitPlayground Express with samd21g18

Got a hard crash which said:

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

#

I have been trying to use this function, and have tested from alpha 2 to beta 4 (the latest at time of issue) and have not been able to successfully use this. Depending on the version, different issues happen from REPL lockups, to rebooting to safe mode. Is this not supported at the current time?

import microcontroller
microcontroller.nvm[0:3] = b"\xcc\x10\x00"
print(microcontroller.nvm[0]
manic glacierBOT
#

Several issues with Feather M4 express (also simple blink aplication) on MacOS (10.12.6):
When using the mu editor it frequently hangs when trying to save code.py.
Sometimes code can be saved but is frequently modified to all 0xFF´s with exactly the same length than the original code.
Serial communication with Mu hangs, ctrl C crl D has no effect in this state.
Uodated Mu from 1.0 to 1.02, but doesn´t improve anything.
When using some other editor with the CIRCUITPTY volume code is cor...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I tested the pca10059 with a simple main.py, that doesn't use any external libs.
It runs stable. I can even torture the drive with f3write. No errors. The problems seem to be linked to bluetooth here.

With the pca10056, it's completely different.
It runs the bluetooth code without an error.
When I write test data to the drive with f3, while the code is running, the test data shows errors afterwards.
When I write test data with stopped code, I get no errors.

It seems that there are s...

manic glacierBOT
tulip sleet
#

@solar whale I'm thinking of releasing a beta 5 immediately with the filesystem flush issue, even before looking at anything else. Does this make sense to you?

solar whale
#

@tulip sleet yes -- I think it will avoid a lot of forum/discord help requests

tulip sleet
#

will proceed. We may have beta 6 very soon too, but right now it's not usable. thanks.

manic glacierBOT
tulip sleet
#

@solar whale can you approve? I need an approving review on the PR from a person with certain privs. I think yours will do?

manic glacierBOT
solar whale
#

@tulip sleet sure -- I approved - not sure if my privs help.

manic glacierBOT
tulip sleet
#

@solar whale worked! I'll make a beta.5

manic glacierBOT
tulip sleet
#

have to do a family errand, but beta is in process

stuck elbow
#

I can confirm it improves things a lot on the samd21

manic glacierBOT
#

so far, I have found the feather_nrf52840 and a particle_argon to both behave well with this PR. I am just doing "normal" use -- running code and copying files to the FS then issuing soft reboot. I have not had any problems.

One related observation - not new but still occasionally occurs.
I have had seen few "odd" behaviors were a newly copied file does not run on the first attempt, but does run after a reboot or recopying - I don't have a clean example of this. This is not a new thing ...

#

@jerryneedell Would you mind trying this code?
It needs the libraries adafruit_ble and adafruit_bluefruit_connect. It's written for the pca10059, so you'll have to adapt the LED port pins.

from adafruit_ble.uart import UARTServer
import board, digitalio, pulseio
from adafruit_bluefruit_connect.packet import Packet
from adafruit_bluefruit_connect.color_packet import ColorPacket

ledr = pulseio.PWMOut(board.LED2_R, frequency=5000, duty_cycle=65535)
ledg = pulseio.PWMOut(board.LED2_...
#

@uhrheber I made a modified version since the feather_nrf52840 does not have the same LEDs - I just use 1 LED
I have run it on a particle argon - so far without issue.
Does this test it adequately?

from adafruit_ble.uart import UARTServer
import board, digitalio, pulseio
from adafruit_bluefruit_connect.packet import Packet
from adafruit_bluefruit_connect.color_packet import ColorPacket

ledr = pulseio.PWMOut(board.D7, frequency=5000, duty_cycle=65535)


uart_server = UARTServe...
#
[adafruit/circuitpython] New tag created: 4\.0\.0\-beta\.5
#

following up on #1649
running this on pca10059


Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.4-2-ga10e4fe21 on 2019-03-17; PCA10059 nRF52840 Dongle with nRF52840
>>> 
>>> 
from adafruit_ble.uart import UARTServer
import board, digitalio, pulseio
from adafruit_bluefruit_connect.packet import Packet
from adafruit_bluefruit_connect.color_packet import ColorPacket

ledr = pulseio.PWMOut(board.LED2_R, frequency=5000, duty_cy...
manic glacierBOT
#

@jerryneedell Please try to copy data to the drive, while the code runs.
Ideally, use F3 (http://oss.digirati.com.br/f3/) or h2testw (https://fightflashfraud.wordpress.com/2008/11/24/h2testw-gold-standard-in-detecting-fake-capacity-flash/).

Both are meant to write random test data to USB sticks, read it back and test for modified/overwritten parts.
I get modified data when writing to the drive while the code runs.

umbral dagger
#

Beta 5... that was quick 😃

manic glacierBOT
solar whale
#

@tulip sleet do you know anything about the "F3" tests for the USB drive -- Is tinyusb ready for that kind of stress test?

tulip sleet
#

don't know that specifically, but know other stress tests, like bonnie++

#

i'd worry a bit more about flash wear if it does thousands of writes

#

may you can limit the writes

solar whale
#

good point -- I think I'll do more reading before tryin it.

gilded cradle
#

@umbral dagger That’s because Beta 4 was broken.

umbral dagger
#

I thought that might have been the case.

solar whale
#

Off for awhile -- My beta5 builds are underway -- will do more testing later. @tulip sleet thanks for the quick release.

tulip sleet
#

beta 5 travis failed, but seemed to do all the right things, so no harm done, and I'll check on the exact failure.

solar whale
#

no good deed goes unpunished 😉

tulip sleet
#

i need to get adabot to run

raven canopy
#

@tulip sleet check the creds. Scott accidentally streamed the cred on Friday.

tulip sleet
#

i think he may have changed them: in travis:

0.61s$ (! var_search "${TRAVIS_TESTS-}" website || (cd tools && python3 build_board_info.py && cd ..))
Not logged in
{"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}
Traceback (most recent call last):
  File "build_board_info.py", line 265, in <module>
    generate_download_info()
  File "build_board_info.py", line 206, in generate_download_info
    git_info, current_info = get_current_info()
  File "build_board_info.py", line 88, in get_current_info
    raise RuntimeError("cannot get master sha")
RuntimeError: cannot get master sha
The command "(! var_search "${TRAVIS_TESTS-}" website || (cd tools && python3 build_board_info.py && cd ..))" exited with 1.
manic glacierBOT
#

F3 just uses a single task to fill the drive with test data, and after that reads the data back and compares it.
I wouldn't call that a stress test but a function test.

A stress test would be dozens of concurrent random reads and writes at the same time.
I don't necessarily expect CP to handle that well.

But: On a Windows system with a background virus scanner installed, it may well happen that the virus scanner reads some files, while CP executes code, and the user reads/writes the s...

pastel panther
#

@tulip sleet @solar whale sorry I'm a bit late to the party but is there anything in particular that needs testing for the FS issues? I saw there was a new release that is apparently a significant improvement

orchid basinBOT
tulip sleet
#

@solar whale @gilded cradle @raven canopy anyone who's around ^^

raven canopy
#

🏃

#

@tulip sleet wait on Travis?

tulip sleet
#

just finished

raven canopy
#

yep. 😄

tulip sleet
gilded cradle
#

Thanks @tulip sleet

tulip sleet
#

uh oh links broken

marble hornet
#

does sphinx auto detect keyword or do you need to tell it that are kwargs?

tulip sleet
#

i have to upload the assets from the broken travis subjob by hand.

#

@marble hornet it figures it out from the signature of the method

#

and you list them as params

#

maybe it doesn't actually figure it out. you have to list any params you want documented

raven canopy
#

@tulip sleet quick sleuthing! Feather M0X was working, but yeah CPX a nogo. Also, changing the language on CPX doesn't change the link...

#

files.json is correct though.. 🤔

tulip sleet
#

i know, that's weird

#

does the link change on M0x when you change the lang?

raven canopy
#

and the rendered HTML has the correct links in the drop down.

#

checking

#

nope. stays en_US.

tulip sleet
#

maybe it never worked

#
<select>
                
                <option value="https://github.com/adafruit/circuitpython/releases/download/4.0.0-beta.5/adafruit-circuitpython-circuitplayground_express-ID-4.0.0-beta.5.uf2" data-files=https://github.com/adafruit/circuitpython/releases/download/4.0.0-beta.5/adafruit-circuitpython-circuitplayground_express-ID-4.0.0-beta.5.uf2 data-locale=ID >
                  
                      INDONESIAN
#

data-files and data-locales aren't double-quoted

#

I"m going to upload the assets and then see if the quoting is the issue

raven canopy
#

k. i'm digging through the commit history to see if it changed

tulip sleet
#

our cat is eating leftover Lake Tung Ting shrimp off the plate I just used

#

the sauce must smell good