#circuitpython-dev

1 messages ยท Page 253 of 1

meager fog
#

and we can keep it as a standalone program for now

umbral dagger
#

@meager fog Already started on that.

meager fog
#

ok rad

#

yeah im looking at how we could pull it apart into a library but there's not that much code!

#

maybe best to keep as is

tidal kiln
umbral dagger
#

@meager fog I have 1 pixel and 3 pixel brushes working.

slender iron
simple pulsar
stuck elbow
#

@slender iron about that gif loading, I wonder if it would make sense to have an extra parameter to only load a selected frame -- this way we could load animated gifs into separate bitmaps

#

though they would need to be really small to fit all in the memory at once

slender iron
#

ya, that could work. I was stumped how to handle gifs that have diffed frames

#

I think they can encode only the portion that changed

stuck elbow
#

right now I just write them all to the same bitmap one after another

#

but I don't handle transparency

#

they can have offsets, though

simple pulsar
#

Wrt "diffed frames" - does the animated gif have the ability to apply compression techniques between frames?

stuck elbow
#

they can update only differences

#

which is a sort of compression, I guess

simple pulsar
stuck elbow
#

yes, except you can also have transparency in there, so you can basically have a diff of consecutive frames, with just the first frame being full

#

see "Animation Frame Montage" on that page

simple pulsar
slender iron
#

@stuck elbow can you link me to the greyscale display you found? I'm going to take a stab at other bit depth displays

#

I think I'll have palette and color converter automatically derive the reduced bit color from an RGB888

#

like it does now from RGB888 to RGB565

tough flax
#

@tidal kiln I really appreciate that! I'm getting this error (on a device that did work w/the Arduino one)

main.py output:
Traceback (most recent call last):
  File "main.py", line 5, in <module>
  File "nunchuk.py", line 37, in __init__
  File "nunchuk.py", line 36, in __init__
  File "adafruit_bus_device/i2c_device.py", line 112, in write
OSError: [Errno 5] Input/output error
stuck elbow
#

@slender iron I recently found something even better -- a display with a 256-color palette!

slender iron
#

ooh! links please ๐Ÿ˜ƒ

stuck elbow
#

they are known as "nokia 6100" displays

slender iron
#

(feel free to point ladyada at them too if you think we should carry them)

stuck elbow
#

with PFC8833 chip

#

problem is they use 9-bit SPI

slender iron
#

ya, looks like sparkfun used to carry it

stuck elbow
#

they did

#

it's obnoxious, because it uses two LEDs in series for backlight, so needs 7V

slender iron
#

I found a grayscale controller that claims to scroll in both directions

stuck elbow
umbral dagger
stuck elbow
#

SSD1329, 4-bit

slender iron
#

its the ssd1327

stuck elbow
#

it's weird, because i2c

slender iron
#

is it i2c only?

tough flax
#

Hmm: @tidal kiln don't do anything on this - I'm going to try to find a different nunchuck

stuck elbow
slender iron
stuck elbow
#

and the chip also supports parallel, though I don't know if it's broken out

stuck elbow
#

nice

#

what's COF?

#

COG is chip-on-glass

slender iron
#

ยฏ_(ใƒ„)_/ยฏ

stuck elbow
#

chip-on-flex?

#

the ssd1322 definitely has an interesting form factor for text, would work well with a keyboard

slender iron
#

most color say they can do horizontal scroll too....

slender iron
#

nice!

stuck elbow
#

see that black thing on that flex cable?

#

does "16 grey scale" mean 4-bit or 16-bit? :P

#

I suppose 16-bit doesn't make much sense with how human eyes work

slender iron
#

4bit

stuck elbow
#

by the way, most SSD13XX displays have a corresponding SH11XX display

slender iron
#

nice!

manic glacierBOT
civic marsh
#

@slender iron thanks for the code pointer and keyboard example, very helpful!

idle owl
#

@gilded cradle I pushed some updates to PyBadger. Also added a second email string line for the business card because blinka@adafurit.com is a short email address, and not everyone has those, so now you can put it on two lines. If you can take a look at it and maybe test it, that would be great.

gilded cradle
#

Ok, I'll get it a test soon. I already have an item for testing it in Basecamp. ๐Ÿ˜ƒ

orchid basinBOT
manic glacierBOT
lethal abyss
#

@idle owl I tried pybadger library with CP 4.1.0.beta1 on my pygamer and everything went smooth for now ๐Ÿ˜ƒ

#

the qr generation is a nice feature

tough flax
#

Happy Saturday, folks. @tidal kiln and I are working on some nunchuk code for CP and I'm seeing this error on the Trinket M0:

Traceback (most recent call last):
  File "main.py", line 10, in <module>
  File "nunchuk.py", line 43, in joystick
  File "nunchuk.py", line 66, in _read_data
  File "nunchuk.py", line 74, in _read_register
  File "nunchuk.py", line 74, in _read_register
  File "adafruit_bus_device/i2c_device.py", line 96, in readinto
OSError: [Errno 19] Unsupported operation

I thought this might be a common I2C issue so I'd ask here - any ideas?

#

FWIW the hardware works with the Arduino WiiChuck.h code

#

And sometimes I get this error instead (looking for a pattern now)
OSError: [Errno 5] Input/output error

onyx hinge
#

"Input/output error" is MPI_EIO is NRFX_ERROR_DRV_TWI_ERR_DNACK or NRFX_ERROR_INVALID_ADDR

tough flax
#

Hmm.

#

Not sure if that helps, but maybe it means the device didn't init right?

#

When I add this after initing the device, I get nothing listed in the scan() results:
111

#
nc = nunchuk.Nunchuk(board.I2C())

i2c=board.I2C()
i2c.try_lock()
print(i2c.scan())
i2c.unlock()
manic glacierBOT
manic glacierBOT
#

ports/atmel-samd/boards: Added support files for boards in the datum series.

Pull request to add support for the datum series of boards from J&J Studios. More information on each of the boards is available at the links below.

https://groupgets.com/campaigns/568-datum-distance
https://groupgets.com/campaigns/573-datum-imu
https://groupgets.com/campaigns/574-datum-light
https://groupgets.com/campaigns/479-datum-weather

#

ports/atmel-samd/boards: Added support files for boards in the datum series.

Pull request to add support for the datum series of boards from J&J Studios. More information on each of the boards is available at the links below.

https://groupgets.com/campaigns/568-datum-distance
https://groupgets.com/campaigns/573-datum-imu
https://groupgets.com/campaigns/574-datum-light
https://groupgets.com/campaigns/479-datum-weather

manic glacierBOT
meager fog
#

@umbral dagger hihi

#

paint looks great

#

are you ready for next guide?

umbral dagger
#

@meager fog Cool. Halloween PyPortal countdown, right?

meager fog
#

oh yeah

#

ok so is the painting guide ready for me to review?

umbral dagger
#

I think so. I made changes to reflect the dual brush work.

#

We should implement BitBlit for CP ๐Ÿ˜ƒ

#

That, and tracking dirty rectangles, would make a lot of cool stuff easy.

meager fog
#

whats bitblit?

stuck elbow
#

Bit blit (also written BITBLT, BIT BLT, BitBLT, Bit BLT, Bit Blt etc., which stands for bit block transfer) is a data operation commonly used in computer graphics in which several bitmaps are combined into one using a boolean function.
The operation involves at least two bitm...

umbral dagger
#

A neat graphic manipulation mechanism.

#

yeah, that

#

Smalltalk made extensive use of it for screen manipulation.

manic glacierBOT
#
meager fog
#

oki

#

you can only overlap now, no xor or such

#

but i think thats ok for now

#

@umbral dagger please replace the generic stock photos whenever you can with photos of the project in the guide

#

we only need stock photos when the topic is really dry and there's no diagrams/photos we can show ๐Ÿ˜ƒ

umbral dagger
#

@meager fog OK, just the one on the page you have open to replace.

meager fog
#

k

#

@umbral dagger art ๐Ÿ˜ƒ

#

ok its live

#

great work

#

next up - macwrite ๐Ÿ˜„

umbral dagger
#

@meager fog Haha

#

Although... if we made an I2C keyboard...

meager fog
#

@eager vortex great videos, just watched a few!

fallow wraith
#

I just got and set up the py gamer and am struggling to find out how to start coding with it

meager fog
#

@fallow wraith start with makecode, its the easiest way to get going

fallow wraith
#

can I use python to code the py gamer or do i have to learn circuit python

meager fog
#

@fallow wraith circuitpython is a subset of py3

#

so if you know python you're ready ๐Ÿ˜ƒ

manic glacierBOT
lime trellis
#

so can safe_mode only be turned off by setting NO_SAFE_MODE before building?

idle owl
#

<@&356864093652516868> Here is the notes doc for the CircuitPython Weekly tomorrow 8 July 2019 at 11amPT/2pmET. Please add your hug reports and status updates even if you'll be attending the meeting - it's super helpful! Thanks! https://docs.google.com/document/d/1DYzTP9a1G0C7GnnqI3cfeUPZATD4IJJJslLUR0NHcMU/edit?usp=sharing

slender iron
#

@lime trellis why do you want to turn it off? that enum is used in the memory that is maintained across resets

manic glacierBOT
manic glacierBOT
#

Original code was correct for SAMD21
New code for SAMD51 only permits pad-0 for TX
Minimal change of 1 code block

tested on Metro M4, now produces a list compatible with my reading of the datasheet...

`Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
TX pin: microcontroller.pin.A3 RX pin: microcontroller.pin.A1
TX pin: microcontroller.pin.A3 RX pin: microcontroller.pin.A2
TX pin: microcontroller.pin.A4 RX pin: microcontrolle...

buoyant coral
#

Hiya! I'm really liking the capabilities of CircuitPython & Python generally! I frequently work on larger-scale OO applications & am used to having a significant amount of memory available for application execution. I've decided to use a Itsy Bitsy M0 for a prototype I am working on. Due to the required peripheral devices & their code dependencies, I ran in to memory issues right out the gate. The device is powerful for its size! Impressive! I've optimized custom modules where possible & will be looking into creating leaner mpy files. I suppose my question is whether there is a similar Adafruit device capable of running CircuitPython with much more memory available. For now, I've switched back to the Arduino IDE.

lime trellis
#

@buoyant coral by "memory" do you mean RAM or storage? The ItsyBitsy has a 2MB SPI flash used for circuitpython functions, but there are other Adafruit M0 boards with 4MB chips. If you're needing data-storage, why not add an SD card reader to your ItsyBitsy board and enjoy TONS of space

untold knot
#

@buoyant coral you want a board with express in the name. Such as feather m0 express or feather m4 express. Those have more storage

manic glacierBOT
#

In regard of adjusting the colors brightness, i think it's enough just to add CP_RGB_STATUS_LED in the #if defined on color_brightness and set_rgb_status_brightness. Like so:

uint32_t color_brightness(uint32_t color, uint8_t brightness) {
    #if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)) || (defined(CP_RGB_STATUS_LED))
    uint32_t result = ((color & 0xff0000) * brightness / 255) & 0xff0000;
    result += ((color & 0...
lime trellis
#

@slender iron regarding safe_mode, I'm exploring ways to implement a "failsafe" routine. Something that'd allow the user to choose what happens under certain exit_code conditions. like... "if brownout, run next.py" or "if main.py EOF, proceed to nextnext.py"

slender iron
#

ah, interesting @lime trellis. safe mode is definitely what you want to poke at

#

for brownout at least

lime trellis
#

Yeah I've been playing around with it. It really comes down to refreshing the vm and then handling the repl. My experiments today had to bypass the repl otherwise it'd hang in run_repl ๐Ÿคท

umbral dagger
#

@buoyant coral As mentioned, a board with "Express" in the name will have an external flash chip which means a bigger USB drive. This will let it hold more code and/or data files. Your program is still limited buy the amount of RAM on the MCU. Unlike when you use C/C++, your python program is stored in RAM (after being byte-compiled if it was a ".py" file). If you want to be able to write bigger python programs and/or use more libraries you'll want an "M4" board. These use a more powerful MCU (SAMD51 that uses the ARM Cortex-M4 core) that has more flash and RAM. Those memory amounts will vary depending on the model of the SAMD51 used on the board.

buoyant coral
#

@lime trellis @untold knot @umbral dagger thanks for the replies! I've indeed been utilizing the 2MB SPI flash for code & audio file storage. So far the 2MB capacity is sufficient. Looks like I'll be upgrading to the ItsyBitsy M4 Express which has the same footprint but a better MCU (as @umbral dagger pointed out) & 512K flash! I'll still have to be a little careful to keep things light-weight... but that extra capacity should allow the full project to move forward! Thanks again! Looking forward to sharing all the details in a week or two!

cerulean pawn
#

hi, I created a couple of new libraries for sensors our blip board https://docs.electronut.in/blip/ - https://github.com/electronut/Electronutlabs_CircuitPython_LTR329ALS01 and https://github.com/electronut/Electronutlabs_CircuitPython_LIS2DH12 is there any place these should be listed to make them more visible?

raven canopy
cerulean pawn
#

thanks @raven canopy

slender iron
#

@cerulean pawn what eink display does your board use?

cerulean pawn
#

@slender iron it's GDEW0154Z04

slender iron
#

ok, thanks! hope to get displayio working for eink soon

cerulean pawn
#

cool! I was trying some stuff a couple of weeks ago but didn't get it to a usable state

slender iron
#

ah, interesting that it does 2-bit black and white

#

I may ping you when I have something

cerulean pawn
#

sure

slender iron
#

I don't think I have a 2-bit display

cerulean pawn
#

maybe two 1-bit framebuffers in existing code can be used

#

they are sent separately

drowsy geyser
#

I have what's probably a dumb question. When I write a compiler, it emits a hardware-specific machine code file. How does CircuitPython work? Is there a hardware abstraction layer between the actual bare metal and the interpreter, or does the interpreter actually run on the bare metal and somehow manage the execution stack? <confused>

slender iron
#

ya, most tri-color einks have the dual memory ranges

#

@drowsy geyser circuitpython compiles to a bytecode that a big C switch runs

#

"vm"

idle owl
#

@vernal cosmos !!! Hi!

drowsy geyser
#

Hmmm, thanks @slender iron . I'm groveling around looking for the source to read, but things have changed quite a bit since I last built it....

#

Hi, @idle owl !!!

round lintel
#

Is the meeting now? I'm just lurking!

neat folio
#

in a few minutes

#

lurking is good ๐Ÿ˜ƒ

idle owl
#

@round lintel Thanks for joining us!

slender iron
#

@drowsy geyser w

#

what are you looking for?

inland tusk
#

@idle owl @slender iron I will be lurking because of a noisy environment.

neat folio
#

also lurking, because SQUIRREL!

solar whale
#

@drowsy geyser Nice to "see" you back online!

sterile bronze
#

just lurking

meager fog
#

๐Ÿ‘

cerulean pawn
#

thanks for this great tutorial on how to create a circuitpython library @slender iron is it normal to git push -f 20 times trying to get it to build?

neat folio
#

the "Big Brother Auto-Backup" feature ๐Ÿ˜‰

meager fog
#

@cerulean pawn are you havin' pylint issues?

cerulean pawn
#

@meager fog both pylint and sphinx, now all fixed

meager fog
#

@cerulean pawn pylint i run locally

cerulean pawn
#

installed stuff locally

meager fog
#

but it takes a few tries at first :/

#

it does get easier!

cerulean pawn
#

just installed the sphinx stuff too

meager fog
#

that helps a ton!

slender iron
#

@cerulean pawn it's ok to rely on travis but local is the easier way to do it

river quest
#

8/8/2019 is CircuitPython day!
Getting started programming microcontrollers with CircuitPython by NYC Resistor - August 3, 2019.
CircuitPython Day with the India Linux Users Group Delhi (ILUGD) at the Delhi Technical University for Women - August 4, 2019.

#

As hackers approached the dramatic stone entrance of Portlandโ€™s Pacific Northwest College of Arts, a group of acolytes belonging to The Church of Robotron beckoned them over, inviting them toโ€ฆ

slender iron
#

๐Ÿ˜„

river quest
neat folio
#

:badger:

river quest
#

oh, i'll make a badger emoji later

neat folio
#

yay!

#

if that's more work for someone, I could help

slender iron
#

@cerulean pawn are you lurking?

cerulean pawn
#

yeah

idle owl
#

@meager fog hug reports?

neat folio
#

kinda multi-tasking, but "dogpile" group hug for the whole wonderful community ๐Ÿ˜ƒ

cerulean pawn
#

a group hug from me too ๐Ÿ˜ƒ

gilded cradle
#

You're Welcome ๐Ÿ˜ƒ

errant grail
#

<lurking whilst landscaping>

prime flower
slender iron
#

๐ŸŽ‰

prime flower
#

๐ŸŽ‰

pastel panther
#

CONGRATS @solar whale! ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰

gilded cradle
#

Congrats ๐ŸŽ‰

tulip sleet
#

no longer talking to space

solar whale
#

Thanks all!

#

@tulip sleet leaving space to others as much as I can --

#

agreed!

slender iron
#

@solar whale you should reload

solar whale
#

hmm -- not hearing

marble hornet
#

In the weeds: AST and/or compile built-in

raven canopy
#

in drive-thru: can we reverse my thought? Link the README...yeah, what kattni just said.

#

Also, I mentioned it a couple weeks ago: config management tools like Ansible used in a pull system?

errant grail
#

If the issue is that the learning guide tool is not conducive to collaboration and freshness, why not change the learning guide tool?

#

There are quite a few learning guides that are out-of-date.

slender iron
#

@errant grail I've tried making an argument for having learn guide text in github in the past and didn't make much progress. can bring it up again

errant grail
#

Fundamentally, the learn guide process and tool are great for creation, but collaborative maintenance is broken. I suggest fixing it rather than adopting a new tool.

slender iron
#

@inland tusk you are a bit quiet

#

@errant grail what do you mean by broken?

errant grail
#

Simply doesn't stay fresh and doesn't allow collaboration to maintain, particularly when authors are no longer around.

slender iron
#

yup, I agree

raven canopy
#

eval substitute?

ruby atlas
#

(lacking context) but I find the whole learn system page style and navigation unintuitive. I'm always failing to see the next page button and see a list of pages. Also lately for some reason it always wants me to log in instead of showing me the content.

#

(this is a problem with how I perceive the content, not a problem with the content)

slender iron
#

the login may be because you are looking at unreleased stuff

ruby atlas
#

the login is happening when i google a guide (the easiest way to find them).

#

so whatever's indexed in google isn't necessarily the right page (rel=canonical problems?)

slender iron
#

hrm, weird

prime flower
#

@ruby atlas I'll let the learn dev team know, could you PM me some more info re: your browser info and possibly a URL?

tulip sleet
#

like, if you can reproduce it by pasting a link in an icognito window, that would be a good reproducible case

ruby atlas
#

hmm maybe it's because i have previously logged in because of AIO.

prime flower
#

Without getting into it, that shouldnt be a factor

ruby atlas
solar whale
#

Have a great week -- dog needs a walk ๐Ÿ‘‹

ruby atlas
#

So maybe it was a transient bug.

marble hornet
#

Python > English

prime flower
#

๐Ÿคท @ruby atlas if it happens again and you can repro, feel free to DM me and I'll pass it to learn dev

ruby atlas
#

Sure, i'll dump my cookies too.

#

And any other session details I can glean from chrome dev tools.

#

Oh, I am the person formerly by the nickname Roy (and realname). Finally realized I could change my nickname on here.

slender iron
#

๐Ÿ‘

silver tapir
#

@gilded cradle BTW, I have been meaning to offer this. I have Hifive Unleashed board with RISCV64 processors, and would like to add support for Blinka. Where would be a nice place to start?

#

This boards are quite pricy ($1k) and a bit rare. I offer this board to developers in Costa Rica and elsewhere who need access to one.
And I also use it to create the Slackware riscv port.
If anyone alse think they might need access to one, please let me know.

umbral dagger
#

Is there base64 encoding support somethere in CircuitPython. I found refrence to the mucropython lib in the RTD. Importing base64 or binascii fails.

silver tapir
#

It has a binascii.a2b_base64(data)

umbral dagger
#

@silver tapir That's what I was looking at... has it been ported, and, if so, where is it?

manic glacierBOT
silver tapir
#

I've just taken a quick look around the library bundle and it doesn't look like it's there.

umbral dagger
#

indeed

silver tapir
#

I'm running 4.1 beta. Let me check on older ones.

gilded cradle
#

Hi @silver tapir, to start with, you would need to get Adafruit_Python_PlatformDetect correctly detecting your board. We've had the best luck with Debian-based distributions of linux with this such as Armbian and Linaro.

silver tapir
#

@gilded cradle I'll put a Debian-riscv on it and try it, and let you know.

gilded cradle
#

Sounds good. ๐Ÿ˜ƒ

manic glacierBOT
silver tapir
#

@umbral dagger Same on 4.0 and 3.1.2.

tough flax
#

So, @tulip sleet and other who were watching the NRF board failing in Seattle - I just got the same error with a second board when trying to install 4.1.0-beta1

#

Hoping this one doesn't go haywire as well

#

And the file IS still located in that spot

tulip sleet
#

@tough flax is this on your own PC?

tough flax
#

Yep

#

I tried a second time and it gives me the same "Format Disk"error (not the could not find one)

tulip sleet
#

can you get to the REPL? If so erase the filesystem. If not, try the 52840 CPy eraser uf2 I dropped to you

tough flax
#

I can get to the repl

#

erase_filesystem() never returns, but I get a "you need to format the disk" error

#

If I reconnect to the REPL I'm back at the prompt

#

but still no filesystem

tulip sleet
#

erase_filesystem() should cause the board to reboot

tough flax
#

This is the second NRF52840 Express I've seen this with

tulip sleet
#

could you check this on a native mac or Linux system?

tough flax
#

Should I choose format?

#

Not easily - should I just ship it to you?

#

I have a pi I can use

tulip sleet
#

yes, try it on the pi. Try storage.erase_filesystem() on that and see if CIRCUITPY appears

tough flax
#

@tulip sleet

mount: wrong fs type, bad option, bad superblock on /dev/sda1,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
tulip sleet
#

is that after reformat? unplug and replug.

tough flax
#

I erased it, unplugged it from windows and plugged it into pi

#

when I tried to mount it that's what I got

#

in dmesg I get this:

[  310.439852] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x88888888)
[  310.439864] F2FS-fs (sda1): Can't find valid F2FS filesystem in 1th superblock
[  310.449495] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x88888888)
[  310.449507] F2FS-fs (sda1): Can't find valid F2FS filesystem in 2th superblock
[  310.449541] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x88888888)
[  310.449549] F2FS-fs (sda1): Can't find valid F2FS filesystem in 1th superblock
[  310.449557] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x88888888)
[  310.449564] F2FS-fs (sda1): Can't find valid F2FS filesystem in 2th superblock
tulip sleet
#

i thought it would try to mount automatically. plugging in my pi

tough flax
#

I have the REPL up from the pi

#

want me to erase again?

tulip sleet
#

yes, try that

tough flax
#

Same errors

#

I can try your eraser

#

But right now it's hosed

#

I can share my screen if you want to drive

tulip sleet
#

my eraser just does what storage.erase_filesystem() does

#

i'm just trying to get into my pi to see what happens when I plug in a working board

tough flax
#

On mine, it showed a new device /dev/sda and a partition /dev/sda1

#

when I went to mount /dev/sda1 it barfed

tulip sleet
#

you shouldnt' need to mount it manually, i thought

#

try plugging in some other board with a good CIRCUITPY and mounting in the same way

tough flax
#

Ok.. while I have it plugged in:

#
root@handraiser:/dev# fdisk /dev/sda

Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sda: 2 MiB, 2093568 bytes, 4089 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start   End Sectors Size Id Type
/dev/sda1           1  4088    4088   2M  1 FAT12
tulip sleet
#

that looks good

tough flax
#

I just attached an M4 Itsy

#

It didn't automount

#

but did mount when I told it to

tulip sleet
#

on mine it just mounted

pi@raspberrypi:~ $ df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/root       14808816 5138012   9005712  37% /
devtmpfs          469544       0    469544   0% /dev
tmpfs             474152       0    474152   0% /dev/shm
tmpfs             474152   12352    461800   3% /run
tmpfs               5120       4      5116   1% /run/lock
tmpfs             474152       0    474152   0% /sys/fs/cgroup
/dev/mmcblk0p1     43539   22683     20857  53% /boot
tmpfs              94828       0     94828   0% /run/user/1000
/dev/sda1           2024     260      1764  13% /media/pi/CIRCUITPY
tough flax
#

So, I copied both filesystems with dd

tulip sleet
#

did the new board work for a while and then just stop?

tough flax
#

hexdump of the m4 looks like this:

root@handraiser:~# hexdump m4dump  | head
0000000 feeb 4d90 4453 534f 2e35 0030 0202 0001
0000010 0001 f802 f80f 0006 003f 00ff 0001 0000
0000020 0000 0000 0080 3729 2100 4e28 204f 414e
0000030 454d 2020 2020 4146 2054 2020 2020 0000
0000040 0000 0000 0000 0000 0000 0000 0000 0000
*
00001f0 0000 0000 0000 0000 0000 0000 0000 aa55
0000200 fff8 ffff ffff ffff ffff ffff a009 0b00
0000210 00c0 efff 0f00 fff0 2011 1301 fff0 6fff
0000220 ff01 018f ffff 1bff fff0 efff 1f01 fff0
#

hexdump of the NRF looks like this:

root@handraiser:~# hexdump nrfdump  | head
0000000 8888 8888 8888 8888 8888 8888 8888 8888
*
0176770 8888 8888 8888 8888 ffff ffff ffff ffff
0176780 ffff ffff ffff ffff ffff ffff ffff ffff
*
0176800 8888 8888 8888 8888 8888 8888 8888 8888
*
0176f70 8888 8888 8888 8888 ffff ffff ffff ffff
0176f80 ffff ffff ffff ffff ffff ffff ffff ffff

#

it's corrupted

#

The NRF52 worked until I tried to load beta1

#

Just like the one in Seattle

tulip sleet
#

could you try to put 4.0.1 or 4.0.2 back on the BOOT drive and then reformat and see if it's better?

tough flax
#

I can try that

#

What exact one's most likely to work?

#

Weird

tulip sleet
#

either 4.0.1 or 4.0.2 neither has the speedups, which is what I'd be suspicious of

tough flax
#

On Linux when I reboot to bootloader mode, I get no sda1 partition

#

Should I reflash on Windows?

#

Or should I mount /dev/sda?

tulip sleet
#

yes, try on windows. there's something odd about your pi that it's not automoutning. There are too many mount options to debug if you have to mount by hand

tough flax
#

WEIRD - I can mount /dev/sda

#

with no partition

tulip sleet
#

it's just how the partition table is set up

tough flax
#

it's a raw disk?

tulip sleet
#

automount on mine

 /dev/sda            3965     959      3006  25% /media/pi/FTHR840BOOT
tough flax
#

This Pi has been used - it's not clean... it's what I have

tulip sleet
#

try sudo apt install usbmount

#

that is supposed to set up automounting of usb drives

tough flax
#

I don't mind the automount, @tulip sleet

#

It's one less automatic thing

tulip sleet
#

np if you're willing to type

tough flax
#

I've lived in linux many years ๐Ÿ˜ƒ

#

Now I get no REPL

#

I flashed it with 4.0.2

#

Now I have a corrupted drive and no REPL access... which is exactly where we were in Seattle

#

And this is just what I did

#

installed Beta1 - then when it failed, installed 4.0.2

#

Installing 4.0.2 did not change the corrupted drive (identical)

#

but I didn't get to do an erase

tulip sleet
#

I'll try the same on one of my '840 feathers, but I have been doing lots of development with a recent master, and it's been OK. I may ask you to send it, but if I brick it and can then unbrick, I'll let you know how

#

sorry about this, it's mysterious

tough flax
#

Can you send that eraser again

#

?

tough flax
#

Make sure you try to copy it from Windows 10

tulip sleet
#

Yes, I'll need to fire up my laptop

tough flax
#

I have a feeling that it's something like Win10 closing the drive before it's done copying

tulip sleet
#

I have seen that strange error about the source file disappearing before. I thought it was in the forums, but I can't find it right nwo

tough flax
#

Eraser did nothing

#

I have a brick

tulip sleet
#

we have to go out fairly soon, so I'll try this later tonight

tough flax
#

Yes, I might just pop it in the mail

#

it is useless to me

#

I am not hurting

#

I have other projects

tulip sleet
#

was this a new one from the factory? I have two recent ones I can try this on. Give me a few days before you mail it, because maybe I can recover it if I can duplicate it

tough flax
#

You can pop it in a debugger

#

Yes

#

Let me get you a date

tulip sleet
#

what antivirus are you running on Windows, anything besides the standard MS-supplied one?

tough flax
#

Just defender

tulip sleet
#

and are you using AIDA64 or Hard Drive Sentinel?

#

my guess is that your machine is fairly clean

tough flax
#

No, just stock windows

#

So... I have one way to unstick it

#

I can use dd to copy the M4 version ๐Ÿ˜ƒ

#

back on to the partition

#

But that will probably invalidate this for any kind of research into what's wrong

tulip sleet
#

oh, wow, that's great! But I think it may indicate it's not a flash chip problem, but perhaps a timing problem in the beta build. I don't know why that would screw up the 4.0.x loads after it's corrupted, though.

#

I'm using the beta change that speeds things up in my test versions, so not sure that's the problem.

#

ok, gotta sign off for now

tough flax
#

That dd copy did not work... :-(
It placed it at an odd place... take a look at where the magic number (feeb) starts

root@handraiser:~# hexdump nrfErase2dump
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
0177770 ffff ffff ffff ffff feeb cd98 ccdb dbcf
0177780 aebd 88b8 8a8a 8889 8889 f88a f88f 888e
0177790 88bf 88ff 8889 8888 8888 8888 8888 bfa9
01777a0 a988 cea8 a8cf c9ce cdcd a8a8 a8a8 c9ce
01777b0 a8dc a8a8 a8a8 8888 8888 8888 8888 8888
01777c0 8888 8888 8888 8888 8888 8888 8888 8888
*
0177800 ffff ffff ffff ffff ffff ffff ffff ffff
#

I'm headed to dinner

silver tapir
#

@gilded cradle Ok. I had to deal with Debian a bit and build missing packages, but I now have python3 and pip.

#

python3 setup.py build, builds without error. And pip3 installed the module as well. I just rant the example code:

#

python3 test.py

Chip id: None
Board id: None
Pi 3B+? False
BBB? False
Orange Pi PC? False
generic Linux PC? False

#

I'm getting a venv ready to start playing. Git fork also ready and updated.

#

One of the files mentioned in the README says:
cat /proc/device-tree/compatible ; echo
sifive,fu540gsifive,fu500

#

The other one:
cat /proc/cpuinfo
hart : 1
isa : rv64imafdc
mmu : sv39
uarch : sifive,rocket0

(repeated until hart :3. And yes, they counter starts at 1, not a 0)

manic glacierBOT
lone sandalBOT
tulip sleet
#

@raven canopy hi - I'm trying to remember if I filed an issue about not adding beta library releases to the bundle -- I can't find one. I was going to document how we figured out how to do that. Or did you fix this already? Not sure where I should file it. Tnx

cerulean pawn
#

for my nrf52840 board,I'm trying to build circuitpython to use the UART instead of USB CDC port, so I compiled it with NO_USB = 1 (and had to disable the #elif !defined(NRF52840_XXAA) flag in supervisor/serial.c file), doesn't seem to be coming up.

raven canopy
#

@tulip sleet just got home after airline woes (was supposed to be home last night). I don't see any related issues; I would say circuitpython-build-tools would be the best repo for one. I do recall the topic...maybe an in-the-weeds? I do not recall handling it though. I've gotta run out in a bit, but we can chat about it later if you want.

manic glacierBOT
idle owl
#

@slender iron what version of the arm toolchain are you using for building CP right now

slender iron
#

7.3.1 I think

idle owl
#

Yah I'm looking at that but wasn't sure if we were on a specific version or something

#

I'm running 7.2.1

slender iron
#

the command there installs a specific version

#
๎‚ฑ arm-none-eabi-gcc --version                                                                                                              Tue Jul  9 09:54:52 2019
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
idle owl
#

@slender iron I'm getting an error trying to make -C mpy-cross. The board I'm about to add is a Trinket analog if that matters. Do I need mpy-cross?

slender iron
#

what is the error?

idle owl
#
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
GEN build/genhdr/moduledefs.h
QSTR updated
make: msgfmt: No such file or directory
make: *** [build/genhdr/en_US.mo] Error 1```
slender iron
#

