#circuitpython-dev

1 messages ยท Page 222 of 1

solar whale
#

try it a few times

prime flower
#

same error

solar whale
#

just as sec

#

copy it to the baord and import miniesptool_esp32argon remove code.py

#

taht part of the guide is way out of date.

prime flower
#
ESP32 mini prog
Resetting
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "miniesptool_esp32argon.py", line 28, in <module>
  File "adafruit_miniesptool.py", line 448, in sync
RuntimeError: Couldn't sync to ESP```
#

looks like the same issue, code.py was removed.

solar whale
#

power cycel the argon and retry

prime flower
#

nope...

solar whale
#

what version of CP is on the argon

prime flower
#

v4alpha5

#

maybe downgrade to v4alpha4?

solar whale
#

no -- let me try it on mine

prime flower
#

np

solar whale
#

then do control-c and return to exut the script -- then retry the load...

#
Adafruit CircuitPython 4.0.0-alpha.5-53-g555da95cf on 2018-12-29; Particle Argon with nRF52840
>>> import uart_comm
b'ets Jun  8 2016 00:22:57\r\n'
b'\r\n'
b'rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)\r\n'
b'configsip: 0, SPIWP:0xee\r\n'
b'clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00\r\n'
b'mode:DIO, clock div:2\r\n'
b'load:0x3fff0018,len:4\r\n'
b'load:0x3fff001c,len:6248\r\n'
b'load:0x40078000,len:10168\r\n'
b'load:0x40080400,len:6468\r\n'
b'entry 0x40080758\r\n'
b'\xfe\r\n'
b'ready\r\n'
b''

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "uart_comm.py", line 55, in <module>
  File "uart_comm.py", line 39, in <module>
KeyboardInterrupt: 
>>> 
prime flower
#

wait for ready?

solar whale
#

after doing that, the upload worked for me.

#

did you get any output?

#

no need for ready

prime flower
#
>>> import uart_comm
b'\xc0ets Jun  8 2016 00:22:57\r\n'
b'\r\n'
b'rst:0N_ET),boot:0x13 (SPI_FAST_FLASH_BOOT)\r\n'
b'configs\r\n'
b'clk_drvx00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00\r\n'
b'mode:DI018,len:4\r\n'
b'load:0x1c,len:756\r\n'
b'load:0x00,len:4892\r\n'
b'load:0x00,len:6476\r\n'
b'entry 0ec\r\n'
b''
solar whale
#

ok -- control-c enter then try load

prime flower
#
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/lib/uart_comm.py", line 55, in <module>
  File "/lib/uart_comm.py", line 39, in <module>
KeyboardInterrupt:
>>> import miniesptool_esp32argon
ESP32 mini prog
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "miniesptool_esp32argon.py", line 18, in <module>
ValueError: ESP_WIFI_EN in use```
solar whale
#

do control-D first

#

reboot

prime flower
#

sync issue again

solar whale
#

hmm -- try this version of CP -- just a sec

#

or just try load agin one more time

#

you are using miniesptool_esp32argon.py

prime flower
#

yes

solar whale
#

if you load that version of CP you can reporduce my setup --

prime flower
#

sec, need to fix something

#

ill try to repro

solar whale
#

ok -- try the load -- if it fails -- try the uart_comm then retry the load.

prime flower
#

well that worked on load

solar whale
#

yay!

#

there were recent changes to UART support in CP . did you have to do the uart_comm step?

prime flower
#

I did not

#

Flashed that version of CP and loaded

#

(still writing)

solar whale
#

good -- its a bit finicky about how it is reset ....

#

tha lst load bit takes ahwile

#

you can use the uart_comm to test it after the load -- ```ress any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.5-53-g555da95cf on 2018-12-29; Particle Argon with nRF52840

import uart_comm
b'ets Jun 8 2016 00:22:57\r\n'
b'\r\n'
b'rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)\r\n'
b'configsip: 0, SPIWP:0xee\r\n'
b'clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00\r\n'
b'mode:DIO, clock div:2\r\n'
b'load:0x3fff0018,len:4\r\n'
b'load:0x3fff001c,len:6248\r\n'
b'load:0x40078000,len:10168\r\n'
b'load:0x40080400,len:6468\r\n'
b'entry 0x40080758\r\n'
b'\xfe\r\n'
b'ready\r\n'
b''
at+GMR
b'WIFI CONNECTED\r\n'
b'WIFI GOT IP\r\n'
b'at+GMR\r\n'
b'AT version:1.3.0.0-dev(6aafec8 - Dec 7 2018 02:23:19)\r\n'
b'SDK version:v3.3-dev-343-g7fa98593b\r\n'
b'compile time:Dec 24 2018 12:27:05\r\n'
b'\r\n'
b'OK\r\n'
b''

#

do control-d first

#

enter AT+GMR after the ready response

prime flower
#

got an OK, matches yours

#
b'ready\r\n'
b''
AT+GMR
b'AT+GMR\r\n'
b'AT version:1.3.0.0-dev(6aafec8 - Dec  7 2018 02:23:19)\r\n'
b'SDK version:v3.3-dev-343-g7fa98593b\r\n'
b'compile time:Dec 24 2018 12:27:05\r\n'
b'\r\n'
b'OK\r\n'
b''```
#

๐Ÿ˜ƒ yay

solar whale
#

cool -- have fun! -- just a minute -- I will post the argon version of some of the test programs -- they need a few changes from what is in the repo.

prime flower
#

the esp at control examples?

solar whale
#

yes

#

try argon_webclient.py first

#

you ned to create settings.py.. Have you tried all thsi on an M4?

prime flower
#

nope

solar whale
#

yes ๐Ÿ˜ฆ

prime flower
#

looks like they're down

solar whale
#

since it is in the bundle -- you ahould be good to go woth those scripts

#

if your bundle is new...

stuck elbow
#

github is down \o/

prime flower
#

yep

stuck elbow
#

happy new year

solar whale
prime flower
#

got it

solar whale
#

@stuck elbow Happy New Year to you!

manic glacierBOT
prime flower
#

@solar whale im gonna modify the io sketch for argon, I see the main diffs.

solar whale
#

@prime flower you just need to cahnge these lines for argon ```RX = board.ESP_TX
TX = board.ESP_RX
resetpin = DigitalInOut(board.ESP_WIFI_EN)

esp_boot = DigitalInOut(board.ESP_BOOT_MODE)
esp_boot.direction = Direction.OUTPUT
esp_boot.value = True

uart = busio.UART(TX, RX, timeout=0.1)
rtspin = DigitalInOut(board.ESP_CTS)

#

the esp_boot part may not be necessary, but it won't hurt !

#

note the RX <-> ESP_TX swap

prime flower
#

hm, getting a Failed to connect, retrying No OK response to AT+CWJAP

#

on both client and IO

solar whale
#

enable debug=True -- if it is responding to AT commands then the problem is most likely in your settings

#

they are often lots of failure/retries

prime flower
#
Connecting...
---> AT+CIPSTATUS
<--- b'STATUS:5\r\n\r\nOK\r\n'
Connected to None```
#

Hrm, doesnt seem to be connected, but the AT+CWJAP=[ssid/pass] does pull from settings

solar whale
#
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.5-53-g555da95cf on 2018-12-29; Particle Argon with nRF52840
>>> import argon_webclient
ESP AT GET URL http://wifitest.adafruit.com/testwifi/index.html
Resetting ESP module
Checking connection...
---> AT
<--- b'AT\r\n\r\nOK\r\n'
---> ATE0
<--- b'ATE0\r\n\r\nOK\r\n'
Changing baudrate to: 9600
---> AT+UART_CUR=9600,8,1,0,0

---> AT
<--- b'\r\nOK\r\n'
---> AT+GMR
<--- b'AT version:1.3.0.0-dev(6aafec8 - Dec  7 2018 02:23:19)\r\nSDK version:v3.3-dev-343-g7fa98593b\r\ncompile time:Dec 24 2018 12:27:05\r\n\r\nOK\r\n'
---> AT+CIPMUX?
<--- b'+CIPMUX:0\r\n\r\nOK\r\n'
---> AT+CIPSSLSIZE=4096
<--- b'ERR CODE:'
---> AT+CIPSSLCCONF?
<--- b'+CIPSSLCCONF:0,0,0,0\r\n+CIPSSLCCONF:1,0,0,0\r\n+CIPSSLCCONF:2,0,0,0\r\n+CIPSSLCCONF:3,0,0,0\r\n+CIPSSLCCONF:4,0,0,0\r\n\r\nOK\r\n'
---> ATE0
<--- b'\r\nOK\r\n'
---> AT+CIPSTATUS
<--- b'STATUS:0\r\n\r\nOK\r\n'
Connecting...
#
<--- b'\r\nOK\r\n'
---> AT+GMR
<--- b'AT version:1.3.0.0-dev(6aafec8 - Dec  7 2018 02:23:19)\r\nSDK version:v3.3-dev-343-g7fa98593b\r\ncompile time:Dec 24 2018 12:27:05\r\n\r\nOK\r\n'
---> AT+CIPMUX?
<--- b'+CIPMUX:0\r\n\r\nOK\r\n'
---> AT+CIPSSLSIZE=4096
<--- b'ERR CODE:'
---> AT+CIPSSLCCONF?
<--- b'+CIPSSLCCONF:0,0,0,0\r\n+CIPSSLCCONF:1,0,0,0\r\n+CIPSSLCCONF:2,0,0,0\r\n+CIPSSLCCONF:3,0,0,0\r\n+CIPSSLCCONF:4,0,0,0\r\n\r\nOK\r\n'
---> ATE0
<--- b'\r\nOK\r\n'
---> AT+CIPSTATUS
<--- b'STATUS:2\r\n\r\nOK\r\n'
Retrieving URL...---> AT+CIPSTATUS
<--- b'STATUS:2\r\n\r\nOK\r\n'
---> AT+CIPSTART="TCP","wifitest.adafruit.com",80,10
<--- b'CONNECT\r\n\r\nOK\r\n'
---> AT+CIPSTATUS
<--- b'STATUS:3\r\n+CIPSTATUS:0,"TCP","104.236.193.178",80,54523,0\r\n\r\nOK\r\n'
---> AT+CIPSEND=97
<--- b'\r\nOK\r\n'
<--- b'\r\nRecv 97 bytes\r\n\r\nSEND OK\r\n'
Receiving: 318
[b'HTTP/1.1 200 OK', b'Server: nginx/1.10.3 (Ubuntu)', b'Date: Wed, 02 Jan 2019 17:45:47 GMT', b'Content-Type: text/html', b'Content-Length: 73', b'Last-Modified: Thu, 16 Feb 2017 17:42:29 GMT', b'Connection: keep-alive', b'ETag: "58a5e485-49"', b'Accept-Ranges: bytes', b'', b'This is a test of the CC3000 module!\nIf you can read this, its working :)']
---> AT+CIPCLOSE
<--- b'CLOSED\r\n\r\nOK\r\n'
OK
----------------------------------------
This is a test of the CC3000 module!
If you can read this, its working :)
----------------------------------------
#

those ar enot from the same run but you get teh idea

prime flower
#
 No OK response to AT+CWJAP="",""```
