#circuitpython-dev

1 messages · Page 245 of 1

tulip sleet
#

@nocturne hatch Yes, after 4.0.0, we'd like to do simple central mode support, and BLE HID. There's no schedule, though.

manic glacierBOT
manic glacierBOT
#

The PyPortal_Smart_Thermometer was downloaded yesterday at 10pm from your
web site.
The CircuitPython I was running
adafruit-circuitpython-pyportal-en_US-4.0.0-beta.6.uf2
The library bundle I was running is
adafruit-circuitpython-bundle-4.x-mpy-20190420

I loaded the Viewmaster example and it is working after unplugging the
pyPortal and then plugging it back it. I have had other problems with the
Smart Thermometer code to.

On Sun, Apr 21, 2019 at 10:28 PM Dan Halbert <notifications@github...

manic glacierBOT
#

The message that I get now is
Running in safe mode! Not running saved code.
Code done running. Waiting for reload.
soft reboot

The Viewmaster code is also not running correctly. It displays the first
bmp file and then stops.

I think I will give up for the night. Thank you for your help.

On Sun, Apr 21, 2019 at 10:42 PM Dan Halbert notifications@github.com
wrote:

Could you try "Absolute Newest" from here:
https://circuitpython.org/board/pyportal/ ?

We have fixed several crash...

#

I tried the Adafruit Quotes Example program and it works correctly.
I will try again tomorrow.
Thanks again.

On Sun, Apr 21, 2019 at 11:03 PM Thomas Kirkland <
thomas.r.kirkland.737@gmail.com> wrote:

The message that I get now is
Running in safe mode! Not running saved code.
Code done running. Waiting for reload.
soft reboot

The Viewmaster code is also not running correctly. It displays the first
bmp file and then stops.

I think I will give up for the night. Thank you f...

#

The viewmaster example code is now working correctly. I had changed the
code to switch pictures based on the light sensor and the room was too dark
when I retried the code the first time. When I turned on the lights the
code worked correctly.

On Sun, Apr 21, 2019 at 11:09 PM Thomas Kirkland <
thomas.r.kirkland.737@gmail.com> wrote:

I tried the Adafruit Quotes Example program and it works correctly.
I will try again tomorrow.
Thanks again.

On Sun, Apr 21, 2019 at 11:03 PM Thomas ...

upbeat plover
#

@stuck elbow @timber mango can you guys test this for me?

it works on my custom build, but would like to know if it works on different ugame stuff, and if the screen scaling stuff works right

#

like is it playable without any edit

stuck elbow
#

@upbeat plover the buttons don't seem to be doing anything

#

ah, it works, I had broken firmware from testing

#

good job

teal bear
orchid basinBOT
idle owl
#

<@&356864093652516868> Here is the notes doc for today's Weekly. Please put your Hug Reports and Status Updates in even if you'll be there in voice - it's super helpful! Thanks! https://docs.google.com/document/d/1ReQ9NS7Q93XM0qE3IHrrFCsTEnpIO_n6dUJI98Ie__E/edit#

orchid basinBOT
upbeat plover
#