you need gettext for msgfmt

idle owl
#

brew install gettext?

slender iron
#

look in the instructions there is an install and link needed

idle owl
#

oh ok. sorry. I must not have done this on this machine yet. I thought I had done all of that already.

slender iron
#

the instructions may have changed since you did it

#

you can run them again without a problem

idle owl
#

doing that now.

slender iron
#

๐Ÿ‘

#

@granite crow is your PR ready for merge?

drowsy geyser
#

@slender iron and @idle owl I'm on a Mac now, but I have a very high-end Linux machine (System76). I'm thinking the toolchain will be simpler on Linux.... Thoughts?

granite crow
#

It does

#

Yes, it does

slender iron
#

k, awesome @granite crow

#

@drowsy geyser I think they are equally simple. the high end box will likely be faster thoug

granite crow
#

Np @slender iron , thanks for the patience ๐Ÿ˜ฌ

slender iron
#

no problem! will review now

drowsy geyser
#

Thanks. Trying to re-establish my workflow. ๐Ÿ˜ƒ

idle owl
#

@slender iron do you do the thing with creating a case sensitive disk image to store the source code?

slender iron
#

yes, definitely

#

on my new laptop I put all my repos in a case sensitive image

idle owl
#

hmm. ok

#

if this is for CircuitPythons specifically, about how big should it be?