#

Weird, same WiFi creds. as my laptop/phone too

solar whale
#

are you running the webclient code I posted

prime flower
#

yeah

solar whale
#

since tou see SSIDS and all -- its communicating

prime flower
#
---> AT+CIPSTATUS
<--- b'ERR CODE:'
---> AT+CIPSTATUS
<--- b'STATUS:5\r\n\r\nOK\r\n'
Connected to None
---> AT+CWMODE?
<--- b'+CWMODE:1\r\n\r\nOK\r\n'
---> AT+CIPSTATUS
<--- b'STATUS:5\r\n\r\nOK\r\n'
---> AT+CWJAP="Adafruit"```
#

seems its in esp.connect(settings) ๐Ÿคท

solar whale
#

taht STATUS:5 does not look normal

prime flower
#

yeah, it wont print APs either

solar whale
#

do you ahve the antenna installed ?

prime flower
#

...right. nope. (keep thinking its built into it)

solar whale
#

may help ๐Ÿ˜‰

#

??

prime flower
#

need to dig it up (not in the box). Are you going to add particle_example to the examples, or just the particle pinouts?

solar whale
#

I need to go AFK for awhile be back in an hour -- good luck!

#

I'll add wahtever is wanted... new example make sense

meager fog
#

<@&356864093652516868> and others in this channel - we have nrf52840 feathers in stock

solar whale
#

woohoo!

meager fog
#

now's a good time to pick some up before we notify the many many poeple signed up ๐Ÿ˜ƒ

marble hornet
#

runs to open laptop

solar whale
#

ordered!

#

@prime flower I'll check back with you in an hour or so.

prime flower
#

ok

upbeat plover
#

thats for cp ble? i like the swd thats nice to have

ruby atlas
#

Man am I gonna have to make another order. Lol ๐Ÿ˜ƒ

upbeat plover
#

im waiting on feather wiced STM32F205, i like wireless but not ble

marble hornet
#

ordered

#

thanks for the heads up @meager fog

idle owl
#

Pro tip: Test your code. APIs change. ๐Ÿ˜„

#

hmm.

marble hornet
#

hmmm?

#

@meager fog does that mean the hw will be up on github today/soon?

#

oh it is! thank you ๐Ÿ˜

meager fog
#

@upbeat plover there's no eta on the WICED boards, i dont recommend waiting, we may never get more modules in

marble hornet
#

could cp run on the "16KB SRAM and 128KB flash available for user code" on the winced?

meager fog
#

nope

marble hornet
#

i'm lookig at the product page and the .brd file and to me to looks like the brd has two more pins for nfc? is this true? ๐Ÿคž

meager fog
#

its not NFC the way you think it is

#

and we dont have code/support for it

#

its not very useful

marble hornet
#

i was looking at rev g

#

oops

ruby atlas
#

If I'm placing an order any other boards i should add? Been a while since I added any ๐Ÿ˜ƒ

#

Other than the Trellis and whatever's been in Adabox 008 009 and 010

meager fog
#

maybe a crickit feather?

ruby atlas
#

Since I should do a bunch more testing of pixelbuf. ๐Ÿ˜ƒ

meager fog
#

could plug the nrf52840 into it

ruby atlas
#

Oh that's a thought.

meager fog
manic glacierBOT
solar whale
#

@prime flower any luck with antenna?

prime flower
#

@solar whale yerp!

solar whale
#

yay!

prime flower
#

Added the particle pinout to post, adding it to webclient and simpletest as well next

solar whale
#

OK great! feel free to update the gude as well!

prime flower
#

@solar whale is that file we used earlier, for comms, on github?

solar whale
#

no - just something I use for testing.

prime flower
#

It's pretty dang useful..

solar whale
#

I can add it or you are welcome to. needs a bit of cleanup -- some commented out code.

prime flower
#

I'll look at the guide after lunch - adding a page to an IO Basics guide first

#

I really wish they integrated a pcb antenna into the Argon instead of this external one...I'm sure it was a/b tested though

tidal kiln
#

velkominn aftur? @slender iron

slender iron
#

๐Ÿ‘‹

exotic pumice
#

@slender iron I got my clock issue fixed while you were away ๐Ÿ˜Ž

marble hornet
#

HI! @slender iron I hope you had a great time with your spouse.

slender iron
#

nice @exotic pumice !

#

@marble hornet we had a lot of fun!

marble hornet
#

๐Ÿ˜ nice

solar whale
#

@prime flower I have some time now if you want me to try to update the gude - or would you pefer to do it?

prime flower
#

I was planning to do it after lunch, or could take a look at your edit?

solar whale
#

SOunds good -- I'll make a few quick obvious changes than you can have it - thanks

prime flower
#

sure, ping me when ready

solar whale
#

@prime flower ok -- I got some of the "low hanging fruit" Needs new screenshots. Let me know if you want me to create them or if you have them . Sorry it's taken so long to get this updated. Too many distractions. You'll note I went awy from using code.py -- I never do it that way but you iif that is preferred go ahead and change it back.

rapid ember
#

]

prime flower
#

@solar whale which screenshots were you considering changing?

manic glacierBOT
solar whale
#

@prime flower the ones on the bottom of the page - they used to old file name

#

the actual upload to the argon esp32

prime flower
#

ah, ok

#

@solar whale are you still editing the guide, I can't edit it if you are.

solar whale
#

I think I'm off

idle owl
#

Anyone running Windows with their CircuitPython boards that can check something for me?

solar whale
#

sorry ๐Ÿ˜ฆ no Windows here

prime flower
#

@solar whale Want me to include the steps to flash, just got a fresh argon from downstairs

solar whale
#

@prime flower sounds great to me!

#

hope the esp32 load step goes more smoothly!

prime flower
#

Would you want the Flashing of the NRF bootloader, then the ESP load?

#

or just the load step

solar whale
#

depends on the audience -- I think it good to show how to do it all since you can't use CP unless you first do the bootloader and doing a bootloader and Softdevice is not something everyone has done.

prime flower
#

almost makes me feel as if a page just for the argon is req.'d...

solar whale
#

We probably should provide the steps to "put it back" I have reloaded the ESP32 firmware but the particle bootloader or firmware. No promises ๐Ÿ˜‰

prime flower
#

I dont think I've tried re-flashing the particle fw

solar whale
#

first you have to reload the ESP32 via miniesptool!

#

before you blow away CP!

#

although I think you can do it via the particle firmware as well.

idle owl
#

@solar whale You're running Linux tho?

solar whale
#

@idle owl yes

#

@prime flower there are really 4 cases: 1) external ESP8266, External ESP32 Huzzah Feather, External Espressif ESP32 with programming UART exposed, Internal ESP32 (Argon)

#

all require different load files

idle owl
#

@solar whale Ok, I would like your help with something then if you have a bit here. Turns out you can rename CIRCUITPY and the rename sticks through disconnecting the board (it writes the name to the filesystem, so if you do a storage.erase_filesystem() it will revert). Thing is, we can't figure out a consistent way to rename it on linux. Dan found fatlabel but you have to figure out what the device path is first, which he tried df or something... I'm adding to the Essentials guide that you can rename the drive so people know they can do it, but I should include how, and I have no idea how that works on Linux.

exotic pumice
#

I can try to help with that one

solar whale
#

go for it @exotic pumice

#

@idle owl trying fatlabel

idle owl
#

There were a lot of awful suggestions on the internet on renaming a mount point... we need something that isn't destructive and is consistent.

solar whale
#

hmm does it work on nrfs?

exotic pumice
stuck elbow
#

@idle owl I usually just use gparted for such stuff

idle owl
#

That seems like a bad idea though

stuck elbow
#

but it's easy to break something with it

idle owl
#

yeah

#

I don't know @solar whale ๐Ÿ˜„

exotic pumice
#

looks like it works

solar whale
#

@exotic pumice did you have to reboot the board to see the new label?

exotic pumice
#

no

#

oh

#

maybe

#

I don't think so

solar whale
#

it shows up immediatle n the File manager with thenew name , but not in with df df only shows it after rebot or maybey remount

#

yeas just hasd to remount to see it with df

exotic pumice
#

that would probably make sense

#

because it's the path where it's mounted

solar whale
#

that was on a Trinket -- now back to nrf

exotic pumice
#

I did it on a cpx btw

solar whale
#

@idle owl works the same on nrf !

#

looks good

#

it even survived my reload the CP .uf2 on the trinket

exotic pumice
#

what would happen if a different device became sda1 (in my example) though

#

we should probably check that

#

make sure it's bound to the actual device not just the /dev/sda1 path

raven canopy
#

@idle owl if you still need Windows stuff (screenshots, perhaps?)...let me know.

solar whale
#

@idle owl ```
jerryneedell@Ubuntu-Macmini:~/projects/ESP_ATcontrol/argon$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 4005852 0 4005852 0% /dev
tmpfs 807220 1780 805440 1% /run
/dev/sda2 952625076 77777296 826434188 9% /
tmpfs 4036100 121692 3914408 4% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
tmpfs 4036100 0 4036100 0% /sys/fs/cgroup
/dev/sda1 523248 6228 517020 2% /boot/efi
tmpfs 807220 24 807196 1% /run/user/123
tmpfs 807220 84 807136 1% /run/user/1000
/dev/sdb1 3845578572 116021908 3534189404 4% /media/jerryneedell/Backups
/dev/sdc1 4072 2758 1314 68% /media/jerryneedell/CIRCUITPY

idle owl
#

@raven canopy I will take you up on that.

#

@solar whale @exotic pumice Thanks!

solar whale
#
0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
 Automatically removing dirty bit.
