#circuitpython-dev

1 messages · Page 255 of 1

onyx hinge
#

@simple pulsar @slender iron mentioned that to me. My personal setup doesn't have an analog filter, I can't speak for what will be on the circuit playground ble

raven canopy
#

audiosource.RawSample and audiosource.WavFile? Mixer doesn't quite fit there, does it? 😄

onyx hinge
#

@cerulean pawn I do know the speeds can be off a little bit, I prepared a small table that showed the frequency errors I expected . https://github.com/adafruit/circuitpython/pull/2000/files#diff-91d90d4c5b3b63bdcbfca203d293a5d0R48 claims that a 22025Hz sample would end up being played at 22038.5Hz (assuming the accuracy of the 16MHz underlying clock of the PWM)

GitHub

This implements AudioOut, with known caveats:

pause/resume are not implemented (this is difficult)
at best, the sample fidelity is 8 bits (this is an inherent hardware limitation)
the way the modu...

simple pulsar
#

The Atmegatron uses analogue circuitry in the form of a steep 3rd order Chebyshev filter to maintain the high end, while still filtering off the modulation frequency. https://soulsbysynths.com/atmegatron/

raven canopy
slender iron
#

@raven canopy I like audiosource. I've been thinking about a synthio to handle envelopes and such too

raven canopy
#