#

And presumably I need to delete the clone I made locally and clone it directly into the image once created?

slender iron
#

my original one for cp only was 10G

#

and, ya, I'd reclone

idle owl
#

GUID is ok?

slender iron
#

not sure what you are asking

idle owl
#

Partition map type

#

MBR, GUID or APFS I think

#

are the options

slender iron
#

ya, sure

idle owl
#

ok

slender iron
idle owl
#

yah I'm there already

#

created it, but wasn't sure if CP needed something specific other than case-sensitive

slender iron
#

nope

manic glacierBOT
cerulean pawn
#

Oh wow, getting ili9163 to work with displayio was easy, it just worked

#

is there a way to check board.SPI() clock speed?

meager fog
#

@umbral dagger hiya hows the halloween countdown going

silver tapir
#

@gilded cradle So, the dev env is ready for playing with Platform detector.

meager fog
#

@umbral dagger hihi

umbral dagger
#

@meager fog hey

silver tapir
#

Any particular past patch set to look at, or any guide on what to add next.

meager fog
#

@umbral dagger did you get to look at halloween countdown stuff today

#

@umbral dagger do ya have what you need

silver tapir
#

I'm not really sure where do I get some of the codes that I see in the code...

umbral dagger
#

I think so. It's coming alomg

meager fog
#

@umbral dagger oki for the graphics, did you make something?

#

or did you need more

umbral dagger
#

I can work with what Phil linked me to

gilded cradle
#

So is it detecting the platform right now? The identifier in /proc/device-tree/compatible sounds promising" That's what I used for one of the boards I did.

silver tapir
#

Yeah. the code is running, and it detects Linux as platform.

gilded cradle
#

But is it detecting your board and chip?

silver tapir
#

('Chip id: ', None)
('Board id: ', None)

gilded cradle
#

Ok, so you'll need to get those being detected. First the chip, then the board.

silver tapir
#

Ok. On it, let me see if I can get it...

gilded cradle
#

๐Ÿ˜ƒ

silver tapir
#

Not sure what I'm doing wrong here. I'm testing the library with repl.

detector.check_dt_compatible_value("sifive,fu540gsifive,fu500")
False
detector.check_dt_compatible_value("fu540gsifive,fu500")
False

#

No wait, got it.

gilded cradle
#

Cool

#

So, now that the chip is being detected, you can just add a conditional that if it's that chip, then we know it's that board.

silver tapir
gilded cradle
#

yes, I believe so, but I think the same thing will need to be in a few other files.

#

Nevermind the few other files, that will be in the next phase.

silver tapir
#

ok, on it.

#

Ok.
python test.py
('Chip id: ', 'HFU540')
('Board id: ', 'SIFIVEHFUA00')

#

@gilded cradle Not sure what I'm missing for detecting the board family.

#

Or, where do I get the info for _MYBOARDS_IDS = {}, or if I should have one...

gilded cradle
#

You would create a board ID for your board along with all the others. You could call is something like HIFIVE_UNLEASHED

#

Then you could add it to something like _HIFIVE_BOARDS_IDS incase there are other Hifive boards that get added to Blinka.

#

then you would create a property at the bottom like any_hifive_board(self) that's similar to the others.

silver tapir
#

I thing I have that.

#

Where should I paste a bit of code? Here, private msg, pastebin?

simple pulsar
#

Are there any known issues with audioio two channel playback having problems keeping the two channels in sync? I've got some drift between them somehow.

gilded cradle
#

@silver tapir, you could submit a PR and I can review it. If it's not quite right, you can just push additional changes.

manic glacierBOT
silver tapir
gilded cradle
#

Ok, taking a look

silver tapir
#

Thanks a lot.

#

Patching...

silver tapir
#

@gilded cradle Ok, travis ready. Just a small reply about the chip id.

#

This, still doesn't work btw.
print("Sifive? ", detector.board.SIFIVE)

gilded cradle
#

Ok, let me look

silver tapir
#

And not sure if I should click "resolve conversation"...

gilded cradle
#

Did you try the other one I suggested?

silver tapir
#

Tried this versions:
if self.detector.check_dt_compatible_value("fu500"): # Works
if self.detector.check_dt_compatible_value("sifive,fu540gsifive"): # Does not
if self.detector.check_dt_compatible_value("sifive"): # Works
if self.detector.check_dt_compatible_value("sifive,fu540gsifive,fu500"): # Does not

#

The full text from /proc is "sifive,fu540gsifive,fu500"

gilded cradle
#

if self.detector.check_dt_compatible_value("fu540gsifive"):

silver tapir
#

Still false.

#

"None" i mean.

gilded cradle
#

Ok, then I guess we'll leave it for now. Hopefully there isn't another board with that string in it or we'll maybe need to revisit.

silver tapir
#

I'm working on the Slackware port, so as soon as there is another riscv64 board, I'll hope I'll get it.

#

Or at least access to developers who do. I'll re-test.

gilded cradle
#

Ok. Can you try print("Sifive? ", detector.board.SIFIVE_UNLEASHED)

#

Also, it would be good to push you changes to the test file

silver tapir
#

Yeap, now it True.

gilded cradle
#

๐Ÿ˜ƒ

silver tapir
#

Test file only or readme as well?

gilded cradle
#

Test file only is fine. I haven't been updating readme

silver tapir
#

It rare hw so it's ok.

gilded cradle
#

Yeah

#

It's kind of like unit testing though so you make sure you don't break other boards.

silver tapir
#

Ok, test file ready.

gilded cradle
silver tapir
#

Sure thing. Thanks for the help.

gilded cradle
#

You're welcome. Thanks for adding this. We love having boards added.

silver tapir
#

@gilded cradle, For tomorrow, libgpiod 1.1.1 compiled, and just to check blinka also builds.

/opt/gpio/bin/gpiodetect

gpiochip0 [10060000.gpio] (16 lines)

There's no more output.

#

Same for git master and next branches of libgpio

marble hornet
#