jerryneedell@Ubuntu-Macmini:~/projects/ESP_ATcontrol/argon$ 
jerryneedell@Ubuntu-Macmini:~/projects/ESP_ATcontrol/argon$ df
Filesystem      1K-blocks      Used  Available Use% Mounted on
udev              4005852         0    4005852   0% /dev
tmpfs              807220      1772     805448   1% /run
/dev/sda2       952625076  77777320  826434164   9% /
tmpfs             4036100    121692    3914408   4% /dev/shm
tmpfs                5120         4       5116   1% /run/lock
/dev/sda1          523248      6228     517020   2% /boot/efi
tmpfs              807220        24     807196   1% /run/user/123
tmpfs              807220        88     807132   1% /run/user/1000
tmpfs             4036100         0    4036100   0% /sys/fs/cgroup
tmpfs              807220        88     807132   1% /run/user/1000
/dev/sdb1      3845578572 116021908 3534189404   4% /media/jerryneedell/Backups
/dev/sdc1            4072      2758       1314  68% /media/jerryneedell/ARGONCP```
#

to see the new lable in df I had to unmount/remount it

idle owl
#

ok

exotic pumice
#

I just confirmed it's bound to the device not the devicepath

idle owl
#

That's good

solar whale
#

and it does require sudo privilege

idle owl
#

hmph.

#

Good for personal use, bad for probably classroom use.

#

Ugh.

solar whale
#

at least it did on my system

exotic pumice
#

same

#

see my screenshot for the error

#

adding the user to the disk group makes it not need sudo

idle owl
#

which requires sudo I'm sure.

exotic pumice
#

yeah

solar whale
#

someone has to be responsible ๐Ÿ˜‰

exotic pumice
#

the disk group also basically gives permission to rewrite the whole disk so probably not the best

idle owl
#

@raven canopy How do you rename CIRCUITPY in Windows? Right click and rename? Or is there a bunch of nonsense on Windows too?

raven canopy
#

i would imagine it's a right-click away...

#

let me spin up a 4.alpha board real quick

idle owl
#

Thank you

prime flower
#

the flashing part at least

solar whale
#

@prime flower Good to have a pro doing the guide! And I'm really glad you are now an argon expert!

prime flower
#

not yet, only been a day, im just excited

#

will address a lot of issues with io on arduino (looks at ESP8266 v2.5 beta..)

solar whale
#

I've had an argon posting temp/humidit to my IO feeds for a few days now.

prime flower
#

looks good, I just setup an argon dash lol

raven canopy
#

actually, 2 and 3 are there. upper left corner is another quick link to properties.

idle owl
#

So you go into Properties to do it?

#

Can you right click on it and get to properties?

raven canopy
#

yep. i've got 6 (or 7?) screen shots. want me to zip 'em and send here? or upload to learn assets?

idle owl
#

I can't link to already uploaded learn assets, so zip them here is fine. Still not sure I'm going to include screenies yet.

raven canopy
#

kk

idle owl
#

Bleh I probably should. And side2 them.

raven canopy
#

do you want me to highlight "clicks" in adafruit pink before i send them?

idle owl
#

I mean... I won't say no to less work for me ๐Ÿ˜ƒ

exotic pumice
#

on windows 10 there's just a right-click-> rename, doesn't look like you have to go into properties

raven canopy
#

hah! oh yeah... there's also the F2 key. plenty of options.

idle owl
#

oi ๐Ÿ˜„

raven canopy
#

you could just make the windows step read like this: "Change the name like you would any other file object in Windows."

#

done. ๐Ÿ˜†

idle owl
#

"What's a file object?"

#

etc.

raven canopy
#

"They're in the computer."

idle owl
#

The files are in the computer..????

exotic pumice
#

I saw a thing today like, "why would I put a window on my computer?"

#

can't find it now

raven canopy
#

alight. grabbed a "click rename" screenshot.

meager fog
#

heya everone here should get nrf52840 feather now

#

we wll start notifying people and we will sell out ๐Ÿ˜ƒ

prime flower
pastel panther
idle owl
#

@raven canopy Do you get an error on Windows if you try to name it something longer than 11 characters? You do on Mac and Linux.

#

Apparently.

raven canopy
#

i think that is "standard" for volume labels. been a while since i went around naming drives. ๐Ÿ˜„ i'll check.

meager fog
#

11 chars is the FAT max

idle owl
#

I think it's a FAT limit

meager fog
#

FATMAX

idle owl
#

that ^^

#

Next up it's MC FATMAX dropping the beats!

raven canopy
#

yep. file explorer won't even let me type more than 11 chars.

idle owl
#

ok thanks

#

@raven canopy Did you send me a zip and I missed it or are you still fancying them

raven canopy
#

been DM spam research discracted...

idle owl
#

right on

raven canopy
#

only one mention to Discord about it in the black hole of Twitter...

marble hornet
#

@regal juniper ask some of the people above this line of text about making a custom board folder

#

------separately---------

#

does the esp at support the esp pico d4?

#

esp 32 pico d4**

prime flower
manic glacierBOT
manic glacierBOT
manic glacierBOT
exotic pumice
#

filming neopixels is hard but suffice it to say I got a Rust rainbow cycle going

#

using nops, sadly

#

my partner in crime has taken over the spi version

exotic pumice
slender iron
brisk cairn
#

Icosahedron has 20 sides which is what I use.

#

Sorry wrong chat. Meant to put it in live video chat.

ember pagoda
#

sorry if this is a stupid question(I'm new to this) but if I had a question about circuitpython could I ask it here?

exotic pumice
#

@ember pagoda yep! no stupid questions

slender iron
ember pagoda
#

Awesome! so I'm using a adafruit trinket M0 and with circuit python I would like to know how to use two adafruit vl53l0x devices at the same time. I'm confused specifically how to (I think this is what I'm supposed to do) change the I2c address on one of them. If this would not work with the trinket I have the same question with the adafruit feather M4 express.

slender iron
#

@ember pagoda Most folks are watching the broadcast now. Sit tight for help.

ember pagoda
#

awesome thanks for the headsup

marble hornet
#

Does the at command for the esp32 work on any esp 32?

#

Like a pico? Or just the wroom

solar whale
#

@slender iron asked for some additional info.

#

@marble hornet the builds I have used are for the wroom but it can be built for other versions. Iโ€™m not familiar with the pico.

slender iron
#

thanks @solar whale

marble hornet
#

@solar whale can I send you a copy and board link? I wanna use it in my v2 tricorder

#

When code matures and I finish v1

solar whale
#

Sure. Just post a link to the pico info and Iโ€™ll see if I can find out more about it.

solar whale
marble hornet
#

Thanks

#

What directory are boards in?

solar whale
#

@marble hornet not sure. Iโ€™ll look at it a bit later and see if I can find it . Wroom was easy

marble hornet
#

Thanks. I'll take a look too

manic glacierBOT
ember pagoda
#

i already asked this question I just want to make sure it doesn't get forgotten: so I'm using an adafruit trinket M0 and with circuit python I would like to know how to use two adafruit vl53l0x devices at the same time. I'm confused specifically how to (I think this is what I'm supposed to do) change the I2c address on one of them. If this would not work with the trinket I have the same question with the adafruit feather M4 express.

manic glacierBOT
idle owl
#

@ember pagoda People are pretty good about reading scroll back, you don't need to post multiple times. In the event that you don't get an answer for a day and there's been a ton of conversation, you can post again, but don't worry about posting again so soon. ๐Ÿ˜ƒ

ember pagoda
#

I'm really sorry

idle owl
#

No worries!

manic glacierBOT
solar whale
#

@marble hornet when it built the WROOM vesrion ita also built a PICO_D4 version do you want the .bin file?

solar whale
#

@marble hornet or just clone the repo and build/customize it yourself.

manic glacierBOT
idle owl
#

@ember pagoda Ok, I looked into it. From the Learn guide: For future reference, the default I2C address is 0x29. You can change it, but only in software. That means you have to wire the SHUTDOWN pin and hold all but one sensor in reset while you reconfigure one sensor at a time

#

I was told that you should look at the Arduino library, it explains it, but it's apparently difficult to do.

#

The other option is to use a multiplexing chip of some sort.

ember pagoda
#

but I was wondering if I could do it with circuitpython

marble hornet
#

Noted. When the board comes in I'll take a closer look. I'd like to do it right so other people don't have to. Thank you for showing me the repo! When I try to build it (for wroom) mind if I pick your brain on issues that arise?

idle owl
#

@ember pagoda I'm not sure. It wasn't mentioned in the response to the question.

solar whale
#

No problem -- and it builds for several boards automatically. I just chose the WROOM.bin

marble hornet
#

Oh

solar whale
#

@marble hornet to get the builds for all boards - follow the instructions in the README for doing a "factory_bin" build at the end. It builds them all.

manic glacierBOT
marble hornet
#

๐Ÿ‘๐Ÿ˜ I'll check back in tomorrow (at my dad's then, the workshop location)

upbeat plover
#

@ember pagoda are you able to just power down each one? and just power up one at a time for reading

idle owl
#

@ember pagoda I don't see anything in the CircuitPython library that looks like it might do that. I think if you want to use CircuitPython, your only option is to include a multiplexer. If it's possible in Arduino, I believe it's possible in CircuitPython, however it doesn't appear to be implemented.

slender iron
#

@ember pagoda You'll need to manage the change of address yourself. If our driver doesn't let you pass in the correct address we can change it.

ember pagoda
#

@idle owl thank you very much!

raven canopy
#

@idle owl from our converstaion on setup.py, just came across this while working on cookie updates:

Anyway, find_packages() walks the target directory, filtering by inclusion patterns, and finds Python packages (any directory). Packages are only recognized if they include an __init__.py file.

we haven't moved on the open issue about removing __init__.py, so this would still work "as is". however, do we want to re-hash the larger conversation?

idle owl
#

@raven canopy We decided to include it because it's inconsistent without it, but it's consistent with it.

raven canopy
#

lol. was i asleep? or is it just my aging memory cells... ๐Ÿ˜†

idle owl
#

So even though it's unnecessary in some cases, we're going to include it in all cases for the few where it's necessary. At least for now until someone can put some deeper effort into figuring out why it's inconsistent.

#

I think it was a quick discussion between Scott, Dan and I. I am pretty sure I closed the issue for it though with that information.

manic glacierBOT
raven canopy
#

yep. closed. didn't notice it. all good...just missed it getting closed. ๐Ÿ˜„

idle owl
#

You had me questioning my own brain there for a minute ๐Ÿ˜„

#

Dan wants to understand it, but now isn't the time.

#

I'd love to know as well. But we'll get to it later.

tidal kiln
raven canopy
#

@idle owl agree, though not sure i can help anyone understand it.
with this find_packages() knowledge though, since a non-package library doesn't have __init__.py, i'm not confident it will work. you can pass in inclusion patterns as well, but i don't know if that's enough. i'll keep reading, just stinks that the only verification is actually deploying and testing.

idle owl
#

@raven canopy Yeah. I will create a test repo that we can use because I'm not waiting for a legit release cycle to test all of this.

raven canopy
#

for now, do you want me to just have it put the cookiecutter.library_name in there?

idle owl
#

Yeah. And we'll add a todo to the file

raven canopy
#

k

idle owl
#

# TODO: CHANGE py_modules= TO packages= IF LIBRARY FILES ARE A PACKAGE FOLDERRight above the py_modules line.

#

or something like that anyway

#

PyCharm highlights it yellow. Easy enough for me anyway.

raven canopy
#

uhh...where is the py_modules line? i may have grabbed an outdated version?

idle owl
#

Second to last line

#

My line numbers are different because I added todos in mine ๐Ÿ˜„

raven canopy
#

i'll go hunting for a "better" version.

#

oh wait...

#

somehow i backspaced over it and renamed. ๐Ÿคฆ

idle owl
#

๐Ÿ˜†

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Hmmm. That's going to be hard whether there's a separate charge pin or not

  • touching the pin directly (without an insulating layer) introduces a bunch of electrical noise and also potentially some leakage currents ... I get very noisy results too when touching the non-insulated parts of the touchpad.

  • touching just an insulated wire is quite a small coupling area compared to a touchpad, and so while there's a capacitance signal there it's quite small.

We might be able to do some b...

rough flower
#

java.io.IOException: Cannot run program "{runtime.tools.bossac-1.7.0.path}/bossac": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26)
at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:207)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:82)
at processing.app.SketchController.upload(SketchController.java:736)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2028)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 8 more
An error occurred while uploading the sketch

#

anyone know how to fix this error?

manic glacierBOT
manic glacierBOT
manic glacierBOT
marble hornet
#

@solar whale i missed one of your messages yesterday and totally didn;t see it. i'd love the d4 bin

#

i'm also getting this error:

#
make: xtensa-esp32-elf-gcc: Command not found
expr: syntax error
/Users/jonahym/Desktop/esp32-at/tools/mkfatfs/Makefile.projbuild:13: warning: overriding commands for target `clean'
/Users/jonahym/Desktop/esp32-at/esp-idf/components/app_update/Makefile.projbuild:38: warning: ignoring old commands for target `clean'
/bin/bash: xtensa-esp32-elf-gcc: command not found
/bin/bash: xtensa-esp32-elf-gcc: command not found
Toolchain path: 
WARNING: Failed to find Xtensa toolchain, may need to alter PATH or set one in the configuration menu
Traceback (most recent call last):
  File "/Users/jonahym/Desktop/esp32-at/tools/esp32_at_combine.py", line 97, in <module>
    main()
  File "/Users/jonahym/Desktop/esp32-at/tools/esp32_at_combine.py", line 93, in main
    esp32_at_combine_bin(args.flash_mode.upper(), args.flash_size.upper(), args.flash_speed.upper(), args.bin_directory, args.parameter_file)
  File "/Users/jonahym/Desktop/esp32-at/tools/esp32_at_combine.py", line 40, in esp32_at_combine_bin
    with open(os.path.join(build_dir, 'download.config')) as f:
IOError: [Errno 2] No such file or directory: '/Users/jonahym/Desktop/esp32-at/build/download.config'
make: *** [factory_bin] Error 1
#

when i try to build it

#

any idea where the file is / should be?

prime flower
#

Does anyone with either a particle Xenon or Boron have the USB VID/PID of them? (Adding them into Mu for blinka )

raven canopy
#

@prime flower I have both, but it'll be after work that I can get em. But.. aren't they in CP's code? runs to look

prime flower
#

may be, I dug thru some particle code for references to them and didn't find them

prime flower
#

๐Ÿ’ฏ

#

@raven canopy Perfect, thanks! added them into the Mu PR I have open

manic glacierBOT
slender iron
#

@prime flower we may want to check with particle about the usb ids

#

I pulled them from their enumeration as a cdc device

prime flower
#

@slender iron Let's check, then. The Argon one is correct (for my setup, at least), notsure about the rest.

slender iron
#

I'm saying we may want to change them

raven canopy
#

Change them to an Adafruit VID/PID?

solar whale
#

@marble hornet when you cloned the esp32-at repo did you also do `git submodule update --init --recursive .. it should install the toolchain for you in esp-idf/ int the esp32-at folder. here is the PICO_D4.bin