hehe. conversely, i also like audiocore, because including Mixer makes more sense that way vice audiosource. (Mixer doesn't seem like a "true" source to me...since it has source children.)

ionic elk
#

@slender iron if you're picking up stm32s, just want to emphasize again how nice the DIS_F412 is! QSPI Flash, 1.5" touchscreen TFT, I2S audio codec, microphone, built in debug. We should be able to test most CPy features on it.

slender iron
#

@ionic elk I already ordered but added to my cart for next time

manic glacierBOT
#

I actually laid out a number of different names for this. The justification I had for this name is that it's the appearance of the board as a drive when plugged in, and follows the naming convention for the Nucleo boards, which also appear as NUCLEO_FXXXX. Plus it's the fastest to type. But some other 'standard' options are:

  • 32F412DISCOVERY (ST Manual)
  • STM32F412DISC (micropython)
  • STM32F412G-DISCO (schematics)
  • stm32f412zg_discovery
    Let me know if you're set on the last one or if ...
manic glacierBOT
#

I got this to hang twice, but only after running for hours. Getting permission to post code here.
@tannewt note where it's hanging: I'll examine more variables but want to post this now before it gets lost.

Backtrace:

Program received signal SIGTRAP, Trace/breakpoint trap.
shared_dma_transfer (peripheral=0x43000000, buffer_out=<optimized out>, dest=<optimized out>, src=src@entry=0x0, 
    buffer_in=<optimized out>, buffer_in@entry=0x0, length=<optimized out>, tx=<optimized out>, t...
onyx hinge
#

I'm back if there's more to be said about audio.

swift arrow
#

I keep getting the following error..

#

OSError: timeout waiting for v2 card

#

thesd card is a 64 GB card formatted fat32

#

ohya.. using CP 4.1.0 RC1

#

doing the cardsneed to be formatted for 512 sectors?

meager fog
#

dev, dont forget its on its own SPI port

swift arrow
#

I;m using the sample code for it I thought.

#

argh...

#

the example should work right? or are you saying I need to set some special pins @meager fog

meager fog
#

there's code at the bottom of the pinout page

#

use that

swift arrow
#

right that is what I am using

#

is 64GB just too big?

#

I used that because it is what I have laying around

meager fog
#

64gb might be xsd

#

use 2-32gb formatted with SDformatter

tulip sleet
#

@slender iron I have reproduced https://github.com/adafruit/circuitpython/issues/2005 but only after several hours of running. Adding stacktrace info to the issue, it looks like a DMA issue. unfortunately we've lost a lot of the variables due to <optimized out>, but I got the contents of the DMA descriptors. If you have time to look and want any other values, I can retrieve them. I'll do another build with optimization turned off and run it overnight again.

swift arrow
#

I found a 32GB SDHC card andused SDformatter.. same issue

meager fog
#

dev, you could try it in arduino

manic glacierBOT
#
(gdb) p peripheral
$19 = (void *) 0x43000000
(gdb) p *(Sercom*) peripheral
$20 = {I2CM = {CTRLA = {bit = {SWRST = 0, ENABLE = 1, MODE = 3, RUNSTDBY = 0, PINOUT = 0, SDAHOLD = 0, MEXTTOEN = 0, 
        SEXTTOEN = 0, SPEED = 0, SCLSM = 0, INACTOUT = 0, LOWTOUTEN = 0}, reg = 131086}, CTRLB = {bit = {SMEN = 0, 
        QCEN = 0, CMD = 2, ACKACT = 0}, reg = 131072}, CTRLC = {bit = {DATA32B = 0}, reg = 0}, BAUD = {bit = {
        BAUD = 0, BAUDLOW = 0, HSBAUD = 0, HSBAUDLOW = 0}, reg = 0...
slender iron
#

@tulip sleet I don't have the brainspace to context switch now

tulip sleet
#

np, I'll run it again with better debuggin on.

slender iron
#

kk

signal root
#

Are you using an open source library for the FAT in Circuit Python?

tulip sleet
#

used by MicroPython and by CircuitPython

manic glacierBOT
manic glacierBOT
#
  • some API rename e.g tud_hid_generic_report --> simply tud_hid_report
  • more callbacks for msc scsi Test Unit Ready, Start Stop Unit
  • usb descriptor is not get using callback instead of struct variable for better dynamic support
uint8_t const * tud_descriptor_device_cb(void);
uint8_t const * tud_descriptor_configuration_cb(uint8_t index);
uint16_t const* tud_descriptor_string_cb(uint8_t index);
uint8_t const * tud_hid_descriptor_report_cb(void);

@hierophect once this ...

sand lotus
#

Oh wait, I guess I should have asked this in the help with section.

manic glacierBOT
pastel panther
#

@prime flower, @graceful heart let me know when you guys chat about the WSGI lib

prime flower
#

@pastel panther np! @graceful heart would you be available sometime this next week to chat?

graceful heart
#

Yeah, maybe we could set a time some time to meet and chat about it?

pastel panther
#

sounds good to me

graceful heart
#

In the evenings I can

#

During the day I have day job haha.

prime flower
#

What timezone are you in @graceful heart ?

graceful heart
#

East coast

pastel panther
#

I'm on the west cost but I'm generally available whenever

prime flower
#

@graceful heart Are you available to chat between 6PM and 7PM EST tomorrow? I could do later too.

graceful heart
#

Yes, tomorrow or today would work at those times

prime flower
#

@graceful heart Tomorrow works better for me, I have a meeting during that time today. Thanks for the PRs, they're incredible.

graceful heart
#

Great! @pastel panther does that time work for you? And of course, happy to contribute :)

pastel panther
#

yup, works great!

#

great work @graceful heart 😃

stuck elbow
#

I just learned that someone made a game jame game for PewPew! https://www.epicgamejam.com/games/game-ego

Epic Game Jam

The Game of Life with a difference: There is a player!
Simply absorb all other life in the universe and become the ultimate being.
A game for the PewPew emulator. The link is to a version than runs in browser. You may need to click the 'Run' button.
Use the arrow keys to move...

manic glacierBOT
#

The values might have been in registers or sometimes on the stack, but at the point in the code where the values are no longer needed, the compiler will reuse those locations, so they are not preserved and would get overwritten for other uses. I'd have to look at the machine code to see if they're accidentally still available. But I can usually go back in the stack and see what was passed down.

#
ruby atlas
#

Resumed work on _pixelbuf to harmonize it's API with pypixelbuf. Naturally I have a crash on CPX that I don't have on the Metro M4. I guess I should grab a Metro M0 and a 10-pixel neopixel strip 😃

#

(which undoubtedly won't crash)

#

(ooh i think i fixed my crash!)

upbeat plover
#

FROZEN_MPY_DIRS += $(TOP)/frozen/feather_m4
i used this in my board.mk but it will not mpy all stuff in folders "adafruit_seesaw" and "adafruit_bus_device" only the "init.py" is being frozen

#

is there another way to use the "FROZEN_MPY_DIRS"?

manic glacierBOT
#

length is probably fine, 0x400 appears in BTCNT.reg and sounds plausible.

I'm wondering if https://github.com/adafruit/circuitpython/issues/1992 could be related to this in some way? I'd imagine the circuitpython interpreter has little interest in the 16bit values and yet they have a profound effect on triggering the bug. Stranger still, I believe when it happens a "fix" is to append a single extra 16bit value. It's very visual on x-y oscilloscope output as the looping image starts p...

upbeat plover
#

@slender iron did something change with frozen libs?

slender iron
#

@upbeat plover not that I know of

onyx hinge
#

@slender iron was the winning suggestion audiocore?

#

I have an existing clone which is giving me this error. I am at the tip of origin/master. Can someone tell me the recovery procedure? ```$ git submodule update --init --recursive .
error: no such remote ref 1dabc2df8ed1acaf0c483b58d757ba72e8b42090
Fetched in submodule path 'lib/tinyusb/hw/mcu/st/stm32lib', but it did not contain 1dabc2df8ed1acaf0c483b58d757ba72e8b42090. Direct fetching of that commit failed.
Failed to recurse into submodule path 'lib/tinyusb'

slender iron
#

@onyx hinge core is fine with me. try git submodule sync too

onyx hinge
#

@dry vortex thanks, submodule sync was it. Will file away..

slender iron
#

great!

manic glacierBOT
slender iron
#

it syncs the .gitmodules file to the .git/ copy

manic glacierBOT
onyx hinge
#

OK, yay, the renaming wasn't as hard as I thought. Testing performed: build and check everything imports on a metro m4 express. Pushed, will PR it later this evening as its own thing.

manic glacierBOT
onyx hinge
#

hmph, failures on travis. sparkfun_lumidrive, pca10056, feather_nrf52840_express -- maybe all the nrf boards?

#

and feather_radiofruit_zigbee

#

and maybe that whole clan

#

well, I see the problem, don't care to stay up late enough to see the outcome on travis

tulip sleet
#

@upbeat plover the frozen module logic expects a repo at each directory. It may not work if the modules are too deeply nested. Try to imitate the directory structure of an existing board with frozen modules

signal root
#

What lib is used for the USB flash storage on M0/M4 chips?

tulip sleet
#

@signal root you asked the same question last night, I thought? Are you asking a different question?

signal root
#

Does oofatfs include the mass storage component?

#

Or just the file system component?

#

When I say mass storage the USB to SPI bridge?

tulip sleet
#

it's the filesystem part; the SPI or QSPI (or internal flash) part is implemented by our own code in CircuitPython. Are you looking for an Arduino solution? See this brand new library: https://github.com/adafruit/Adafruit_TinyUSB_Arduino which includes USB mass storage support

#

that uses the SDFat library underneath

signal root
#

Noice :)

I'm writing my own javascript platform, wanted to take cues from micro/ciruitpython

#

I flashed micropython on to the m4 saved a file and used arduino_spiflash to load it 😃

#

I'm binding arduino calls to in the JS

tulip sleet
#

see circuitpython/supervisor/shared for common code, and then see the supervisor code in each port/ we support for the device specific code

signal root
#

So that TinyUSB may be perfect

tulip sleet
#

ok! It's brand new, so let us know if you have issues

signal root
#

I mean this is pretty exciting if you can build your own platform with a couple of arduino libs

tulip sleet
#

yup! supporting USB storage on Arduino is a great thing

#

i've gotta sleep, but check later if you have questions.

signal root
#

Thanks @tulip sleet

tulip sleet
#

yw!

signal root
#

I'm using platformio and I don't think the platform has USB Stack enabled

signal root
#

got it building 😃

#

Got a filesystem saving to SPI! Boom! I am super shocked at how quick I've got everything up and running!

manic glacierBOT
manic glacierBOT
#

When nrf pwm audio is introduced, it will be called audiopwmio. To enable code sharing with the existing (dac-based) audioio, factor the sample and mixer types to audiocore.

INCOMPATIBLE CHANGE: Now, Mixer, RawSample and WaveFile must be imported from audiocore, not audioio.

Testing performed: On a metro m4 express, I imported both modules and (without a speaker attached) played a RawSample out the A0 pin

exotic pumice
#

so happy rn

stuck elbow
#

what does this mean?

exotic pumice
#

it means I got microchip to fix their stupid bad datasheet that destroyed me

#

two 9s

main meteor
#

I remember some of the "which is reality" traffic, congrats! 🎊

exotic pumice
#

thanks

#

this is the perfect ending to my ridiculous story

#

I remember showing it to people and them not seeing it either, which is the scariest part lol

#

so glad it's fixed

#

I guess most people use atmel studio or arduino or whatever so it's not that big an issue

#

but it's egregious if you're writing your own hal

#

I wanna frame this darn datasheet

main meteor
#

Your efforts will save a bunch of people a bunch of head scratching, time and frustration.

exotic pumice
#

thank you sir

#

I made a new hashtag, #MakeMicrochipDatasheetsGreatAgain

#

😛 😂

main meteor
#

Bad datasheets are part of why I punted Microchip PIC for Atmel AVR back in the day (Microchip has improved since, which is good since they also absorbed Atmel).

exotic pumice
#

yeah I guess it was atmel that had the good ones

#

but they're atmel now so ¯_(ツ)_/¯

#

maybe the hashtag should say atmel but too late

#

or maybe I'm playing on the irony that america is about as great as microchip

#

who knows

main meteor
#

Back in the PIC days, there were two programmer protocols, one semi-documented, one proprietary. I couldn't afford the Microchip programmer, so I bought the Warp13 one instead. I didn't use DOS, so I used the open source command line tools. Then new chips came out and the Warp13 didn't have enough memory to support both protocols, so it then only supported the undocumented proprietary one 😠 so I could no longer use it if I wanted to work with the newer chips. That's when I surveyed the microcontroller landscape and settled on AVR, with it's wonderful inexpensive STK-500 programmer/dev board, fully documented specs and protocols, and wide open source support.

#

Now with CircuitPython, I don't need to deal with programmers, protocols, or any of that. I can program a CircuitPython board with pretty much anything that supports a standard USB serial port.

stuck elbow
#

the microcontroller landscape has really improved as well

#

pretty much nobody uses the undocumented and closed-source ones anymore

main meteor
#

Even TI learned their lesson.

stuck elbow
#

I'm looking forward to seeing what RISC-V does

main meteor
#

I'm still cherishing the forlorn hope that there will be open source FPGA support for other than legacy chips.

#

The Arduino people said they'd democratize FPGA programming, but they're not there yet.

stuck elbow
#

someone will, eventually

#

probably by that time everybody switches to proprietary quantum computers, though

#

it's a red queen race

main meteor
#

There's a reason I still play with vacuum tubes and relays.

old smelt
#

@main meteor - I'm interested in a more detailed conversation about open-source FPGA development. Out of scope for this channel, but if you would be open to a 1:1 discussion sometime, I'm all ears.

#

or we could pick it up in another channel/topic area

main meteor
#

I'm on travel today so will be in and out

old smelt
#

Not urgent. Whenever you have some time.

upbeat plover
#

I've been wanting to learn Verilog, I want a FPGA but the ones Adafruit sell are not quite what I'm looking for. I like the TinyFPGA a lot but I want a little more.

bitter hearth
#

I'm a full-time Python programmer, and I just started on electronics... I am super duper impressed by CircuitPython's "first five minutes" experience! It's actually way better than CPython's, hahaha 😛 Just plugged in the board, edited the demo file, messed with the code, saw the changes, boom. It's incredible not to have to install any tooling to get to that first step.

manic glacierBOT
orchid basinBOT
prime flower
#

such as: Helper Libs -> IoT, APIs (Hue, LIFX, Adafruit IO, Azure IoT), Display (Button, shapes, text, framebuf, image load, slideshow), Testing (board test suite, possibly a unittest down the line), Audio,

raven canopy
prime flower
#

Or just additional organization within that general category similar to how Drivers are organized.

#

@raven canopy I just clicked 5 helper links at random, and none of them had github topics.

#

i think we'd need to sweep that list

raven canopy
#

i'm not sure a single library has one. its not an easy task to update 160+ pages. but...Python is a wonderful too when combined with the GitHub API. adabot

prime flower
#

some have 'em

#

we'd need to start with categories for the topics though

raven canopy
#

i only pointed it out since there seems to be some drift in how things are organized/categorized.

prime flower
#

which is then search-ible like boards, sort by category

raven canopy
#

the PyPI ones would be easy, honestly:

keywords = read_setup_py()
github_api_update.topics(keywords)

though, the keywords may not be the best candidates.

prime flower
#

they're good for specifics but not broad categories, most of the ones i skimmed thru

manic glacierBOT
#

Would it be possible to link folks to a particular row and have the modules then link out to their docs?

I'm sure there's a way. With the Jinja parsing available, might be able to work up some HTML selection box magic. My HTML is lacking; but the internet is vast and full of info. 😄

Should we make a separate page for each?

At minimum, it may be best to make the support matrix its own page. With 60+ (and growing) boards, it will be a long list. I'm actually already in WIP-mode t...

upbeat plover
#

@tulip sleet thank you for tip with frozen modules, i used CPX for example and now everything is working as expected

tulip sleet
#

@upbeat plover Great!

manic glacierBOT
manic glacierBOT
graceful heart
#

@pastel panther @prime flower Just got home, free to chat whenever

pastel panther
#

@graceful heart I need to wrap some stuff up and gather some thoughts but I should be good to go at 7

graceful heart
#

oh ok, cool.

bitter hearth
#

time.monotonic() is a floating point number of seconds, right? On a trinket m0 express, that's 30 bits? Won't that hit precision barriers within a few months?

#

ah, I guess people have been thinking about this already, it's mentioned in passing in some github issues

#

i see, there's monotonic_ns() for some boards

manic glacierBOT
#

I think the only board that isn't building properly is trinket_m0_haxpress:

Build trinket_m0_haxpress for zh_Latn_pinyin took 17.81s and failed
make: Entering directory '/home/travis/build/adafruit/circuitpython/ports/atmel-samd'
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
-184 bytes free in flash out of 253440 bytes ( 247.5 kb ).
24664 bytes free in ram for stack out of 32768 bytes ( 32.0 kb ).
Too little flash!...

bitter hearth
#

So if I want to run 10 steps per second on a stepper motor forever, I should use monotonic_ns() and compensate for wrapping around sys.maxsize?

onyx hinge
#

status: creating audiopwmio in shared-bindings / shared-module and adapting nrf pwm audio to use it

manic glacierBOT
simple pulsar
bitter hearth
#

@simple pulsar thanks, the thread identifies the issue but I don't see it resolved there 🤷

#

It does point out that I should look at the C source for .monotonic() though...

#

I only want an accurate dt within a second of the last time I checked, so I think I can just subtract the last common_hal_time_monotonic() from the current one and use that... just have to do it in C instead of python

prime flower
#

@pastel panther @graceful heart I'm in the vooice chat when you're ready

pastel panther
#

@prime flower im mid reflow

prime flower
#

ok!

bitter hearth
#

Are there CircuitPython C libraries that aren't built as part of the core? I'm clicking around the library bundle and not finding any

#

guess I should be in the "help-with" channel

onyx hinge
#

@bitter hearth I don't think you can "dynamically" load a native code module that is not part of the core, like you can import a .pyd on windows python...

bitter hearth
#

ah, okay, thanks

pastel panther
#

aahh heck, there goes that

manic glacierBOT
slender iron
#

@raven canopy what is the right way to run adabot so it adds the environment variables to travis for new repos? python3 -m adabot.circuitpython_libraries -v validate_travis

raven canopy
#

haha. been too long since i ran it...had to look it up: -t/--token -v "validate_travis"

slender iron
#

kk

onyx hinge
#

While I'm looking at audioio/audiocore documentation to appease travis, I noticed a lot of blocks that say Sample must be an `audiocore.WaveFile` or `audiocore.RawSample`.. In general, do these sites also permit a Mixer object?

slender iron
#

@raven canopy how is that different from ADABOT_GITHUB_ACCESS_TOKEN?

#

@onyx hinge ya, I think they should

onyx hinge
#

@slender iron OK, I guess I'll just add audiocore.Mixer to the list everywhere I find those two

#

oh, hm, can you give a mixer to a second mixer?

raven canopy
#

@slender iron different? i may have misunderstood your question...

slender iron
#

@onyx hinge I think so

onyx hinge
#

It seems like it might be an unusual use, but my expectation from the code is that it would work

slender iron
#

@raven canopy the flag is confusing me. when true, it prompts for a password

upbeat plover
#

im having an issue with circuitpython-stage my game doesnt display... I can hear the sounds from the game but all that is displayed is Blinka in top-left of black screen

#

@stuck elbow is this a know issue or have i done something wrong

slender iron
#

@upbeat plover what version are you running?

upbeat plover
#

Adafruit CircuitPython 5.0.0-alpha.0-45-gd99d3bd47-dirty on 2019-07-25; Adafruit Feather M4 Express with samd51j19

slender iron
#

totally possible I broke it

raven canopy
#

@slender iron which env var are you wanting adabot to set? -t and validate_travis will set the token for Travis in GitHub for the repo and create the GITHUB_TOKEN on Travis.

slender iron
#

it -t used for more that setting GITHUB_TOKEN?

raven canopy
#

nope

onyx hinge
slender iron
#

ok, it seems weirdly named to me. I expect something like --prompt-password

#

@onyx hinge probably

raven canopy
#

its easily changed... 😄

slender iron
#

yup, will do

onyx hinge
#

I wonder if there's a board with I2SOut but not audioio. Now, such a board wouldn't have audiocore.. but it wouldn't have had audioio before, so surely somebody would have noticed it was broken.

slender iron
#

I think nrf is like that

#

but maybe we don't have audiobusio on it

raven canopy
#

oh yeah, now i remember. i used -t/--token because -p/--print exists. otherwise i would've done -p/--prompt.

onyx hinge
#

but "is" will be "was" soon, nrf will have audiocore + audiopwmio

#

I think that no, nrf doesn't have audiobusio, but from datasheet it does HAVE both pdm for audio in, and i2s for in AND out

slender iron
#

@raven canopy kk, will probably just not have a short version

#

actually leave t as the short

raven canopy
#

the nrf port on my laptop has audiobusio... PDMIn just doesn't work. 😄

slender iron
#

I2SOut does though I think

#

maybe I'm just remembering adding it to samd

onyx hinge
#

@raven canopy do you mean you have a work-in-progress ? Or that nrf has it, and I'm overlooking it?

raven canopy
#

WIP

onyx hinge
#

OK, I hope that the audiocore stuff doesn't get in your way (on the whole I think it should help)

raven canopy
#

it shouldn't hurt. and being able to play what my mangled filter is trying to do, instead of copying the REPL output and trying elsewhere will help. hehe

tulip sleet
slender iron
#

nope, will look later

tulip sleet
#

i assume not urgent due to upcoming weekend

slender iron
#

makes sense since I changed the constructor C api but not the direct calls to it 😃

#

nope ssd1322 driver won't work but that's ok

#

I'm camping all weekend anyway

onyx hinge
#

'night all. I'll check my pull#2000 for travis errors in the morning, probably I got something wrong while fixing docs or enabling audiocore based on audiobusio too

#

(I'm just scared of pause/resume and making work to avoid it)

slender iron
#

night!

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
onyx hinge
#

@raven canopy fwiw I ended up dialing back the cleverness of when to enable audiocore, so you'll just want to toss CONFIG_AUDIOCORE = 1 in your .mk after all.

stuck elbow
#

clever code rarely is

manic glacierBOT
#

MICROPY_VM_HOOK_LOOP was provided in MicroPython vm.c to allow tasks to be run at safe points (between bytecodes) in the VM. It is defined in CircuitPython as run_background_tasks();, and we use it many more places when we're busy waiting for an indefinite period and need to service background tasks. It's also guarded by #ifdef, rather unnecessarily.

Let's create a new macro and redefine the old:

#define RUN_BACKGROUND_TASKS run_background_tasks()
...
#define MICROPY_VM_HOO...
manic glacierBOT
#

the I2C FRAM needed repeated-start for reading the device id but not for data. https://github.com/adafruit/Adafruit_FRAM_I2C/blob/master/Adafruit_FRAM_I2C.cpp#L109

most chips specify they want a stop but will work fine with repeated start, so we default to repeated start in the register library and it works just fine.
https://github.com/adafruit/Adafruit_CircuitPython_Register/blob/master/adafruit_register/i2c_struct.py#L86

i prefer we keep stop in and throw an exception for linux w...

manic glacierBOT
#

Well, if a chip wants a stop, then that's fine — you can do that simply with a second transaction. The problem is when you want to do a repeated start, without the stop. writeto_then_readfrom is one case of that, but there are three other combinations (write-write, read-read and read-write) that can potentially be used by some chips. I think I only saw write-write myself in the wild (write the register address, do a repeated start, and write the register value).

But I think it would be...

manic glacierBOT
#

I'm going to watche/listen to the CircuitPython Deep Dive but where is the stack for the CP interpreter? Is there any guarantee that it can't clash with other users of the SRAM or detect if it does? I ask because the data buffer + length ends up in SRCADDR and that's 0x2002fd40 which is fairly close to end of (M4 192k of) SRAM at 0x2002ffff.

manic glacierBOT
heady raft
#

anyone around that can help me? I am having problems with getting the bootloader folder to show up on a trinket - i have followed these steps and the usb driver will install and show the usbtiny device but when I double press the reset switch no folder appears on my pc for me to load a uf2 file.. im on windows 7 x64 and also tried a windows 10 pc with the SAME results https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting

Adafruit Learning System

New to CircuitPython? This is the place to start.

manic glacierBOT
manic glacierBOT
#

There's two variable length arrays (presumably on the stack?) at the end of this highlighted piece of code: https://github.com/adafruit/circuitpython/blob/master/shared-module/displayio/__init__.c#L24-L63

I've not yet figured out exactly what the code is doing but buffer_size has potential to be 128 which means a 4*128 = 512 allocation on stack for buffer[] plus whatever mask[] size is.

Is it worth checking some MP_MAX_STACK_USAGE_SENTINEL_BYTE (0xEE) are still present where e...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Thank you for auditing this code!

@tannewt Take a look at these issues:

I've not yet figured out exactly what the code is doing but buffer_size has potential to be 128 which means a 4*128 = 512 allocation on stack for buffer[] plus whatever mask[] size is.

mask[] can actually be quite large. It could be pretty much the size of the whole display. So suppose it's 320*480, that makes mask length 4800 + 1. @tannewt Note how large this can get.

I set a breakpoint in the s...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
lunar crown
#

I put in a pull request about two weeks ago, fixing some typo class bugs in the Adafruit_CircuitPython_SI5351 driver. It was approved and merged the same day. But, it has never shown up in the Adafruit_CircuitPython_Bundle distribution. Is there something else I need to do to get it into the bundle?

raven canopy
#

@lunar crown the library needed a new release. i took care of it, and it should be in the bundle by monday at the latest.

meager fog
#

@heady raft you have a classic tiny85 trinket not a trinket m0, it cannot run circuitpython (its a very old board)

lunar crown
#

@raven canopy TNX

craggy galleon
#

Can I just say Great Job who has already ported over the boards to the CircuitPython.org website. I started porting over my board but it is already there 😄

Thank you!

orchid basinBOT
manic glacierBOT
upbeat plover
#

@gilded cradle I have to round the backlight float or it gets wacky. Without rounding it skips around like it should be 0.96, 0.92, 0.88, ect. but it does stuff like this 0.9645, 0.9189, 0.8548

from minitft_featherwing import wing
import time

# Turn off backlight
wing.backlight = 1.0
time.sleep(0.1)

while True:
    for i in range(25):  # fade on
        wing.backlight = round((wing.backlight - 0.04), 2) 
        time.sleep(0.05)  # slow down signals to seesaw
    for i in range(25):  # fade off
        wing.backlight = round((wing.backlight + 0.04), 2)
        time.sleep(0.05)  # slow down signals to seesaw
onyx hinge
#

@upbeat plover Is it hurting things that the numbers aren't exact? One alternative would be to write (for the "fade on" case), wing.backlight = i / 24 so that the backlight changes from off (0.00) when i=0, to full on (1.00) when i=24 on the last loop.

#

(or maybe (i+1) / 25 .. recalling that range() likes zero, so range(25) goes 0, 1, ..., 23, 24, which is 25 numbers, but doesn't actually include 25)

solar whale
#

@tulip sleet when I update my clone of master I get this error Synchronizing submodule url for 'tools/uf2' Synchronizing submodule url for 'tools/usb_descriptor' error: Server does not allow request for unadvertised object 1dabc2df8ed1acaf0c483b58d757ba72e8b42090 Fetched in submodule path 'lib/tinyusb/hw/mcu/st/stm32lib', but it did not contain 1dabc2df8ed1acaf0c483b58d757ba72e8b42090. Direct fetching of that commit failed. Failed to recurse into submodule path 'lib/tinyusb' do I need to do something different -- I update with this ```git submodule sync
git submodule update --init --recursive
git submodule foreach --recursive 'git fetch --tags'

onyx hinge
#

@solar whale I encountered the same thing recently. tannewt recommended me to "git submodule sync", and I think that fixed it.

solar whale
#

Thanks -- did not seem to help for me ...

onyx hinge
#

drat, I was hoping I had the answer

#

and now that I read what you said, you already had tried that

solar whale
#

trying a clean clone

tulip sleet
#

@solar whale I saw similar issues, but a clean clone fixed it

#

even my super duper:

alias gitsubupdate='git submodule sync --quiet && git submodule update --init --recursive'
#

did not fix it

solar whale
#

ok -- happier after clean clone

stuck elbow
#

obviously we need to add more arguments to that command

#

maybe a couple of --force and --hard will help?

manic glacierBOT
gilded cradle
#

@upbeat plover, you could always add a new property or function if that helps. I just didn't want it breaking existing code.

upbeat plover
#

turns off the backlight not on

manic glacierBOT
manic glacierBOT
#

fwiw, I think that it would be possible to keep the classes in audioio either for a limited time (like, would appear in both places in 5.x, and be only in audiocore in 6.x) or even forever. The "price" would be just a few dozen bytes in the dictionary of audioio. I'd be happy to double check this and submit a pull request if that's what @tannewt would like.

Meanwhile, I would also be happy to help out with some import logic in cpx to adapt to either circuitpython version, if that w...

marble hornet
#

@upbeat plover I used a float because it is closer to a percentage and It felt more intuitive

#

And how often is brightness set: once or twice?

#

And while 255 is used for colors that is a paradigm people learn when they start doing display programming but display brightness is a paradigm you many people are familiar with before they start embedded / display work

manic glacierBOT
manic glacierBOT
gilded cradle
#

@upbeat plover, I wanted it to be between 0-1.0 to be consistent with the neopixel and dotstar brightness values. We could check the parameter type passed in and if it's bool, set the value to 255 (skip the calculation) andFalse to 0. We could potentially take anything over 1 and use it as a raw value and anything between 0 and 1 to be the percentage. Only confusing value would be a value of 1 since it may mean full brightness and may mean nearly dim. That's why I suggested a new property or function.

raven canopy
#

who wants core docs built with Sphinx 2.1.2 (current)? cause, i have 'em building locally. 😉

#

sadly, i barely understand how i've done it. 😆

manic glacierBOT
tulip sleet
#

@raven canopy sounds great! if you want to do a PR that would be fine.

upbeat plover
#

how do i build older version of CP? im stuck on 5.0.0

stuck elbow
#

checkout an older tag

raven canopy
#

just battling Travis. the usual "works local, never on CI." game. 😄

#

also just noticed earlier, Travis finally has Bionic available.

onyx hinge
#

Because what I always need is another distraction, I was going to look at changing how lis3dh.shake (the method which checks if the device is being shaken) works. Where do I put the file so that it will override the one that is frozen in? (note: can't actually start on this right now, the cpx is at home and I'm still in ohio -- just gathering information)

raven canopy
#

you can force the import location, iirc

from .lib import lis3dh

can't remember if the . relpath works in cirpy...

onyx hinge
#

Makes sense, I'll try that first.

#
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyError: __main__
``` well that doesn't seem happy.
#

Looks like maybe putting it just directly in the top level could do it

raven canopy
#

try without the .?

onyx hinge
#

yeah that works at the repl

#

okay, goodnight! curiosity settled for now

raven canopy
#

spends too much time in CPython; forgets his CircuitPython

#

night!

onyx hinge
#

is there a meeting tomorrow? I might be able to at least listen in, if I can find some free wifi at the right hour

raven canopy
#

should be. i don't remember any cancellation notice.

onyx hinge
#

I'll try to check in

slender iron
#

@onyx hinge yup! we're meeting tomorrow

#

Hi all, we'll have our normal CircuitPython meeting at 11am Pacific / 2pm Eastern tomorrow here on Discord. Everyone is encouraged to join. Here is the meeting notes doc for it: https://docs.google.com/document/d/1Nf7-76XfJN_4uTwfvHyRNtHLUNHfL_-U6BjF6ZzAlGk/edit?usp=sharing <@&356864093652516868>

raven canopy
#

@slender iron i'm going to merge the "check travis builds new boards" PR, if you don't have anything further? its gonna raise a few conflicts on open PRs, but thats easy to deal with.

manic glacierBOT
slender iron
#

sounds good. thanks @raven canopy

manic glacierBOT
craggy galleon
#

@raven canopy how do I go about resolving conflicts about TRAVIS in my pull request no. 2014 ? I would imagine this could be an issue impacting all other boards.

manic glacierBOT
onyx hinge
#

do you have that button when you look at your pull request?

craggy galleon
#

@onyx hinge I know where the conflict is. The issue is that every PR for a new board updates the same file (.travis.yml). I am just wondering if there is someone who manages it / resolves them.

#

Do you have any experience with fixing these types of merge requests?

onyx hinge
#

@craggy galleon Yes, though I haven't personally done it via the github web interface

#

do you want to try to walk through the steps together?

craggy galleon
#

Sure! That would be great!

My concern is that someone else's PR will go before #2014, then the same process would need to be followed.

onyx hinge
#

I think that your change was just to add a new board or board(s) to those lines, right?

craggy galleon
#

That's right. 😃

onyx hinge
#

In that case, the way I would do it personally is to just delete the lines from "<<<" to "===" which represent your changes, and re-add your new board(s) to the TRAVIS_BOARDS lines that remain.

#

Also delete the ">>>" line

craggy galleon
#

Yeah sure - that sounds easy enough. Give me a minute and I'll do that now.

#

Should I double check which boards have changed?

onyx hinge
#

Well, by starting with the side that was marked "master", you know you are starting with the most up to date list. So I think you can be confident and just add your new board

#

it is a very simple case, just not quite simple enough for git or github to be able to do it automatically

craggy galleon
#

I think that's gone through now

onyx hinge
#

OK, let me pull up the pull request again

craggy galleon
#

Travis CI is just checking I didn't break anything. Thanks Travis! blinka

onyx hinge
#

the github page is loading slowly for me, but yeah it looks good

#

congratulations, you now know how to resolve a merge conflict!

craggy galleon
#

Thanks @onyx hinge !

onyx hinge
#

also, thanks for your work on circuitpython. I'm sure somebody will be along soon to (hopefully) approve your contribution!

manic glacierBOT
lone sandalBOT
raven canopy
#

@onyx hinge @craggy galleon thanks for getting the conflict worked out! it's an unfortunate situation when the PRs get stacked up like that, but its unavoidable. (I was this close to working them myself last night, but I'd rather the PR owners know what's happening so to keep their branches up to date.)

lone sandalBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I am interested in implementing some version of low power sleep for the nrf52840. From looking through the code it bit, it seems like there are timers and loops that need to be run continuously for CircuitPython to function as expected which complicate the issue.

My first goal would be to implement a new module to sleep on command. A secondary goal would be to merge the low power code in with the time.sleep function.

Could someone give me some pointers on where to start, what things to ...

#

We currently use the SysTick timer in all our ports for general timekeeping (msec ticks and smaller): see ports/nrf/tick.c. SysTick is available on all M0/M4 processors: it is not manufacturer-specific. SysTick is based on the processor clock; when the processor sleeps, its clock is turned off, so SysTick will stop working.

So tick.c et al would need to be changed to use the RTC instead. The RTC can be set up to run all the time, even during sleep. There are similar RTC peripherals on ...

onyx hinge
#

hmph, trying to connect to the audio meeting from a Panera, but I'm getting "no route". Must not comply with their policy.

onyx hinge
#

@drowsy geyser can you say something over the voice channel for a minute? I'm trying to figure out whether I can listen this way or whether I need to switch over to tethering

#

(I won't be talking, but I did put my hug report and progress report in the document)

drowsy geyser
#

@onyx hinge I can't really - open office space. 😃 I'm ostensibly working.

river quest
onyx hinge
#

@drowsy geyser I understand how that is

turbid radish
#

Hi all!

onyx hinge
#

ah here come some people

stuck elbow
#

o/

drowsy geyser
#

Howdy.

stuck elbow
#

← lurking

old smelt
#

Lurking.

tidal kiln
#

lurking

onyx hinge
#

ah now I have audio

#

lurking

turbid radish
#

lurking also

#

Pynny

onyx hinge
#

low power sounds like fun to hack on

drowsy geyser
#

Lurking today. Hugs, though, to Jerry, LadyAda, and Brentru for analyzing and fixing the "gamepadshift" error on PyPortal with the latest firmware and bundle.

stuck elbow
#

deep sleep at the least would be super-useful

onyx hinge
#

years ago, "jeenode" did a blog for years about this sort of thing. he was doing sensors.

#

hi scott

drowsy geyser
#

Oh, so I guess I'm text-only instead of lurking. 😃

slender iron
river quest
#

go @kattni! opening keynote for #PyOhio2019, here to share the journey from “maybe i’ll learn this programming thing” to today and the impact that mentorship and beginner focused resources can have. #pyohio

Every community should be lucky to have someone as caring and inspiring as @kattni. I'm so glad that you are part of the #python, @CircuitPython and open learning community at @adafruit. #PyOhio2019 https://t.co/iQwL8CiYfP

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

This is a bit of a coming soon but deserves its own news item! STM32 Discovery F412ZG and F411RE support by @hierophect – GitHub: “This PR adds rudimentary support for the STM32F4 serie…

#

Scott wil be on ASK AN ENGINEER and we have some cool surprises next week!

#

In the news:
The MagPi Magazine: Control servos with CircuitPython & Raspberry Pi <-- MakerMelissa!
Issue 21 HackSpace magazine: CircuitPython storage

tidal kiln
#

excellent idea!

river quest
onyx hinge
#

snek is a cool language in its own right

river quest
#

Made with Mu - A HyperCard inspired GUI framework for beginner developers in Python
https://github.com/ntoll/pypercard
https://twitter.com/ntoll/status/1155567530876055552

Here's the code for the "classic" Celsius/Farenheit converter GUI example... it's actually only 44 lines of Python..!

https://t.co/znOCkgvHML

PyperCard should be quick, simple and easy to make work. Also, in time it should work on Windows, OSX, Linux, Android and iOS. :-...

▶ Play video
sterile bronze
#

just lurking

ionic elk
#

Whoop I don't know if this is a big deal but we might not want to use Nucleos as the STM32 pics in the news issue! They aren't supported and aren't on the schedule as they lack critical USB components.

#

We're focusing exclusively on the Discovery line

turbid radish
#

Speak up Brent

ionic elk
prime flower
#

@turbid radish Just adjusted my mic - factory is loud 😃

turbid radish
gilded cradle
#

I think Kattni is out the next 2 meetings still

onyx hinge
#

😃

drowsy geyser
#

@gilded cradle I think so, but I haven't caught up with her after her keynote.

slender iron
#

@drowsy geyser did you have hug reports to give?

drowsy geyser
#

@slender iron Yup, hugs to Jerry, LadyAda, and Brentru for fixing issue #46/#47 on PyPortal (the gamepadshift bug).

onyx hinge
#

what I think I overheard about videos is that everybody organizing pyohio is going to take a deep breath before getting the videos online so be patient

#

they really knocked it out of the park, they deserve hug reports too

turbid radish
#

I put that FeatherWing in Awesome Feather

#

Word of the day: Orthogonal

errant grail
#

"Medicine Man" product claims.

tulip sleet
drowsy geyser
#

Nothing for me

onyx hinge
#

@tulip sleet I won't get the paraphrase right, but Greg Svoboda (who gave the other keynote) quipped that when he learned hexadecimal, people told him, "you'll never need to know that". Well, when he learned bluetooth, he needed hexadecimal.

#

that got shown off at pyohio

drowsy geyser
#

Thanks, team. Keep up the fantastic work!

errant grail
#

Thanks everyone!

onyx hinge
#

so happy to sit in on the meeting today thanks to pyohio and a travel day. I'm going to try to shift my regular schedule to enable me to come more often.

tulip sleet
#

@onyx hinge arm-none is for bare boards. We'd recommend using the download from the arm site. The ARM toolchain developers seem to no longer be doing any packaging themselves

errant grail
raven canopy
#

@onyx hinge @tulip sleet I wasn't aware Buster had ver7-q2; it may be an option now. But I doubt they'll do any better at keeping the package rolling with version changes (Stretch is still on ver5). That is why I was following the new "download straight from ARM" approach. They only offer 64bit, or source...

#

and, I'm still a bit noobish at this level of knowledge

onyx hinge
#

no, the version in buster won't see updates unless there's an actual security problem discovered. buster-backports might. I understand why the project would standardize on a particular one so that everyone seems the same results as travis, but in practice the debian buster compiler has been working for my nrf stuff

#

and then the part where I'm noobish is how / when things get from debian into raspbian, sooo

raven canopy
#

Looking at that package, they have an armh version, so it should get rolling released on the RPi.

#

I'm still not sure that arm64 ( Debian renamed from aarch64) will run it. I'll most likely be learning/fighting with dpkg. 😁

manic glacierBOT
errant grail
upbeat plover
#

something changed in audioio that broke stage

#

File "stage.py", line 166, in play AttributeError: 'module' object has no attribute 'WaveFile'

solar whale
#

@upbeat plover in the 5.0 master you have to import it from audiocore now

upbeat plover
#

only three place in stage.py that needed to be changed

stuck elbow
#

@upbeat plover pull request please? :)

upbeat plover
#

@stuck elbow PR done almost did typo and do "audioiocore" but i caught it and did "audiocore"

solar whale
#

should the audioio/core changes be made so thay are "backward compatible" try/except?

upbeat plover
#

im still having issue where ugame stuff doesnt show, just blinka top-left and black-screen, everything works fine 4.1.0-rc.1

stuck elbow
#

@upbeat plover is that an nrf?

upbeat plover
#

feather_m4_express with minitft_featherwing

#

@solar whale why do i need both audioio and audiocore? AudioOut is only in audioio

#

@stuck elbow the PR has the sound working now, but now both audioio and audiocore are imported

slender iron
#

audiocore contains the source of sounds now (aka RawSample, WaveFile and Mixer)

upbeat plover
#

"When nrf pwm audio is introduced, it will be called audiopwmio. To enable code sharing with the existing (dac-based) audioio, factor the sample and mixer types to audiocore." Is this so if you dont need everything you can just import AudioOut if thats all you need?

slender iron
#

it's so that ports can support audiocore without audioio. (the nrf doesn't have a dac)

manic glacierBOT
tawny creek
#

random Q, would the adafruit_is31fl3731 benefit from being part of displayio?

slender iron
#

it'd certainly be interesting!

tawny creek
#

lotsa similarities to the oled stuff

slender iron
#

16x9 isn't a lot of pixels

tawny creek
#

not at all, would the fonts have to be redrawn?

slender iron
#

the builtin is smaller than that but it wouldn't fit much text

#

I kinda assume we'll want some sort of scroll for displays that small including the charlcds

manic glacierBOT
#

So, yes it looks like we should check we have enough stack left.

mask's size should be limited by buffer_size because it holds one bit per pixel of the current area (clipped.)

Yup, the volatile is debugging leftovers.

I'll likely rework the begin_transaction stuff with the e-paper work I'm starting. As it is now, the first check causes a chip select blip that we don't need.

upbeat plover
#

i did PR for CPX so it works with 5.0.0 how do you sperate stuff for like a 5.x bundle?

manic glacierBOT
slender iron
manic glacierBOT
tulip sleet
#

@slender iron Great! going out soon but will review later tonight or tomorrow morning

slender iron
#

k, np

manic glacierBOT
#

I doubt the dma_descriptors are corrupted by the stack because they are on the other side of the heap. However, it's worth looking to see what is placed next to it in memory.

It is weird that DRE is high on the Sercom since it should trigger a DMA burst to fill it. This could happen if the DMA wasn't ready when DRE was triggered I think.

I wonder if it's related to the DMA issues @ladyada and @PaintYourDragon saw with the nintendo emulator and eyeball code.

onyx hinge
#

@slender iron it's a perfect time to nitpick me, I'm at the airport and it's an alternative to looking at flight delays

#

🛫

slender iron
#

👍

manic glacierBOT
#

Untested, but I believe you would want to write, for any or all items that you wanted from audiocore,

try:
    from audiocore import RawSample
except:
    from audioio import RawSample

At this point, RawSample will be available as an unqualified name. You could also write (untested)

try:
    import audiocore
except:
    import audioio as audiocore

At this point audiocore.RawSample will be available as a qualified name.

When I'm at home, I have a CPX...

#

@ladyada It's not clear to me that we need fine grained control of stop. Looking at the FRAM, the device ID read looks like the standard write (address 0xf8 has data direction 0 for write), no stop, repeated start, read (0xf9 is the same address with direction bit high) that we'll now have with the composite call.

I'm all for not limiting ourselves to what Linux can do. However, in this case I think Linux does everything that I2C devices need and by aligning our APIs through implicit con...

tawny creek
#

or a very low res game

onyx hinge
#

oh travis you're so very particular

#

@slender iron this documentation building problem was caused by the rename; is "one more rename" (so the end user will refer to audiopwmio.PWMAudioOut) necessary, or what do you see as the resolution? /home/travis/build/jepler/circuitpython/shared-bindings/audiopwmio/__init__.c:12:toctree contains reference to nonexisting document u'shared-bindings/audiopwmio/AudioOut'

#

it looks like an assumption about class names vs C source filenames to me

raven canopy
#

that's going to get tricky even if it builds, since shared-bindings/audioio/AudioOut.c also uses the class name AudioOut. RTD doesn't have "branching" for the ports...

#

wait. nevermind. thought just completed. they'll live under different modules...

#

needs to make dinner so brain functions properly

slender iron
#

@onyx hinge I think its a toctree issue

manic glacierBOT
slender iron
#

@onyx hinge make sure to pull changes. I tried to fix the last bits

manic glacierBOT
raven canopy
#

egads... that table has no wrapping. 😬
found fix #1! hehe

#

but, it all still works as intended, so i'll take that. 🎉

onyx hinge
#

@slender iron thanks, I'll try to resort the urge to force push the branch

manic glacierBOT
solar whale
#

@slender iron is there an update to the ssd1306 lib for displayio? Or did I misunderstand? I don’t see a recent update.

onyx hinge
#

I wonder if there's a way to generate the board list within a a Travis job instead of having to manually maintain it

#

Even if the balance was not quite ideal

raven canopy
#

i had that too. even thought about having a log file in S3 to handle load balancing.

onyx hinge
#

Ooh that would be way beyond anything I had thought of

raven canopy
#

i mean, at 700+ assets to build, its not a small task we're asking of Travis. its going to take time.

#

i plan on deep diving on why the Polish builds take like 8000% more time to build. i'm thinking its more to do with its completeness as a translation, but it'd be interesting to try and trim the PL build times. (that % number is wholly hyperbolic...)

onyx hinge
#

Yeah in that light 50 minutes is pretty fast

#

Were you involved in making the translations work?

raven canopy
#

i was not. i don't even understand it fully. 😄

onyx hinge
#

I haven't looked but want to someday to understand it

#

Our else join you in perplexity

raven canopy
#

i think its just a matter of inline-ing from the .po reference files. strong think though.

onyx hinge
#

As in it literally makes new source files?

river quest
manic glacierBOT
#

While this is "initially" done, there is a slight problem. Which actually isn't new to us.

The generated table does not wrap the text: https://circuitpython.readthedocs.io/en/latest/shared-bindings/support_matrix.html#support-matrix

After some searching, this is primarily a sphinx-rtd-theme issue.

There exists a workaround, which is already implemented in docs/static/customstyle.css. However, it doesn't seem to work for ...

raven canopy
#

@onyx hinge that's the point where i lose understanding. hehe

manic glacierBOT
slender iron
#

@solar whale it's a separate library so rpi users aren't stranded

onyx hinge
#

it looks like the translation procedure produces a very big function which linearly searches through the list of all original strings and returns the related translation. It must be depending on the optimizer to find at compile time which one of the strings is actually the result. However, it seems like the size of the translation is always the same no matter the target language

slender iron
onyx hinge
#

.. in translate.c, inline __attribute__((always_inline)) const compressed_string_t* translate(const char* original)

#

@pulsar ferry were you serious about "pt" translation taking longer to build? I didn't duplicate that finding here, not even 10%

#

though I'm not using the sanctioned gcc version, I'm using whatever's in debian buster

raven canopy
#

@onyx hinge not pt. pl. its always around a minute. e.g.: pca10056 takes <3 seconds for every language, and pl takes 52 seconds.

though, i just realized that its the first language to get built for each board. i vaguely remember a "don't rewrite po files" speedup recently.

#

hehe

#

discord was autocorrecting me. hilarious.

onyx hinge
#

I couldn't figure it out. must be tired.

#

"<3 you autocorrect"

#

said nobody ever

manic glacierBOT
raven canopy
#

only when reading other people's autocorrect misadventures.

onyx hinge
#

.. and now bad airport wifi is about to cut me off unless I pay

#

so bad it made me say a cuss, sorry 😦 😦

#

goodnight @raven canopy thanks for encouraging me to understand how CP does translations a little better!

manic glacierBOT
raven canopy
#

@onyx hinge night! enjoy the air travels!

onyx hinge
#

I'll enjoy being home, I'm sure of that

#

but pyohio was so worth it

raven canopy
#

that's the best part. only good part? something like that. 😄

onyx hinge
#

it is amazing that when it works you can go all the way across this huge country in just a fraction of a day

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

When I read that article I found it quite pro-asyncio, despite the inflammatory title: "I do believe asyncio is quite user-friendly, but I did underestimate the inherit complexity concurrent programming brings."

In fact, I think it supports the stance that you should not try to build a simpler system - asynchronous code is difficult, as the author says: "whether you use asyncio, Twisted, Tornado, or Golang, Erlang, Haskell, whatever".

manic glacierBOT
#

In fact, I think it supports the stance that you should not try to build a simpler system - asynchronous code is difficult

Sure, but it doesn't have to be that difficult.

Writing something like the Happy Eyeballs algorithm takes 50 lines in Trio but 500 in "native" asyncio. That should tell us something. As should the fact that the people responsible for asyncio plan to evolve it into a Trio-ish direction as quickly as possible.

manic glacierBOT
#

Hi !

I am having more issues with timers and CircuitPython using a SAMD51G19A this time.

I have been doing some testing and discovered that the CircuitPython is reporting that all timers are being used. I have done a table check and think this might be wrong or not using all the available channels. - happy to be told otherwise.

From the Datasheet

Servo Pin TC TCC TCC
8 PA08 0.0 0.0 1.4
7 PA09 0.1 0.1 1....
manic glacierBOT
#

I am looking at robothatmm1/pins.c, and I see these pin definitions, which are somewhat different that you posted in the first post:

	// SERVO Pins
	{ MP_ROM_QSTR(MP_QSTR_SERVO1), MP_ROM_PTR(&pin_PA16) },
	{ MP_ROM_QSTR(MP_QSTR_SERVO2), MP_ROM_PTR(&pin_PA17) },
	{ MP_ROM_QSTR(MP_QSTR_SERVO3), MP_ROM_PTR(&pin_PA18) },
	{ MP_ROM_QSTR(MP_QSTR_SERVO4), MP_ROM_PTR(&pin_PA19) },
	{ MP_ROM_QSTR(MP_QSTR_SERVO5), MP_ROM_PTR(&pin_PA11) },
	{ MP_ROM_QSTR(MP_QSTR_SERVO6), MP_ROM_PTR(&pin_PA10...
manic glacierBOT
#

You can add some print statements in common-hal/pulseio/PWMOut.c to print out the timers and channels. I started to do this but it would be more direct if you did. To print, do this (adjust args as necessary):

mp_print(&mp_plat_print, "%d %d\n", something, something);

I did add a print statement and tried this on a Metro M4 but unfortunately not all the pins you are using are available on that board.

I am not sure, but I think the assignment logic more goes by the FUNCTION po...

manic glacierBOT
prime flower
#

Is binascii not in within CircuitPython 4.x builds?

#
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: no module named 'binascii'```
prime flower
#

oh, hrm

#

Some libraries are only enabled only WiFi-capable ports (ESP8266, nRF) because they are typically used for network software: binascii, hashlib, uheapq, uselect, ussl.

prime flower
#

Are there plans to add these to libraries to 5.x since WiFi /networking is utilized by some boards (AirLift, PyPortal)?

manic glacierBOT
manic glacierBOT
manic glacierBOT
orchid basinBOT
manic glacierBOT
#

@crowecawcaw, when I was dev'ing primarily on Win10, I used Atmel Studio 7. Breakpoints and I/O registers were a bit of breeze. The [major] downside though was being forced to compile in a VM. It may be possible to overcome that, but I never figured out a way.

I did try to get Segger Embedded Studio working as an IDE on Linux and Win10, but never got anywhere with it.

On Linux, using GDB became just as fast as AS7 in most cases. Especially after I started using a [breakpoints file](http...

manic glacierBOT
manic glacierBOT
#

Hi @dhalbert ,

It has been merged in last night to the main CircuitPython repo in PR #2014 :

https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/boards/robohatmm1_m4/pins.c

        { MP_ROM_QSTR(MP_QSTR_SERVO1), MP_ROM_PTR(&pin_PA18) },
	{ MP_ROM_QSTR(MP_QSTR_SERVO2), MP_ROM_PTR(&pin_PA19) },
	{ MP_ROM_QSTR(MP_QSTR_SERVO3), MP_ROM_PTR(&pin_PA20) },
	{ MP_ROM_QSTR(MP_QSTR_SERVO4), MP_ROM_PTR(&pin_PA21) },
	{ MP_ROM_QSTR(MP_QSTR_SERVO5), MP_ROM_PTR(&pin_PA11...
onyx hinge
#

I'm getting an unusual build error. ```Warning, treated as error:
failed to reach any of the inventories with the following issues:
intersphinx inventory 'https://circuitpython.readthedocs.io/projects/busdevice/en/latest/objects.inv' not fetchable due to <class 'requests.exceptions.SSLError'>: HTTPSConnectionPool(host='circuitpython.readthedocs.io', port=443): Max retries exceeded with url: /projects/busdevice/en/latest/objects.inv (Caused by SSLError(SSLError(1, '[SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:1056)')))

#

sphinx-build 1.8.5 running with python3 (everything from pip), and I swear it worked last week

raven canopy
#

@onyx hinge with my PR getting merged yesterday, we're now running on Sphinx 2.1.2. but that looks...Travis-side.

onyx hinge
#

@raven canopy huh so despite trying to use pip(3) to get it, is my sphinx seriously out of date?

#

smh

raven canopy
#

shouldn't be too out of date. if you do update to sphinx 2.x (py3 only), you'll need to pull from master though, as there is an update to c2rst that allows it to work with 2.x.

brazen bluff
#

Hello I'm brand new to the circuitpython community. I had the distinct pleasure of Meeting @idle owl at PyOhio and she encouraged me to begin my journey by joining this community. I appreciate all her words of encouragement and I'm excited to be here and start on my GBPhoneHome Project (name credit goes to Dan Lindeman)

raven canopy
#

👋 welcome @brazen bluff!

onyx hinge
#

@raven canopy it's working now, so yay?

raven canopy
#

🎉

#

yay!

onyx hinge
#

hmmm looking at the support matrix, which is my goal, I see that there are some boards that have "audiocore" but not "audioio", like Adafruit Feather M0 Adalogger. This may be a mistake due to my PR that added audiocore.

#

@brazen bluff welcome! I was at pyohio but I didn't meet anybody who looks like your avatar there. Don't miss the #help-with-circuitpython channel too

brazen bluff
#

@onyx hinge now that you mention it I didn't see any owls ? 😃

onyx hinge
#

🦉

#

@raven canopy yeah I did something "smart" for audiocore that confuses the autogenerated support matrix. I think it's not actually the case that "audiocore" is in the Adalogger, just that the script doesn't understand what I put in the .mk file

raven canopy
#

the support matrix is fresh...and rigid. i wouldn't make decisions based on its result. its easily changed... 😄

onyx hinge
#

here's what I did, which was intended to make it so that boards with audioio automatically got audiocore. It was lazy.

raven canopy
#

ahh. there are a few others like that already. wiznet, terminalio, etc.

#

i would've brought it up #in-the-weeds, but i couldn't attend the meeting. just need to have a larger conversation about it. one option is to just write the special cases into support matrix. core code shouldn't exactly bend to the docs.. 😄

onyx hinge
#

Would you like me to file an issue, or do you think you'll remember this?

raven canopy
#

i'll remember. its got a wrapping bug. but, the initial issue is still open, so i'll add it there too. (i noted it in the PR, as well)

onyx hinge
#

OK, thank you for working on this!

raven canopy
#

doh! i missed a tannewt reply to the original issue recommending closure. new issue it is. hehe

manic glacierBOT
onyx hinge
#

make -n -p BOARD=... | grep ^CIRCUITPY_ will get you the content of relevant makefile variables after all the parsing is done, but sometimes variables still refer to other variables in this listing.

near wedge
#

Anyone know if you can edit code on a CircuitPython board using an iPad and USB connection kit?

raven canopy
#

@onyx hinge yeah, that's the issue at hand. the script reads cirpy_mpconfig.mk to establish the "base", then reads mpconfigport.mk and mpconfigboard.mk to determine inclusion/exclusion. but for those few that don't have a direct on/off correlation, they aren't captured. well, except for FULL or SMALL build.

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

OK! Big news- It’s now possible to edit and save Python code on iOS to embedded electronics, CircuitPython USB devices! This is a follow up to our post about Apple’s iOS 13 beta, which …

raven canopy
#

was that just really fortuitous timing? lol

river quest
#

hah, oh wow

#

i just scrolled up

raven canopy
#

@near wedge see blog post ^^^ 😄

river quest
#

that is kinda cool

raven canopy
#

indeed!

near wedge
#

Yay! This will come in handy for Defcon! 😄

pastel panther
#

@graceful heart I just had a chance to finally try out the color picker server demo. It works great! (once I fixed a bug that had nothing to do with your code) 😃

manic glacierBOT
#

Now that the first iteration of the new module support matrix is done, it needs more work. I'm going to put a few issues into this single one; if anyone would rather have them broken up feel free (or let me know).

  • [ ] Text does not wrap in the matrix table:
    There are some CSS settings that are in /docs/static/customstyle.css that should force wrapping inside the table. They are somehow either getting overwritten, or not included.

  • [ ] **Some modul...
raven canopy
#

rolling through the labels for that issue, i realized Hacktober is like 2 months away. 🎃

lone sandalBOT
manic glacierBOT
#

@tannewt BusDevice is huge in terms of memory and rather slow. I'm controlling displays on PewPew with I2C, so speed is rather important.

I'm not concerned with me failing to update the library. The scenario I'm concerned with is me updating the library, which then fails to work with all the older versions of CircuitPython, because people didn't update their boards immediately (or can't do it, for instance because they use HUZZAH). That would mean I either would have to effectively support...

graceful heart
#

@pastel panther :)

#

I think we might want to re write the demo app to not use 3rd party scripts hosted on a cdn. Works great when your client is connected to internet, but I tried using in conjunction with AP and obviously since my device is connected to the esp AP, it doesn't have internet to download the scripts from a cdn...

#

So we can either include the downloaded assets in the static folder, or just re write the JS app to not need them. Wouldn't be as cool if you had to type in your rgb values though....

manic glacierBOT
#

Below are some test results:

[LOOP] Initialising...microcontroller.pin.SERVO5
use new... TCC1[7] 2
[LOOP] Initialising...microcontroller.pin.SERVO6
use existing... TCC1[6] 2 1
[LOOP] Initialising...microcontroller.pin.SERVO7
use existing... TCC1[5] 2 1
[LOOP] Initialising...microcontroller.pin.SERVO8
use existing... TCC1[4] 2 1
[LOOP] Initialising...microcontroller.pin.SERVO1
use new... TCC0[6] 2
[LOOP] Initialising...microcontroller.pin.SERVO2
use existing... TCC0[7] 2 0
...
#

I guess this sort of shows the issue.

TCC 0 is not being selected in some cases.

I have a working theory on this one. I think there could be an issue with the logic of selecting pins with the same existing TCC timer. Since this is the first part of the function - in other words: It will also check on an existing first - it might rule out some valid pins in later stages.

I am doing some more testing on this now to see if it can be worked out. I see no reason that a valid pin s...

manic glacierBOT
#

Two things at play here:

  1. I think I just have another unfortunate pin selection.
  2. It is going by lowest TCC timer rather than 'first function'

I have been working off this table for which pins are sharing CC Channels:

Compare Channel: 4
Wave Output: 8
Valid for: SAMD21 TCC0, TCC1 - SAMD51 TCC1

0 1 2 3
4 5 6 7

In fact for TCC0 on SAMD51 it should be:

Compare Channel: 6
Wave Output: 8

| 0 | 1 | 2 | 3 | 4 | 5 |
|--|--|--|--|--|--|...

manic glacierBOT
#

After spending some time looking through the code base, my plan is to make a module that has a function low_power_sleep() that will put the processor in a low power state until the time elapses. From what I can tell, there are 3 types of timers in play:

  • RTC: This is constantly running and is used for time.time(). It runs even if the processor is in low power modes.
  • SysTick: Based on the processor clock cycles (very precise) and is used for general timing including time.sleep() and tim...
manic glacierBOT
manic glacierBOT
slender iron
#

@umbral dagger ask here please

umbral dagger
#

@slender iron I'm using fill_area to grab pixels from the display. It works as expected on a PyPortal, but on a PyGamer the result is rotated 90 degrees counter clockwise.

slender iron
#

the displays are oriented differently

#

in the init code

#

pyportal is the weird one

#

the intention is for the buffer to align with the real orientation of the display

manic glacierBOT
#

I thought that if an interrupt was firing quickly, it would prevent the processor for staying in the low power state for very long causing the power consumption to remain high. In this instance, the RTC would be triggering interrupts every 30.5us to increment the ticks. By configuring a timer to interrupt less frequently (100ms or so), the processor would be mostly sleeping and its power consumption would remain very low. The power consumption then would not depend much on the type of timer o...

umbral dagger
#

@slender iron Is there a way to determine the rotation?

slender iron
#

the display knows it but I'm not sure if it is exposed

#

could be though

umbral dagger
#

I'm happy with saving a screenshot rotated, but the width and height don't reflex the rotation, so they'll need to be swapped. Knowing what the hardware is could be used to flag special cases... but that's cumbersome as new boards are released.

slender iron
#

ya, width and height are weird like that

#

feel free to add a rotation property

#

could even add the ability to set it

umbral dagger
#

@slender iron OK... looking into that where would you suggest it? board? display?

#

I guess Display

manic glacierBOT
#
[adafruit/circuitpython] New branch created: dm\-mixer
slender iron
#

@umbral dagger yup, display

raven canopy
#

@slender iron I believe that is where I left it. I still have my local branch. I can get it back to current an submit a PR.

prime flower
#

@slender iron Would it be possible for binascii to be built with 4.x? I tried adding it to mpboardconfig.h and got 3 of errors relating to mbedtls/ . The pure-python implementation I have works but it's pretty slow

slender iron
#

@prime flower what do you mean by possible?

prime flower
#

Are there plans to re-enable it on samd ports in the future, or would I be better off going with a python implementation?

slender iron
#

I don't have plans to add it but that doesn't mean it couldn't be added. What APIs of binascii do you need?

tidal kiln
#

@slender iron weird one. not sure. want me to iterate a bit to offload you?

slender iron
#

@tidal kiln sure! I'm not sure what the next steps are with them.

prime flower
slender iron
#

I'd suggest filing issues for binascii and hashlib.

prime flower
#

Sure!

slender iron
#

binascii should be moved to the shared-bindings/shared-module split

manic glacierBOT
solar whale
#

@graceful heart I finally got around to trying the wsgiserverdemo. It worked great -- so much to learn... Thank you!

manic glacierBOT
#

I ran this program, ^C'd it, and then did ^D to do a soft reload. This doesn't always happen, but it did happen several times, so I tried to provoke. Probably not related to BLE. Notice it's crashing inside the import of adafruit_displayio_ssd1306.mpy.

"""CTS demo
"""

import board
import displayio
import terminalio
import time

import adafruit_displayio_ssd1306
from adafruit_display_text import label
from adafruit_ble.current_time_client import CurrentTimeClient

d...
graceful heart
#

@solar whale 😃 blinkacomputer

umbral dagger
#

@slender iron PR soon

upbeat plover
#

@slender iron i did
try: import audiocore except ImportError: import audioio as audiocore
but it still is failing travis... I tested code on my CPX and my test melody.py is playing on stable 4.0.2 and 5.0.0

manic glacierBOT
raven canopy
#

@upbeat plover it looks like pylint is complaining about audioio possibly being imported twice:

import audioio
try:
    import audiocore
except ImportError: 
    import audioio as audiocore

This is a tricky one... 🤔

stuck elbow
#

you can replace import audioio as audiocore with just audiocore = audioio

raven canopy
#

That seems like a useful trick here. I do wonder how mangled the global is after that ImportError. It may work, but imagine it's an interesting web...

stuck elbow
#

not sure what you mean by mangled?

#

ImportError happens before any code is executed from the module being imported

raven canopy
#

Right. But audioio is already imported...

stuck elbow
#

looks like new displayio broke stage :(

upbeat plover
#

yeah i havent been able to get ugame to display in 5.0.0

stuck elbow
#

@raven canopy imports are cached, you can re-import a module as many times as you want, and nothing will happen

#

I wish I weren't so sick, I could look into it

#

@slender iron any idea what has changed? I basically only call displayio_display_set_region_to_update and display->send

stuck elbow
#

I can't see anything suspicious in those functions

stuck elbow
#

I think I found the problem

manic glacierBOT
#

Thank you @tannewt and @dhalbert both for the tips!

I have a new lowpower module running with a sleep() function that runs correctly off a timer. The function waits for an interrupt repeatedly until the timer interrupt fires. Current the current draw is sitting at 2.5mA. I've compiled the firmware without the softdevice option which I'm assuming prevents the bluetooth hardware from being initialized and run. Are there other interrupts which could be preventing the processor fro...

onyx hinge
#

@upbeat plover @raven canopy I sure didn't try that compatibility block under pylint. It sounds like the assignment version mentioned by @stuck elbow might be a workaround

manic glacierBOT
#

Do you have any sort of ideas as to a timeline on this, or where it fits in on the roadmap. This would be super helpful for a project we're currently working on. If we were to write a Python extension in C, would we have access to the Arduino BLE libraries to implement BLE HID from that route? Or would it need to be done from scratch.

onyx hinge
#

If you came to a conclusion about what did work, I'll get it added in a note on that PR

#

(it's confusing, at $DAY_JOB, PR is a problem report, so sometimes I say PR when I mean issue..)

raven canopy
#

the other option is to just disable the pylint flags.. 😉

onyx hinge
#

@raven canopy with the support matrix, was it "just coincidence" that it got transposed (so that boards run down the left and modules go across), or was it a deliberate choice?

raven canopy
#

this is going to be an interesting merge conflict unravelling on my Mixer branch. good thing compilers are smarter than i am, and can point me in the right direction. 😄

stuck elbow
#

fixed it

raven canopy
#

@onyx hinge deliberate choice.

manic glacierBOT
onyx hinge
#

I still am thrilled every time I use a debugger on a microcontroller. it's like the future

#

OK, time to figure out how to pause/resume audio! or at least spend a solid 30 - 45 minutes working towards taht

raven canopy
#

@onyx hinge it does look much better when the text wraps properly...

onyx hinge
#

oh yeah you are on the right track

#

and it will be so much better for humans that they can look up the board name, not have to know if it's a samd

stuck elbow
#

by the way, I see there is meowbit in the adafruit shop, any chances for having circuitpython running on it? it's stm32f4 wth an extra flash spi flash

upbeat plover
#

i was just looking at that, cool new board

stuck elbow
#

it's been around for a while

#

their support sucks hard, though

#

they have a license-breaking closed-source fork of the mu editor executable, only for windows, for example

#

(mu is licensed GPL, they don't provide source code)

upbeat plover
#

when i was first looking at a dev board i was gana get a micro:bit, but i heard they were UK made and i seen CPX was USA... now im here

onyx hinge
#

alright! pausing and resuming a RawSample now works on nrf

#

and a wave file

#

there was just a bug in my wave file test program 🤕

manic glacierBOT
#

Good timing: I have been working on this today. The code is really all in Python: the C BLE modules provide the infrastructure. The code is relatively complex because of the complexity of HID. It needs pairing and bonding: I have pairing working, but have not yet implemented bonding (remembering the pairing info so you don't need to re-pair).

No promises on when it will get done, but it's my current task!

raven canopy
#

just a normal day in software land. build 3 just failed on bringing MixerVoice up-to-date.. 😄

onyx hinge
#

Are you getting further each time though?

#

I'm going to go do a happy dance for a little while and then re-test everything and find out what I broke while adding pause...

#

discovered and fixed one bug in here, though: a RawSample would only loop, I think 131070 times...

manic glacierBOT
raven canopy
#

haha. clearly not enough. "Loop Uptime: 4 years, 16 days, 13 hours, 6 minutes, 28 seconds"... 😄

onyx hinge
#

I'm using a sample program that makes one repetition of a "440 Hz" sine wave, so that's right around 5 minutes

#

actually testable

onyx hinge
#

was it really fast? really slow? who can say!

#

@tulip sleet fwiw I'm looking at the new gcc snapshot, at the point of seeing if the travis build will finish. before_script.19 388 0.01s$ (! var_search "${TRAVIS_SDK-}" arm || arm-none-eabi-gcc --version) 389 arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 8-2019-q3-update) 8.3.1 20190703 (release) [gcc-8-branch revision 273027]

onyx hinge
#

that's not gonna fly

tulip sleet
#

@onyx hinge - yeah we did this experiment a few weeks ago, and we were really disappointed

#

maybe due to -flto

onyx hinge
#

@tulip sleet I don't think things will work without lto, will they?

tulip sleet
#

they'll be too big. i need to do some websearching to see whether there's a fix for this (like turning off some expensive optimizations or something)

onyx hinge
#

I'll document my findings so that a third person doesn't come along and try the same thing

#

What a disappointment what such a huge performance regression could go out. I wonder what the story is.

#

It maybe they just built the compiler with optimization off

tulip sleet
#

try an m4 build without -flto and see if gcc8 is closer to gcc7 there.

onyx hinge
#

I can do that while I'm documenting timings, sure

#

Supposedly clang can build for arm. Has anyone tried that, that you know of?

#

Hmm the build failed anyway. I didn't drill down yet to see why

#

Oh, time limits

#

😭

manic glacierBOT
slender iron
#

@onyx hinge I tried clang a while back and the code size was 10s of kilobytes larger

onyx hinge
#

@slender iron 😦 okay

slender iron
#

ya, I'd love if it worked

onyx hinge
#

hm, any timings I generate locally are suspect since my baseline is debian stretch's gcc, not the one y'all use

#

(same for sizes)

manic glacierBOT
#

I found, and @dhalbert confirmed, that the 8-2019-q3 compiler is significantly slower (more than 3x as long!) to build. The whole build doesn't succeed on travis, because it exceeds the 50 minute timeout for jobs.

Old compiler (7-2018-q3-update):

Build trinket_m0_haxpress for pl took 72.58s and succeeded
Build trinket_m0_haxpress for zh_Latn_pinyin took 18.23s and succeeded

https://travis-ci.com/adafruit/circuitpython/jobs/221025799

New compiler (8-2019-q3-update):

B...
stuck elbow
#

one of these days someone will rewrite circuitpython in rust

slender iron
#

I'd love it if someone figured out how to interop with rust

onyx hinge
#

yeah I heard that a wealthy recluse with a lair on a volcanic island was going to provide the funds

slender iron
#

would love to use it for new modules

stuck elbow
#

I think it generates normal object files?

slender iron
#

¯_(ツ)_/¯

stuck elbow
#

@onyx hinge in my experience funds don't help much, a bored programmer helps much better

manic glacierBOT
upbeat plover
#

@stuck elbow your stage audiocore changes havent made it into current CP

#

with fixes, everything working for feather_m4_minitft_featherwing the ugame

exotic pumice
#

rust has good ffi

#

probably not impossible

#

do you need c-interop or python interop or both?

#

@slender iron

#

and c-interop is even easier

graceful heart
#

hi all! Question for everyone: What do you think is the best way to author a project that has dependencies on Circuit Python libraries (like from the bundle, for example) ? Does a requirements.txt make sense? I don't think a pip install would download the deps in an easy to get to location though?

Is the best option just to write a well documented Readme that points to the latest release of each library the project has a dependency on?

exotic pumice
raven canopy
#

@graceful heart yeah, at this time, pointing to the latest release for either the bundle or the library itself is best. for non-Github-oriented folks, this is probably the best link: https://circuitpython.org/libraries
takes a little guesswork out.

manic glacierBOT
#

So the problem is that the DHCP process is run asynchronously: the python code keeps running while the wiznet device is attempting the get an address. If it can't get an address then the while loop will never exit: you'd need to do something cleverer like giving up after 20 times around the loop and trying something else.

However, you should be able to interrupt the time.sleep(1) in the REPL (with ctrl-C) and the hard fault obviously shouldn't be happening and the flash shouldn't have...

minor plume
#

@graceful heart I was working a little bit on a python script that would look at a yaml config file and copy listed circuit python libraries from the bundle onto a device. I stopped working on it for a bit because I realize I was making it over complicated, but I may finish it at some point just in case people want to use it.

raven canopy
#

hehe. i have a similar one; auto forking and local git updating for every library repo. GitHub API is a wonderous thing. 😄

minor plume
#

I need to keep reminding myself of that principle of “do the simplest thing that could work, and add complexity when you need it and not before” 😂

#

Premature optimization is a real problem sometimes.

raven canopy
#

but that's just...no fun. haha. i like cpydeploy; looks good!

minor plume
#

Thanks! I need to get back to it and at least clean it up. I also need/want to start contributing to circuit python, and finish a couple of projects I have on my bench. However, I am moving from CA to AZ in a month, and I suspect none of those things is going to happen until after I move.

raven canopy
#

yeah, moving definitely stalls other stuff.

minor plume
#

Yup. I am moving into two new roles at work, presenting a panel at my company‘s customer conference in two weeks, and then moving in early September. A lot going on right now.

#

I said to a coworker the other day that I’m actually kind of grateful that I have way too much to do to be able to spend time freaking out about how much I have to do. 😂

raven canopy
#

haha! been there. congrats and good luck on the new roles (if they're desired...)!

minor plume
#

Thanks! They are, and they potentially pave the way to some very interesting opportunities a year or so from now.

raven canopy
#

its "break time" for me. i over-pruned this merge conflict, and my brain is telling me "nope. not doing that right now". 👋

minor plume
#

Plus they give me an opportunity to really make a difference for my company and for our customers. (I am a recovering DBA/Dev, and a manager at a software company.)

raven canopy
#

recovering DBA/Dev
🤣

minor plume
#

Your brain sounds like it’s making a wise suggestion.

#

I was a decent DBA, and I was a decent Dev before that, but I’m discovering that I really have a knack for leadership. The team I’m going to be leaving to take my new role is in a healthier place than it has ever been at any time in the company’s history, according to my boss.

raven canopy
#

"proof is in the pudding". leadership isn't easy. and to paraphrase something i picked up somewhere (and use a lot): "management is not leadership. anyone can manage. leading takes passion."

minor plume
#

Yup. And a fine balance between confidence and humility, I think.

raven canopy
#

definitely. i've enjoyed most of my leadership roles. some...are just no-win situations. 😄 ok..now i'm off.

minor plume
#

Yeah.

manic glacierBOT
manic glacierBOT
#

Hi @deshipu I appear to be having the same problem as @jadudm described in the initial comment. Reviewing the instructions you referenced (https://circuitpython.readthedocs.io/en/latest/docs/troubleshooting.html#file-system-issues) they ask me to "Download the appropriate flash .erase uf2 from the Adafruit_SPIFlash repo." and linked here https://github.com/adafruit/Adafruit_SPIFlash/tree/master/examples/flash_erase_express. Unfortunately there are no uf2's there.

Are there updated instruc...

#

I'm trying the libraries and examples from the bundle and realized the joystick pins are swapped, whenever I move the joystick UP or DOWN the values I receive are from the JOYSTICK_X, same for the y axis (LEFT or RIGHT) is this normal behavior? any suggestion?.

This is my code:
`import time
import board
import analogio

def read_x(samples=3):
reading = 0
for sample in range(0,3):
reading += x.value
reading/=3
return reading

def read_y(samples=3):
...

manic glacierBOT
manic glacierBOT
onyx hinge
#

Can someone point me at the docs for translators? Or, really, my question is: are translators intended to edit the .po files by hand, or is there some suggested technology to help them out? Or, really, my statement is, I'm excited about https://weblate.org/en/ and I wonder whether it should be investigated for circuitpython

Weblate

Copylefted libre software, used by over 1150 libre software projects and companies in over 115 countries.

tulip sleet
#

it looks interesting, the free tier for libre projects has some limitations but I don't understand what they are

manic glacierBOT
#

@nickzoic Would it be possible to have a wiznet.connected property within the wiznet module which I would poll against, instead of the while/sleep code?

. If it can't get an address then the while loop will never exit: you'd need to do something cleverer like giving up after 20 times around the loop and trying something else.

Should this be handled within the wiznet module itself? Or in the code.

Can you let us know the exact circuitpython version you were using, eg: the filen...

manic glacierBOT
manic glacierBOT
upbeat plover
#

anyone know of any other libs that need audiocore fix? I just did CPX with @stuck elbow fix.

stuck elbow
#

@upbeat plover maybe the rtttl?

manic glacierBOT
upbeat plover
#

did PR for rtttl

upbeat plover
#

@stuck elbow not sure why but CP is using "circuipython-stage" 6d1ae72916 and not master

#

oh i see why in CP it says its using "circuitpython-stage @ 6d1ae72916"

#

should it be @ master?

raven canopy
#

Submodules are tagged to commits. On a local, you can point the submodule to master. But the moment you push it, it will reflect the current commit.

upbeat plover
#

@raven canopy wouldnt that be a good thing? error will be caught faster?

stuck elbow
#

@upbeat plover no, it uses an explicitly released and tagged version

#

this way we can keep doing development on the master and not break CP

ruby atlas
#

@idle owl Welcome back, and awesome keynote at PyOhio!

idle owl
#

@ruby atlas Thank you!

lone sandalBOT
meager fog
#

@tidal kiln p0ng

swift arrow
#

anyone using Visual Studio code to program their CP stuff?
I seem to remember a blog post or something that there was an extension for VSC that enabled the output to be seen.. ie print statements.. but I can't find the extension nor the post.. like the serial console in Mu

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

Via Scott Hanselman’s blog: My son and I were working on an Adafruit NeoTrellis M4 Mainboard over the holidays. This amazing little device puts a NeoPixel + an Audio board + a USB port along …

swift arrow
#

no that is the one that keeps popping up in my searches.. I think it was like an adafruit blog or something

#

lol which that is also a blog.. but I'm after the one that talks about the name of the experimental serial console like the one in Mu

#

I wonder if I can't find it because "Mr Lady Ada" talked about it on a show..

#

argh.. I swear it exists somewhere

raven canopy
#

The one from Scott Hanselman shows the serial console being used in one of the screenshots. 🤷

swift arrow
#

doh... nope

tidal kiln
#

@meager fog p1ng

ruby atlas
#

@idle owl do you have a dotstar strip someplace I can test the _pixelbuf refactor on? I think I thoroughly broke it in my latest branch.

meager fog
#

@tidal kiln hihi for the seesaw firmware

#

its almost certainly that bug

#

so question - if we dont use the callback to query the # of pixels, it still works

idle owl
#

@ruby atlas Yep! On it. 😃

tidal kiln
#

not sure. i think the number of pixels is needed. it's parameter to the call that actually does the writing.

ruby atlas
#

@idle owl Thanks! That strip will do fine. Now to wire it up to the Metro M4 so I can also connect the Segger.

meager fog
#

@tidal kiln ahh i mean, is it that we only store 255 for the length of the buffer, max, or that we can only address

#

its def a bug, i think it was a miscommunication, we should support 255+ 'pixels' but got turned into '255 bytes'

#

the samd09 doesnt have a ton of memory but should be able to do maybe 100 pixels

#

the samd21 has 'infinite' ram 😃 can do 1000

raven canopy
#

@ruby atlas I usually use the little grabbers on exposed jumper. can be a pain keeping them in place though..

tidal kiln
#

the actual buffer size looks like it is set differently for different targets

#

it's just that variable for the length

ruby atlas
#

@raven canopy yeah it's a real pain. I need to solder things up more permanently at some point. I've been using alligators.

meager fog
#

@tidal kiln ok how about we return 16 bit no matter what, then?

tidal kiln
#

yep. that's the fix.

meager fog
#

ok please patch it and try it on raspi/feather if you can

#

im a lil swamped today with a script writeup

#

but i can also test

tidal kiln
meager fog
#

ok please do a PR 😃

#

also gotta change type of len

#

right?
oh weird