I made a python file with (i'm pretty sure)all the html colors as 24bit hex. module for cp, circuitpyhon_displayio_html_colors? does this sound like a thing we'd want?

#

ex: gray_cloud = GrayCloud = 0xb6b6b4 gray_goose = GrayGoose = 0xd1d0ce platinum = Platinum = 0xe5e4e2 metallic_silver = MetallicSilver = 0xbcc6cc blue_gray = BlueGray = 0x98afc7 light_slate_gray = LightSlateGray = 0x6d7b8d slate_gray = SlateGray = 0x657383 jet_gray = JetGray = 0x616d7e mist_blue = MistBlue = 0x646d7e marble_blue = MarbleBlue = 0x566d7e slate_blue = SlateBlue = 0x737ca1 steel_blue = SteelBlue = 0x4863a0 blue_jay = BlueJay = 0x2b547e dark_slate_blue = DarkSlateBlue = 0x2b3856 midnight_blue = MidnightBlue = 0x151b54 navy_blue = NavyBlue = 0x000080 blue_whale = BlueWhale = 0x342d7e lapis_blue = LapisBlue = 0x15317e denim_dark_blue = DenimDarkBlue = 0x151b8d earth_blue = EarthBlue = 0x0000a0 cobalt_blue = CobaltBlue = 0x0020c2 blueberry_blue = BlueberryBlue = 0x0041c2 sapphire_blue = SapphireBlue = 0x2554c7

slender iron
#

@marble hornet would be good for the community bundle!

lethal abyss
#

@idle owl I had some crash using pybadger show_qr_code.
So I rerfreshed my repository and tried to launch examples/pybadger_simpletest.py and ended up with the same error.


pybadger = PyBadger()

pybadger.show_badge(name_string="Blinka", hello_scale=2, my_name_is_scale=2, name_scale=3)

while True:
    pybadger.auto_dim_display(delay=10)
    if pybadger.button.a:
        pybadger.show_business_card(image_name="Blinka.bmp", name_string="Blinka", name_scale=2,
                                    email_string_one="blinka@", email_string_two="adafruit.com")
    elif pybadger.button.b:
        pybadger.show_qr_code(data="https://circuitpython.org")
    elif pybadger.button.start:
        pybadger.show_badge(name_string="Blinka", hello_scale=2, my_name_is_scale=2, name_scale=3)

I'll stick to my image QRcode show for the rest of EuroPython, no problem.
But I wanted to warn you

lethal abyss
#

20 minutes later, no idea what I broke in my build chain but I just removed the .mpy I built and added a pure copy of the library source file and it works.
I'll figure out later what happen

manic glacierBOT
#

I've put CircuitPython on a PyGamer. My understanding is the audioio libraries nowadays put the output at the midpoint 32768 (3.3V/2) by default.

From REPL on 4.1.0-beta.1 I'm running

import board
import audioio
dacs = audioio.AudioOut(board.A0, right_channel=board.A1)

As the third command runs both outputs jump to around 1.65V as expected. They then drift slowly (perhaps 5 seconds) to A0=0.03V and A1=2.46V - drift is almost linear but there is a slight jump.

Other...

marble hornet
#

@slender iron ๐Ÿ‘

marble hornet
prime flower
#

oh, neat @marble hornet

lethal abyss
#

I took some time to update my pygamer with the latest learn guide about pybadger
https://learn.adafruit.com/pybadger-event-badge/prepare-your-pybadge

But there is no adafruit_pybadger.mpy in the library bundle linked on circuitpython.org
https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/download/20190709/adafruit-circuitpython-bundle-4.x-mpy-20190709.zip

Adafruit Learning System

Create a CircuitPython powered event badge with PyBadger, PyBadge and PyGamer!

prime flower
#

It hasn't been added to the bundle yet

marble hornet
#

@prime flower thank you! But i can't take too much credit. i wrote a python script to write it for me ๐Ÿ˜…

lethal abyss
#

thanks @prime flower I wanted to point the issue as the learn guide is published and point to the lib bundle.
I'm not stucked as I'm using my own local version ๐Ÿ˜‰

minor plume
#

I'm glad I'm not the only one who tripped over the pybadger not being part of the library bundle yet.:-D

#

Also, sorry for missing the CircuitPython weekly chat this week. ๐Ÿ˜ฆ I'm moving into a new roie at work and getting ready to move from CA to AZ in September, so things are a bit hectic right now.

meager fog
#

@marble hornet heya thats handy, can you add it to the contributor bundle?

#

we could add support for it into turtle (to match CPython)

minor plume
#

I'm having some trouble with the sample code from the pybadger learn guide on my PyGamer. I get errors when I press the buttons. Busy day at work today, but I'll see if I can run down what's going on at lunchtime if I get a break.

#

Initial badge display is fine, but the call to pybadger.show_business_card tells me "Unexpected keyword argument 'name_string')" and the call to pybadger.show_qr_code is producing the error:

File: "adafruit_miniqr.py", line 531, in put
TypeError: can't convert 'int' object to str implicitly

Since I don't have time to dig into this right now, just wanted to flag what I'm seeing in case someone else wants to look at it before I have time to come back to it.

manic glacierBOT
marble hornet
meager fog
#

yes

slender iron
manic glacierBOT
#

I appear to have made some data which despite being even in length (4930 samples = 2465*2) when passed to audio.RawSample with channel_count=2 and then sent to output with play() with loop=True it will play but the A0/A1 will not stay synchronised and drift around. At 100kHz playback it takes 60 seconds to return to being very briefly in sync.

Code is rather large because it contains the data as a list, see https://github.com/kevinjwalters/circuitpython-examples/blob/master/pygamer...

gilded cradle
#

@silver tapir try /opt/gpio/bin/gpioinfo

manic glacierBOT
silver tapir
#

Much better.
gpiochip0 - 16 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed "?" output active-low [used]
line 11: unnamed "spi2.0 cd" input active-high [used]
line 12: unnamed unused output active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high

idle owl
#

@lethal abyss Thanks for catching that! I got caught up with other things and forgot to get it into the bundle. I'll do that today.

lethal abyss
#

@idle owl that's ok because I knew how to solve my issue

idle owl
#

@lethal abyss I meant to do it anyway, it needs to be there. So thank you for reminding me regardless. ๐Ÿ˜ƒ

cerulean pawn
#

@slender iron does it make sense for microSD as external flash filesystem? or is only non-removable storage preferred or something?

slender iron
#

it'd be nice if it was managed by the supervisor. I'd hesitate to use it as CIRCUITPY itself since it is removable

cerulean pawn
#

okay

#

browsing circuitpython source, figuring out what goes where at the moment, I'd like to add PWM audio out for nrf port

main meteor
#

Is it going to have a coin acceptor or is that just a clever graphic?

#

Or place for a coin cell? ๐Ÿ˜ƒ

lavish sundial
#

does circuitpython support interrupts?

cerulean pawn
#

it's will be a real coin slot, some coin will go through for sure

silver tapir
#

@gilded cradle I'm happy with gpioinfo. I was being pessimist and thinking I'd have to code upstream.

#

Please let me know what could be the next step.

gilded cradle
#

The next step is to create a microcontroller which is just the chip. There's plenty of examples there. Since you only have 1 GPIO controller, it's pretty easy. For instance look at the allwinner_h3. The number you pass to Pin is the libgpiod line number. Also if you create any blank folders, be sure to copy over an empty init.py file or PyPI won't install it.

manic glacierBOT
slender iron
#

@lavish sundial not from python, no

silver tapir
#

@gilded cradle That would be where, in blinka 's code? Or still in the Adafruit platform detect lib?

gilded cradle
silver tapir
#

Ok, I'll look into it.

#

Thanks again.

meager fog
#

@cerulean pawn its on our list - chat with @onyx hinge

#

if you work together perhaps it will go easier ๐Ÿ˜ƒ

#

but yes having PWM output for 'audioio' would be great - it can use 8bit pwm (or 16 if the pwm is fast enough)

#

and then we just need to RC filter it

cerulean pawn
#

thanks @meager fog, will talk to them. Saw some gh issues for same just now

idle owl
#

@slender iron Did you have to do anything special to get your Hovercam to work? Mine's not showing up at all.

slender iron
#

is the screen working? I think you need to turn on the usb side

idle owl
#

Screen is working

#

Oh, ok

#

I see what you mean

#

thank you

onyx hinge
#

@cerulean pawn @meager fog Yes, tannewt has asked me to look into the adding pwm audio to the nrf port. I have not been able to put much time into it now, I have basically just gotten my dev environment up for the nrf boards, and tested a speaker on the existing PWM function. The idea is to be compatible with the current analog audio interface, so that code will work from the samd boards with just a change of pin designator, but there may also be limits on the bit resolution of the audio that are more restrictive than the samd port.

prime flower
celest zenith
#

I think you need a blank line before the :param

prime flower
#

@celest zenith sphinx doesn't care about that it seems...

celest zenith
#

Hmm. adding blank lines before the first :param line worked for me -- also had to add blank lines after the .. code-block directives

prime flower
#

@celest zenith Ok, I added those and still hit the same indentation level error thru sphinx.. weird

raven canopy
#

@prime flower i have a feeling that's related to the docstring being inside the __init__ special method. .. automodule doesn't render special methods by default, so the parser may not recognize that its inside the init and thinks that the indentation is wrong...

most of the __init__ docstrings i've seen are at the class level...

prime flower
#

@raven canopy Is there an alternative?

#

i.e: > most of the init docstrings i've seen are at the class level...

raven canopy
#

other than using :special-members:, not that i know of really. other than manually typing out all members with :members: foo, bar, __init__ (which i'm not even sure would work with dunders)

prime flower
#

@raven canopy I originally had it at the class-level, though

#

I tried moving it to init, same issue.

raven canopy
#

and it still gave the error? (didn't roll through the Travis history)

prime flower
#

yep!

#

cant figure out this sphinx error, preventing me from PR'ing :grr:

raven canopy
#

๐Ÿค” i'll take another look then... ๐Ÿ˜†

#

oh wait... its specifically for MQTT.connect(). der. ๐Ÿคฆ

#
    def connect(self, clean_session=True):
        """Initiates connection with the MQTT Broker.
        :param bool clean_session: Establishes a persistent session
            with the broker. Defaults to a non-persistent session.
        """

should be

    def connect(self, clean_session=True):
        """Initiates connection with the MQTT Broker.
        :param bool clean_session: Establishes a persistent session
                                   with the broker. Defaults to a 
                                   non-persistent session.
        """

subsequent lines need to indent past the :

#

oof. that looks horrible here in discord.

prime flower
#

doesn't it indent pas the : ?

raven canopy
#

needs to be past the second/closing :

prime flower
#

even with all the indents past the : I'm still hitting that..

#

maybe the code blocks?

raven canopy
#

the same line is complaining?

prime flower
#

got it passin! thanks @raven canopy and @celest zenith

atomic beacon
#

Does anyone know the max size and speed of the micro SD card for the M0 adalogger?

marble hornet
#

@slender iron is that ur cat?

lone sandalBOT
slender iron
#

@marble hornet was there something on AAE? my parents came so I missed it

marble hornet
#

Yes, A hand snap activated, cat toy servo running off a cpx, to me the video sounded like you speaking.

slender iron
#

ah, nope. not me. will need to watch it though

#

my kitties are mostly white. search #pet-photos for pics

manic glacierBOT
cerulean pawn
#

@onyx hinge do you have that test code somewhere online?

marble hornet
#

Tannewt: AWE, very cute!๐Ÿฑ

onyx hinge
#

@cerulean pawn I don't have any code to post yet. So far, I played pure tones using pulseio PWMOut, so I at least knew the speaker and op-amp were working.

#

@cerulean pawn basically, ```>>> import pulseio

from board import *
p = pulseio.PWMOut(D0, variable_frequency=True)
p.duty_cycle = 1000
p.frequency = 440
p.frequency = 523
p.duty_cycle = 0

lime trellis
#

One out of every ~20 or so SAMD51 does this when flashing the UF2 bootloader from AS7 (Pulsing green indicator LED and solid red neopixel). Reflashing doesn't fix it. Has anyone else encountered this?

tulip sleet
#

@lime trellis photo is an ESP32, I think? Not sure what you meant.

#

is it on the bottom of the board?

#

ok, I see it's the SAM32. Does the BOOT drive show up

slender iron
#

circuitpython pulses green after code.py finishes

meager fog
#

@umbral dagger hiya please take a sped-up GIF of the halloween countdown

#

@umbral dagger or you can have noe + pedro do it for you

#

but right now needs a little more demo of what they're building

umbral dagger
#

To capture the background changing and the count decreasing? Do you want the final days then the "Happy Halloween" screen?

meager fog
#

just the countdown part

#

doesnt need to be the final part

#

or at least, the background-changing part

lime trellis
#

@danh sorry for the confusion. Yes SAMD51 on back side. Does not ever reach BOOT drive. Windows notifies of USB error.

umbral dagger
#

@meager fog Ok, I can fake the timing to speed it up.

tulip sleet
#

@lime trellis check the fuse settings from AS7, but I have no other first-line suggestions

#

is it fast or slow red led pulse?

lime trellis
#

@tulip sleet I'll take another pass through the fuses, bootprot looked fine. Red RGB is constant.

tulip sleet
#

fast means the UF2 bootloader is not seeing a USB connection (can simulate this by hooking it up to a USB power supply or use a charge-only cable)

#

so i'd check the soldering on the connector, etc

lime trellis
#

Ooo ok that's a good thing to try. Do you happen to have any tricks or routines to revive bricked samd chips?

tulip sleet
#

if you can get to SWD, then you're home free: can set fuses manually. Also SAMD51 has a bit to set that bypasses the BOOTPROT setting

umbral dagger
#

@meager fog I put it in as the thumb image

lime trellis
#

@tulip sleet that's just it, as far as I can tell I'm in SWD. I can read device id and set user page no problem. I'll look more into your comment about the USB port after doing power only test. Thank you for your insight!

manic glacierBOT
idle owl
#

@slender iron when you have a minute, I have a couple of general questions about the files used to add a board to CP

slender iron
#

@idle owl I have time now. want to hop in voice chat?

idle owl
#

@slender iron sure.

slender iron
slender iron
sly falcon
#

@idle owl do you have a minute to chat sometime today or tomorrow?

idle owl
#

@sly falcon I can make time. Today might be better as tomorrow I'm heading out in the afternoon for the weekend.

#

Afternoon ET.

sly falcon
#

ok....

#

I have time now, if you're free

idle owl
#

Sure. Audio/video/text?

sly falcon
#

text...I tried setting up my audio and well...I think I have to tear apart my computer to find out why the connector isn't working ๐Ÿ˜‰

#

pops over to private chat

idle owl
#

@slender iron is microcontroller.pins also considered a "module" ?

slender iron
#

yup

idle owl
#

thanks

#

@slender iron ok for the most basic changes needed: rename the board in mpconfigboard.h... where do the following things get changed if needed? ```

  • verify that your chip variant matches (mpconfigboard.mk or .h or both?)
  • verify that the spi flash configuration matches (same?)
  • verify that the crystal configuration matches? (don't see that anywhere)
slender iron
#

@idle owl 1) both 2) .h for spi pins and .mk for specifying the chip 3) #define BOARD_HAS_CRYSTAL 1 in .h

#

for 3 see metro_m0

idle owl
#

ah I don't see it because I'm looking at a Trinket variant. right. ok. Thanks

slender iron
#

ya, it's a weird one where it's only there if it is present

marble hornet
#

@slender iron : can i, again, ask why Groups have a set length?

slender iron
#

I did it originally to prevent allocations during actual rendering

#

I agree it'd be good to remove though

#

it's also way simpler to implement

marble hornet
#

Does python code not cease progression during a refresh?

#

If so that is so cool!

manic glacierBOT
#
  • Add BLE central functionality to Service, Characteristic, and CharacteristicBuffer. Add new native classes CentralandScanner`.
  • Deleted remnants of Device code (was combined central and peripheral).
  • Remove AddressType. Now it's just an integer. Address changed correspondingly.
  • Deleted AdvertisementData. BLE Advertisement data is now constructed in Python, in adafruit_ble.advertising.
  • Broadcaster removed as a separate class for beacons to avoid a lot of dupl...
buoyant coral
#

Hi all! Quick Q re: audiobusio on Itsy Bitsy M4 Express. It seems the module is not available. When running import audiobusio in main.py I get Traceback (most recent call last): File "main.py", line 1, in <module> ImportError: no module named 'audiobusio'. I am attempting to use audiobusio.I2SOut. Thoughts about what I might be doing wrong?

Adafruit CircuitPython 4.0.2 on 2019-06-27; Adafruit ItsyBitsy M4 Express with samd51g19
>>> help("modules")
__main__          collections       math              storage
_os               digitalio         microcontroller   struct
_pixelbuf         displayio         micropython       supervisor
_time             errno             neopixel_write    sys
analogio          fontio            os                terminalio
array             frequencyio       pulseio           time
audioio           gamepad           random            usb_hid
bitbangio         gc                re                usb_midi
board             i2cslave          rotaryio
builtins          io                rtc
busio             json              samd
buoyant coral
slender iron
#

@buoyant coral I don't believe the smallest samd chips have i2s support

#

looks

#

yup, it's missing from the 48 pin versions like the itsy bitsy has

buoyant coral
#

Nutz. So yeah I just received 2x Itsy Bitsy M4 Express boards which apparently feature samd51g19 which lacks I2S as that data sheet shows. Is there another Itsy Bitsy Express board that has a SAMD chip with I2S support and 512k+ RAM? I may need to use an Itsy Bitsy M4 Express & an Itsy Bitsy M0 Express in tandem.
Might go the analog route via A0 & A1. Thoughts on an amp module (e.g. https://www.adafruit.com/product/2130) for those analog signals? Space is limited for this project. Looks like the pins emit voltages similar to those found in typical line level audio applications. My only concern is whether the amplifier module mentioned above can work with that analog audio signal with an odd DC offset.

tulip sleet
#

@buoyant coral can you fit a Feather M4 in the space? That has I2S.

main meteor
#

You could also AC couple the signals if your application doesn't require response down to DC, then you could remove the offset.

buoyant coral
#

Hey @tulip sleet! Good idea! It would probably fit. I might just do that. I think I may even have one at the ready in a box somewhere. My only concern with the Feather is supplying regulated power via the battery pin. Most microcontroller board choose between a VIN pin and the USB connector. The Feather platform differs in that one can only power it via the USB connector or the BAT pin (which has a charge controller in-line). If my calcs are correct, it could be powered via that BAT pin if the supply voltage is regulated at about 4.2V (allowing power to pass into the microcontroller, but eliminating the risk of the charge controller attempting to send voltage back the power supply if a USB cable is also connected).

#

@main meteor I'm not familiar with that approach. Since this discussion is moving further away from CircuitPython, perhaps we could discuss further in #help-with-audio? The application only requires a single speaker.

tulip sleet
buoyant coral
wooden lichen
#

Have you guys heard of the new esp32-S2 chip?

#

It is going to have build-in usb, hopefully it can support mass storage flashing so it can finally have circuitpython

quasi fjord
#

somebody in here is eagerly awaiting being able to get their hands on one to start porting. I don't remember names though

stuck elbow
#

it's going to take a while, and I'm afraid od them buthering the usb standard

#

the current beta silicon still doesn't include the usb bits

wooden lichen
#

Isn't it included, or is the software ready yet?

tulip sleet
#

we were told the silicon doesn't support it (maybe it's buggy; I don't know)

main meteor
#

I'm eyeing it, but I'm currently pretty pleased with the AirLift concept, which divides up the functionality nicely so I don't have to worry about networking with the same CPU that's running my main code.

stuck elbow
#

so here's my presentation from EuroPython:

manic glacierBOT
#

I'm in the middle of some application programming at the moment but will have a look when I get to end of that.

I've also discovered another problem with dacs.play(something, loop=True) ceasing output and possibly leaving output on the last sample in something. I thought it was time based but it's not, sometimes it's 20 seconds, sometimes over a 100, sometimes seems to run ok "forever". It's very unclear what the trigger is for cessation of looping! The code in question was just doing ...

lethal abyss
#

@stuck elbow I really I wish to stay more days and applause you for all the fun you bring to EuroPython this year.
having unplanned training sessions with perfect strangers was one of my favorite moments! ๐Ÿ’ž

stuck elbow
#

I'm glad to hear that

meager fog
#

please try re-uploading?

umbral dagger
#

@meager fog @twin mica got it fixed it seems

wooden lichen
#

@main meteor There are some very nice options available with just an esp32 for example pip install and the esp32 can currently have 8MB PSRAM what can also be increased to 16MB

#

You can do some real extra stuff with that amount of ram

solar whale
#

@tulip sleet starting to play with BLE PR's the UART/Eddystone/peripheral examples seem to work -- I'm not sure how to use the central demo.

#

@tulip sleet ah -- got it -- using 2 nrf52840s they are talking!

#

now I can start playing ๐Ÿ˜‰

sudden coral
#

are there particularly recommended ways to profile a circuitpython application beyond spam-printing gc.mem_free and gc.mem_alloc? I'm imagining something like cprofile (except not deprecated lol) but really anything to give insight as to where/why memory is allocated would be awesome

#

I suppose I could also scan through sys.modules and do a sizeof on everything I find but that seems... brute force and inaccurate

#

the root issue I suppose: converted a bunch of heavy .py files to .mpy files and noticed very little difference in mem_free() (though a huge decrease in startup time, which was great), which is telling me freezing stuff in is possibly not going to help me as much as I need.

stuck elbow
#

any memory analyzis is going to be inaccurate, because python doesn't really have a concept of memory ownership, so you never know who actually holds it

sudden coral
#

even rough guesses are fine by me (which is really all cprofile gives me on desktop cpython)

stuck elbow
#

if you call gc.mem_free(1) you get a memory map with types of objects marked

#

and you can enable debugging to enable the stack analysis module

sudden coral
#

gc.mem_free(1) gives me a TypeError, takes no positional args

#

I'll look into enabling debugging though

#

ahhh looks like I want micropython.mem_info([verbose]) -- edit: this doesn't exist on m4

stuck elbow
#

aah, sorry, I might have confused cp and mp

#

sorry

raven canopy
sudden coral
#

<wrong>looks like that functionality is pretty unmaintained, I get a gnarly build failure when forcing that to be enabled</wrong>

#

nvm I should consider make clean every once in a while, the fix for most qstr issues

wooden lichen
#

What editor do you guys use for circuitpython?

solar whale
#

I use nano but I never edit code on the device. I edit locally on my computer then copy to the device and sync the file system.

sudden coral
#

really any editor will do - micro/circuitpython don't have tight integrations with most editors. Mu is I believe a common beginner's recommendation, otherwise pick your fav (vim/emacs/vscode/sublime/whatever)

solar whale
#

If you edit on the device, the editor must handle writes properly.

onyx hinge
#

I have a particle xenon flashed with circuitpython. How do I get it to go back to uf2 mass storage bootloader mode? or am I better off just using nrfjprog to program it?

#

I tried holding the other physical button and poking reset but that didn't seem to do anything

solar whale
#

Double tap the reset button

onyx hinge
#

that should give me a breathing red led when I do it, right?

solar whale
#

Not sure about led bout should mount The NRFBOOT drive . Not sure of exact name.

onyx hinge
#

OK. I've been trying that and I only ever see CIRCUITPY, never *BOOT

solar whale
#

Tap faster

#

Or slower

#

About .5 sec apart

wooden lichen
#

Yeah mu is the best editor because it knows the libraries.

#

Just don't like the editor itself

#

Looks like it's made for people with bad eyesight

onyx hinge
#
>>> microcontroller.reset()
``` isn't getting me to the bootloader either.  weird.
#

(though, I know there have been problems there in the past; I think this is a micropython module that may not be seeing much testing in circuitpython)

slender iron
#

@sudden coral did you see my stream about memory debugging?

sudden coral
#

I did not!

slender iron
ruby lake
#

climbs back up out of the Tk/python rabbit hole for a bit.

timber mango
#

Hi. I suppose that it is not 100% a circuitpython issue, but I think it is the closer to refer it here. I have a trinket m0 that it was working until yesterday (programmable and interacting with led/button). Today circuitpy did not appear and mu said there was no device connected. I reset it, red led appears and remains red. Tried on a second m0 I have and I had the same. Same when I used another usb cable. Do you know what could it mean?

meager fog
#

sounds like a bad usb cable/port

#

maybe shut down computer, wait a bit, then use another port

timber mango
#

I checked two other usb ports and a third usb cable, but the same. Probably I should find another pc to check. Thank you!

meager fog
#

weird!

timber mango
#

I read about kaspersky and norton possible issues in troubleshooting section. I have eset and I am wondering if it is something similar. I will find a pc without eset to check it.

manic glacierBOT
buoyant coral
#

PHP developer here. Really enjoying learning more about Python & CircuitPython! Aside from creating a PR (since I'm a Python noob), what is the preferred way to request CircuitPython features?

  1. Hoping to propose a small revision to CircuitPython's json.dumps so it supports pretty-printing of JSON strings (perhaps by default?).
  2. Hoping to propose a port of https://pyyaml.org/wiki/PyYAML.
    I'd love to help. Still a Python noob, though.
slender iron
#

@buoyant coral I'm happy to help you contribute! for ideas an issue is the place to start. code is always welcome via pr

#

pyyaml may be doable as python code

indigo wedge
#

Are there any examples for using esp32spi as a http server? ๐Ÿ™‚

#

Seems it would be perfect to serve files from the file system and add some dynamic data or set settings over it

tulip sleet
#

@solar whale re two 52840โ€™s. Yes, this is exactly how I was developing and testing. One time with the current code I got a hard fault, but was unable to reproduce it. It was when attempting to connect from client with bad argument and then doing something else like trying to write. Not able to reproduce. But the demo code in the library ran for five hours with no problems before I stopped it.

snow cedar
#

Anyone worked with adafruit_cursorcontrol ? I'm trying to get running on a PyGamer and it's initing and erroring coming back with File "<stdin>", line 1, in <module>
File "adafruit_cursorcontrol/cursorcontrol.py", line 81, in init
File "adafruit_cursorcontrol/cursorcontrol.py", line 240, in generate_cursor

stuck elbow
#

it got cut off, can you paste the whole exception?

snow cedar
#

code.py output:
Traceback (most recent call last):
File "code.py", line 14, in <module>
File "adafruit_cursorcontrol/cursorcontrol.py", line 81, in init
File "adafruit_cursorcontrol/cursorcontrol.py", line 240, in generate_cursor
TypeError: unsupported bitmap type

stuck elbow
#

how did you load that image?

snow cedar
#

I didn't load any image...

#

mouse_cursor = Cursor(display, display_group=splash)

#

is line 14, asking the library to run with its defaults

stuck elbow
#

where does it get the image from?

snow cedar
#

It generates a default image in memory and loads it.

#

This is why it is strange.

raven canopy
#

@snow cedar can you file an issue on the repo? i think its a bug related to the last change to that file. looks like line 81 should be updated to be self.generate_cursor(self.cursor_bitmap)

snow cedar
#

Will do...

raven canopy
#

thanks!

manic glacierBOT
snow cedar
#

Just tested that fix @raven canopy and it looks good

onyx hinge
#

Whee, I have all the stubs written for nrf audioout, and have started working on sharing code with pwmout for allocating, initializing, and releasing pwm channels. It looks like audio will have to have its very own PWM channel, so it will take away 4 PWMs for 1 or 2 audio channels. I also spotted a few bugs, which I've noted in my own log and will file as issues if I don't fix them.

meager fog
#

@onyx hinge nice

#

@indigo wedge there's a PR ๐Ÿ˜ƒ

onyx hinge
#

I will need to re-scale samples in a different way than DAC-based audio out. Say you have a 8kHz sample to play. You will end up reprogramming the PWM for a "top" of 2000. This means you have to rescale the individual samples by (8000/32768) before using them as the raw PWM value.

#

At least, I didn't see anywhere else this is being done now

meager fog
#

in general, no

#

people tend to pick the fasts PWM they can get

#

then they update the timer every 8 khz

#

if it were possible, the best way is PDM not PWM

#

but i dont know that any chips have a pdm out periph

onyx hinge
#

I don't see any sign of PDM in the nrf manual (I thought that too)

#

they have a PDM input only

meager fog
#

yeah its ok

#

so i sorta think maybe best to do it the classic way - dont change the frequency, just duty

#

unless you want to use the time for both

#

which will save u a timer but then yeah you need to set it up when playing

onyx hinge
#

Do you think there's something better to do than set the PWM "top" to give 1 PWM cycle = 1 audio sample? Sounds like you are.

#

For instance, set it for a "top" of 400, and do a temporal-resample too?

meager fog
#

no i think thats peachy

#

just make sure you're at least a decade above the sample rate

#

also, we can tweak if one way isnt workin'

onyx hinge
#

16MHz / 2000 = 8kHz. Are by "decade above" are you saying 16MHz / 200 = 80kHz, and repeat each sample 10 times?

#

(the hardware can repeat a sample an integer number of times)

#

but then you've gone from a ~10 bit PWM to a ~8 bit PWM, so the fidelity will suffer

#

(16MHz is the highest counting rate available for PWM on nrf)

meager fog
#

really? its a 64mhz chip ๐Ÿ™„

#

you'd think they'd give you at least 32mhz for the pwm

#

yeah you need the pwm rate to be 10x the sample rate

#

so 80khz

#

otherwise you cant filter well

#

so yeah do 8 bit

#

there's no PLL's or anythin?

onyx hinge
#

choices are 16MHz down to 125kHz

indigo wedge
#

@meager fog that's a-freaking-mazing, thanks! ๐Ÿ˜„

meager fog
#

@onyx hinge i guess thats whatcha got

#

@indigo wedge please try it and suggest anything to the submitter, i wont have time to test it out

indigo wedge
#

will do for sure, and I see there's a AP mode PR too, just what I needed

onyx hinge
#

Thanks, I'll code it so that it will find an integer sample repetition factor that gives an underlying waveform that repeats at around 80kHz, even if that means a smaller resolution (e.g. 8-bit equivalent)

#

so for 8kHz original sample, it might literally be 80kHz and 200 (7.xxx bits resolution)

meager fog
#

@indigo wedge yes i asked them to split the two. they should work just fine but...again, untested. please check and suggest. the PRs looked at least 90% there

#

@onyx hinge id recommend, if it doesnt glitch, just set it to max speed (16mhz) and 8 bit, and then set up the DMA to feed it the duty cycle values at whatever rate audioio wants

#

if its 22khz it wont sound great, but thats not our problem ๐Ÿ˜ƒ

#

and there may be situations where thats desirable (say if you can connect a hi quality filter)

onyx hinge
#

@meager fog got it.

#

bbl

meager fog
#

like, the PWM should be free-running

#

i havent actually used this periph but im guessing based on similar ones ๐Ÿ˜ƒ

#

mostly this should get you going ASAP. until you listen w/ears or look on a scope, hard to really gauge ๐Ÿ˜ƒ

onyx hinge
#

I also don't see how I can retrieve the PWM value currently being output. I can ignore it for now, but it may make for an unavoidable audio pop at shutdown, because the PWM duty cycle can't be ramped from whatever it was at .stop() to the "quiescent" value. (If I play to the end of a buffer, I would know the last sample in the buffer, however). This is something I should note and work on later, not get bogged down by.

manic glacierBOT
#

Hoping to propose a small revision to CircuitPython's json.dumps so it supports pretty-printing of JSON strings. It seems ujson.dumps supports two additional formatting arguments: json.dumps(parsed, indent=4, sort_keys=True) (https://stackoverflow.com/a/12944035/6763539).
Some may want this pretty-print functionality, while others may find it unnecessary. Given how Python supports import of specific module functions, perhaps there should be json.dump & a json.dumps where `json.dump...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
past tangle
#

Hey gang, so super green question here but: whatโ€™s a VIN in relation to my m0 express featherboard? The sharp sensor Iโ€™m looking to use says this for the connections: โ€œThe square pad is ground, middle is VIN, and the remaining pad is output. โ€œ โ€” Iโ€™m completely clueless, my searches just show stuff about servos or stuff that mentions this but doesnโ€™t actually tell me what VIN is/stands for/what on my board is the same as VIN. I assume itโ€™s something power related, hopefully my 3v, but thatโ€™s me guesstimating. Yโ€™all have any insight here?

raven canopy
#

@past tangle VIN is Voltage In, which is the power supply line that provides power to the sensor. so you'd connect the Feather's 3V pin to VIN.

manic glacierBOT
past tangle
#

@raven canopy awesome, thanks for the speedy reply! Iโ€™m a little gun shy as I start hooking everything up and donโ€™t care to risk frying my board or components just yet ๐Ÿ˜… thanks!

raven canopy
#

no worries. we all started that way. ๐Ÿ˜„

#

well, i know i did.

onyx hinge
#

How frequently does run_background_tasks() get called, when things are operating properly?

raven canopy
#

i've been under the impression that it runs at every cycle of the VM loop...

onyx hinge
#

that's going to be a lot more often than once per 2ms, then?

raven canopy
#

looking at it again now. there is a flag so that it doesn't run until the "last" run is complete...

onyx hinge
#

Yes, I see that part too

#

and also some scattered places where it's called explicitly, presumably because they run a long time without returning to Python code.

#

What's on my mind is the sizing of the audio buffer for nrf pwm audio

#

which I think we've established will be the original audio sample, resampled to 8 bits at a sample rate of 62.5kHz -- but each sample still takes 2 or maybe even 4 uint16_ts to store, so the converted audio storage feels like a lot of RAM

indigo wedge
graceful heart
#

I also assumed PIL wouldn't work, but that would be amazing if it could ๐Ÿ˜ฎ

#

maybe certain modules are OK?

green rock
#

I was playing with that yesterday and that's the conclusion that I came to.

graceful heart
#

@green rock that it doesn't work at all or that certain modules are ok?

green rock
#

That CP doesn't have any of PIL.

graceful heart
#

๐Ÿ˜ฆ but expected.

granite crow
#

Greets yall, I'm pretty new to Travis and everything CI related, do you have any preferred tutorial on it, or can I get started by reading the docs?

raven canopy
granite crow
#

Thanks @raven canopy gus

onyx hinge
#

The other day I reported problems accessing the uf2 bootloader on a particle xenon. Update: When I use arduino to flash the bootloader, it works (I can reach it by the normal double-click on the reset button, boot filesystem label FTHR840BOOT). When I use 'make sd' in circuitpython, I can't access the uf2 bootloader.

#

however, resetting to uf2 from microcontroller.on_next_reset still doesn't work

graceful heart
#

Has anyone ever had a circuit python device claim to show up as a 'network device' when plugged into mac os usb?

#

It appears the serial monitor and repl isn't working correctly in Mu editor

#

looks like its showing up as /dev/cu.usbmodem14201

#

I have a ESP32 co processor attached... but I haven't started seeing this until recently.

onyx hinge
#

@graceful heart sounds like the "serial device" that lets you access the python terminal is being interpreted as an old fashioned dial-up modem. I dunno if that is typical for macs or not. I wouldn't have expected it to change just because you added the ESP32 co-processor, it should depend on how circuitpython identifies itself to the OS

graceful heart
#

The itsy bitsy LED starts green and then after a few seconds turns to white, which as I understand, means it has went into REPL mode? This is also when the OS pops up asking me to configure it as a network device.

green rock
#

Mine shows up as usbmodem, but it's always been tty.usbmodem.

graceful heart
#

ok..... I just restarted my mac. It still popped up looking like a network device, but now Mu is able to communicate with it now.

#

it used to think it was a keyboard lol.

green rock
#

๐Ÿ˜† Getting closer... maybe?

graceful heart
#

maybe! lol

onyx hinge
#
    enum { DFU_MAGIC_SERIAL = 0x4e };

    NRF_POWER->GPREGRET = DFU_MAGIC_SERIAL;
    reset_cpu();
}
``` hm, it's supposed to be resetting to DFU (if you take this at face value) but that doesn't seem to happen either.
#
#define DFU_MAGIC_UF2_RESET             0x57
``` from uf2 bootloader source
#

but it's not appearing as a "serial dfu" device either, it just boots right into circuitpython...

scarlet maple
#

At least for my PyPortal, the usbmodemNNNNN device shows up any time itโ€™s plugged in to the Mac. Addressable with screen, and I assume thatโ€™s the device Mu talks to, too. Have seen other screenshots of similar devices showing up in network preferences.

onyx hinge
#

using 0x57 doesn't make any difference

stuck elbow
#

back home

manic glacierBOT
#

This makes microcontroller.on_next_reset(RunMode.BOOTLOADER) work as documented.

Testing performed: flashed on a Particle Xenon with the Feather nRF52840 express bootloader installed, the sequence

import microcontroller
microcontroller.on_next_reset(microcontroller.RunMode.BOOTLOADER)
microcontroller.reset()

causes the CIRCUITPYTHON device to disappear and be replaced by the NRF840BOOT device. Just doing microcontroller.reset() works as before, as does double-reset.

manic glacierBOT
manic glacierBOT
onyx hinge
#

looks like my scaling must have been wrong, and it clipped...

#

or maybe it's playing outside the intended bounds of the sample

tulip sleet
#

Nevertheless, it goes up and down ใ€ฐ

onyx hinge
#

yup, it's less than I'd hoped for this weekend, but it's still real progress. Time to head out to sunday family dinner.

#

(also I think I spotted that it's a pointer arithmetic problem, so for half the time it's DMA'ing at the wrong addresses)

graceful heart
#

Hi Everyone! I've been working on this PR to add some lightweight web-server functionality to the ESP32spi library, and I think its getting to a good enough point for review. I would really appreciate any feedback! <@&356864093652516868> .

https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI/pull/59/files

Thanks!

GitHub

This is still a work in progress, but opening it up for early feedback and suggestions.

Adds Server creation methods to esp32spi.py

Instantiates a server on the esp32 on the specified port and a ...

raven canopy
#

@graceful heart i added the circuitpython librarians team to the reviewers for ya. also, i'm looking, but don't expect much from me. ๐Ÿ˜„

indigo wedge
#

On first glance it looks awesome, see you added the event handling and serving files ๐Ÿ˜ƒ

#

First thing that is noticeable is the mixing of single and double new lines, but I have a bit OCD thing about consistency that doesn't really affect code functionality.

graceful heart
#

oh yeah, I totally get that ahaha. I think most of the repo is in double quotes, I can make sure and clean that up.

#

thanks @raven canopy

#

ohhh, I think I misinterpreted you . @indigo wedge . Do you mean having extra empty lines between pieces of code, like inside a function body? I sometimes will do that to logically separate out pieces of 'grouped' code, but I can clean that up to follow whatever the convention is.

indigo wedge
#

I meant like in adafruit_esp32spi_server.py it seems a bit arbitrary which functions are separated by single new line and which by a double, but it really doesn't matter ๐Ÿ˜…

#

This will be awesome to have a AP web server to setup initial wifi credentials, thanks so much for all your work ๐Ÿ˜ƒ

graceful heart
#

Thanks, I'm happy to help, it's been a lot of fun ๐Ÿ˜„ When combined with AP mode, I think it will be really useful for making web apps to control your board that you can load on your mobile phone, wherever you want.

marble hornet
#

i'm defining an api and am curious about what is the most intuitive way to set padding around a page.

or
app.page_padding(top, bottom) and app.page_padding(top, bottom, left, right)
or
only one of the above options w/ 4 options
#

did i explain my question clearly?

onyx hinge
#

@marble hornet There's whatever css does, I'd interpret varying numbers of arguments same as css

manic glacierBOT
#

I have begun work on this in a branch in my personal repository, but nothing's ready for integration yet.

nrf's pwm module has some limitations:

  • 16MHz max count rate (A top value of 256 (255?) gives 62.5kHz)
  • Each PWM value can be repeated an integer number of full PWM cycles
  • When AudioOut device is constructed, will claim an entire PWM instance, like a variable-frequency PWM does (normally, can support 4 pins)

There are two general approaches to adapting an arbitrary sample ...

marble hornet
#

@onyx hinge , thank you! i like it alot

slender iron
#

<@&356864093652516868> Community meeting is tomorrow at 11am Pacific / 2pm Eastern here in the CircuitPython voice and text channels. Everyone is welcome to join. Notes doc for the meeting is here: https://docs.google.com/document/d/1bG6hLq6jgBDLLFRSbaL0Z8TfaXGL2n4fAD0KdO27kPY/edit?usp=sharing

manic glacierBOT
cerulean pawn
#

@onyx hinge any way I could help you with the pwm audio stuff right now?

manic glacierBOT
fierce rapids
#

Where should product hardware assembly bug reports go?

stuck elbow
#

probably the forum?

tulip sleet
#

@fierce rapids That's good, or as feedback on the guide. But more people see it in the forums, and you can see feedback about your feedback.

manic glacierBOT
sly falcon
#

Thanks for the merge, @idle owl! ๐Ÿ˜

idle owl
#

@sly falcon Thanks for slogging through that!

sly falcon
#

Haha....my pleasure! I did find a few things I'd like to tighten up in the next week or two...but work is super busy right now, so I'll be missing today's meeting again

round lintel
#

Lurking!!

idle owl
#

@round lintel Thanks for letting us know!

sterile bronze
#

just lurking

graceful heart
#

also lurking!

turbid radish
#

Lurking here

river quest
#

CircuitPython takes flight - Using CircuitPython on High Altitude Balloons - Why choose CircuitPython? Matt writes -

"We had been programming it in C up till this launch, but with myself graduating next semester along with the Computer Engineer on our team it we needed to find a way to allow for ease of maintenance. When I found you guys had libs for the radio and GPS we decided to try that out. The radio portion worked fantastic."

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

Together as a community, we reached over 13,000+ humans thank you! We share projects, coordinate events, make new friends, build open-source together like CircuitPython, weโ€™ve worked really hโ€ฆ

errant grail
#

Lurking/listening while landscaping today. I'm finding dirt underneath the sod. And there's lots of it!

solar whale
#

makerdiary - dongle and pca10059

#

tested BLE on these

turbid radish
#

Thank you for your hard work Deshipu at EuroPython!

inland tusk
#

could you give us a link to the two podcasts you were on?

turbid radish
#

Yes, Kudos to Bill Binko, nice pinout diagrams coming

#

Hope all is ok Charles

raven canopy
#

@tulip sleet did you see my comment on the Bundle PR for skipping bundling beta releases?

stuck elbow
tulip sleet
#

@raven canopy - not yet; I may have deleted the email by accident. will go look

idle owl
#

@tulip sleet Can you mute?

tulip sleet
#

oops

solar whale
#

@idle owl I hope its vacation!

#

๐Ÿ˜ฆ

#

๐Ÿ‘

pastel panther
#

LET THE KODEZ BE FREEEE

solar whale
#

Have a great week all -- have to run ๐Ÿ‘‹

raven canopy
#

back to work for me... :eeyore:

lunar crown
#

@slender iron I opened an issue yesterday on adafruit_si5351.py and ladyada asked me to submit pull request with fix. I have new branch with fixes, but am getting authentication failure. How do I get authenticated to publish new branch for pull-request?

slender iron
#

@lunar crown push to a branch on your own github fork

#

and pr from there

lunar crown
#

OK

idle owl
#

@tulip sleet in mpconfigboard.mk, there's CHIP_VARIANT and CHIP_FAMILY. Ignoring anything but SAMD for now, what is CHIP_FAMILY? Is it samd## for all the SAMD chips?

tulip sleet
#

@idle owl we only support samd21 and samd51, so yes CHIP_FAMILY is one of those two. Then the CHIP_VARIANT is the specific chip (which will have varying pins, and also sometimes varying features (like no I2S on the small '51 chips)

idle owl
#

Ok.

#

Thanks.

#

@slender iron What's the difference between USB_VID and USB_PID, and aren't we providing one of them?