slender iron
#

@raven canopy not sure we have a good solution for it at this point

solar whale
#

@marble hornet a few other things -- did you first build the firmware make then follow all the steps at the end of this to build the config file. make factory_bin to combine factory bin, by default, the factory bin is 4MB flash size, DIO flash mode and 40MHz flash speed. If you want use this command, you must fisrt run make print_flash_cmd | tail -n 1 > build/download.config to generate build/download.config.

upbeat plover
#

try making my first own frozen lib for "Adafruit Mini Color TFT with Joystick FeatherWing" for feather_m4 i think it may be too big for feather_m0

solar whale
#

@marble hornet one more thing - you'l probalby need to do a make menuconfig before the make you should not have to change anything just save the file (sdkconfig) unless you did the make defconfig -- that may do the same thing. Sorry - there are many ways to get the the same place...

manic glacierBOT
#

I think we should aim to be backwards compatible with neopixel and break any weird things with other RGB LED drivers. Most of those differences are a result of bad copy and paste so we should take the hit now to make them uniform.

We should update each individual driver and include the new PixelBuf dependency as needed.

Does that clarify things? Any other issues we need direction on?

raven canopy
#

@slender iron yeah, seems a tricky situation. my understanding is the IDs are tied to hardware, but I could definitely be off the mark on that. "product" could just as easily include both hard and soft...

manic glacierBOT
upbeat plover
#
import sys
import time
# pylint: disable=wrong-import-position
try:
    lib_index = sys.path.index("/lib")        # pylint: disable=invalid-name
    if lib_index < sys.path.index(".frozen"):
        # Prefer frozen modules over those in /lib.
        sys.path.insert(lib_index, ".frozen")
except ValueError:
    # Don't change sys.path if it doesn't contain "lib" or ".frozen".
    pass

import random
from TG_Modules.TG_RGB.rgb import colorst as color  # use color to make
from TG_Modules.TG_RGB.st7735r import ST7735R
from adafruit_seesaw import seesaw as ss
from adafruit_seesaw import digitalio as dio
from adafruit_seesaw import pwmout as pwm
from micropython import const
import board
import bitmapfont
import busio
import digitalio
import gc

__version__ = "0.0.0-auto.0"


class joystick:     # pylint: disable=too-many-public-methods
    """Represents a single mini tft featherwing. Do not use more than one at
       a time."""
    def __init__(self):
        # Only create the joystick module member when we're aren't being imported by Sphinx
        if ("__module__" in dir(digitalio.DigitalInOut) and
                digitalio.DigitalInOut.__module__ == "sphinx.ext.autodoc"):
            return
        self._disp_sck = board.SCK
        self._disp_mosi = board.MOSI
        self._disp_miso = board.MISO
        self._disp_cs = board.D9
        self._disp_dc = board.D10
        self._i2c = busio.I2C(board.SCL, board.SDA)
        self._seesaw = ss.Seesaw(self._i2c, 94)
        self._backlight_pin = pwm.PWMOut(self._seesaw, 5)
        self._disp_rst = otherdio.DigitalIO(self._seesaw, 8)
        self._disp_spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO

is this correct way to start a frozen?

slender iron
#

@raven canopy I think the challenge is that some hosts cache usb descriptor based on ids and this will cause different descriptors for the same id

#

@upbeat plover the latest versions of circuitpython should already prefer frozen over lib

upbeat plover
#

thank you so i can remove that bit?

slender iron
#

yup, I think so

manic glacierBOT
raven canopy
#

@slender iron good point. Didn't even think about that.

manic glacierBOT
tidal kiln
upbeat plover
#

woot got backlight on/off and button values all working in frozen

manic glacierBOT
#

The HiFive1 doesn't have native USB so I'd rather not port to it.

However, the FPGA folks will have native USB and RISCV cores. It brings up an interesting point though where we really define a port by peripheral family instead of the cpu core itself. Porting to the RISCV cpu itself shouldn't be hard since its a gcc change. The peripheral support is the hard part.

upbeat plover
#

im not sure how to call something from the frozen
wing._disp.rect(5,5,150,50, color(0,0,50))
says no color but i have it in the frozen as from TG_Modules.TG_RGB.rgb import colorst as color

if i do

from frozen import wing
from TG_Modules.TG_RGB.rgb import colorst as color

wing._disp.rect(5,5,150,50, color(0,0,50))```

works as expected
#

i guess for now ill just remove it from frozen

tidal kiln
#

check your path?

>>> import sys
>>> sys.path
['', '/', '.frozen', '/lib']
>>> 
raven canopy
#

@tidal kiln indeed. the first API call in that check is to get the tag name, which is date of the release; but the query also returns the published date. from there, its just a matter of mathing the difference. what did you have in mind for the difference?

tidal kiln
#

@raven canopy just thinking of someway of escalating or emphasizing ones with greater amounts of lag

raven canopy
#

correction: bundle release tag names are the date. library releases are not, but the pub date is still available

#

we might be able to append the library name in that section with "stale days". e.g. ```
Adafruit_CircuitPython_FRAM (30)
Adafruit_CircuitPython_DHT (145)

tidal kiln
#

if the delta is like a day or so, maybe up to week, then that's like "normal", but if delta is like several weeks or more then make it bold or blink or blinking bold red with scroll effect and sparkles

#

delta = time between latest commit and latest release

upbeat plover
#

@tidal kiln ['', '/', '.frozen', '/lib'] was the return?

raven canopy
#

adabot needs some sparkles. i'm sold... ๐Ÿ˜„

tidal kiln
#

i'm mainly just thinking out loud...and seeing if something like this is possible

raven canopy
#

all good. i'd say its a definite possibility, and some vectorable info would be nice to have. adabot has about 2500-2900 API requests left as available when all 3 scripts are run (libraries, dl stats, arduino). guess the hard part is where do we draw the line on grabbing/using that info...

tidal kiln
#

@upbeat plover that's the search order then. not sure what you have, but if it's in '/', then it will get used instead of the frozen version, for example

#

@raven canopy thanks. i think this a good in-the-weeds thing. i'll ask it next meeting.

raven canopy
#

๐Ÿ‘ go ahead an put an issue in too, if you want. make it open-ended, but use the release issue as an example...

#

also thinking out loud: if we start to run into API rate limiting, we can bolster adabot and have her handle it accordingly by waiting until the next limit reset. time.sleep(3600)

#

oh..will have to include Travis stall handling as well. great...now i already feel like doing it. ๐Ÿ˜†

upbeat plover
#

can you take a look when you have time @tidal kiln

#

oh i should have made comment but my CS and DS were moved

idle owl
#

We're way behind because of the badge URL update. So everything is unreleased.

raven canopy
#

"This release was brought to you by: Adabot!" ๐Ÿคฃ

idle owl
#

And the number Travis.

tidal kiln
#

And the letter 9.

#

@upbeat plover sry if you've posted about this, but i don't know background here - what is TG_Modules?

upbeat plover
#

they dont go in the lib folder is that the cause of issue? cp isnt looking in correct spot?

manic glacierBOT
tidal kiln
#

so you have a folder named TG_Modules?

upbeat plover
#

yeah

tidal kiln
#

what's in that folder?

upbeat plover
#

hold on ill give you exact path

#

\tg_modules\TG_RGB\rgb

#

do i change line 51 to that?

tidal kiln
#

that's all in your CIRCUITPY folder?

upbeat plover
#

yes

#

the screen works idk why calling color doesnt

tidal kiln
#

oh, that zip and the repo are different

upbeat plover
#

yeah it can rotate

tidal kiln
#

but basically you have the contents of the zip copied to CIRCUITPY?

upbeat plover
#

yes its all in feather_m4 CIRCUITPY

marble hornet
#

where did you find those?

upbeat plover
#

here like months ago

marble hornet
#

oh, that one

upbeat plover
#

may still find in chat

marble hornet
#

okay

#

all good

tidal kiln
#

ok. starting to see how you're setup.

upbeat plover
#

says 0ct 20? is that right?

tidal kiln
#

and where did you put joywing.py?

upbeat plover
#

in /lib/adafruit_mini_tft_featherwing

#

this is still alpha version i started it today still havent copy pasted over my offset fixes

#

basically needs this as it is now

def yfix(ya):
    ya = ya + 24
    return ya
#

then when you do a command you would (x, yfix(y)) for stuff and it would come out right

#

@marble hornet doesnt that version have a built in offset, idk how to use it

tidal kiln
#
wing._disp.rect(5,5,150,50, color(0,0,50)) says no color

what the actual text of the error you got here?

upbeat plover
#

`Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'color' is not defined

wing._disp.rect(5,5,150,50, color(0,0,50))`

tidal kiln
#

it's complaining about not knowing what the function color() is

upbeat plover
#

let me look at me adafruit stuff there is similar there

marble hornet
#

look at the code, i try to name variables well it'll be in all of them

tidal kiln
#

are you trying to call this?

from TG_Modules.TG_RGB.rgb import colorst as color
upbeat plover
#

think it would be same as from adafruit_rgb_display import color565 as color

marble hornet
#

then cater's code should work

tidal kiln
#

you do that in joywing.py, but you would also need to do something similar in your main code

#

try this real quick just to see if it returns without error:

wing._disp.rect(5,5,150,50,  0)
upbeat plover
#

works

#

and when i do python wing._disp.rect(5,5,150,50, 255) it makes red rectangle

tidal kiln
#

so, yah, it's just that in your calling code, it doesn't know about color()

marble hornet
#

@upbeat plover what ya making?

upbeat plover
#

helper lib for tft

marble hornet
#

ah

upbeat plover
#

my code is starting to look huge in main.py and i want to clean it up, still have 100kram of free space, im like what can i add next lol

marble hornet
#

thank you!!!!

#

really hate seting up seesaw (like i can;t figure it out

#

)

#

so thank you

upbeat plover
#

seesaw was fun

marble hornet
#

where is the documentioan or guide for that ?

upbeat plover
#

think that is where you start

#

i did trial and error till i got buttons right

#

if you guys want to post up the code?

#
from adafruit_rgb_display import st7735
from adafruit_seesaw import seesaw as ss
from adafruit_seesaw import digitalio as dio
from adafruit_seesaw import pwmout as pwm
from micropython import const
import time
import busio
import board
import digitalio

i2c = busio.I2C(board.SCL, board.SDA)
seesaw = ss.Seesaw(i2c, 94)
rst = dio.DigitalIO(seesaw, 8)
cs = digitalio.DigitalInOut(board.D5)
dc = digitalio.DigitalInOut(board.D6)
backlight = pwm.PWMOut(seesaw, 5)
backlight.duty_cycle = 0xffff
spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO)
display = st7735.ST7735(spi, cs, dc, rst, 80, 160)

# pylint: disable=bad-whitespace
BUTTON_RIGHT = const(7)
BUTTON_DOWN = const(4)
BUTTON_UP = const(2)
BUTTON_LEFT = const(3)
BUTTON_B = const(9)
BUTTON_A = const(10)
BUTTON_SEL = const(11)
# pylint: enable=bad-whitespace
button_mask = const((1 << BUTTON_RIGHT) |
                    (1 << BUTTON_DOWN) |
                    (1 << BUTTON_UP) |
                    (1 << BUTTON_LEFT) |
                    (1 << BUTTON_B) |
                    (1 << BUTTON_A) |
                    (1 << BUTTON_SEL))
seesaw.pin_mode_bulk(button_mask, seesaw.INPUT_PULLUP)

display.reset()

while True:
    buttons = seesaw.digital_read_bulk(button_mask)
    if not buttons & (1 << BUTTON_RIGHT):
        print("Button Right-D pressed")

    if not buttons & (1 << BUTTON_DOWN):
        print("Button Down-D pressed")
    
    if not buttons & (1 << BUTTON_LEFT):
        print("Button Left-D pressed")

    if not buttons & (1 << BUTTON_UP):
        print("Button Up-D pressed")

    if not buttons & (1 << BUTTON_B):
        print("Button B pressed")

    if not buttons & (1 << BUTTON_A):
        print("Button A pressed")

    if not buttons & (1 << BUTTON_SEL):
        print("Button SEL pressed")
    
    time.sleep(0.01)
#

that would be cut down pretty good but i think the etch would be a good demo

marble hornet
#

#WhenYouFigureOutThatYouForgotPullUpResistorsTheDayAfterOrderingThePCB

upbeat plover
#

i have the etch demo for adruino too... just say

slender iron
manic glacierBOT
tidal kiln
#

@slender iron i'll look at the hallowing/ble one

slender iron
#

thank you!

manic glacierBOT
slender iron
#
Adafruit Industries - Makers, hackers, artists, designers and engineers!

As 2018 comes to a close we like to reflect on how the year went and set goals for 2019. In the last two years (2017, 2018) this has been a blog post by me (Scott aka tannewt). For 2019, weโ€™d like โ€ฆ

#

I'm working on mine now

stuck elbow
#

hmmm....

ruby atlas
#

@slender iron welcome back!

#

and congrats

stuck elbow
#

@ruby atlas congrats?

upbeat plover
#
from adafruit_mini_tft_featherwing.rgb import colorst as color
from adafruit_mini_tft_featherwing.joywing import wing

# wing._disp.
"""
pixel(x, y, color=None)
rect(x, y, width, height, color)
fill(color=0)
hline(x, y, width, color)
vline(x, y, height, color)
text_dimension(x, y, text, size = 1)
text(x, y, text, color(255,255,255), background = color(0,0,0), size = 1, rect_extension = 0, italics = 0)
scroll(x, y, str, color(255,255,255), background = None, size = 1)
round_rect(x, y, width, height, r, color)
"""

wing.backlight_on
wing._disp.pixel(0,0, 255)
wing._disp.rect(5, 5, 150, 50, color(75, 200, 50))
wing._disp.scroll(20, 20, "hello", color(255,255,255), background = None, size = 1)
wing._disp.text(10,10,"This test shows \n if it is working",color(255,255,255), background = color(0,0,0), size = 1, rect_extension = 0, italics = 0)```

for featherM4  and tft joywing @marble hornet want to test it?
#

everything is now in lib/adafruit_mini_tft_featherwing

#

requires adafruit_seesaw lib too

#

i runout of memory on M0 maybe someone can take a look?

stuck elbow
manic glacierBOT
#

I have notionally recreated this behavior.

I ran the code from the zip file above on a Hallowing, saved as different name and run as import:

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.5 on 2018-12-10; HalloWing M0 Express with samd21g18
>>> import test_code

I did not have the BLE UART connected (not sure of complete wiring used). I did attach a strand of NeoPixes (PID 3919. The NeoPi...

stuck elbow
#

@upbeat plover are you using compiled .mpy versions or .py ones?

upbeat plover
#

mixture

#

ill try all .mpy next

marble hornet
#

@upbeat plover sure

#

What cp version?

upbeat plover
#

4.0.0-alpha.5

marble hornet
#

Okay

#

It'll be some time

#

College apps come first

manic glacierBOT
slender iron
#

@stuck elbow Great! Thanks! Reading it now.

#

@ruby atlas Thanks!

#

@stuck elbow speech recognition is definitely a stretch. It would get people very excited!

scarlet fjord
#

hello, i am having a problem.
This is the error I get when trying to make a keyboard press a bunch of keys at once:

Traceback (most recent call last):
  File "main.py", line 64, in <module>
  File "adafruit_hid/keyboard.py", line 100, in press
  File "adafruit_hid/keyboard.py", line 152, in _add_keycode_to_report
ValueError: Trying to press more than six keys at once.
#

the thing is, im specifically splitting the array of keys to press in to smaller arrays of 6 keys each and asking to press them:

import digitalio

from adafruit_hid.keycode import Keycode
from adafruit_hid.keyboard import Keyboard

from keysetup import kbd_pins

kbd = Keyboard()
kbd_keys = []
toggles = []
queuepress = []
queuerelease = []
prev = []

macros = ["macro1.py"]
which_macro = 0
macro = macros[which_macro]

def splitarray(arr, size):
     arrs = []
     while len(arr) > size:
         pice = arr[:size]
         arrs.append(pice)
         arr   = arr[size:]
     arrs.append(arr)
     return arrs

for pin in kbd_pins:
    pin.direction = digitalio.Direction.INPUT
    pin.pull = digitalio.Pull.UP
    toggles.append(False)

file = open(macro, "r")
for line in file:
    kbd_keys.append(eval(line))

print("Waiting for Keypresses")

while True:
    for key in kbd_pins:
        key_index = kbd_pins.index(key)
        
        if not key.value:  # pressed?
            if not toggles[key_index]:
                toggles[key_index] = True
                key_press = kbd_keys[key_index]
                for press in key_press:
                    queuepress.append(press)
        else:
            if toggles[key_index]:
                toggles[key_index] = False
                key_release = kbd_keys[key_index]
                for release in key_release:
                    queuerelease.append(release)
    
    queuepress = splitarray(queuepress, 6)
    queuerelease = splitarray(queuerelease, 6)
        
    for press in queuepress:
        kbd.press(*press)
    for release in queuerelease:
        kbd.release(*release)
    
    queuepress = []
    queuerelease = []
#

any help would be appreciated

slender iron
#

I don't think you can do that because we maintain the state of pressed keys internally

#

the usb report itself is always a list of pressed keys if I remember right

scarlet fjord
#

hmmmmmm damn
so there's no way to get n-key rollover with the current code?

slender iron
#

not without changing the underlying C code

scarlet fjord
#

oof
that, i cannot do ๐Ÿ˜›

slender iron
#

I'm not sure how the usb protocol changes for n-key rollover

#

you could figure it out ๐Ÿ˜ƒ

scarlet fjord
#

i dont know C, and i certainly dont know how to make my own circuitpython sourcecode ๐Ÿ˜…
I'll just stick with 6-key rollover at the moment i guess....
i'll only be making stuff for gaming and i only have 5 fingers on a hand, so i guess it isnt much of a problem ๐Ÿ™

slender iron
#

please file an issue about it, it may not be hard to support

#

pretend to be more than one keyboard ๐Ÿ˜ƒ

scarlet fjord
#

ooooooh ok, a quick skim-read of the QMK firmware which showed up when i did a google: https://github.com/qmk/qmk_firmware/blob/995c3141a674a0311786cc713ea96d39330a9b48/docs/usb_nkro.txt
it is indeed a limit of the USB protocol??
so i might need to add some more keyboards and send more events over them... is it possible to have multiple 'keyboard' devices in circuitpython?
cause i know i have to define a keyboard like so:
kbd = Keyboard()
can i just... do this? lol:

kbd_1 = keyboard(1)
kbd_2 = keyboard(2)
etc..

? lol

slender iron
#

it may not be that hard actually

errant grail
#

@slender iron I'll take a shot at some 2019 ideas later tonight. Much of what I need/want has already been expressed, so I need time to dream a little more.

slender iron
#

thanks @errant grail!

#

you could try adding a second keyboard to that list

#

the code above it may not work for it though

#

an issue is the best place to discuss it

errant grail
#

Been thinking about further abstraction for coprocessing, like AT support for RFMxx...

slender iron
#

๐Ÿ˜ƒ @stuck elbow mentioned it too

scarlet fjord
#

oof, ok ๐Ÿ‘ I'll file an issue ๐Ÿ˜›

manic glacierBOT
slender iron
#

thanks @scarlet fjord

manic glacierBOT
solar whale
#

@slender iron tried irremote_simpletest on a particle_xenon with pr_1408 -- not sure what to expect ```
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.5-27-g675226667 on 2019-01-03; Particle Xenon with nRF52840