@stuck elbow only buttons are up and down, I was gana do differently but i found gameplay more fun/difficult as it is now, the only thing i would like to work on is the Wall class, id rather it be a tiled sprite thingy.... I would like to do something (ugame.display.height//2) and then just move it randomly with random.randint(0, (ugame.display.height//2)) that way its like a wall is coming and you have to go above it or below it.... i wasnt sure how that would scale though.... like if the screen was really big would it be possible to get out of the way.... blinka's speed increases with screen size but so does everything else

#

also if you tried current version on a really big screen i would guess it would lag, from the massive amount of objects it would have to keep track of

modest atlas
#

@umbral dagger i love your article on the trinket mo express hack, is it possible to do the same but keeping the flash external and using pins on the board over soldering to the mcu

umbral dagger
#

@modest atlas Should be but you would loose what little I/O the board has.

#

It was an experiemnt more than a practical project.

modest atlas
#

Want to add flash to a feather mo lora

umbral dagger
#

Ah

#

It's just SPI

#

You'd need to make custom board support for it.

#

If it's just storage you want, you coiuld add an SD card to the SPI interface. Then no special board support needed.

modest atlas
#

Could I store my cpy lib files there

umbral dagger
#

I don't think so.

#

You'd have a bootstrap problem... loading the SD lib so you could load libs 😃

#

Though the core system could be in internal flash.

#

You could do a build with the sd lib frozen into the core CP.

#

@modest atlas Here's a question... can you share a spi bus with flash and other devices?

modest atlas
#

I have no idea

umbral dagger
#

I'm thinking external spi flash might want/need the full bandwidth.

#

@modest atlas Anyway, glad you liked the article. That was the start of a long and twisty road over the last year and half.

modest atlas
#

You have some great work very educational and exciting to see

umbral dagger
#

Thanks

orchid basinBOT
teal bear
#

@umbral dagger I've been doing SPI for about 48 hours now.. that said, I think you can share - this might answer it http://codelectron.com/how-to-setup-virtual-spi-in-linux

orchid basinBOT
teal bear
#

also, if anyone knows how to log SPI driver requests, that's my current task

upbeat plover
#

Edublocks is nice, good place to start, recommending it to my friend i let borrow CPX

inland tusk
#

is there a meeting this week

solar whale
#

yes

old smelt
#

Lurking today.

sterile bronze
#

Lurking for the meeting

solar whale
#

👋

raven canopy
#

have my lappy at work today. tethered to my phone, so hopefully have a mic.

tidal kiln
#

lurking

upbeat plover
slender iron
#

👍

#

@tidal kiln can you mute?

turbid radish
#

Here but lurking today

river quest
raven canopy
#

thanks digikey !!!

river quest
#

In the news - HackSpace issue #18 has a TON of CircuitPython articles / projects, including a 6 page getting starter - https://hackspace.raspberrypi.org/issues/18 (PDF download). AND 2600 has a PyPortal project.

slender iron
#

🎉

inland tusk
#

harrah for the core

turbid radish
#

I'm mike only... 😃

slender iron
#

@stuck elbow mind sorting your notes alphabetically on your username?

raven canopy
#

"Only. Mike, Only." 🕵

pastel panther
#

@turbid radish 😐

stuck elbow
#

sorry, I thought I did

turbid radish
#

Actually still lurking, :humor:

stuck elbow
#

fixed

slender iron
#

thanks @stuck elbow

#

@old smelt want your hug report read off?

gilded cradle
#

Can you get back to me in a minute

#

Ok, ready

turbid radish
#

New boards, yes!

wraith tiger
#

BTW, for anyone using vim vimregex.com is very informative vim's flavor of regex.

prime flower
#

@wraith tiger I have some PySerial/USB experience from a very weird project last year, if you need some advice on it. Feel free to PM or chat in a diff. channel

solar whale
#

@idle owl What do you do in your spare time 😉

idle owl
#

Spare time?

raven canopy
#

PyCon prep? 😄

old smelt
#

@slender iron - sorry for the late reply. Yes, I did. Mostly working on other stuff right now, but listening in and wanted to get my hug report in last-second. kattni got it. Thanks!

slender iron
#

cool cool, thanks!

wraith tiger
#

@prime flower OK, thanks.

#

I remember the character of Uncle Martin from the "My Favorite Martian" TV show would purge unimportant info from his brain to free up memory space.

errant grail
wraith tiger
#

It's a clever design that can be used as two separate breakouts or as a pass through when jumpers are installed.

prime flower
#

ha yes! CircuitPython_Nest!

gilded cradle
turbid radish
#

Thank you, yes I need to boost this as well. Hopefully we'll get some good sales 😃

gilded cradle
#

Yeah

solar whale
turbid radish
#

Anyone wanting either a paper or eBook on working with the Circuit Playground Express, check for the book "Getting Started with Adafruit Circuit Playground Express" wherever you order books from. Or check out the Humble Bundle for a good group deal for the eBook.

prime flower
#

@solar whale woah - flappy inflatable tube man! PM me with more details as you work thru it, we'll blog it up!

turbid radish
#

Go RC 😃

pastel panther
#

old boss liked to say a pessimist is an optimist with experience

errant grail
#

Release the candidate!

pastel panther
#

@raven canopy is channeling adabot

slender iron
#

my voice connection is bad here

pastel panther
#

so is kattni?

tulip sleet
#

me too - some kind of discord issue

slender iron
#

thanks for running the meeting @idle owl and thank you to @pastel panther for taking notes!

pastel panther
#

glad to help!

turbid radish
#

Thank you to the CircuitPython team and to you all

errant grail
#

Thanks!

slender iron
#

👋

prime flower
#

👋

gilded cradle
#

Thanks

slender iron
#

hope to see you there @inland tusk

turbid radish
upbeat plover
#

i want to recreate my favorite NES game "Seicross" I never beat it, graphics would end up currupting so bad it would be like crazy looking

orchid basinBOT
manic glacierBOT
#

As mentioned earlier on Discord (#help-with-circuitpython):

I'm pretty new to python, so I'm probably missing something basic to avoid memory issues. But I've isolated a continuous memory loss due to my use of displayio. I have a parent group splash = displayio.Group(max_size=SPLASHMAX). I splash.append a series of simple bitmaps to initially fill up the group. In the main loop, I just overwrite those same child bitmaps with other bitmaps over and over forever. No new appends are made t...

manic glacierBOT
#

Thanks for pointing tools/gen_usb_descriptor.py, I had missed it :)
I somehow had to patch it further for critor's computer to detect the Trinket M0 running a build from the current https://github.com/debrouxl/circuitpython/tree/master , but it's all fixed now, great.

I understand very well that the 4.0 release is nearing and that you don't want to delay it by spending time making USB more configurable for the benefit of infrequent people targeting an oddball I/O-less platform, and wantin...

wraith tiger
#

It looks like I’ll need to upgrade to at least a slightly better logic analyzer to be able to capture full speed USB.

#

Mine is only 24 MHz max, which is only twice the full speed rate.

stuck elbow
#

isn't usb using differential signals?

teal bear
#

@wraith tiger what are you doing looking at USB?

wraith tiger
#

@stuck elbow It’s sort of pseudo-differential.

manic glacierBOT
simple pulsar
#

Hello all. What's the estimated date for CircuitPython 4 release?

slender iron
#

@simple pulsar soon. hoping to do a release candidate in the next few days

#

and then we'll wait a week-ish to hear of any issues

#

we'll fix any that come up and reset the week-ish waiting period

simple pulsar
#

Ok, just curious, I'm working on a Learn Guide which uses that adafruit_midi and has the dependency on 4 for USB MIDI support. But I am in no particular rush.

meager fog
#

@tidal kiln hey can you let me take over the RFM FAQ

tidal kiln
#

sure. try now?

meager fog
#

@tidal kiln ok text changed

#

done now!

tidal kiln
#

@slender iron fyi - at this point i think the hard crashes were something on my side. i had an unused import i found when writing up the issue that seemed to be related. (import of imageload)

wraith tiger
#

@teal bear Sort term: I want to be able to capture traffic between my dmm & computer. Long term: Logic analyze all the things!

slender iron
#

@tidal kiln nothing on your side except power should be able to lead to a safe mode. anything else is something we should fix

tidal kiln
#

ok, the other hiccup was the current state of imageload. i think i had the PR version pushed over.

slender iron
#

kk, I'll fix the color order soon

manic glacierBOT
tidal kiln
#

@slender iron yep. responded.

slender iron
#

thank you @tidal kiln

teal bear
#

@wraith tiger in freenode #timvideos futarisIRCcloud CarlFK: What do you want to capture full speed USB for? There was good video that outlined the (cheap) options (on #timvideos or #tomu) a few weeks ago...

manic glacierBOT
wraith tiger
#

That one is kind of like the big brother of the one I have now..

manic glacierBOT
orchid basinBOT
orchid basinBOT
slender iron
#

@stuck elbow want me to update the stage library? which release should I include?

stuck elbow
#

@slender iron I don't really have releases, just use the master

slender iron
#

can you just tag a release? that way it's easier so track what version it is

stuck elbow
slender iron
#

thanks!

#

will make a pr to update it this morning

stuck elbow
#

thank you!

manic glacierBOT
manic glacierBOT
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 4\.0\.0\-rc\.0
orchid basinBOT
upbeat plover
#

wow so many boards

#

is there a way to sort that list by name?

#

have to "Ctrl + F" and search for what im looking for so much stuff like wowz

tulip sleet
manic glacierBOT
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 4\.0\.0\-rc\.1
desert iris
#

Congratulations! Version 4.0 Yes. finally.

solar whale
#

Who won the RC.1 pool ? 😉

orchid basinBOT
slender iron
#

@desert iris not quite stable but very close

gilded cradle
#

Potentially stable

tidal kiln
#

@slender iron i'm starting to work on displayio examples for non-built in display configs. any suggestions for board / display combo?

slender iron
#

@tidal kiln nope, they all should be ok

tidal kiln
#

ok. just to check - about to breadboard an itsy m4 and PID1480

slender iron
#

do we have a driver for the 9340C?

tidal kiln
#

hopefully 9341 works - does for arduino lib

#

nothing special about choice - just happens to be what i have on hand

#

but...better to use an ILI9341?

manic glacierBOT
#

This is minor, but I have other code in my fork and I can't quite make a fix right now... @dhalbert said make an issue :-)

When the USB descriptor generation moved to /supervisor (from ports/atmel-samd) there are two places that list "Makefile" as a dependency. Those should now be changed to 'supervisor.mk'

Here are the two lines (line numbers have changed in my fork:

autogen_usb_descriptor.intermediate: ../../tools/gen_usb_descriptor.py Makefile | $(HEADER_BUILD)
and
$(BUILD...
upbeat plover
#

when feather air lift coming?

crimson ferry
#

sekret ...last Wed's A.A.E. I think I heard something about 3 hardware products coming out this week, so I'm cautiously optimistic (I wanted one almost the moment I learned about ESP32SPI)

manic glacierBOT
manic glacierBOT
#

All import errors with board and displaio are gone now .Code failed at line 38
Traceback (most recent call last):
File "code.py", line 38, in <module>
ReloadException:
soft reboot
Below is the code from the example....
""
This test will initialize the display using displayio
and draw a solid red background
"""

import board
import displayio
import adafruit_ili9341

spi = board.SPI()
tft_cs = board.D9
tft_dc = board.D10

displayio.release_displays()
display_bus = display...

manic glacierBOT
manic glacierBOT
solar whale
#

Off to a good start -- loaded rc1 on several boards (feather_nrf52840, PyPortal,g rancentral, metro_m4_express) no issues to report ....

stuck elbow
#

\o/

solar whale
#

also tried pewpew10 !!

manic glacierBOT
#

The shield and TFT screen arrived today, The demo app that came with the Metro MO Express worked fine. attached the TFT shield and downloaded the adafruit_ili9341.py to test and that's when the code started not seeing the board and the other modules.

Installed CircuitPython 4.0.0-rc.1 code saw the seeing the modules and uploaded to board without errors, but no demo on the screen.

reloaded the working demo that was shipped with the Mo Express it stopped working, seems to be two Issues Bo...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
crimson ferry
#

rc1 looks great on PyPortal, ItsyBitsy M4, and Feather M4. I'm trying to isolate another memory leak (~50k/hour), but it was present before rc.0 not newly introduced. Looks like fragmentation, possibly related to #534 (import heap/frag).

manic glacierBOT
upbeat plover
#

@crimson ferry I get memory leak when i use gc print without collecting after, I know you already know about the collect so probably not your issue```python
import gc
print(gc.mem_free())

but not when i do
```python
import gc
print(gc.mem_free())
gc.collect()
#

never mind, seems to always leak memory

#

both leak memory gc is broken?

stuck elbow
#

it's not a leak, that's how garbage collector is supposed to work

#

it doesn't collect until you actually run out of memmory

upbeat plover
#

okay so it just looks like my ram is getting less and less

stuck elbow
#

it is, but as soon as it is needed, the gc will run and free it

upbeat plover
#

thanks for clearification on that, i didnt know

stuck elbow
#

if you have less memory after gc.collect() runs, that's a leak

upbeat plover
#

? just doing gc.collect() doesnt run it unless it is needed?

stuck elbow
#

I think it forces it to run

#

not sure

upbeat plover
#

well i still get less and less ram with this ```pyhon
import gc
while True:
print(gc.mem_free())
gc.collect()

#

ill run it till ram runs out see if it runs the gc.collect after

manic glacierBOT
#

@stephenvowell That shield is meant for classic Arduino. In the product description it says:

Works with any classic Arduino '328. Solder closed three jumpers to use the ICSP header for use with Leonardo or Mega

See https://learn.adafruit.com/adafruit-2-8-tft-touch-shield-v2/connecting#tft-screen-pins-2-4
and
https://learn.adafruit.com/adafruit-2-8-tft-touch-shield-v2/connecting#using-with-a-mega-slash-leonardo-2-12

board.SPI() would use the 2x3 header pins. You could change the ...

stuck elbow
#

that should stabilize at some point

upbeat plover
#

no issue now?? shows ram constaint 159184 on feather M4

#

not sure why sometimes it give less and less

stuck elbow
#

heisenbug

crimson ferry
#

I have same code running on PyPortal, Feather M4, and ItsyBitsy, but with conditionals for PyPortal-specific stuff. It's a while True that does the same things over and over. The non-display version will run for days and gc.collect() (manually about every minute, b/c it keeps me alive longer) will usually pop them right back to the exact byte of memory they had before, but the PyPortal (probably displayio-related, but could be some other feature) runs down steadily until it gets a memory error. I'm trying to isolate it. I had one with making shapes, but a pre-RC version cured that one. So now I'm looking at fonts and buttons and stuff.

#

Believe it's fragmentation-related b/c I can't allocate about 1.5k when gc.mem_free() says I should have like 50k.

#

I do print(gc.mem_free()) gc.collect() print(gc.mem_free()) so I can see before and after. Maybe I shouldn't be manually gc'ing so much (in theory you shouldn't need to do it at all), but it has no ill effects on the non-PyPortal code.

meager fog
#

@umbral dagger heya for the BLE logger guide, please add a screenshot from your phone

#

so they can see how to use it

umbral dagger
#

@meager fog will do

celest zenith
#

Are there plans to add I2C and monochrome (1bpp) support to displayio?

umbral dagger
#

@meager fog How's that look?

stuck elbow
#

@celest zenith Yes, eventually

orchid basinBOT
manic glacierBOT
meager fog
#

@umbral dagger thankx

#

btw all here, there's a couple more AirLifts in stock

ruby lake
#

for my truck? 😉

crimson ferry
#

PyBadge!

upbeat plover
#

PyBadge reminds me of hallowing but M4

meager fog
#

yah its not too different

#

but of course, buttons, bigger screen, beefier chip, can run makecode arcade and more

stuck elbow
#

yay, pybadge is on sale!

upbeat plover
#

i got miniTFT joypad featherwing working with feather adalogger had to cut out soo much

LD_FILE = boards/samd21x18-bootloader.ld
USB_VID = 0x239A
USB_PID = 0x8015
USB_PRODUCT = "Feather M0 Adalogger"
USB_MANUFACTURER = "Adafruit Industries LLC"

INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

CIRCUITPY_DISPLAYIO = 1
CIRCUITPY_PEW = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_RTC = 0
CIRCUITPY_SAMD = 0
CIRCUITPY_USB_HID = 0
CIRCUITPY_USB_MIDI = 0
CIRCUITPY_TOUCHIO = 0
CIRCUITPY_GAMEPAD = 0
CIRCUITPY_GAMEPADSHIFT = 0
CIRCUITPY_I2CSLAVE = 0
CIRCUITPY_BLEIO = 0
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_NVM = 0
CIRCUITPY_NETWORK = 0
CIRCUITPY_WIZNET = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_ANALOGIO = 0
CIRCUITPY_MATH = 0

FROZEN_MPY_DIRS += $(TOP)/frozen/feather_m0_adalogger

CFLAGS_INLINE_LIMIT = 35

and i froze adafruit_bus_device

never thought it would be possible but it is, its possible to use it with M0 non express boards

#

doing different test right now see if i can add back and not have to use frozen bus stuff

stuck elbow
#

@upbeat plover that is a fun exercise, but ultimately not very practical

#

I finally got this thing to work

opal mason
#

@meager fog Thanks for the heads up about the M4 express airlift. Just grabbed one from the store. Going to use it as the foundation of my next robot project ( a BB-8) running CP. Looking forward to developing some libraries to handle sabertooth motor controllers....

upbeat plover
#

@stuck elbow your right not very practical, but i just did test and my UART logger still runs on this build... gana try something crazy and see if i can get the logger and the display to work same time

stuck elbow
#

@upbeat plover you know you can graft a flash memory chip on that feather and turn it into feather haxpress?

meager fog
#

@opal mason nice

modest atlas
#

Congrats on cpy 4.0.0!!!

upbeat plover
#

ive heard about people doing stuff like that but ive never tried, i total would give it a go if i had a little SPI storage chip

stuck elbow
#

there is a trinket_m0_haxpress example in the boards

upbeat plover
#

@stuck elbow can i somehow get the SD card to be external flash device?

stuck elbow
#

you can run programs from an sd card, but you can't have it show up on USB

#

@meager fog on the pybadge description it says that it has a volume pot, but I can't see it on the photos

upbeat plover
#

@stuck elbow i mean more like build CP so i can put a ton of frozen in the SD card?

stuck elbow
#

no, you can't do that

meager fog
#

ioh right yeah

#

ill remove

#

fixed

#

@stuck elbow lemme know if i mde any other mistakes 😃

stuck elbow
#

looks good!

#

by the way, why are the direction buttons black? did you use different ones? weaker/stronger?

manic glacierBOT
#

It's actually a problem with the code not fitting the shield (or vice versa), so you have two options here: either you change the jumpers on the shield, as the article says, or use an SPI object created on the pins that the shield uses by default, instead of using the board's default SPI pins. The first one requires a change in hardware, the second one in code — it's up to you which one you choose.

stuck elbow
#

@tulip sleet mid-air collision :)

tulip sleet
#

@stuck elbow I just deleted mine, yours is better!

manic glacierBOT
stuck elbow
#

tbh, it would probably be a good idea to add an example specifically for that shield

#

but I'm way too lazy to do that

gilded cradle
#

Yeah, I didn’t realize that shield would work with CP when I wrote the example. I can add a shield specific version to the repo if that modification ends up testing good.

stuck elbow
#

that would be awesome!

manic glacierBOT
#

But before I do here is the code Mu doesent see errors.

import board
import displayio
import adafruit_ili9341
import busio

spi = busio.SPI(board.D13, MOSI=board.D11, MISO=Board.D12) #SCK, MOSI, MISO

tft_cs = board.D9
tft_dc = board.D10

displayio.release_displays()
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs)

display = adafruit_ili9341.ILI9341(display_bus, width=320, height=240)

Make the display context

splash = displayio.Group(max_size=1...

manic glacierBOT
#

Since I'm building a board with an OLED screen, and I already have a working prototype, I thought that I would start a discussions about the possible ways of implementing support for monochrome (1-bit) displays in displayio.

I'm using an SH1106 OLED display, but it is organized very similar to SSD1306 OLED, the PCD8544 "Nokia" LCD, and the e-ink displays, so we should be able to cover a good range.

The current display code, especially the displayio_refresh_displays function, is ...

upbeat plover
#

i think the helper lib is in the bundle now

#

if not ill try making a draft. @idle owl you already got something in the works? seems like when ever im gana do something like that you already have it done 😃

idle owl
#

@upbeat plover It's not on my list 😃

upbeat plover
#

do you know if anyone else is working on it? sound like im good to go

idle owl
#

I don't know, @gilded cradle might be the only one who could be. Maybe wait on a response from her.

upbeat plover
#

kk

gilded cradle
#

Yep, I’m working on a guide for using displayio with TFT FeatherWings.

upbeat plover
#

Awesome

sly falcon
#

The only change (other than the version rev) is it's compiled against the official Espressif IDF v3.2 that was recently released

#

I'm doing some testing here and thinking it would be great to get some others to test before I submit the PR

#

Anyways...back to Ask an Engineer!

solar whale
#

@sly falcon thanks for building and posting it. I look forward to trying it. Unfortunately, I won’t be able to do any testing until next week. Good luck with it.

crimson ferry
#

@sly falcon I can load it up on a couple of mine. Anything special to do, or just let my CP software put it through its paces ( a few web calls every hour)?

sly falcon
#

@solar whale thanks! And no worries....I'm sure we'll get it figured out 👍

#

@crimson ferry nope - should behave just like the factory-shipped firmware (v1.2.2).

#

Heck... should behave just like v1.3.0, too

crimson ferry
#

Why is the "Adafruit Metro M4 Express AirLift (WiFi) - Lite" called "Lite"? ...cuz it's lifted by air, or are there some abbreviated features from what some might expect?

celest zenith
#

you gave me an excuse to figure out how to upload new firmware on my airlift

#

@sly falcon success, I built your branch and loaded it onto my AirLift, will let you know if I have any problems.

sly falcon
#

@crimson ferry if I understood ladayada on AaE tonight, it's because it's using a version of the SAMD51 with less RAM

#

@celest zenith woo for learning new things! Haha

#

Thanks for compiling and testing! I look forward to hearing how it goes

#

BTW - did you follow the updated instructions I have in the README?

celest zenith
#

no, I had already setup a build environment and just checked out the v3.2 tag so I just ran make and then cut an pasted the python command that pops out of the build

tulip sleet
#

it's Lite because SAMD51J19 instead of J20 (192kB vs 256kB ram), 2MB instead of 8MB external flash, no crypto chip

upbeat plover
#

there will be non lite version? is that why?

#

one with SAMD51J20?

crimson ferry
#

Thanks docmollo and danh. It's good to see Airlift taking off (pun intended)!

#

@sly falcon I'm not savvy with the building yet, so I loaded the .bin

tulip sleet
#

no guarantees on anything; what shows up is what you get, but we've had LEEKS

upbeat plover
#

i dont have a metro yet i think i might get a samd51j20, just cause that and I dont have grand central

sly falcon
#

@celest zenith ok, cool. Should be the same thing as running "make firmware" and uploading that.

#

@crimson ferry you're welcome! No worries on not building from source. Testing that BIN file is totally helpful, too!

crimson ferry
#

Up & running on a Feather ESP32 CP-co-processor. No news is good news, but I'll let you know if anything weird happens. I'll put it on some breakouts too once I get set up for that.

manic glacierBOT
tight minnow
#

New to circuitpython: Where to I find board.py for my device. I am looking for an easy document to determine available io pin functions.

#

I'm assuming a board.py must exist to support the "import board". It does not reside in the lib folder. Built into the core circuitpython code for each mpu?

main meteor
tight minnow
#

Thanks. I had not explored the ports folder on github.

main meteor
#

Most of the board (and CPU) specific stuff seems to live there.

stuck elbow
#

@tight minnow if you check pins.c in those directories, you will see the name to hardware mapping there

solar basin
#

@slender iron I just saw the pygb project as I was surfing CircuitPython.org, I so want in! lol

orchid basinBOT
#

@jwcooper We've updated the script with the rest of the necessary information to complete the libraries page.

I want to find out, how does the page get updated? Is it triggered by the script updating? Or is there something else to it?

I ask because I am considering having the authors/reviewers/newlibs/updatedlibs lists be updated daily as a rolling weekly list. I want to make sure that we're handling that appropriately if we decide to do it - I think it's simply a change on our end for...

tight minnow
#

Thanks all for the assistance with the board module . The link provided by deshipu seems particularly helpful

orchid basinBOT
slender iron
#

@solar basin awesome! hardware is hard to come by now but hopefully it'll get better at some point

royal ridge
#

I need a sanity check: are both displayio and hid non-blocking, right?

crimson ferry
#

@tight minnow dir(board) and dir(microcontroller.pin) will give pin info interactively

orchid basinBOT
tight minnow
#

@crimson ferry I've gotten dir(board) to work but not dir(microcontroller.pin) . NameError: name 'microcontroller' is not defined
Am I supposed to replace microcontroller with the name of a particular controller?

upbeat plover
#

i think you need to ```python
import microcontroller

#

then use dir(microcontroller.pin)

tight minnow
#

I should have thought of that. Just getting back to python after about a year. I'm proving to be a bit rusty.

#

Thanks

upbeat plover
manic glacierBOT
#

How do eink's fit into this picture? They are slow to refresh and some allow partial updates.

refresh_displays will likely change a lot with partial screen update support. My current thinking is to structure the partial areas into rectangles rather than individual pictures. By passing rectangles areas can fill in multiple pixels in a single call. I think they'll also want a pixel orientation to dictate the pixel order in the buffer. (OnDiskBitmap may want to will it in non-linearly if pi...

manic glacierBOT
#

I have limited experience with e-ink screens, having only used the smaller ones, but at least those are very similar to the other monochrome displays. Here is a driver I wrote for the gew0154t8 chip: https://gist.github.com/deshipu/f98123276336c6763d66c439761ccd48

Notable differences:

  • You need to provide both old pixel data and new pixel data for them to be able to calculate the optimal update pattern. That means we will need double buffering.
  • They have a "busy" pin, which indicates ...
manic glacierBOT
inland tusk
#

Wondering if anybody is working oni getting blinka working on the pocket beagle bone? Just got three of the PocketBeagles

idle owl
#

@inland tusk Check the Blinka repo, I believe PocketBeagle support has already been added.

manic glacierBOT
#

Many of those displays don't have the MISO pin in the SPI mode, and even if the display has it, the breakouts they are mounted on don't make it available. Also, it would be painfully slow.

For a 128x64 SSD1306 OLED, you need 1kB of RAM to keep a full copy of the whole screen, or 128B to keep a buffer for a single line. Compared to a 160x128 ST7735's 40kB of RAM, that is more reasonable.
Besides, with 1kB of data to compute and send to the display each frame, doing full-screen updates does...

inland tusk
#

@idle owl all I should have to do is add blinka using pip3 or pip to installl it and if it works then all is well? Somebody recently mentioned it so I figured I would ask about it.

idle owl
#

Yes in theory.

manic glacierBOT
#

Right now the most expensive part of refreshing the screen is actually computing the colors of all the pixels, and not actual sending of the computed data (which could be, if it became a problem, done asynchronously with DMA anyways). If we keep that 1kB buffer of the whole screen for the monochrome displays, we can only update the pixels that changed, and keep the old pixels from previous frames. We would still send full bytes to the display, but that's fast. If we don't keep that buffer and...

manic glacierBOT
manic glacierBOT
#

I took a CPX running 4.0.0 beta7 connected to Windows host:

  1. reset it to put 4.0.0 rc 1 on it
  2. connected to serial console
  3. deleted lib
  4. copied lib from adafruit-circuitpython-bundle-4.x-mpy-20190425 onto board
  5. ran chkdsk f: (it said no problems)
  6. renamed code.py on the board to something.py
  7. copied myfile.py onto board and renamed it to code.py
  8. hit control-D

This popped out:

Auto-reload is on. Simply save files over USB to run them or enter REPL to dis...
simple pulsar
#

Hello all. I've noticed that the latest bundle of libraries has the new adafruit_midi library on it but this immediately gave a MemoryError. I just had a look and was surprised to see adafruit_midi/init.py (not an .mpy file). This looks the same for a few other libraries I've just looked at. Is there a reason for this? I think this is going to be a bit of a disaster for my app code

#

I meant adafruit_midi/__init.py__ there

manic glacierBOT
manic glacierBOT
lone sandalBOT
raven canopy
manic glacierBOT
stuck elbow
#

you shouldn't be putting any substantial code in __init__.py anywyas

manic glacierBOT
simple pulsar
#

@stuck elbow @slender iron @raven canopy I added a comment on all this to https://github.com/adafruit/Adafruit_CircuitPython_MIDI/issues/3#issuecomment-487035082 - is the build system correct/useful in not applying mpy-cross to a library python file? I'd say not but perhaps there's something I'm not aware of here.

manic glacierBOT
meager fog
#

pybadges in stock

sly falcon
#

wooooo!! Order placed 😄

manic glacierBOT
manic glacierBOT
#
import microcontroller
microcontroller.on_next_reset(microcontroller.RunMode.BOOTLOADER)
microcontroller.reset()

works as expected but

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

Does not enter safe mode. I was going to use it like "else statement" boots to safe_mode stopping code.

manic glacierBOT
manic glacierBOT
manic glacierBOT
stuck elbow
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
marble hornet
#

@meager fog mind if i use the feather logo on a 3rd party feather compatible board?

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
idle owl
#

@stuck elbow Might make sense. I would suggest emailing Mike B to find out for certain. DM me for contact info if needed.

manic glacierBOT
manic glacierBOT
slender iron
slender iron
#

<@&356864093652516868> We will not meet May 6th or that week due to PyCon. Will meet on May 13th next after Monday's meeting.

stuck elbow
#

this pycon is going to be great

manic glacierBOT
orchid basinBOT
#

The next (last?) part to #119.

Two environment variables will need to be added to Travis:

  • ADABOT_GITHUB_ACCESS_TOKEN: self explanatory
  • CP_ORG_UPDATER_RUN_DAY: Sets the day of the week that the script will actually run. Day is a number between 0 & 6, with 0 being Monday. (Travis cron will be set to run daily. This ensures the script runs on the day we want since Travis won't guarantee that a weekly cron will run on a certain day.)

I was unsure that the rvm stuff in the origin...

manic glacierBOT
upbeat plover
#

i want some wifi, but waiting on feather airlift.... i sure hope that is still a thing

stuck elbow
#

if you have any esp8266 board lying around, you can use that

#

just not as neat and convenient

upbeat plover
#

i dont have anything small and wifi, other then pi zero wireless

#

im using that for webcam/secuirity cam

exotic pumice
#

how did the azure pipelines experiment go?

#

atsamd-rs has some busted travis stuff that needs fixing

orchid basinBOT
#

@jwcooper Are you okay with the Contributors and New/Updated Libraries lists being updated daily? The Contributing page would be updated weekly. I ask because updating it daily would increase the amount of activity on the repo, and you seem most likely to notice. It won't require any changes on your end, it's something we'd do, but it would mean daily builds.

crimson ferry
#

@upbeat plover It seems to be, was mentioned again in A.A.E. last week (but of course "no questions" and no guarantees). The Airlift breakout is pretty nice, and the ESP32 breakout provides a lot of pins. Using ESP32 Feather as a co-processor is awkward. One complication with the Airlift Feather will be if >2 SPI FeatherWings and getting all the pins worked out. But I'm definitely looking forward to that form factor. for compactness.

manic glacierBOT
solar whale
#

@slender iron @idle owl just a heads up. I can’t make it to the CP weekly today and will also miss the next few. I’ll be back on at the end of the month.

idle owl
#

@solar whale Thanks for letting us know. We're missing the next one too. Hope all is well!

solar whale
#

Good luck at PyCon. All good. Just schedule conflicts and some travel!

idle owl
#

Thanks! Have a good time!

umbral dagger
#

All (maybe especially @tulip sleet or @slender iron ) . I'm getting this odd situation: ```>>> air_uart = busio.UART(board.A2, board.A3, baudrate=9600)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Invalid pins

board.A2
microcontroller.pin.A2
board.A3
microcontroller.pin.A3

tulip sleet
#

which board is this?

orchid basinBOT
umbral dagger
#

@tulip sleet Sorry: ```Adafruit CircuitPython 4.0.0-rc.1 on 2019-04-23; Adafruit Metro M4 Airlift Lite with samd51j19

tulip sleet
#

@umbral dagger do A2 and A3 work on a regular Metro M4? There may simply not be a SERCOM available on those pins for TX/RX

umbral dagger
#

@tulip sleet Oh. Good point. That worked on the Feather M4Express

tulip sleet
#

yeah, actual pin mapping may be quite different

tidal kiln
idle owl
#

@tidal kiln Nope! Haven't heard anything about it, so I assume there aren't any plans.

umbral dagger
#

@tulip sleet I found a pair that work.

manic glacierBOT
tidal kiln
#

@idle owl i'm not finding any issue that seems related. probably just another sensor that got overlooked? ok if i create an issue just to track things?

idle owl
#

@tidal kiln Yep, please apply the "Libraries" milestone to it. Thanks!

manic glacierBOT
manic glacierBOT
errant grail
#

Will be lurking during today's meeting. Back in the studio to track two or three more songs.

tidal kiln
#

lurking
group hug and good luck at PyCon to those going!

tulip sleet
#

we'll be here shortly - still in another meeting

sterile bronze
#

lurking

inland tusk
#

hello everyone

turbid radish
#

Hi all, lurking today

meager fog
#

hiya im here for just another couple mins

#

if you want to call me next ill go

pastel panther
#

😃

raven canopy
#

gotta step out for a sec. bbia-flash

meager fog
#

oh i forgot future-hug report for @stuck elbow for some upcoming stage guides !

stuck elbow
#

mike malfunction

#

sorry

#

read it off for me

meager fog
#

ooooh hardware

#

ok really gotta run - bbiab

inland tusk
#

@slender iron something that I fogot to ask about is. , is there a verion of CP for pocket beagle?

slender iron
#

the blinka library might work with it

pastel panther
#

it does/should

inland tusk
#

thats what i thought

pastel panther
#

I recall a PR for support

inland tusk
#

I thought the same top

tidal kiln
meager fog
#

hiii back

pastel panther
meager fog
#

@inland tusk yeah theres some code for BB pocket - if you wanna try please do

#

i've not had cycles to test it

#

it should 'just work' 🤷

turbid radish
#

Yes, there is the Blinka Library for using CP with PocketBeagle,, thanks to the help of Drew

inland tusk
#

@meager fog thanks for the info

meager fog
#

@inland tusk plz report back on that issue/PR 😃

inland tusk
#

I will try to as soon as possible

meager fog
#

thanks everyone 👋

errant grail
#

Thanks everyone!

meager fog
pastel panther
#

EVERYONE IS AWESOME!

gilded cradle
turbid radish
#

Thanks all, see you back here in Discord in two weeks

pastel panther
#

😃

raven canopy
#

like an awesome possum?

meager fog
#

that was a fast meeting!

sterile bronze
#

Thanks you all do great work making my life easier

errant grail
#

Our box turtle doesn't shed much.

pastel panther
#

gotta feed 🐕

meager fog
#

ok im onto next meating

#

later folx

idle owl
#

Later!

gilded cradle
#

later

raven canopy
#

hoppin off too. 👋 🐇

idle owl
#

I'm going to drop off

#

Cheers all!

gilded cradle
#

I'm going to drop off as well.

#

Bye

manic glacierBOT
tidal kiln
#

too late for in the weeds?
Q: how will displayio support work in blinka?

slender iron
#

good question

#

we should be able to create all of the same APIs for it

tidal kiln
#

i'm not currently seeing any related issue in the blinka repo?

slender iron
#

no, I don't know if it's planned at all

tidal kiln
#

guess i can find out by creating one

slender iron
#

it'd be good to track

stuck elbow
#

pysdl2 perhaps

#

though it does work differently

#

instead of going down through the stack of layers from the top down, you just blit them over each other from the bottom up

simple pulsar
gilded cradle
#

Thanks for creating that @tidal kiln. It was something I wanted to discuss, but kept forgetting about. I think it’ll be super useful.

tidal kiln
#

@gilded cradle yep! totally. tons of Pi (and other SBC) Python based projects that use displays.

gilded cradle
#

Yeah, like for instance adding a display to a Beagle Bone Black.

stuck elbow
#

I think that most of the time you want to use the kernel driver for that

gilded cradle
#

It depends on what you want to do.

#

For running it more like a typical computer, yeah.

stuck elbow
#

pretty much for any use

#

you get performance and a huge ecosystem of existing tools

#

and yes, you can have several displays that way

manic glacierBOT
#

I'm running a popular meetups group in Israel called IoT Makers. We organize hands-on workshops for the Maker community, and would love to introduce CircuitPython to our workshops. In order to make this possible, we'd need your help:

  1. By adding support for the Thingy:52 and its peripherals. We have 24 Thingy:52 devices that were generously contributed to our community by Nordic Semiconductor.
  2. Alternatively, if Adafruit could sponsor some C...
idle owl
#

@tidal kiln Thanks!

tidal kiln
#

EPD?

idle owl
#

Yep 😃

tidal kiln
#

sure. np.

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I've added in a patch to the development branch above to fix a length bug where reads have a bunch of zeros on the end.

Also I noticed while messing with this code that unless you explicitly close them, sockets don't close until they are GCed. There's only 8 available so they run out pretty quick. This results in a not very helpful OSError: 24 message which really should get a translation, etc.

I also sometimes get an OSError: [Errno 5] Input/output error on send.
Sometimes it hel...

orchid basinBOT
manic glacierBOT
meager fog
#

@raven canopy heya you saw the security alert on adabot?

meager fog
#

@tidal kiln hey i have a displayio question

#

did you actually try wiring it up

#

i thought D0 had to be on pad Px00, Px07 Px15 or Px23 (e.g. a byte boundary)

tidal kiln
#

for parallel bus example?

meager fog
#

ya

tidal kiln
#

yep.

#

Metro M4 Express + 2.4" TFT

meager fog
#

ooo ok

tidal kiln
meager fog
#

np

#

that's not true in arduino 😃

#

ok guide is great - i'll make live!

tidal kiln
#

it worked, but good question. not fully sure of the limits. might be worth pinging scott? (he read thru guide already)

meager fog
#

if you're feeling up for it, adding the code/pix of each 'example' would be excellent and probably required long-term

#

yah he reviewed, im just triple-checking 😄

tidal kiln
#

i've got a ton of examples i scratched together

#

be good for them to live somewhere

meager fog
#

yah the ones in the guide are excellent

tidal kiln
#

want me to PR to learn repo?

meager fog
#

yes plz, you can tag me

#

then swap em out

tidal kiln
#

right. i'll add the complete examples for the parallel bus, etc. also

meager fog
#

ok!

tidal kiln
#

i should do some housekeeping first, so might be a bit before PR shows

#

i'll ping you when i send it though

meager fog
#

np

#

also there's a Shapes library for drawing rects/circles

raven canopy
#

@meager fog kattni clued me in. GitHub flagged it, iirc.

orchid basinBOT
manic glacierBOT
#

Sorry to come to this late. As context I am a long time embedded control developer who has written a couple of low level preemptive tasker/schedulers (easier than you might guess) and I've least read several versions of UNIX/Linux schedulers. I used to be up on current theory, including studying how an OS scheduler problem (priority inversion) killed the Pathfinder Mars lander, but that was a while ago. I just wanted to add one thing. Usually concurrency is implemented with a small number of ...

meager fog
#

@gilded cradle heya made your guide live!

#

(was a quick review)

gilded cradle
#

Thanks

#

I thought it would go great with @tidal kiln's guide

tidal kiln
#

yeah! all the displayz!

meager fog
#

😃 indeed

#

@gilded cradle if you want to order the shield displays to try them, those should also work

gilded cradle
#

Yeah, I just got some in the mail today. I was going to try that next. I wanted to do a guide with breakouts as well.

meager fog
#

ok you can stick it all in one guide

gilded cradle
#

Sounds good

manic glacierBOT
manic glacierBOT
manic glacierBOT
marble hornet
#

@weary raven awe, that's a shame.

scarlet maple
solar whale
#

@scarlet maple Can you elaborate on why you posted that? Not obvious to me.

scarlet maple
#

Purports to be Python for HP calculators.

#

Relevant to the TI-84 image above.

solar whale
#

Thanks for the clarification -- I'm still a bit confused by the discussion, but that's OK. I get confused easily 😉

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I didn´t assume that DHCP with it´s UDP ports is used by default as I had a static IP addresses on the WIZNET. I didn´t call wiznet.ifconfig with parameters and now I am unclear about how to switch between static address and DHCP: circuitpython.readthedocs mentions a wiznet.dhcp call. Do I just have to set this to false or true immedately after creating WIZNET5K or true to achieve this ?
Without understanding it all: In the code you changed it seems that after spi,cs,rst there is an option...

manic glacierBOT
#

On Thu, 2 May 2019, at 18:36, gvcp wrote:

I didn´t assume that DHCP with it´s UDP ports is used by default as I had a static IP addresses on the WIZNET. I didn´t call wiznet.ifconfig with parameters and now I am unclear about how to switch between static address and DHCP: circuitpython.readthedocs mentions a wiznet.dhcp call. Do I just have to set this to false or true immedately after creating WIZNET5K or true to achieve this ?

Yeah, unless you explicity disable DHCP (by setting wiznet....

granite crow
#

Hi, I am trying to add support for RGB to be used as status indicators, the PR is this one , as I am not familiar with the circuitpython code base I would like to get some feedback. The functionality is based in 3 PWM signals with a fixed frequency of 50kHz, the RGB led color will be controlled by varying the duty cycle of the signals, for now the brightness is also controlled with the duty cycle also. It's still a work in progress, so any help would be much appreciated.

manic glacierBOT
manic glacierBOT
#

The discussion on How many pwm outputs can I use on CPX? explained why the Circuit Playground Express's A7 pin could produce a PWM output but this functionality is not currently enabled because one of the counters associated with it is limited to 8bit rather than the 16bit resolution on other PWMs.

It would be useful to offer CPX's A7 for PWM use for those willing to accept its limitations. Perhaps other boards have similar pins?
...

simple pulsar
#

I've got some new file system corruption. The board was clean according to chkdsk, then I copied lib directory on, ran chkdsk and it's now not clean. Should I ticket this? This is on a Windows 8.1 host

stuck elbow
#

if you have a reliable way of reproducing it...

simple pulsar
#

It's magically fixed itself. I rebooted after installing wireshark and chkdsk was then clean all four CPXs I have.

#

All very odd.

#

Turns out my PC doesn't boot too possibly with the four CPXs. Seems to hang at the bios. Maybe the sheer number of HID keyboards freaks it out.

stuck elbow
#

the keyboard that cpx emulates is not suitable for boot

#

it's the "extended" keyboard that most bioses don't recognize

simple pulsar
#

I'll look into later when I've got some time, it was rather odd but I've never had four CPXs plugged in and I don't normally have them plugged in when i boot.

orchid basinBOT
manic glacierBOT
manic glacierBOT
#

Test code below. Draws a bitmap with a 1 pixel border then scales it up. Scaled result border is not symmetric. The top (y=0) and left (x=0) edges appear doubled?

import board
import displayio

SCALE = 8
WIDTH = 10
HEIGHT = 10
X = 20
Y = 20

bitmap = displayio.Bitmap(WIDTH, HEIGHT, 2)

palette = displayio.Palette(2)
palette[0] = 0xFFFFFF
palette[1] = 0xFF0000

for x in range(WIDTH):
    for y in range(HEIGHT):
        if (x == 0 or x == WIDTH - 1 or
           ...
manic glacierBOT
#

OK I've made some builds for revision d97c81b and temporarily made them available at:

https://www.dropbox.com/sh/fiy9jqi7dozdlfv/AAAnxWPCM5yGOHLZUwUURtwQa?dl=0

If all goes well, I expect this PR will get merged back into CircuitPython proper shortly after PyCon, but these should at least let you all test the new code now and see if it solves your problem!

@gvcp / @notro / @genevanmeter / @turbinenreiter / @brentru / @siddacious / @ladyada

orchid basinBOT
#

After removing the matrix setup when dropping the rvm section in .travis.yml, I forgot to remove the --user flag from the pip install command. Which causes:

pip 19.0.3 from /home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pip (python 3.6)
0.39s$ pip install --user -r adabot/requirements.txt
Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
The command "pip install --user -r adabot/requirements.txt" failed and exited with 1...
lone sandalBOT
upbeat plover
#

i made some changes to CPX helper lib for sounds can someone test? i dont have mine currently, let friend borrow

im doing stuff similar with buzzer and feather

manic glacierBOT
#

I just tested an GEMMA M0 on 3.1.2 and that was perfect for 20 executions of raise AttributeError("abcdefghij" * 12) at REPL. The first execution of that after upgrade to 4.0.0 rc1 did the stuck buffer thing:

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

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-rc.1 on 2019-04-23; Adafruit Gemma M0 with samd21e18
>>>
>>>
>>> raise AttributeError("abcdefghij" * 12...
marble hornet
#

i have some c questions. anyone have a moment?

#

mainly should i be concerned that i'm getting a compiler warning. but the program is working

#
#include <string.h>

char* str_add(char *a, char *b){
    char c[strlen(a)+strlen(b)+1];
    strcpy(c, a);
    strcat(c, b);
    return c;
}

int main () {
    char a[] = "foo";
    char b[] = "bar";
    char *c;

    //char c[] = str_add(a, b);
    c = str_add(a, b);
    printf("%s\n", c);
    printf("%s\n", str_add(a, b));

    return 0;
}
#

print:

#
test.c:12:12: warning: address of stack memory associated with local variable 'c' returned [-Wreturn-stack-address]
    return c;
           ^
1 warning generated.
foobar
foobar```
stuck elbow
#

that is only working by accident

#

you are writing to a piece of memory that is no longer allocated, anything else might be already using it

#

you will get mysterious crashes with something like that

#

basically the only reason this is working is that your program is not doing anything else

marble hornet
#

okay...

#

so the return c is just pointing to unallocated memory?

stuck elbow
#

after the function finishes, yes

#

for things like that you have two choices: either you use malloc, and then you have to remember to free it when not needed anymore, or you pass c to the str_add function as a third argument, with an already pre-allocated buffer

#

of course then it would be nice to also pass the length of that buffer, so that the function can check that you are not going out of bounds on it

marble hornet
#

ah, okay. so i'm still thinking pythony...? i think i'll malloc . thank you

stuck elbow
#

note that if you forget to free it, you will have a memory leak, and if you free it twice, you will have a crash

#

they joys of manual memory management

marble hornet
#

arg okay 😦

#

can't i make a class to do that for me?

stuck elbow
#

in C++ it's called String

#

C doesn't have classes

marble hornet
#

ahahaha

#

okay

#

thank you 😃

manic glacierBOT
granite crow
#

Hi, I am trying to add support for RGB to be used as status indicators, the PR is this one , as I am not familiar with the circuitpython code base I would like to get some feedback. The functionality is based in 3 PWM signals with a fixed frequency of 50kHz, the RGB led color will be controlled by varying the duty cycle of the signals, for now the brightness is also controlled with the duty cycle also. It's still a work in progress, so any help would be much appreciated.

stuck elbow
#

@granite crow everyone are at PyCon.US right now, so please be patient

granite crow
#

Didn't knew that, I will wait, sorry

stuck elbow
#

no need to be sorry, there is no way you could know

#

just don't get disappointed with the lack of feedback

manic glacierBOT
solar whale
#

@sly falcon Finally got a chance to try the NINA 1.3.1 prebuilt binary on and ESP32 breakout via metro_m4 -- no problems.

meager fog
#

@stuck elbow @umbral dagger heya by chance do y'all know of a readline for microcontrollers/embedded

#

im lookin around but i figure you might Just Know of a good one

stuck elbow
umbral dagger
#

Off hand, no. I ended up just writing one in/for CP.

meager fog
#

i meant in C/C++ sry

stuck elbow
#

ah, no, sorry

meager fog
#

np trying out eLua, works but the REPL is basic and annoying

granite crow
#

@stuck elbow I won't :)

umbral dagger
stuck elbow
#

micropython's repl is actually better than python's was at the time

meager fog
#

ok yeah i might try that microrl

#

i dont need everything, just like backspace to work 😄

umbral dagger
#

Emacs on one line!

main meteor
#

Heh, reminds me of the days when I'd have to use stty or ioctl to set "cooked" mode.

neon dragon
#

Does anyone know how to add nrf52 libraries to CircuitPython? I need app_timer (part of the SDK).

stuck elbow
#

that would be non-trivial

#

maybe there is another way to do what you need

neon dragon
#

I need an RTC timer. The nrf52 has 3, one is used for BlueTooth, one by CircuitPython's RTC library, the 3rd one by the app_timer library (RTC1). I could just grab RTC1, but this might brake something else down the road. Or I could modify the RTC library and share the timer (I believe it uses RTC2). Application: wakeup from deepsleep.

stuck elbow
#

I can't really help you with this, you might want to come back late next week when everyone come back from pycon

#

or open an issue

neon dragon
#

Would it be OK to do a PR of a start and ask for help? I'd also like feedback if I added my module correctly to CircuitPython (before going too far).

crimson ferry
#

@sly falcon Same, no problems running NINA 1.3.1 since April 24 on a Feather ESP32 via Feather M4.

solar whale
#

@sly falcon also cloned your repo and built NINA 1.3.1 from source (against esp-idf-3.2) -- all good!

stuck elbow
#

@neon dragon possibly

solar whale
meager fog
#

@solar whale yay

exotic pumice
#

someone oughta write a telnet client for them esp32 metro m4s

#

so I can BBS it up without just piping my laptop to the display

#

piping my laptop to the display is fun and all

#

but a real mobile BBS client would be cool as...

stuck elbow
#

shouldn't be too hard

#

I say give it a try

#

make an irc bot while you are at it

exotic pumice
#

haha

stuck elbow
#

or even better, add a small keyboard and make an irc client

exotic pumice
#

It's tough to find a good keyboard

#

I wonder how many pins those blackberry ones take

#

answer: 20

#

i2c port expander I guess

#

hmm

#

I'll call it the blinkaberry

stuck elbow
#

make your own

scarlet maple
exotic pumice
#

terminal emulation is built in sorta

#

oh mans I gotta pipe the star wars movie to this

exotic pumice
#

display's too small 😦

#

yeah I've been meaning to get one of those

#

I'd like it more assembled than it is currently

stuck elbow
#

I have the hackaday belgrade badge

#

I'm thinking about trying to make something similar, but with the buttons on the back side, a la those two-part keyboards

exotic pumice
#

I like the blackberry keyboards

stuck elbow
#

so you can hold it and touch-type at the same time

#

of course you wouldn't see the buttons then, but you learn where they are quick enough

exotic pumice
#

Just bought a blackberry keyboard for $4 on aliexpress

#

I never learn

stuck elbow
#

hehe, too few projects?

exotic pumice
#

oh totally

#

between all the rust stuff, and all the c64 stuff

#

I have nothing to do

stuck elbow
#

you know that rust now supports samd21?

exotic pumice
#

and 51

#

I wrote the 51 support

stuck elbow
#

awesome

#

I'm meaning to try rust since like 5 years, but I never have a project for it

exotic pumice
#

use it anywhere you'd use C

#

or python for that matter

#

it's got the high level features like iterators and stuff, with the performance of C

stuck elbow
#

well, I only use C where I have to, because the project I contribute to is already in C

exotic pumice
#

right

#

idk I think it's simple and high level enough to replace python too but some people disagree

stuck elbow
#

the write-compile-debug cycle is too long

exotic pumice
#

fair point

exotic pumice
#

@stuck elbow do you know how to connect a linux terminal output to my /dev/ttyACM0 input? I googled but didn't find much useful

#

I can do it with an intermediary echo but I wanna just hook up the whole pts to the tty

#

I think I did it actually but something got confused

#

probably control characters

#

screw it, I'll write a bash function

simple pulsar
#

screen /dev/whatever BAUDRATE

exotic pumice
#

that connects input to input

#

I'm connecting output to input but it's not all it's chocked up to be with all the control characters and weirdness

simple pulsar
#

I think that's going to be the inherent nature of the raw terminal output

exotic pumice
#

yup

#

I had a dream of an extra terminal display but that was shattered

simple pulsar
#

I've captured stuff with script command before and then cleaned it up as needed but that'll be hard/messy with anything typed. And that approach isn't realtime

orchid basinBOT
#

@TheKitty,

What update interval would be acceptable for this?

If "realtime", then yeah, that would be somehow writing the page's code to retrieve at access. Which wouldn't update the mirrored submodule in this repo, and would render the submodule pointless. I am not in a position to espouse on feasibility of this though...webdev is definitely not my forté.

If something along the lines of weekly, then the submodule update could be worked into adabot. Adafruit_CircuitPython_Bundle upda...

timber mango
#

asking just to be sure:
there's no way at all to use circuitpython on samd21 or samd51 boards that use a crystal other than 32kHz, right ?
(I have a board with 24MHz crystal on Pins A14/A15)

quasi fjord
#

I haven't built circuitpython myself, but that sounds like something that would be adjustable is some sort of board definition file. The published builds probably wouldn't work because they're going to configure the chip or whatever default 32kHz crystal then stall when it isn't there to generate clock ticks, but given the breadth of boards CP runs on there has to be some board-specific init function you can override to configure for a different external crystal. I foresee a lot of digging in datasheets in your future

manic glacierBOT
stuck elbow
#

I'm using it on boards that don't have a crystal at all

exotic pumice
#

yeah it's probably easier to pretend you don't have a crystal than to adjust to a different frequency one

manic glacierBOT
#

Partial success with feather M4 Express, but there seem to be 2 different issues, 1 with wiznet, 1 with circuitpython 4.0 RC1 in general:

  1. I was able to send and receive data (connected to a server) via REPL executing the code line by line without problems, but when I do the same in code.py everything hangs, nothing is sent and I also
    don´t receive anything on the feather. Here is the test code:

import wiznet
import socket
spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=boa...

north yacht
#

Hi all, first day here, first use of my Metro Airlift lite. Am I correct that this is not considered an "Express" board? (I tried copying the entire /lib directory from adafruit-circuitpython-bundle-4.x-mpy-20190503 and it ran out of space.

lofty nova
manic glacierBOT
tulip sleet
#

@timber mango The clock initialization code would have to be changed.

stuck elbow
#

that is a lot of forks, let me guess, the sprints have started?

river quest
#

🍴 blinka

raven canopy
#

🏁 🏃

manic glacierBOT
#

I added a print statement after each line in the above code, the last output I got was that the socket was created (ss=socket.socket...) After about a minute I got a traceback for ss.connect with an OSError 4 (interrupted system call) then everything hanged again in the same way than above.
The server side didn´t show a connection from the feather M4 client.

Another try: adding a 3 second sleep before each print statement changed the behavior a bit:
I got a connection on the server side ...

warped pendant
#

hi what chat would cover hallowing badge??

stuck elbow
#

depends on what you are running on it

warped pendant
#

cp on hallowing just trying to load the badge and i don't know what i've done i'm getting error on the display and green/fade to cyan ---yellow -- blue which i'm thinking is line 111 -- in the lib should have touchio and pulsio? maybe that is the problem?

stuck elbow
warped pendant
#

but in the git repo it doesn't have them in the lib file

#

ok thanks!

solar whale
#

@gentle bronze I saw that there was an update to the nrf52 bootloader and that it uses the SOFTDEV_VERSION 6.1.1 - It looks like CircuitPython is still using 6.1.0 -- is there a problem with that? I tried it with feather_nrf52840_espress and it seems ot be working OK, but I can't get it work with a pca10059 dongle. CircuitPython keeps going into safel mode. Have I missed some steps. - is the 2.11 bootlader compatible with Circuitpython at this time?

upbeat plover
#

@raven canopy i made some changes to play_melody() can you test them?

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

On Sun, 5 May 2019, at 07:36, gvcp wrote:

I added a print statement after each line in the above code, the last output I got was that the socket was created (ss=socket.socket...) After about a minute I got a traceback for ss.connect with an OSError 4 (interrupted system call) then everything hanged again in the same way than above.
The server side didn´t show a connection from the feather M4 client.

Another try: adding a 3 second sleep before each print statement changed the behavio...

manic glacierBOT
manic glacierBOT
exotic pumice
#

If I wanted to write a driver for an 8-bit parallel display, would I need DMA?

#

how parallel is parallel? is one after another at 120MHz close enough?

stuck elbow
#

there is already support for parallel displays in displayio, so it's just a question of coming up with the correct init sequence and commands

exotic pumice
#

I'm trying to do it in rust tho

stuck elbow
#

well you can bitbang it if you don't care about speed

exotic pumice
#

ok, I think it will be fast enough for now

#

just wanted to make sure it didn't have to actually have all the pins flip at the same time for it to work

stuck elbow
#

no, you have a clock pin

manic glacierBOT
#

On Sun, 5 May 2019, at 18:46, gvcp wrote:

Just to be sure:
I assume like the arduino version the wiznet circuitpython implementation doesn´t need the hardware interrupt available on the seperate IRQ pin of the ethernet feather ?
Or does it have to be connected to some pin of the processor ?

This implementation only uses SPI plus CS (chip select) and RST (reset).
RST isn't really required either, I think, so I should make that optional.

I'll try and reproduce the code.py problem on...

solar whale
#

@gentle bronze It looks like the issue with the pca10059 is in CP -- If I revert to the beta.7 build, CP boots OK with the new bootloader -- It falis with rc.1 or the current master -- I'll open an issue in CP.

manic glacierBOT
#

My PCA10059 Dongle boots to "safe mode" with CP 4..1 or the current master but it works OK with Beta.7

Note- I did update the bootloader to v2.11 -- rc.1 does work with it on a feather_nrf52840_express

RC.1



You are running in safe mode which means something unanticipated happened.
Looks like our core CircuitPython code crashed hard. Whoops!
Please file an issue at https://github.com/adafruit/circuitpython/issues
 with the contents of your CIRCUITPY drive and this message:...
exotic pumice
#

@stuck elbow I don't see a clock pin

stuck elbow
#

@exotic pumice it's RD or WR depending on whether you read or write

exotic pumice
#

Oh

stuck elbow
#

basically you set the pins to whatever states you need, and then wiggle that pin

#

and that "latches" the states and writes them to memory

exotic pumice
#

Thanks

stuck elbow
#

the datasheet has details of the protocol

exotic pumice
#

well, I got it written, now it needs a long debugging session

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Hi there.
I have a question regarding mqtt and usocket.
The old Micropython mqtt-library uses the class usocket.

Now there is no MQTT library in the nrf52840 and no usocket library, because the chip has no Ethernet.

What if you use Nordic UART to build an MQTT connection with a broker? Would not that be great.

It is not theoretically possible to write a usocket class that can connect to a server (MQTT broker) via the UART interface.
A umqtt class (simple.py, robust.py) could then ...

#

a bit more information: I tried using a makerdiary_nrf52840_USB_dongle and get simialr results as with the pca10059.
4.0 - beta.7 works OK
rc1 does not boot
dmesg reports:

[230532.689753] scsi host7: scsi scan: INQUIRY result too short (5), using 36
[230532.689772] scsi 7:0:0:0: Direct-Access     makerdia nRF52840-MDK-Don 1.0  PQ: 0 ANSI: 2
[230532.690160] sd 7:0:0:0: Attached scsi generic sg2 type 0
[230532.691315] sd 7:0:0:0: [sdc] Unit Not Ready
[230532.691319] sd 7:0:0:0: [s...
#

hmm -- the plot thickens -- tried RC1 on a sparkfun_nrf52840_mini (also no external flash) and it also boots to safe mode like the pca10059
Beta 7 works normally.
Note -- on this board, I have the bootloader delivered with the board - not 2.11 as on the other boards.

UF2 Bootloader 1.00
Model: SparkFun nRF52840 Mini
Board-ID: SparkFun nRF52840 Mini
Bootloader: s140 6.1.1 r0
Date: Nov 26 2018

So far 3 for 3 nrf52840 boards without external flash do not boot properly with 4...

orchid basinBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

4.0 RC 1 checks.

Adafruit CircuitPython 4.0.0-rc.1 on 2019-04-23; Adafruit Trinket M0 with samd21e18
>>> import board, busio
>>> i2c = busio.I2C(board.SCL, board.SDA)
>>>

remove resistors:

Adafruit CircuitPython 4.0.0-rc.1 on 2019-04-23; Adafruit Trinket M0 with samd21e18
>>> import board, busio
>>> i2c = busio.I2C(board.SCL, board.SDA)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: SDA or SCL needs a pull up
>>> 
manic glacierBOT
halcyon breach
#

Hello

slender iron
#

@stuck elbow it was the mentored sprints. regular sprints start tomorrow morning (10 hours or so)

#

<@&356864093652516868> Reminder that we aren't meeting this week. Next week, we'll be back and ready to roll after a wonderful but exhausting PyCon.

exotic pumice
#

why do my display drivers never work lol?

tulip sleet
manic glacierBOT
slender iron
#

@knotty cypress brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/c421118b9d7f29e9bdb3c9b92c5d971f60248479/Casks/gcc-arm-embedded.rb

plucky flint
#

👋 to PyCon sprinters... 😃

stuck elbow
#

@plucky flint are you sprinting as well?

#

on Mu, I presume?

knotty cypress
#

@slender iron succeeded ( 10.14.4 w/xcode select)

plucky flint
#

@stuck elbow yeah.... on Mu. Today is triage day. Tues/Wed = merging/coding etc....

knotty cypress
#
<go menu>
Go: Utilities
<disk utility icon>
Launch Disk Utility.app
<add volume>
+ volume
<add apfs volume>
Add APFS volume to container:
    name: circuitpython
    Format APFS (Case-sensitive)

    click Add
<new container in finder>
New volume appears in finder

Note: before starting  the "Build CircuitPython" steps, first open a bash terminal and cd to /Volumes/circuitpython/, and to perform the steps there



stuck elbow
#

@plucky flint I hope there will be a lot of newcomers!

raven canopy
#

👋 to sprinters from me as well!

quick crow
upbeat plover
#

will Mu ever support other languages like zh_Latn_pinyin?

#

@raven canopy i have suggestion for code change can you review the reply?

raven canopy
#

@upbeat plover i'll look. working from home today, so i'll be bouncing around things.

upbeat plover
#

best place to work

umbral dagger
#

@upbeat plover The only place to work.

prime flower
#

@knotty cypress Heya - I can add those images to the guide, come by the table I'm at or get my attention and we'll add them in 😄

knotty cypress
manic glacierBOT
upbeat plover
#

@raven canopy your code works well, much better way of writing that thank you for teaching me lots... didnt know anything about enumerate() and had never done a if not equal to before that is much nicer then if else

raven canopy
#

lol. Nina dropped a "not out yet. don't clap". 👏

upbeat plover
#

thats for the esp32?

#

nRF52?

raven canopy
#

hehe, didn't even think about the context of my statement. not the NINA firmware. i'm watching the PyCon talk that Dan linked earlier. Nina Zakharenko is the speaker. https://youtu.be/35mXD40SvXM

#

@upbeat plover re "teaching": you're welcome. writing long form (if...elif...else) isn't necessarily bad. its usually a good thing actually, as it increases readability/maintainability for future readers. but, on MCUs, and especially the CPX since it's quite constrained, every byte counts. i've learned a lot of that since i've been around here, so i'm merely passing it on. 😄

manic glacierBOT
upbeat plover
#

yes i was thinking in this case too it probably cuts down how many steps it take to do that if else, so making code faster?

raven canopy
#

yeah, a tiny bit of that too. not wasting cycles on unnecessary code is a good universal practice.

civic pebble
#

Following the tutorial to build circuitpython, running make -C mpy-cross tells me I'm missing msgfmt. Ideas? I'm the guy in the blue polo closer to the hallway side of the room.

raven canopy
#

i'm watching these translation PRs pop up, hoping for some Pirate addtions. 🤞 😬

#

@civic pebble i'm pretty certain that's related to the gettext library.

#

@civic pebble what OS are you on?

civic pebble
#

macOS

raven canopy
#

i would check that this step installed gettext:

brew install git python3 gettext
civic pebble
#

yep, I've got gettext

raven canopy
#

🤔

civic pebble
#

got it

raven canopy
#

🎉 yay!

civic pebble
raven canopy
#

hehe. i scrolled past that one when i searched...

#

i wonder if it would be beneficial to link to that issue in the learn guide...

civic pebble
#

Also - if anyone wants some help with the music tracker, I'm remotely musical and wrote a mini-tracker for playing stepper motor music on arduino a couple weeks ago

manic glacierBOT
prime flower
#

ER, seems down

lone sandalBOT
trim elm
#

@tidal kiln I made the changes you suggested and made a new PR. Thanks for the feedback.

#

Although it failed to build, so I may have to fix some stuff

#

Ok. I fixed the issue

tidal kiln
#

@trim elm thanks. do you have hardware to test?

trim elm
#

I do. Although the build failed again, so I'll get back to you in a few minutes

tidal kiln
#

yah, looks like just pylint cosmetic stuff

trim elm
#

Yeah. I just put in another commit where I fixed the line continuation error, although it hasn't built yet

tidal kiln
#

otherwise code looks OK and worth checking out...with an ADS1015..see if it return 16bit at max, etc.

manic glacierBOT
trim elm
#

Yeah. I tested with the ADS1015 and verified that I didn't mess up the code for the ADS1115 also

tidal kiln
#

cool. if you can post some of that testing details and results in the PR comment thread, that'd be awesome.

#

isn't linting fun. 😃

stuck elbow
#

better to get that automatic than from a human

trim elm
#

Yeah. I've installed it on my computer so I can fix it without making a million commits

#

Ok. So it passed the pylint tests on my local computer

#

It finally passed the online one too

manic glacierBOT
#

Building with a frozen module that has no tag fails with a confusing error message.

Eg:

Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
FREEZE ../../frozen/Adafruit_CircuitPython_BusDevice ../../frozen/Adafruit_CircuitPython_CircuitPlayground ../../frozen/Adafruit_CircuitPython_HID ../../frozen/Adafruit_CircuitPython_LIS3DH ../../frozen/CircuitPython_Pixbuf_Neopixel ../../frozen/Adafruit_CircuitPython_Thermistor
fatal: No nam...
manic glacierBOT
#

I do not know which version of Circuit Python you were using but for CircuitPython 4.0.0-rc.1 I received a similar issue with the Test Code you provided and I took that code and fixed the double edged borders with the following code. Hope it helps!!

import board
import displayio

SCALE = 8
WIDTH = 10
HEIGHT = 10
X = 20
Y = 20

bitmap = displayio.Bitmap(WIDTH, HEIGHT, 2)

palette = displayio.Palette(2)
palette[0] = 0xFFFFFF
palette[1] = 0xFF0000

for x in range(WIDTH):
f...