import irremote_simpletest
Heard 1 Pulses: [791]
Failed to decode: ('10 pulses minimum',)


Heard 1 Pulses: [792]
Failed to decode: ('10 pulses minimum',)

Heard 67 Pulses: [8927, 3517, 1375, 486, 1379, 1485, 380, 1485, 379, 1486, 379, 1486, 1380, 484, 1407, 458, 1409, 456, 1410, 2346, 434, 2317, 435, 2317, 1434, 317, 1435, 2317, 435, 2317, 435, 1426, 1436, 317, 1435, 425, 1439, 426, 438, 1427, 438, 1426, 438, 2316, 1435, 427, 1437, 427, 1437, 427, 1438, 2316, 435, 2317, 1406, 344, 1407, 345, 1407, 1454, 438, 2316, 405, 2346, 1405, 345, 1404]
Failed to decode: ('Both even/odd pulses differ',)

Heard 3 Pulses: [8910, 1792, 1375]
Failed to decode: ('10 pulses minimum',)

Heard 3 Pulses: [8904, 1788, 1377]
Failed to decode: ('10 pulses minimum',)

Heard 1 Pulses: [815]
Failed to decode: ('10 pulses minimum',)

manic glacierBOT
#

FYI - I tried running the irremote_simpletest.py with this PR on a particle_xenon. I was not sure what to expect. Seems to respond to an keypress from the IR Remote, but does not decode properly -- receives lots of noise triggers.


Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.5-27-g675226667 on 2019-01-03; Particle Xenon with nRF52840
>>> import irremote_simpletest
Heard 1 Pulses: [772]
Failed to decode:  ('10 pulses minimum',)
-----...
#

FYI - same code as above (D11 instead of D2) on a featherm4 express - this does decode the keypreses - also lots of noise. May be the environment


Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.3-43-g80db2cec9 on 2018-12-03; Adafruit Feather M4 Express with samd51j19
>>> import irremote_simpletest
Heard 1 Pulses: [252]
Failed to decode:  ('10 pulses minimum',)
----------------------------
Heard 67 Pulses: [9027, 4511, 587, 558, 551, 582,...
marble hornet
#

@meager fog is the NFC on the nrf for auto pairing to a phone kinda NFC?

manic glacierBOT
#

Most of the info I have comes from open-source wikis, where they use many keyboard devices each sending 6 keys each - https://deskthority.net/wiki/Rollover,_blocking_and_ghosting#Interface-limited_NKRO
https://github.com/qmk/qmk_firmware/blob/995c3141a674a0311786cc713ea96d39330a9b48/docs/usb_nkro.txt
My Corsair K95 RGB for instance creates many virtual devices for N-Key rollover. Here I have two screenshots, one with the K95 RGB unplugged, and one with it plugged in, and you can see more t...

#

ok used one of these https://www.adafruit.com/product/157
much less noise -- still does not decode


Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.5-27-g675226667 on 2019-01-03; Particle Xenon with nRF52840
>>> 
>>> import irremote_simpletest
Heard 67 Pulses: [8962, 3484, 1410, 455, 1403, 1462, 407, 1458, 411, 1454, 405, 1460, 1408, 457, 1412, 453, 1405, 460, 1409, 2344, 403, 2349, 409, 2343, 1404, 349, 1409, 2343, 404, 2348, 409, 1455,...
manic glacierBOT
raven canopy
#

hmm. should we throw a DHT at nrf pulsein? ๐Ÿ˜ฌ

manic glacierBOT
solar whale
#

@raven canopy ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.5-27-g675226667 on 2019-01-03; Particle Xenon with nRF52840

import dht22_test
RunTime Error Checksum did not validate. Try again.
-3276.7 6553.5
-3276.7 6553.5
RunTime Error Checksum did not validate. Try again.
-3276.7 6553.5
-3276.7 6553.5
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "dht22_test.py", line 11, in <module>
File "dht22_test.py", line 9, in <module>
KeyboardInterrupt:

raven canopy
#

@solar whale 2-to-1...seems normal. ๐Ÿ˜†

manic glacierBOT
#

@hathach @sommesoft made me do it! just for fun I tried a DHT22 temperature sensor with this PR.

Adafruit CircuitPython 4.0.0-alpha.5-27-g675226667 on 2019-01-03; Particle Xenon with nRF52840
>>> import dht22_test
 RunTime Error  Checksum did not validate. Try again.
-3276.7 6553.5
-3276.7 6553.5
 RunTime Error  Checksum did not validate. Try again.
-3276.7 6553.5
-3276.7 6553.5
Traceback (most recent call last):
  File "<s...
manic glacierBOT
slender iron
#

thanks for the help @solar whale

errant grail
#

@slender iron I sent a link to my CircuitPython 2019 post to the circuitpython2019@adafruit.com email address. Hope it's useful for the planning process.

slender iron
#

Great! I look forward to reading it tomorrow @errant grail thanks!

errant grail
#

You're welcome!

manic glacierBOT
manic glacierBOT
prime flower
manic glacierBOT
raven canopy
#

@plucky flint here! here! great post. ^^^^

manic glacierBOT
upbeat plover
#

does particle argon kit do wifi and TLS 1.2?

manic glacierBOT
solar whale
#

@upbeat plover The ESP32 can support TLS v1.2 -- are you asking with regards to using it with CircuitPython and the AT Firmware or "as-delivered" by Particle with Particle mesh?

upbeat plover
#

as-delivered,

#

or cp...

solar whale
#

I think the simple answer is - yes. The devil is in the details..

upbeat plover
#

I understand, you guys are still in dev for cp for those boards?

solar whale
#

yes -- lots of rapid development in progress.

manic glacierBOT
meager fog
#

<@&356864093652516868> hey

#

did you hear that?

stuck elbow
#

bells?

meager fog
#

no

#

more like

pastel panther
#

a train station?

meager fog
#

a whistle?

stuck elbow
#

I'm in Switzerland, I always hear bells

meager fog
#

there it is again

slender iron
#

๐Ÿš‹

stuck elbow
#

ain't hear nothing

turbid radish
#

No

meager fog
#

nono i definiately heard it

#

much louder this time

idle owl
#

Doppler effect.

exotic pumice
#

๐Ÿ˜ฎ

stuck elbow
#

it's getting closer

#

duck!

idle owl
#

Mind the gap!

errant grail
#

Must be the arrival of...

pastel panther
#

train reference!

umbral dagger
#

oh my

#

is it?

#

could it be?!

turbid radish
#

Gc

stuck elbow
#

public transportation coming back to US?

meager fog
#

๐Ÿš†

idle owl
#

@stuck elbow In very specific locales only.

pastel panther
#

F5 F5 F5 F5 F5

errant grail
#

๐ŸŽ† ๐Ÿพ

umbral dagger
#

Well, it has a price now...

meager fog
#

i see it coming round the bend

pastel panther
#

haha

umbral dagger
#

bingo

#

gold rush time

pastel panther
#

48 in stock!

exotic pumice
#

inb4 we break the website F5ing

meager fog
#

GET ON THE TRAIN EVERYBODY

errant grail
#

I think I can... and I did!

stuck elbow
#

๐ŸŽŠ

umbral dagger
#

And done.

stuck elbow
#

๐ŸŽ‰

umbral dagger
#

In other news my debouncer library is nearing readiness. How many input pins did you say there is on the GrandCentral?? Debounce All The Pins!!!;).

solar whale
#

๐Ÿš‚

slender iron
#

I'm on board!

cunning crypt
#

Choo choo! Don't have the spare cash (nor the time, nor any projects, honestly), but awesome anyway

exotic pumice
#

@slender iron you're the conductor

#

or @meager fog is

drowsy geyser
#

Envy. I'm just chilling on the notification list....

solar whale
#

@drowsy geyser if you go to the shop it will let you purchase.

drowsy geyser
#

What? I just looked last night. <scampering off to the shop>

manic glacierBOT
upbeat plover
#

"256KB of RAM" ๐Ÿ˜ป

drowsy geyser
#

Oh nice. Order in. ๐Ÿ˜ƒ

pastel panther
#

choo choo!

upbeat plover
#

thats the cat's meow right there

pastel panther
#

18 down, 30 left

#

(I'm sure there is more for the hoards that will decend when notifications go out)

marble hornet
#

19 down 29 left

exotic pumice
#

26

upbeat plover
#

needs a shield to put feather wings on

exotic pumice
#

lol

drowsy geyser
#

I forsee a Grand Central weather station shield. <dusting off kicad>

ruby atlas
#

๐Ÿ˜ƒ

fluid helm
#

Haha, that's the thing I got in the steam sale yesterday ๐Ÿ˜ @exotic pumice

exotic pumice
#

it's very poignant

pastel panther
#

@upbeat plover I'm already on it ๐Ÿ˜‰

ruby atlas
#

@slender iron saw your comment on the PR. I think the one Neopixel API change I need to address is that pixel orders in my work come from classes defined in pixelbuf.ByteOrder rather than being tuples. I can probably catch the tuples in the wrapper classes and find a matching ByteOrder class.

manic glacierBOT
slender iron
#

ah ya, I'd move away from the tuples I think @ruby atlas

ruby atlas
#

Do you think I need to bother with translating the tuples, since most examples just use the named classes?

#

Also the other bit is how we want to transition to it. I have prototype classes here https://github.com/rhooper/Adafruit_CircuitPython_RGBLED/blob/master/neopixel.py and https://github.com/rhooper/Adafruit_CircuitPython_RGBLED/blob/master/adafruit_dotstar.py that use pixelbuf. There's definitely some code I can clear out of pixelbuf, but I wanted to discuss that too ๐Ÿ˜ƒ There's currently 3 ways to have pixelbuf do write callbacks, and I feel like we should just have one way.

slender iron
#

named classes should be fine. we can break anyone who does a tuple directly

prime flower
raven canopy
#

๐ŸŽŠ ๐Ÿš„ ๐ŸŽŠ

ruby atlas
#

The 3 (4) ways to callback:

  • function + args + pixelbuf as a argument (I think this can go away)
  • function + args + bytearray (This seems redundant)
  • directly call neopixel_write (I think this should go away)
  • function + args (no arguments added by pixelbuf - not yet implemented)
#

The direct neopixel_write was part of benchmarking, and it gives a small boost, but not enough to be worth the hassle.

slender iron
#

kk, which is you preferred way?

ruby atlas
#

I had thought about making it so Pixelbuf can be API compatible with Neopixel and returning it instead of a Neopixel instance.

slender iron
#

I think the C one should be _pixelbuf and the python one pixelbuf

ruby atlas
#

Yeah, probably a good idea. that's not a big deal to do. I haven't finished implementing the _pixelbuf code yet.

slender iron
#

ya, totally

#

the prototypes look good to me

ruby atlas
#

Oh, there's also two easter eggs in pixelbuf... a C implementaiton of wheel and a fill_wheel method. Probably not the right homes for them and should be off on smaller device footprints.

slender iron
#

should be easy to move into a different module

ruby atlas
#

I was driving 72+72+32 pixels with fill_wheel() yesterday and it was a little too fast.

slender iron
#

that's a good problem to have

ruby atlas
#

yeah, less cycles FTW.

#

I should have a 256 pixel dotstar next week sometime to see how it performs and/or test how many pixels i can drive before i run out of memory ๐Ÿ˜ƒ

#

Since you know that'll be a thing ๐Ÿ˜ƒ

slender iron
#

๐Ÿ˜ƒ

ruby atlas
#

A future expansion might be to be able to back subsets of a pixelbuf with different devices.

#

Though the callback should make that possible anyhow.

#

maybe not that easily for dotstars.

#

start and end bytes.

slender iron
#

why not just have multiple pixel bufs?

ruby atlas
#

that's what i'm doing now, but it would be great to have one big virtual buffer for large arrays.

#

(and to add 2-d indexing)

slender iron
#

ya, we can always have a muxing sort of thing on top

ruby atlas
#

very_bright = AllThePixels([strip1, strip2, strip2])

slender iron
#

๐Ÿ˜ƒ

ruby atlas
#

Should I move common code in adafruit_dotstar and neopixel to a base class, or should the duplication remain as we probably don't want to freeze both?

slender iron
#

what common code?

ruby atlas
#

some of deinit, __enter__, __exit__, __repr__, __setitem__ , __getitem__ and the various proxy properties.

#

Mostly it's just __init__ that's unique.

slender iron
#

why can't PixelBuf be the super class?

ruby atlas
#

Oh, hmm...... So PixelBuf would wrap the _pixelbuf stuff?

#

Much like the two classes already do?

slender iron
#

why do you need a wrapper?

ruby atlas
#

Subclassing a C class didn't behave right.

slender iron
#

in what way?

#

@tulip sleet are you around?

ruby atlas
#

I can't remember which things were crashing.

slender iron
#

I think dan saw something go by about this

ruby atlas
#

The subscr stuff worked, I think properties misbehaved, and method calls were ok.

#

Dan and I did have a little chat about it but I forget where we ended up.

#

Being able to subclass properly would be the best outcome.

slender iron
#

kk, for now lets do a Python superclass with the name we want

#

and it can wrap the C

#

once the C subclassing works we can swap out the Python wrapper

ruby atlas
#

Yep, and then get a nice performance boost, and even ditch the callback code.

slender iron
#

ya

ruby atlas
#

What was your first computer? => my dad's Hyperion portable PC Compatible

#

My own first computer was a 286 I built from parts I bought from the PC rental store I worked for doing maintenance.

raven canopy
#

mine: Compaq something, something. which i quickly fried the motherboard on, because i just had to peek in the case and did so while on a carpeted floor. sparky ๐Ÿคท

idle owl
#

IBM something that my parents had to take a loan out to buy apparently. Further: My dad says they still have it. I have not seen proof of this though.

prime flower
#

Dell Inspiron with a C2Duo running XP, possibly a newer version of tannewt's #1

raven canopy
#

i think i still have the HDD from the first PC i built. 528MB. so yuge!

ruby atlas
#

I started with MSDOS, then went to DesqView on the 386, and eventually to Windows on a 486.

raven canopy
#

3.1. still the best version. ๐Ÿ˜†

ruby atlas
#

3.1.1 WFW

#

Didn't need 3rd party stuff for ethernet and tcp/ip with that.

#

(well you needed the NDIS driver... but ...)

#

LOL A bot just told me off.

raven canopy
#

i do remember Winsock. ๐Ÿ˜„

ruby atlas
#

And then deleted my message.

#

Weird.

raven canopy
#

word filter caught a certain sitting US president.

ruby atlas
#

Oh. Tru[m]pet winsock.

#

Those were the days.

raven canopy
#

if Dyno was open source, i would gladly volunteer to touch up the filter routines.

ruby atlas
#

I guess we're coming back to some of that approach with the AT-command IP.

raven canopy
#

ikr!

ruby atlas
#

over 20 years later, old things are new.

terse kayak
#

I remember saying that this internet thing wouldn't catch on unless Microsoft gave away their TCP stack

meager fog
#

@tidal kiln p0ng

tidal kiln
#

@meager fog pIng

meager fog
#

can you help the people with crickit hat and no i2s audio

#

im out of time today ๐Ÿ˜ฆ

#

i thought i made the mute pin un-mute by default but i dont have one in front of me

#

they can solder a wire or cut the trace?

#

or set the pin high using gpio shell command

tidal kiln
#

ok. i'll get them something so they at least have output.

#

setting high was left channel only

solar whale
#

@prime flower fine with me.

errant grail
#

First "computer" was a DIY relay adder-subtractor with a bank of lights but a very advanced telephone dial data input. Our school didn't have much except a donation of old telephone equip that was torn out of the 1920s era central switching building. Had to make do. First commercial computer was an Apple II.

ruby atlas
#

https://en.wikipedia.org/wiki/Hyperion_(computer) was what I had at home. I had used the C64 and Apple ][ at school.

The Hyperion is an early portable computer that vied with the Compaq Portable to be the first portable IBM PC compatible. It was marketed by Infotech Cie of Ottawa, a subsidiary of Bytec Management Corp., who acquired the designer and manufacturer Dynalogic in January 1983. I...

meager fog
#

@tidal kiln what if you cut the trace?

#

on the bottom, jjumper

tidal kiln
#

yah. that should work same.

#

the jumper is un-cut, so i'm guessing the unconfigured GPIO 16 was pulling it low

#

there's a pull up, so cutting to disconnect GPIO will do same

meager fog
#

yeah i think GPIO16 is 'leaky'

#

please try it

#

if so we can easily get people going and ill revise guide

tidal kiln
#

ok, i'll cut the trace on mine to be sure....give me 5....

slender iron
#

๐Ÿ˜ƒ

tidal kiln
#

@meager fog first attempt didn't work. investigating...

manic glacierBOT
#

Yes I'm aware of the similarity with FrequencyIn, but I need to be able to configure which edges to count on: rise/fall/both.

I'm starting to wonder if it would be better to use soft pin interrupts instead if we can just ignore the interrupt if the callback is already on the scheduler stack. This would prevent an interrupt from flooding the stack blocking other soft interrupts.

tidal kiln
#

@meager fog nvm, rookie mistake (pwr'd seesaw, not pi), cutting trace works, audio both channels

marble hornet
#

is there a cp released for the nrf?

manic glacierBOT
marble hornet
#

i only see .hex

exotic pumice
#

really strange question but anyone know the baud register value of 9600 baud?

#

I'm getting 65326

marble hornet
#

i;m getting this error while building for the nrf

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

msgfmt

#

message format ?

exotic pumice
#

do you have all the submodules?

marble hornet
#

i ran the update

slender iron
#

msgfmt is in gettext

marble hornet
#

hmmm

#

i installed it but i'll try it again. do you remember the line to run?

exotic pumice
#

I believe it's

git submodule sync
git submodule update --init --recursive
marble hornet
#

i ran that

#

@slender iron brew says gettext is installed

#

hmmm

ruby atlas
#

Mac?

#

I had some issues with gettext on mac

#

Try brew link โ€”force gettext

#

Or something like that.

marble hornet
#

it worked with --force

#
GEN build-feather_nrf52840_express/genhdr/mpversion.h
Creating build-feather_nrf52840_express/frozen_mpy.c
usage: mpy-tool.py [-h] [-d] [-f] [-q QSTR_HEADER]
                   [-mlongint-impl {none,longlong,mpz}] [-mmpz-dig-size N]
                   files [files ...]
mpy-tool.py: error: the following arguments are required: files
make: *** [build-feather_nrf52840_express/frozen_mpy.c] Error 2
make: *** Deleting file `build-feather_nrf52840_express/frozen_mpy.c'
Jonahs-MacBook-Pro:nrf jonahym$ make BOARD=feather_nrf52840_express V=2
GEN build-feather_nrf52840_express/genhdr/mpversion.h
python ../../py/makeversionhdr.py build-feather_nrf52840_express/genhdr/mpversion.h
Creating build-feather_nrf52840_express/frozen_mpy.c
python3 ../../tools/mpy-tool.py -mlongint-impl=mpz -f -q build-feather_nrf52840_express/genhdr/qstrdefs.preprocessed.h  > build-feather_nrf52840_express/frozen_mpy.c
usage: mpy-tool.py [-h] [-d] [-f] [-q QSTR_HEADER]
                   [-mlongint-impl {none,longlong,mpz}] [-mmpz-dig-size N]
                   files [files ...]
mpy-tool.py: error: the following arguments are required: files
make: *** [build-feather_nrf52840_express/frozen_mpy.c] Error 2
make: *** Deleting file `build-feather_nrf52840_express/frozen_mpy.c'```
#

the next error^^^

#

and @ruby atlas thank you!

exotic pumice
#

ok my google fu tells me 65326 == 9600

#

once again syncbusy is giving me grief

manic glacierBOT
ruby atlas
#

@marble hornet seeing how far i get in the build

#
python3 ../../tools/mpy-tool.py -mlongint-impl=mpz -f -q build-feather_nrf52840_express/genhdr/qstrdefs.preprocessed.h build-feather_nrf52840_express/frozen_mpy/test.mpy > build-feather_nrf52840_express/frozen_mpy.c``` are the args i got for `mpy-tool.py`
marble hornet
#

yeah, mine has the error there too

ruby atlas
#

You: python3 ../../tools/mpy-tool.py -mlongint-impl=mpz -f -q build-feather_nrf52840_express/genhdr/qstrdefs.preprocessed.h > build-feather_nrf52840_express/frozen_mpy.c
Mee: python3 ../../tools/mpy-tool.py -mlongint-impl=mpz -f -q build-feather_nrf52840_express/genhdr/qstrdefs.preprocessed.h build-feather_nrf52840_express/frozen_mpy/test.mpy > build-feather_nrf52840_express/frozen_mpy.c

#

Looks the same to me.

#

oh wait

#

I have build-feather_nrf52840_express/frozen_mpy/test.mpy passed in as an arg.

#

what branch are you on?

marble hornet
#

the most recent

#

master

ruby atlas
#

switched branch and retrying after clean

marble hornet
#

switched to ?

ruby atlas
#

I was on pixelbuf in my fork.

#

it was a few commits behind master

#

Builds OK.

#

try a fresh checkout and maybe try env -i PATH=$PATH make BOARD=feather_nrf52840_express -j12 to have a (mostly) clean env for the build?

#

something's not quite right with your build env.

raven canopy
#

@tidal kiln a few weeks back in the weeds, we discussed module-level vs class-level constants. where did we end up, decision wise on that? i can't remember...

tidal kiln
#

i think it was "it depends"

marble hornet
#

@ruby atlas i'll give it a shot and tell you if it worked or not. eating dinner brb (mom's calling)

raven canopy
#

of course it was. ๐Ÿ˜†

tidal kiln
#

did you see my issue? i just re-asked myself that same question recently

raven canopy
#

nope. looking at Debouncer...

raven canopy
#

yep. thems the ones.

#

and, re: ADS issue...great, now we have 3 ways. ๐Ÿคฃ

tidal kiln
#

those debouncer ones look like they could be module level and put in const()

raven canopy
#

that was my thought. they never change, nor should they, and only take up useless space per instantiation.

tidal kiln
#

i don't think they are needed in the calling program

#

they appear to be used internally

#

they're class level, so all instances share

raven canopy
#

ahh...yes, i was down one level in my brains.

manic glacierBOT
raven canopy
#

@tidal kiln just had a thought. how does micropython.const() work on RPi? is there a stub in Blinka? just lazy enough that he didn't look

#

there is indeed. n/m. ๐Ÿ˜„

tidal kiln
#

yep. super complex code ๐Ÿ˜œ

manic glacierBOT
#

Sorry about the delay but I found where the bug is at the start of my code there were the lines:
backlight = pulseio.PWMOut(board.TFT_BACKLIGHT)
splash = displayio.Group()
board.DISPLAY.show(splash)

That were left overs from one of the Demo code I used to test the screen,
I took out the majority of the screen code while I nailed down neopixel patterns with the intention of adding it back in later but left those three lines thinking set up code wouldn't cause problems (which I was wrong...

upbeat plover
#

๐Ÿš† sold out

manic glacierBOT
ruby atlas
#

@upbeat plover really not surprised. it's an epic board.

marble hornet
#

Agreed

umbral dagger
#

Between the '840 feather & the grand central, I'm going deep into mad scientist mode for come up with some great projects to show them off.

meager fog
#

more coming soon!

#

first run was small, and we're still working out yield - a 128 TQFP 0.4mm is no laughing matter

main meteor
#

That is a lot of teeny little pins in a small space. Looking forward to playing with one!

ruby atlas
#

As usual, I'm amazed by the Adafruit products.

#

I can't wait to work with the Grand Central

#

Once yields are up and I can buy many, it might become my go-to platform other than feathers.

#

Though I love the Metro too

#

OK, try #4 for this mini 3d-printed Metro stand. I flubbed my Feather stacker stand.

main meteor
#

The more I think about it, the harder it looks. Do the solder stencil openings have to be fine tuned for that pin pitch? (probably) Does the solder thickness need to be adjusted too? (probably) Maybe the soldermask needs fine tuning as well. That's leaving alone the temperature profile and all that twiddling.

meager fog
#

mad, yes yes and yes ๐Ÿ˜ƒ

#

eveything

ruby atlas
meager fog
#

0.7mm is breezy, 0.5mm is standard, 0.4mm is a challenge

#

roy, the diagrams are not really meant to be comprehensive - i recommend exporting from eaglecad directly if thats ok

main meteor
#

Go ahead, call it 400ยตm. It sounds even more impressive that way.

meager fog
#

i have to eyeball the dim's - its mostly so people have 'a scale sense':)

#

if that makes sense

#

and since we layout in imperial, the precision is lost otherwise

ruby atlas
#

It does make sense. Though the feather doubler/tripler measurements were perfect.

#

I understand doing layout in imperial. Aren't most north american parts still in imperial anyhow?

#

I mean, heck, even in Canada, we build houses in imperial.

#

Attempts to get us to acknowledge metric for construction failed long ago.

#

Metric timber was laughable.

#

I ended up cheating for the openscad and used this scaling: scale([25.4, 25.4, 1]) so I could do layers in metric an the rest imperial.

idle owl
#

So much rainbow!

#

zoom

ruby atlas
#

I can't wait to see just how many pixels i can drive before i run out of memory.

idle owl
#

I am also excited about that ๐Ÿ˜„

umbral dagger
meager fog
#

@umbral dagger ok - next up - wanna revise the 3 examples that use it to instead use the lib

umbral dagger
#

@ruby atlas Yeah, imperial (i.e. antiquated British... so ironic) will persist in some niches until the US switches and a few generations cycle.

#

@meager fog That's next on my list.

raven canopy
#

@ruby atlas can't you just use an arbitrary number to test memory. The RAM doesn't care if the blinkies are there... ๐Ÿ˜

#

I for one would welcome metric lumber. The math and measuring is so much easier. Mathing @ 1/64ths of an inch is annoying.

ruby atlas
#

@raven canopy There's nothing quite like interacting with SPI or neopixel_write to make sure you can do it.

#

I've already discovered that it's often best to manually call gc.collect() in some use cases, than to let CircuitPython decide when it wants to collect for performance reasons.

#

Not to mention the bigger the strip, the more sensitive to bugs they are.

tawny creek
#

@umbral dagger OOOOOOhhhh โค โ˜บ nice, a debounce library! will these work with joyfeatherwing/tft featherwing?

umbral dagger
#

@tawny creek It'll work with anything you can wrap a 0-arg, boolean function around (typically a lambda/closure). You can also hand it a digitalio.DigitalInOut object.

solar basin
#

I recently picked up a Feather M4 and a TFT FeatherWing. I'm trying to figure out how to draw text to the screen in CircuitPython. What's the trick?

tawny creek
#

have you tried this example?

solar basin
#

@tawny creek yeah, there's no text examples

#

It links to another article that talks about drawing text but I couldn't get that to work.

meager fog
#

display stuff is being heavily reworked this month

#

you may want to kick back and wait till displayio is ready

solar basin
#

Will do, thank @meager fog and thanks for making such awesome electronics ๐Ÿ˜ƒ

meager fog
#

๐Ÿ‘

plucky flint
#

@raven canopy thank you!

timber mango
#

hello ๐Ÿ˜ƒ

#

someone here that can help me / give me some tips for optimizing a CircuitPython Library?
its a pixel lib that needs some speed improvments to be usefull for animation things..

#

i have reworked / added a variant that fits better with the daisy-chained nature of the TLC59711 chip..

#

but currently to set a single pixel in the buffer it costs 0.98ms. and that adds up really fast..
so with a small matrix of 8x16 pixel this needs ~124ms โ†’ that is to much to make smooth animations ๐Ÿ˜ฆ

tulip sleet
#

@timber mango so it's __setitem__() that' slow. Some suggestions. Don't check the values for float, just assume int. Don't check range with assert. Look up the values in _buffer_index_lookuptable just once each. There's redundant code there. Don't fetch value[0] and value[1] multiple times: save the value in a regular variable. You're creating a list each time maybe value = list(value). Try to avoid that. Remove all the asserts

#

In general pre-compute as much as possible. Can you avoid those lookups if things don't change? Don't allocate storage (list, tuple, etc.) if you can avoid it.

timber mango
#

@tulip sleet thanks for your suggestion!

#

i will try and optimize! ๐Ÿ˜ƒ

#

is assert slower than an classic if ...?

#

in my timing measurements i get relative long times also for the bare minimum:

meassure timming:
pixels set:
'pixels[3] = (500, 40500, 1000)'
        0.79ms per call
'pixels[12] = (0.5, 0.5, 0.5)'
        0.94ms per call
'pixels[for 0..128] = (0.5, 0.5, 0.5)'
        118.46ms per call
channel set internal:
'_set_channel_16bit_value(0, 10000)'
        0.18ms per call
'_set_channel_16bit_value(0..2, 10000)'
        0.45ms per call
'_set_channel_16bit_value(for 0..384, 10000)'
        61.91ms per call
#

_set_channel_16bit_value is really bare:

        buffer_start = self._buffer_index_lookuptable[channel_index]
        self._buffer[buffer_start + 0] = (value >> 8) & 0xFF
        self._buffer[buffer_start + 1] = value & 0xFF
#

the lookuptable is faster than to calculate the index every time (was my first version..)

#

so without all the conversion and checking i get to about half the duration -

but for user-friendlyness i think i will have to add set_pixel_16_bit_value__fast function...
so if someone want's all the nice checking he can use it.. (good for developing?!)
and then move to the unprotected _fastversion?!

#

is this a good idea?

pastel panther
#

I don't think having two versions of the same function makes sense

#

I think the idea of making it more user friendly as good, but I think having two versions would be more confusing

#

The energy you would put into explaining the different and why to use the different versions would be better spend just explaining how to use the faster version properly

#

At least that's my opinion

timber mango
#

good point

#

hm - the float conversion could be really useful - but it also adds up:

'pixels[for 0..128] = (0.5, 0.5, 0.5)'
        118.75ms per call
'pixels.set_pixel_16bit_value(0..128, 500, 40500, 1000)'
        49.61ms per call
'pixels.set_pixel_16bit_value(0..128, f0.1, f0.5, f0.9) manual conversion'
        59.37ms per call
'pixels.set_pixel_float_value(0..128, 0.1, 0.5, 0.9)'
        60.94ms per call
#

but all in all iam at about half the time to set all pixels if i use the fast version ๐Ÿ˜‚

#

so with 128 pixel i can get update rates of <16fps...

tough flax
#

Hi folks - Is 3.x still the recommended stable version for writing guides? If so, will there be another release as @tulip sleet mentioned on this PR? https://github.com/adafruit/circuitpython/pull/1317#issuecomment-435700536

tulip sleet
#

@tough flax Hi - I didn't bother with another release because you were the person who needed this and you were building your own custom releases anyway with different stuff frozen. However, if this is useful as a standalone, it wouldn't be hard to make another release.

#

@timber mango

is assert slower than an classic if ...
No, but why bother checking? If you're looking for speed just remove error checking and assume the calling program is doing the right thing.

#

Same idea about using floats vs ints. If ints a practical way to make it faster, then making the calling code do the calculation in ints

tough flax
#

@tulip sleet I'm writing a guide that uses this - I'll be including instructions on which version to download (as well as a UF2 that I build from an official source). I just want to know what version to recommend. I thought 4.x was still bleeding edge?

tulip sleet
#

@tough flax Assume 3.x for now. But if you need serial_bytes_available() for the guide, then I can make a release.

#

it's in 3.x, but it's past the last release

tough flax
#

And @timber mango (and @tulip sleet) I've found in other languages that assert() or try/catch blocks are generally the same speed as if/else if the test succeeds, but WAY slower if the test fails (allocation of exception, capture of stack trace, etc.)

#

I'd love a 3.1.2 release if you could

timber mango
#

@tough flax if it fails its fine if its slow for my case ๐Ÿ˜‰ as in most cases the script will stop at this point and the user has to fix his bugs ๐Ÿ˜‰

tough flax
#

I've just done lots of tuning and removing try/catch that's used as logic flow is a common task

tulip sleet
#

@tough flax I can get to a 3.x release in the next couple of days, np.

tough flax
#

Great - thanks!

timber mango
#

@tulip sleet hm yea you are right..
the only thing iam questioning at the moment is - CircuitPython 'easiness' vs ' speed'
so its way nicer to for the user to write something like:

pixels[3] = (500, 40500, 1000)
# or 
pixels[3] = (0.5, 0.5, 0.5)

vs

pixels.set_pixel_16bit_value(
    3,
    int(0.1 * 65535),
    int(0.5 * 65535),
    int(0.9 * 65535)
)
tulip sleet
#

the speed of this kind of thing is an issue. @ruby atlas is working on pixelbuf, a native (C) implementation of some of the low-level pixel code, which may or may not be applicable here. The M0 processors are just not that fast, with an interpreted (well, compiled to bytecodes) language on top of that, yes, you'll see slowness. Switching to an M4 board will help you, but if you are trying to do fast animation, there are lots of tricks you may need to pull to speed it up (and/or switch to C/C++).