#circuitpython-dev

1 messages Β· Page 219 of 1

raven canopy
#

i wish the API had a notifications = False flag i could set...

solar whale
#

I haven't deleted this many emails since the last election

upbeat plover
#

@solar whale does that work for updating libs too like do pip3 install --upgrade adafruit-circuitpython-bme280?

solar whale
#

yes

upbeat plover
#

sweet

#

i foudn the update thing for pip3 install --upgrade adafruit_blinka a couple of pages in so it is there

raven canopy
#

alright. PRs done. now kattni has the thankless job of merging the rest. @idle owl AVRprog is the last one in my cycle... #GitHubEmails2020

idle owl
#

I'll run Adabot when I'm done to make sure I didn't miss any

manic glacierBOT
solar whale
#

well done!

raven canopy
#

only reported errors: README.rst does not exist...so that's a win!

idle owl
#

Nice!

solar whale
#

@meager fog just put it on a Pi Zero -- works fine but I'm sure it woked in the past as well -- was the issue only with certain libs?

raven canopy
#

now...to debug my garage door opener. πŸ› 

idle owl
#

Alright, running Adabot now to see what I missed due to Gmail threading things really weirdly

upbeat plover
#

si7021_simpletest.py works on pi zero w

meager fog
#

@solar whale nah the detection was bad

#

we faked the chip detection code. now its "correct"

#

hex, gr8! have fun πŸ˜ƒ

solar whale
#

@meager fog ooh! -- managed to get a POST to go through to adafruitIIO from my argon!! lots of issues with parsing the response but it got there.... small steps

idle owl
#

Only missed 1!

manic glacierBOT
meager fog
#

@solar whale !!!! amazing

#

i cant wait to get back into it

upbeat plover
#

im having an issue with I2C fram with pi zero w

import board
import busio
import adafruit_fram

i2c = busio.I2C(board.SCL, board.SDA)
fram = adafruit_fram.FRAM_I2C(i2c, address=0x50)

print(fram[0])
tidal kiln
#

@upbeat plover run i2cdetect real quick:

i2cdetect -y 1
upbeat plover
tidal kiln
#

hmmm. there it is.

meager fog
#

fram may not work

#

its an odd chip, and isnt tested on pi yet

#

probably a clock stretch or repeated stop issue

upbeat plover
#

i was just going through stuff, testing and that was first issue

meager fog
#

if there isn't a diagram with a pi in the guide then its not tested, i think that library is very new πŸ˜ƒ

tidal kiln
#

oh. pi's looooooooove clock stretching

#

not

gusty kiln
#

fwiw, i did test FRAM i2c a bit ago and also found not working.

idle owl
#

Yeah I took it out of the guide.

manic glacierBOT
#

What is so special with your target customers, that you think, they do not understand callbacks?

The problem is not with the callback mechanism itself, but in the constraint that MicroPython has that you can't allocate memory inside a callback. This is made much more complex than necessary by the fact that Python is a high level language with automatic memory management, that lets you forget about memory allocation most of the time, so it's not really obvious what operations can be used ...

manic glacierBOT
meager fog
#

@solar whale i haz some framebuf

#
.*            **    **           .
.*             *     *           .
.* **   ***    *     *    ***    .
.**  * *   *   *     *   *   *   .
.*   * *****   *     *   *   *   .
.*   * *       *     *   *   *   .
.*   *  ***   ***   ***   ***    .
.                                .
..................................

tawny creek
#

@meager fog sparkly text!

meager fog
solar whale
#

@meager fog thanks! I won't be able to try it until tomorrow. Will try it then. Made good progress with. POST . I have a working example.

meager fog
#

kool

tawny creek
#

@meager fog text works πŸ˜„

#

that's using your brand new new new cp framebuf

meager fog
#

yay

#

yep i am commiting some example code for ssd1306

#

cascade, feel free to review either PR

tawny creek
#

okay! I'm testing out the SSD1306 examples and drawing stuff

manic glacierBOT
tawny creek
#

@meager fog for the SSD1306 example with your changes I'm getting

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Framebuf capability test - these are slow and minimal but don't requirea special graphics management library, only `adafruit_framebuf`
Pixel test
Lines test
Traceback (most recent call last):
  File "code.py", line 55, in <module>
TypeError: function takes 1 positional arguments but 6 were given

on a trinket m0

meager fog
#

do you have both latest?

#

what line is it?

tawny creek
#

yep i have the latest for both and it's on line 55 display.line(corner_from[0], corner_from[1], corner_to[0], corner_to[1], 1)

#

on examples/ssd1306_framebuftest.py

meager fog
#

hmm nope thats def correct

#

i dont have that code open or wired anymore

#

you can try and track down what it is, or comment on the PR πŸ˜ƒ

tawny creek
#

will comment and report! tyty

#

tested on an M4 Feather and it works as is

manic glacierBOT
#

In my implementation of interupts I’ve added a boolean β€œfast” that defaults
to false and controls running the handler via the scheduler (no constraints
on allocation) or directly in cases where latency is critical.

I am also considering running the gc automatically in the eventio loop but
have not yet considered all potential side effects. Ditto permitting
interrupt handlers is straightforward in eventio, for cases when they are
needed.

Bernhard

On Sat, Dec 22, 2018 at 02:27 Noralf TrΓΈnnes...

errant grail
tawny creek
#

awesome @errant grail ! Was talking to someone about the neotrellis and thought of using a gesture sensor with it! πŸ˜„

manic glacierBOT
solar whale
#

@meager fog @tawny creek that error in line 55 for the ssd1306 is if you have the old framebuf.py on your system. remove it.

teal bear
raven canopy
#

@teal bear there is a "Feedback?" link on the left side of the page, under the page titles.

teal bear
#

thanks

marble hornet
#

Can I pick anyone's brain about how to do text in Cp? I’ve done a text in cp before and it worked. However I used a dictionary instead of just a block of bytes to define the shape of the texts.

#

A python level dictionary.

marble hornet
#

and about formatting a byte block for text

tulip sleet
#

@marble hornet not sure I know what you mean

marble hornet
#

Each letter can be represented by a bitmap. Like I did for my gui(see link) but I've seen systems where the definition for all the characters was one large block of bytes. I'm curious about formatting like that (is it more efficient) or a standard that is already created ? https://github.com/TG-Techie/TG-US/blob/master/lib/tg_modules/TG_Fonts/font_01.py

#

Clearer?

tulip sleet
#

Scott is working on reading "BDF" format fonts for displayio, so we'll have this natively at some point. For your current stuff, the only thing I would say is to use bytes or bytearray for the rows of a character: it will be more efficient than the tuples, which will get stored as a tuple of ints instead of a packed contiguous array of bytes

marble hornet
#

Thank you! Okay, and do you know if the gfx will grab the text from displayio? Or if it has even been discussed?

solar whale
#

@meager fog this is not ready for a PR yet but it has some changes that I made that seem to help -- one is to use "SSL" for https URLs -- the other stuff is trying to parse the "\r\n"s more reliably. This works well with an ESP32, but not so well with the ESP8266. I add a post_url function taht lets me sent a post to an AdfruitIO webooks URL. both http and https work. Let me know if you want an example.

teal thorn
#

Is there any example of passing files to/from the SD card through USB? Is there a circuitpython XMODEM implementation? A USB mass storage implementation would be even better. What is the best way to move data to/from the card without having to move the card to a reader?

meager fog
#

@solar whale rad

#

ok did an ssd1306 release, im also going to add image() support to framebuf

#

and may do a little more re-working of ssd1306

upbeat plover
#

how do you read pixels from ST7735R displays?

meager fog
#

you cannot

#

SPI displays are one-way

#

on linux/largermem boards you buffer the display in memory

upbeat plover
#

so ill have to make like a virtual memory that keeps track of all pixels or something? i think m4 has enough memory for that

main meteor
#

If you're using a processor without enough RAM, you could use an outboard memory for that too, at the cost of some speed and complexity.

meager fog
#

M4 can do it

#

but blitting is not fast - its something we're looking at...just FYI that its all purepython until displayio is added

marble hornet
#

will qspi sram support normal spI? (it is microchip) or will i need to bit-bang it?

#

my reason for asking: i;m looking for a larger amount of mem and all the higher capacity spi flash chips seem to use qspi

meager fog
#

all QSPI chips can be SPI

#

QSPI is just incredibly fast IF you have hardware support. bitbang wont be fast enough. use plain SPI

#

@solar whale some more framebuf stuff will be rolling out

#

as i bring up other weirdo displays

tawny creek
#

@solar whale aha! thank you πŸ˜ƒ works!

#

@meager fog will framebuf be used for charlieplex led displays too?

meager fog
#

it could be?

#

but it isnt yet

#

if you wanna try that would be rad

#

it may require a new 'type' for 8 bit-per-pixel storage

#

not sure :/

#

but you'd get text n stuf

marble hornet
#

thank you @meager fog

marble hornet
#

@idle owl how is color passed to the displays in the cp gfx?

meager fog
#

TG, the GFX library is still from micropython and is not documented. please hold tight until its documented πŸ˜ƒ or at least, tested!

#

@solar whale ok ping me when yr around

#

we can do more stuffz

marble hornet
#

@meager fog though I'd try to find some bugs. I can hold tight though😁.

meager fog
#

if ya find bugs or have udpates, PRs & issues will work best until people are back from holiday

#

thanx!

marble hornet
#

πŸ‘

#

the circle is really cool!

#

the way it is drawn

#

do doc strings have to be """ ?

solar whale
#

@meager fog Hi! I'm around.

stuck elbow
#

actually not all spi displays are read-only

#

the ILIsomething one has MISO and MOSI

marble hornet
#

ili9341

idle owl
#

@marble hornet That's how we do docstrings You can also do # for comments.

marble hornet
#

thnx

meager fog
#

hiii i did a bunch o display things

#

@stuck elbow they have bi-directional SPI but you cannot read display memory

#

just status

stuck elbow
#

@meager fog I'm sure I did read the display memory off them, they have a command for that. The problem is you need slower SPI clock for reading.

meager fog
#

weird - maybe thats why it didnt work

#

that was a long time ago

stuck elbow
#

0x2e is the read command

#

yeah, and there are so many of them

meager fog
#

we'll add it to displayio when we get there, so we can dump screens πŸ˜ƒ

#

deshi, i added a sharp memory library - i only tried it with a 96x96 on the m4 but it should work for any size

solar whale
#

@meager fog Is there something you wanted me to look at?

marble hornet
#

Modded gfx (haven't found errors in the already existing methods yet either )

#

in car, shakey hands

tawny creek
#

@marble hornet COOL! not dma yet?

marble hornet
#

thanks!

#

no, do you know how?

tawny creek
#

check this bit @marble hornet πŸ˜„

marble hornet
#

@tawny creek isn;t that just arduino?

stuck elbow
#

@meager fog awesome, I will test it tomorrow

tawny creek
#

@marble hornet aiyah my bad!

marble hornet
#

np

#

maybe it'll come to cp later

meager fog
#

@solar whale nah, i was about to do some esp32 hackin tho

solar whale
#

@meager fog i'm around for another hour if you need anything -- trying to figure out why the nrf52840 and the SSD1306 are not playing together

meager fog
#

yeah thats very odd

#

can you take a pic of your oled?

solar whale
#

Earlier I ran thoght the configuration of a new argon from scratch to CP with AT firmware -- took about 15-20 minutes -- no problems

meager fog
#

do you wanna commit what you have

#

so we dont collide?

#

i dont mind merging and keeping hacking. the people using it are all in this channel πŸ˜ƒ

solar whale
#

my changes are easy and they probably will break the ESP8266 so I can add tehm any time.

#

but happy to commit if you want

meager fog
#

yhmm yeah yours has the autoreset chip

#

so...i dont know!

#

@solar whale its ok to break

#

i wont do a release

solar whale
#

trying a pioled now

#

ok -- will commit in a few minutes

#

same behavior on the pioled

meager fog
#

yeah its not that

#

very odd

#

other i2c device work?

solar whale
#

yes - so far

#

haven't tried a lot -- will try more

meager fog
#

yeah thats very mysterious

solar whale
#

have you tried it on a feather52840 yet?

meager fog
#

i have not :/

#

i mean yes - but in arduino only

#

ok 🍣 is here, so gonna eat - bbiab

solar whale
#

enjoy -- commit to ESP_ATconrol comming now

meager fog
#

@solar whale ill try to get a github query thing working, maybe have a little feather proj that displays ⭐

#

thank u!

#

yeah i took a detour for displays but its gonna be worth it

solar whale
#

should I add a "simpletest" for post?

#

I'll wait -- needs some explanation.

#

ah - what the heck -- I'll add it

shut osprey
#

I'm using a playground express, with circuitpython and i'm having issue playing a file...

#

I get the error: Pin PA02 in use

#

my code is cpx.play_file("Coin.wav")

#

and i have it declared as: from adafruit_circuitplayground.express import cpx

#

OH - it uses A02... so because i'm using A02 for an external neopixel, i guess that means I cannot use it to play music? Is there any way i can get this working?

manic glacierBOT
shut osprey
#

I attempted: cpx._speaker_enable - but once i assign the A02 to neopixel, i no longer can use it...

meager fog
#

wiz, great!

solar whale
#

It sure is nice to have the 8Mbyte QSPI flash enabled on the PCA10056 -- I an retire my SDcard!

meager fog
#

lol

#

ok let me get an ESP32

#

@solar whale for external ESP32 (not argon) how are you wiring it

#

are you using a feather or an esp32 devkit?

solar whale
#

Huzzah ESP32 -- just connect TX/RX/VUSB/GND

#

D5 for RESET

meager fog
#

do you upload code via USB?

solar whale
#

yes

#

do you wan tthe file

meager fog
#

yazz

solar whale
#

this is the 4Mbyte version

meager fog
#

factory?

solar whale
#

thats what the makefile names it

#

I can post the "sparse" files if you want as well

#

/usr/local/bin/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect factory_WROOM-32.bin

#

that is my flash command

meager fog
#

ok i solderd esp32 feateh

#

and this is your compiled version of the latest AT firm from ESP?

solar whale
#

yes but for TX/RX uart -- do you want the version for on board ERC32 for the argon?

#

for miniesptool load?

meager fog
#

nnono

#

miniesptool is only for stuff like argon

#

i find your ERC32 charming πŸ˜„

solar whale
#

πŸ˜ƒ

#

oops -- hard habit to break

#

18 years of coding on that chip

#

BTW -- just tried a sht31d (I2C) on argon -- no problems

meager fog
#

writin' btw you can def use 921600 baud to upload

#

weiiird

#

thinks

#

could be the chip has a limit of how many bytes you can send?

#

its clearly initing

#

did we add invert() command?

#

thats a good one for testing

solar whale
#

I tried invert and it works! -- all the funny pixels stay

meager fog
#

it inverts right?

#

like alternates

solar whale
#

yes

meager fog
#

if so, I2C works fine

#

its probably the write-size

#

you can try breaking it into chunks

#

its probably a circuitpy bug

solar whale
#

ok -- good clue -- bugs in CP - nah πŸ˜‰

meager fog
#

we should allow any-size buffer but often its like "ahh who would write more than 256 bytes???"

#

up to you if you want to submit a small patch or wait till thach's back next week later

solar whale
#

I'll try to look into it tomorrow -- I have to head to the airport to pick up my daughter in a little while.

meager fog
#

ok np

#

well now ya know πŸ˜ƒ

#

id put in an issue no matter what, this is not uncommon

#

soft_framebuf is slooow but doing all these displays means that when scott's back, we'll know how best to support em

solar whale
#

sounds like a good think to try. I'll se if I can figure it out. I can move the issue from SSD1306 to CP/nrf

meager fog
#

yay thx

#

sorry was distracted but ESP32 is now bootloaded

#

lemme find my featm4

solar whale
#

I have found the bitcoin test work really well with my version

meager fog
#

good!

#

oh do you want to also try enabing flow control on ESP32

#

if you do a build, might help with the messy +IPS parsing

solar whale
#

but busio.UART does not have flow control -- just want to do it manually?

meager fog
#

yeah

#

manually

#

uart is so slow, if you think about it, that digitalio will work fine

#

...installing latest 4.0 on m4....

solar whale
#

OK-- its easy to test ESP32 -- use AT+UART_CUR to set and AT+UART_DEF to make it "permanent" can rebuild after testig it.

meager fog
#

oh really?

#

ok what pins, dya know?

solar whale
#

pins?

#

oh for flow control -- need to check

meager fog
#

hmm i checked your PR and it has the POST and some SSL fix - thats it right? i can do it later if so

#

since im going to only be GETing

solar whale
#

it also strips "\r\n" in at_respone

meager fog
#

ops i forgot to PR my fixes too

#

those might hel

#

yeah

#

ok let me keep working in my branch, and ill add your lil fix, i did the SSL thing and also made the response parsing a lot more durable against unexpected WIFI CONNECTED messages

solar whale
#

ESP32 GPIO 14 is RTS 15 is CTS

meager fog
#

ok cool htose are exposed

#

lemme see if i can get this working

#

basically everything falls apart once you get to multi-packet messages

#

also on esp8266 i could ssl some things but not others, it wasnt good enough for github

solar whale
#

OK -- as I said, I can alway redo my changes -- nothing to complex

meager fog
#

did you upload a rootcert?

#

(to that bin)

solar whale
#

I think so -- whatever was in the default build - I did not add anything

meager fog
#

all good

solar whale
#

the github response is "huge"

meager fog
#

yep...

#

you got it working w/github on esp32 only right?

#

i couldnt get it working on 8285

#

ok gonna wire this up now...

solar whale
#

I got some error respose -- not the full message -- but got much farthere with SSL on ESP32 than on ESP8266.

#

let me see if I have a copy of the response

#
---> AT+CIPSTART="SSL","api.github.com",443,10
<--- b'CONNECTOK'
---> AT+CIPSEND=68
<--- b'OK'
<--- b'\r\nRecv 68 bytes\r\n\r\nSEND OK\r\n'
Failed to connect, retrying
Failed to read proper # of bytes
meager fog
#

yeah

#

it closes the connection

#

i think

solar whale
#

my POST command works and I get the ful response

meager fog
#

oh innnteresting

#

this doesnt work on esp32

#

---> AT+CIPSSLSIZE=4096 <--- b'AT+CIPSSLSIZE=4096ERR CODE:0x01090000ERROR'

#

but it does on ESP8266

#

bleyh

#

yknow im gonna make a new class of exception for this, like OKError

solar whale
#

FYI -- POST example ```--> AT+CIPSTART="TCP","io.adafruit.com",80,10
<--- b'CONNECTOK'
---> AT+CIPSEND=99
<--- b'OK'
<--- b'\r\nRecv 99 bytes\r\n\r\nSEND OK\r\n'
[b'HTTP/1.1 200 OK', b'Server: nginx', b'Date: Sun, 23 Dec 2018 02:17:59 GMT', b'Content-Type: application/json; charset=utf-8', b'Transfer-Encoding: chunked', b'X-Frame-Options: SAMEORIGIN', b'X-XSS-Protection: 1; mode=block', b'X-Content-Type-Options: nosniff', b'X-Download-Options: noopen', b'X-Permitted-Cross-Domain-Policies: none', b'Referrer-Policy: strict-origin-when-cross-origin', b'X-AIO-Worker: io-rails-2', b'Access-Control-Allow-Origin: *', b'Access-Control-Allow-Credentials: false', b'Access-Control-Request-Method: *', b'Access-Control-Allow-Methods: POST, PUT, DELETE, GET, OPTIONS, PATCH', b'Access-Control-Allow-Headers: DNT, Origin, X-Requested-With, X-AIO-Key, Content-Type, Accept, Authorization', b'Access-Control-Expose-Headers: X-Pagination-Limit, X-Pagination-Start, X-Pagination-End, X-Pagination-Count', b'Access-Control-Max-Age: 1728000', b'ETag: W/"47fa3b5685de32ecb8449046fd5c40e5"', b'Cache-Control: max-age=0, private, must-revalidate', b'X-Request-Id: 0401bee7-519d-45f5-8437-754b0ef8f77e', b'X-Runtime: 0.040861', b'', b'e4', b'{"id":"key","value":"0","feed_id":877499,"feed_key":null,"created_at":"2018-12-23T02:17:59Z","location":null,"lat":null,"lon":null,"ele":null,"created_epoch":1545531479,"expiration":"2019-02-21T02:17:59Z"}', b'0', b'', b'']
---> AT+CIPCLOSE
<--- b'CLOSEDOK'
OK

e4
{"id":"key","value":"0","feed_id":877499,"feed_key":null,"created_at":"2018-12-23T02:17:59Z","location":null,"lat":null,"lon":null,"ele":null,"created_epoch":1545531479,"expiration":"2019-02-21T02:17:59Z"}
0


#

hmm just asec -- let me try something

#

I don't see CIPSSLSIZE in the AT list for ESP32

meager fog
#

man the ESP32 is way nicer and faster

#

less clunky retries

#

i got it talking, just need to make tweaks to mah tweaks

#

ill have a new PR for you later

#

if you want i can get the OLED working

#

but i think better if we just fix nrf52840

#

up to u

solar whale
#

I'm oopen to all ideas πŸ˜‰ -- I have to head to the airport now -- will check in tomorrow and see whare things stand.

meager fog
#

yep l8r!

solar whale
#

good night!

meager fog
#

---------------------------------------- This is a test of the CC3000 module! If you can read this, its working :) ----------------------------------------

solar whale
#

Yay!

shut osprey
#

@meager fog I did not get it working, I edited my response... Is there a way to play sound AND use a02 inn the circuit playground?

#

And, not inn

meager fog
#

A0 is analog output, do you mean A2? can you snap a pic showing what you're tring to do

#

that will help

shut osprey
#

Yes give me one second

meager fog
#

oh boy yeah you're using all the pins

#

you cannot use A0 for both analog input and speaker, same pin

shut osprey
#

4 player 1d pong πŸ˜ƒ i need 4 buttons and 4 LED strips

meager fog
#

ooh

#

hmm

#

well...

shut osprey
#

OK - so is there a way for me to disable A0 as the speaker, and just have speaker go directly to the speaker?

meager fog
#

you could connect the strips together, and do the math to segment them

#

noo, it actually goes the other way, A0 is always audio, you can disable the onboard buzzer only

shut osprey
#

AHH ok...

meager fog
#

i think your best bet is to share the LED strips

shut osprey
#

hmm - i guess making the neopixels a single data out is likely the only way

#

makes the code more complex...

meager fog
#

yeah i recommend it

#

you could hide that part in a function

#

or...no speaker

shut osprey
#

true - but i'm trying to use it as a learning lesson to teach others, so more complexity = harder to teach

meager fog
#

hm

shut osprey
#

I'll figure it out, this was super useful

#

BTW - Thank you for everything you've done

meager fog
#

you could also do tricks with the buttons

#

but thats icky too

shut osprey
#

Adafruit is truly amazing... Your products are amazing, and you're an inspiration

meager fog
#

yay thanks for the nice note πŸ˜ƒ

#

how about 2 neostrips together, that saves you 2 pins, maybe not as bad

shut osprey
#

Having it set up as a single neopixel strip is likely the "easiest" and most logical thing...

meager fog
#

yahhh

shut osprey
#

single pin would be less complex logic then split as 2, as each strip is a possible player

meager fog
#

its all tradeoffs, the A0 thing was a struggle to decide but...being able to alligator clip audio to a 3.5mm plug seemed pretty useful

#

worth giving up an input

shut osprey
#

Makes sense - just a limitation of the board I have to play with

meager fog
#

you can do it! good luck!

shut osprey
#

Thanks! I'm excited, I'll certainly post pictures and an explainer video when it's all done

marble hornet
#

what is the "travis build" that happens when a github pr is posted

tawny creek
marble hornet
manic glacierBOT
#

Hi, I konw this question might be stupid...

I am new to circuitpython, but I have some experience about micropython.
Now I got ESP8266 board, I followed the docs:
https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-for-esp8266
and I downloaded the firmware adafruit-circuitpython-feather_huzzah-3.1.1.bin
then I erased flash and burn the firmware. But don't work, the repl prints:


    $�c��g'�dćd`�g�ln{���g
                          οΏ½$l`xοΏ½oοΏ½β–’
               ...
tawny creek
meager fog
#

@solar whale i cant seem to get flow control working - and you really need it for 115200 baud. 57600 works without

#

i am tying IO15 to 3V ... no response from AT commands

#

of course it started owkring 3 minutes later

#

flow control helps a lot, you only need one pin! 115.2k now good

#

we could try to push it higher

meager fog
#

@solar whale ok for big bundles, like this github status, we get bad fragmentation - ill see what we can do....ive already moved the individual IPD packets to their own pre-allocated buffer

meager fog
#

k i think solved with some gc.collect's and zeroing out big buffers once we're done with 'em

solar whale
#

@meager fog Sounds like you made great progress. I'd love to see how you did the flow control.

#

Ah - I see it is all in your fork -- great.

manic glacierBOT
raven canopy
#

@meager fog I was thinking of maybe taking a stab at putting flow control in the C side. Adabot work has slowed for now, and it's time to get back in the core. πŸ˜„. Do you think that will help with the higher bauds? @solar whale

manic glacierBOT
#

I ran into this issue trying to use an I2C OLED Featherwing on a nRF52840 baord -- tried on both particle_argon and pca10056 -- same result
https://github.com/adafruit/Adafruit_CircuitPython_SSD1306/issues/15
Some commands like .invert() do work so it appears that the I2C interface is able to communicate with the OLED.
The same board with the same library work normally on a metro_m4_espress so this appears to be an issue with the nRF5284 I2C.

I have used other I2C devices on the nRF5284...

raven canopy
#

@marble hornet looking at that Travis log, it's mostly whitespace/PEP8 stuff that pylint is complaining about. I'll hop on the laptop in a few, and review the PR and comment for anything else.

solar whale
#

@raven canopy are you thinking you will add it to busio?

raven canopy
#

@solar whale yeah, that was the thought.

solar whale
#

I think it would be a nice option -- I'm surprized it has not come up before.

umbral dagger
#

I propose removing redefined-outer-name and no-self-use from the pylint checks. They are both a royal pain when writing OO code. Certainly as build-breaking

manic glacierBOT
#

ok,next time I will ask support in forum.
But I'm very sure about baudrate is 115200.
That's why I doubt about firmware.

I will try to learn more about it, provid more details about this problem, then maybe you can help me much easier.

?? Outlook for Androidhttps://aka.ms/ghei36


From: Dan Halbert notifications@github.com
Sent: Sunday, December 23, 2018 9:54:25 PM
To: adafruit/circuitpython
Cc: How; Author
Subject: Re: [adafruit/circuitpython] Which fir...

#

I need pin interrupt support for a project and this is one way of achieving that if we don't end up supporting pin interrupts directly (latency is not a problem for this project since the signal is sent over i2c to a Raspberry Pi).

I have previously wondered if PulseIn (#1072) could be used, but I think a Counter abstraction is a much better fit and has other use cases too. Of course there's that feature creep syndrome and flash is scarce on some boards.

@tannewt was unsure about pull s...

manic glacierBOT
tidal kiln
marble hornet
#

Thank you @tidal kiln and @raven canopy I'll give it a good read

manic glacierBOT
meager fog
#

@raven canopy honestly, bitbanging flow control works quite well

#

and we use in_waiting so we def only want it for RTS

#

@solar whale ok so ...

#

with ESP32 we can do a lot, i shut off SSL verification for now because there's no certificate in place

#

i made a lot of changes and i want to make some more πŸ˜ƒ

#

we're getting close to perhaps creating a wrapper/helper library

#

Reply is OK! Parsing JSON response...parsed OK! 902 b'Sun Dec 23 13:28:07 2018' stargazers: 632

#

902 times in a row!

idle owl
tidal kiln
#

"parsing JSON".....i feel the potential for a new holiday jingle there...

idle owl
#

@umbral dagger We're trying to keep our code within standard. Many of the checks are annoying but it means we're writing standardised code. You're always welcome to disable Pylint in your code if you think it's makes more sense, but I don't think we want to start disabling things globally because we start to erode the standard.

#

The issue with changing the global config is where do we stop? Someone else probably runs into a different set of checks every time and would want those removed.

manic glacierBOT
umbral dagger
#

@idle owl Fair. Is our global config align with PEP-8?

#

I do fairly freely disable some.

idle owl
#

Yeah I believe that's the PEP were using.

#

We suggest trying to avoid too much disabling, but you can always make your case if we disagree.

stoic wren
#

Is tap detection actually working in the adxl34x library?

meager fog
#

@stoic wren may not be yet

#

i know a PR was recelyt worked on

stoic wren
#

oh, that's a bit of a relief - thought I was being dense πŸ˜ƒ

meager fog
#

@solar whale its a lovely day to implement socket

stoic wren
#

AttributeError: 'ADXL345' object has no attribute 'enable_tap_detection' with the simplest possible code

tidal kiln
stoic wren
#

Using the one in today's auto-release - I can try that one...

tidal kiln
#

not sure why...for now just grab directly from repo

stoic wren
#

Yeah, I see that now

#

will do

meager fog
#

ooh @tidal kiln adabot warns us about that but people are away, so maybe it wasnt run recently

#

@stoic wren test it out, if it works ill do a release πŸ˜ƒ

tidal kiln
#

yah. probably just a holidays thing

meager fog
#

πŸŽ„

stoic wren
#

it's running now at least - will test further πŸ˜ƒ

meager fog
#

nice!

stoic wren
#

works!

meager fog
#

gr8 ill release

marble hornet
#

@raven canopy thank you for your comments I found them VERY helpful. I actually debated over the std_font import location while writing the code and how you explained it clarified quite well.

manic glacierBOT
marble hornet
#

If I change a fork will a pr change to match it?

tidal kiln
#

did you create a different fork than the original PR?

#

oh wait fork, not branch...

#

you just need to push your commits to your fork and the PR will see them

#

like magic

solar whale
#

@meager fog nice! the stargazer example works great on metrom4 with esp32 -- now to see if I can make it works on the Argon.

meager fog
#

@solar whale wow fast

#

i just commited a big api change

#

to match esp more

#

so we can avoid passing around deets

#

you really need hw flow if you want 115k

#

i just couldnt get it going past 57600 otherwise

#

here's my latest stargazer

#

it has 7 segment stuff you can ignore

#

but the loop's simpler

solar whale
#

I have 7 segment on mine -- actually 14 segment on metrom4 πŸ˜‰

meager fog
#

and it ran all nite without memoryerror so i think i got all the alloc's out

#

lol ok

#

im going to imlpement some subset of socket

solar whale
#

sounds great -- you are fast!

meager fog
#

since i figure we need it eventually

#

then backport get_url

#

i had to remove your at command tweak, it was messing up my esp32

#

if it got ina bad state

#

lets see if we can solve it another way

#

(like if echo got turned off, the lines got squished together and it fell over and died)

#

er echo-off turned back on, say due to a power brownout

solar whale
#

np -- I'll pull your stuff and take a look -- did ou commit latest to master?

meager fog
#

i commited to my personal fork

#

on ladyada

solar whale
#

ok -- I have that

meager fog
#

only thing is... argon doesnt connect to IO15 which is the hardware UART. why? i dont know :/

solar whale
#

ah -- may need to rebuild that - I was just going to look at it.

meager fog
#

like its not even on the schematic

#

so im a little mystified

solar whale
#

hmm -- I left tehn set to 14/15 since I thght tehy would eb accessible

meager fog
#

yeah those are the hardware flow pins

#

i see they put a test point on that bad

#

pad

#

but its not connected. little odd

#

but perhaps you can recompile?

#

unclear if its a hardware flow control or if you can soft control it. otherwise we'll have to either massively increase the UART buffer (not too bad, may help) or keep to 57600

marble hornet
#

thanks @tidal kiln

solar whale
#

because RX/TX are 34/35 but schematic looks like 40/41 ???

manic glacierBOT
raven canopy
#

It's all quite confusing. Even the docs and code never agree on which of the 3 UARTs they're using. It's almost like reading the DHT sheets. πŸ˜†

manic glacierBOT
solar whale
raven canopy
#

Yeah, according to the block diagram, those would be correct.

idle owl
#

@meager fog @tidal kiln The lack of release is on me. I got behind this week on library work. Every repo has updates at the moment.

tidal kiln
#

no worries. holidays. two workshops....all good

raven canopy
#

Is it normal that when Scott mentioned "make releases easy", I immediately thought of adabot doing releases? πŸ˜† adabot

idle owl
#

@raven canopy Adabrain.

solar whale
#

@meager fog @raven canopy My brain is failing me -- I can't find where I got the pin 34/35 setting for the Argon AT firmware build -- I'm still tryin to track that down -- It works but I am very confused right now....

manic glacierBOT
idle owl
#

@marble hornet You around?

marble hornet
#

yeah! i should be for a while. what's up?

idle owl
#

I wanted to help you with your PR, I know why it failed and what needs to change to get it to run properly.

#

I happened to be on Travis and watched it fail

marble hornet
#

I'd love some help. what did you see?

idle owl
#

So you changed the library structure at Sommersoft's suggestion, which means you have to change how it checks the library as well.

#

Open the .travis.yml file

marble hornet
#

okay opening...

idle owl
#

Line 30 is currently: - pylint adafruit_gfx.py

#

It needs to be - pylint adafruit_gfx/*.py with the correct spacing to match the other items under script:

marble hornet
#

okay... is the * a star or file names that should be fill in?

idle owl
#

It is a *

#

that way it runs on all the files contained within the folder

#

Push that change and let Travis run again on the new commit. That will get it to pylint the files inside the new adafruit_gfx folder you created.

marble hornet
#

pushing

idle owl
#

Which could mean a whole new set of errors, but that's how this works πŸ˜„

#

Actually we may need to add another line. We don't have folders within folders typically. But you have a fonts folder in there.

#

Which Pylint will not run the files within unless we tell it to.

marble hornet
#

that's part of the fun right! brb getting water

idle owl
#

I'm fairly sure anyway.

#

Ok

#

When you return, I'm going to have you try adding another pylint line to .travis.yml and we'll see if it works or not. If not, we remove it. If so, we leave it.

marble hornet
#

okay, back

idle owl
#

Add below line 30 another line: ```

  • pylint adafruit_gfx/*.py
  • pylint adafruit_gfx/fonts/*.py```
#

At least if I'm reading it right, that's the folder you added right?

marble hornet
#

pushing

idle owl
#

And it looks like mostly whitespace errors.

#

There are some more complicated errors at the end though.

marble hornet
#

okay, where are you seeing this interface ?

idle owl
#

Beginning: ```
W:398, 0: FIXME: should text wrapping happen or should spill over edge of screen? some of the wrapping is started but commented out (fixme)

End:

W:295, 4: Keyword argument before variable positional arguments list in the definition of round_rect function (keyword-arg-before-vararg)
R:295, 4: Too many arguments (6/5) (too-many-arguments)
R:339, 4: Too many arguments (6/5) (too-many-arguments)
W:385,38: Using possibly undefined loop variable 'x' (undefined-loop-variable)
W:385,41: Using possibly undefined loop variable 'y' (undefined-loop-variable)
W:412,12: No exception type(s) specified (bare-except)
C:413,22: Do not use len(SEQUENCE) to determine if a sequence is empty (len-as-condition)
W:419,20: No exception type(s) specified (bare-except)
W:403, 8: Unused variable 'highest_height' (unused-variable)

#

Have you had to read Travis output yet or would you like a quick primer?

marble hornet
#

i have it on the docket to read the page. but a primer would be greatly appreciated

idle owl
#

Wow! You win a prize! I've never managed to hit pylint that far negative! Congrats! πŸ˜„ Your code has been rated at -830.00/10

#

We've all hit negative scoring on Pylint, welcome to the club πŸ˜ƒ

marble hornet
#

wow! do i get an as seen on pylint sticker πŸ˜‰

idle owl
#

Oh man, we need something like that. Alright, quick walkthrough.

marble hornet
#

kk

idle owl
#

The beginning shows what is happening, it's running things from the .travis.yml file, and then in most cases, collapses all of it down so you're only seeing a few lines out of about 500.

marble hornet
#

okay, of the script's analysis of the code?

idle owl
#

That's it going through logging in, verifying Travis credentials, checking versions, checking deployment of it to Travis, and installing everything else it needs to run the rest of the .travis.yml file

#

Next is where it actually pylints your code

marble hornet
#

line 540?

idle owl
#

It tells you what pylint command it's running pylint adafruit_gfx/*.py and then the file name. Starting on line 535

#

Then it tells you which .pylintrc file it's using which is the global config file found in the repo

#

then it says the module name *************** Module gfx

#

which means it's checking the gfx.py file there

#

And everything under that is the issues it found. And line 714 is the "score" for that particular file, and 716 tells you Pylint failed exited with 28 in red.

marble hornet
#

okay... πŸ‘

idle owl
#

Line 718 begins the next module, next pylint command to check the fonts/ directory

#

and then every issue found in the gfx_standard_font_01 file

#

Line 1211 and 1213 show you score and error in red for pylint for that file.

#

Next you see it's pylinting the examples and found nothing because it's empty at the moment. 1217 shows a green line that exited with 0 which means passing

#

Then it verifies the bundle versions and that it is able to create versions of all the files for the bundle and for download with a release beginning on 1219.

#

Then on 1267 is where it builds for Sphinx for the documentation. This is another place where you will probably find errors that need to be addressed, Sphinx can be super finicky

#

There is an error on 1282 - 1284: Warning, treated as error: /home/travis/build/adafruit/Adafruit_CircuitPython_GFX/docs/index.rst:17:toctree contains reference to document 'api' that doesn't have a title: no link will be generated The command "cd docs && sphinx-build -E -W -b html . _build/html && cd .." exited with 2.

#

You will definitely need help with the Sphinx stuff until you've had the same error a few times and know what to do. It took us all a few times to get it.

velvet badger
#

@idle owl and @marble hornet , I'm really thankful for everything you guys do. Wanted you to know that. Also curious: What are your favorite Christmas movies?

idle owl
#

@marble hornet So start working through the errors. There are editors, as far as I know, that will take care of trailing whitespace for you, but I don't remember which. I should be around on and off for the rest of the day so if you need help with the more complicated errors, ping me and I'll see if I can help.

#

@velvet badger Thank you! I appreciate that. We do this for the community, so thank you for being a part of that!

marble hornet
#

thank you kattni, i'll do some googling for the editors and start chugging away!

tawny creek
#

what do you use to code with @marble hornet ?

idle owl
#

@marble hornet Feel free to commit and push as you go if you like, we don't mind a crazy commit history in a PR. Otherwise, you can also run pylint locally, but use version 1.9.2 because it differs from the newer version. What operating system do you use? I don't know how to do it on Windows except with WSL

marble hornet
#

@idle owl macos 10.13

#

on my precious baby: a mbp and just chatting: what do you use?

#

@velvet badger thank you, I really appreciate it! and my pleasure. and that's a hard question. wbu?

#

@tawny creek the mu editor. it makes connecting to the repl far easier. and besides the color scheme i think it is great! hbu?

tawny creek
#

VScode and Mu

idle owl
#

@marble hornet I use PyCharm, and Mac OSX, though I haven't updated to the most recent version so not sure what version I'm running. You can create a virtual environment or simply install pylint using .. brew I think. Checking.

#

Nope that's not it. Hmm.

#

Oh, pip. Easy enough.

#

Or pip3 install pylint if you have Python3 installed. Which I think still isn't by default. Which is silly.

marble hornet
#

Right! And do I pass it the file name when in the directory of the file I'm testing?

idle owl
#

I use iTerm 2 and screen for the serial monitor, although there is a terminal built into PyCharm if you want to use it, but for some reason it doesn't scroll up when in the serial console of CircuitPython which can be annoying.

#

Yes, once it's installed you pylint filename.py or pylint directory/filename.py or pylint directory/*.py for multiples.

tawny creek
idle owl
#

That's global only for the Learn guide system. Our global for everything else is different.

tawny creek
#

ahhh! where is the global one

idle owl
#

We decided examples can be more readable than library code since they're for guides.

tawny creek
#

thanks @idle owl !

marble hornet
#

so no travis on examples?

idle owl
#

Travis runs, but we disable a lot more pylint checks

#

Inside .pylintrc there is a line that you can add disable to and tell it not to look for certain things.

#

For the Learn guide repo, that is many things.

#

For everything else it's empty. Or for examples in repos, there are maybe 2 disabled items.

tidal kiln
#

think of travis like this, for each "build" or "travis run":

  • a virtual linux computer is created with internet access
  • your repo is cloned to that computer
  • then a script is run - you write this script
  • the script must run without errors for the "build" to pass
#

it's been written for you, since that's what we want to have run on any PR's

solar whale
marble hornet
#

why is pylint? (i'm curious not accusatory)

tidal kiln
#

it's a linter, for python

#

linter's are super annoying pieces of software that make you have to keep tweaking your code so they are acceptable style-wise

idle owl
#

They force our code to conform to a standard.

tidal kiln
#

you can have the most functional awesome code, hardware tested, but it might still fail a lint check because...i dunno. one white space...a variable is too short or long...there are too many..blah bah

meager fog
#

it also makes sure people's PRs dont break things, at a low level

idle owl
#

There are some instances, and there will be in your code, where you can disable pylint locally for a particular function or set of lines. And for your own future reference, you can always make a case for disabling pylint for something if you think it's wrong,. and we can discuss it in the PR.

tidal kiln
#

but, yah, like kattni says, they help force all code to a certain style, which is important

meager fog
#

if it wasn't for the linter, i'd have to spend hours going thru every PR - it maintains a minimum quality standard so we aren't chasing down missing parens

tidal kiln
#

but don't think lint = fail means the code won't run or is not functional

idle owl
#

There are a few errors in that list that I think you will end up needing to disable locally.

meager fog
#

cater, no, but there's a correlation

#

there's just not enough time for me to hand-check all the code πŸ˜ƒ

#

you'd be surprised how many PR's we get for totally-breaking code o_O

idle owl
#

^^ Yep.

tidal kiln
#

yep. what has been said. @marble hornet FWIW, i typically have to do about two or three lint related commits once i think i'm done and travis takes a look...it's just part the cycle.

meager fog
#

you can also run pylint locally - catches 95% of it

idle owl
#

@tidal kiln Without the linter we wouldn't have your hilarious series of linting commit messages though.

umbral dagger
#

It’s incredibly useful in some cases, and a petulant nag in others.

tidal kiln
#

yah.....2019...the year i'll lint locally! i will! i totally will.

umbral dagger
#

I’d be happy to get my local pylint working identically to travis’

meager fog
#

its fast to lint locally, doesnt catch some RTD stuff is all

tidal kiln
#

the other trick is to turn on travis for your fork repo

marble hornet
#

okay! sounds like a passionate and useful tool. So, if it is throwing a "piece of lint" on some prewritten code should i change it even if it seems to comply?

umbral dagger
#

Emacs has it built into python-mode to it marks it up as I work... but it’s not doing quite the same checks.

idle owl
#

@marble hornet Give me an example of what you mean.

meager fog
#

das, i run it at the command line

#

if you're in the repo dir, it will use the local .pylintrc

idle owl
#

PyCharm picks up most of it, but I still run it from command line.

umbral dagger
#

Nicer to have it mark up the code like text in a word peocessor.

idle owl
#

Agreed.

marble hornet
#
        """Circle drawing function.  Will draw a single pixel wide circle with
        center at x0, y0 and the specified radius."""
        f = 1 - radius
        ddF_x = 1
        ddF_y = -2 * radius
        x = 0
        y=radius
        self._pixel(x0, y0 + radius, *args, **kwargs)#bottom 
        self._pixel(x0, y0 - radius, *args, **kwargs)#top 
        self._pixel(x0 + radius, y0, *args, **kwargs)#right
        self._pixel(x0 - radius, y0, *``` so it was giving a lint error on the  y=radius and x = 0. this: ```gfx.py:172:60: C0303: Trailing whitespace (trailing-whitespace)
gfx.py:173:57: C0303: Trailing whitespace (trailing-whitespace)``` but these isn't a character after either of them
meager fog
#

yes there is

#

there's a space, remove it

idle owl
#

Yep

tidal kiln
#

and welcome to the band!

marble hornet
#

after the =? for after the 0?

umbral dagger
#

Emacs also highlights trailing whitespace. Just sayin.

idle owl
#

@marble hornet So the answer to your question is yes, please fix up the code that already exists if it has errors.

meager fog
#

at the end of the line

tidal kiln
#

looks like maybe after #bottom and #top?

idle owl
#

Trailing whitespace means after the end of the line, so invisible unless you have an editor that highlights it

meager fog
#

the linter is rarely wrong

marble hornet
#

I can't click on it though...

#

in mu

idle owl
#

hmm

marble hornet
#

i see in when highlighted... but can't get it to go away

idle owl
#

Click after radius and then use the arrow? Or does it go to the next line and skip the space.

marble hornet
#

next line

#

might it be a \r in the code?

idle owl
#

You may need to try a different editor. Mu may be setup to workaround those things.

marble hornet
#

okay

meager fog
#

use atom editor or something

idle owl
#

Atom is the simplest next step

#

It's what I started with before moving to PyCharm

marble hornet
#

i have it installed! (failed in trying to use the apio editor, now it is stuck on(or i haven't figured out how to turn it off))

umbral dagger
#

I just got sucked into PEP-8 πŸ˜ƒ

marble hornet
#

for line too long: I don't remember seeing function and method inputs with split () sections. like:```
def exp(a,v,c,d,e,f,g):
print('who would cross the bridge of death...')

#

vs:

#
def exp2(a,v,c,
            d,e,f,g):
    print('must answer me these questions three:')```
#

should i leave them too long ?

idle owl
#

@marble hornet What line

#

57 in gfx?

marble hornet
#

yeah _ _ init _ _ and others like it

idle owl
#

It can look like this python def __init__(self, width, height, pixel, hline=None, vline=None, fill_rect=None, text=None, font=None):or something close to it.

#

As long as the continuation spacing is correct, it can be multiple lines

marble hornet
#

πŸ‘

#

wow, right up to 9.09/10 i might use this outside of cp

idle owl
#

There are linters for many languages as well as Python.

marble hornet
#

is pylint written in py? (🀞 oh please say yes 🀞 )

idle owl
#

I believe so, yes.

marble hornet
#

yay !

#

but is pylint linted with pylint? lintception

#

okay:

#
gfx.py:338:4: R0913: Too many arguments (6/5) (too-many-arguments)```
#

i use all the provided arguments

tidal kiln
#

yeah...thought so...:(

idle owl
#

@marble hornet So here is where we discuss locally disabling

marble hornet
#

πŸ’

#

im ready

#

🀞

tidal kiln
#

this is the fun part πŸ˜ƒ

marble hornet
#

great!

#

is that the pylint things commented out?

idle owl
#

If you indeed use all the arguments, you can place a comment on that line that is ```

pylint: disable=too-many-argumentsAnd one at the end of the method stating # pylint: enable=too-many-arguments```

marble hornet
idle owl
#

Needs to be indented under the def like the rest

#

I think anyway

#

In theory if it's indented, it only applies to that method, but it's not always the case, so adding an enable isn't a bad idea.

marble hornet
#

and if there are two do i put two sets of lines on for each ?

idle owl
#

Yes

#

Actually, you can do this to check: try putting the disable line indented on the first method

#

pylint again

#

and if the second one is still in the list, you don't need the enable lines

#

If it's not on the list, then you need the enable lines.

#

Food has arrived! I will bbiab.

marble hornet
#

enjoy!

marble hornet
#

ooohhhhhh

#

and it finds fixmes for you!

meager fog
#

@solar whale ok more flow control and you can run the code now at 460kb

#

it does make a diff for big payloads

#

either way this does the baudrate stuff better, so you can hard-reset and it doesnt get confused

#

and of course you can drop the baud down more

#

im getting some perky speeds now

#

can grab github data approx every 10 seconds

#

z'not T1 but its better than my old 19200 hayes

#

i think i will socketify now

manic glacierBOT
solar whale
#

Nice -- I'm still trying to figure out the argon pins for flow control and the UART. I'm wondering if the AT commands always go over the default pins even if an alternative UART is enabled. I can't figure out why my build actually works.I am going to rebuild according to the schematic and see how it behaves.

meager fog
#

what firmware repo are you using?

#

i can look a lil

#

odd because you'd think they'd want flow control at 921600

solar whale
#

the argon firmware did have flow contol -- I am just using the Espressif AT firware https://github.com/espressif/esp32-at but I set the UART TX/RX for AT to pins 34/35

manic glacierBOT
#

Gave it a test and seems like its works. Anything else to try out, or can we close this issue?

Adafruit CircuitPython 3.1.1 on 2018-11-02; Adafruit ItsyBitsy M4 Express with samd51g19
>>> import board, busio
>>> import adafruit_ssd1306
>>> from digitalio import DigitalInOut, Direction
>>> spi = busio.SPI(board.SCK, board.MOSI)
>>> DC = DigitalInOut(board.D7)
>>> CS = DigitalInOut(board.D9)
>>> RST = DigitalInOut(board.D10)
>>> disp = adafruit_ssd1306.SSD1306_SPI(128, 32, s...
manic glacierBOT
solar whale
#

@meager fog I think I'm making some sense of this: see appendix A.4 fo https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf -- I am using UART0 for AT -- is it possible taht even thought I set the pins for other values, the default pins in this table are also active? These are the pins that are referenced in the schematic. I'll try a build with TX=41,RX=40 CTS =38 RTS=39 and see if it works -- should e able to use HW flow control. these pins correspond to GPIO 1,3,19,22

meager fog
#

total mystery to me

manic glacierBOT
meager fog
#

@solar whale ok i am redoin' the examples for the new style

solar whale
#

OK -- I am burning new argon -- we'll see how it works

meager fog
#

ok i will mention, for reasons i don't understand, the few few times i tried to turn on hw flow it didnt work...

#

but then it did

#

maybe dodgy wiring

#

but it did happen to me twice

solar whale
#

this is on external ESP32 from metrom4?

#

ha -- new file does still respond to AT command -- with new pin definitions -- there is hope

meager fog
#

yeah im only on M4 + external ESP32, im gonna leave the argon to u

solar whale
#

At least now my build matches the schematic!! -- Now I try HW flow control and see if I can run your demo

meager fog
#

oh man good luck

#

do you have afork?

solar whale
#

Its just done via make menuconfig

meager fog
#

wait to unconfuse me - are you changing flow control pins on espressif at firmware, or argon firmware changing default baudrate

#

cause you hvae two options

#

you could also, of course, just try the default argon firmware now

#

ill lint while you mess around, i could run 961200 on an m4, with flow enabled

solar whale
#

I could, but it does not support all the AT commands -- cant change its baud rate. I think I am just using the default pins for UART0 for the ESP32 DOWD -- my default is still no flow contol, but I can enable it via AT+UART_CUR

meager fog
#

yeah it always starts w/o flow which is fine

#

only worry for me is if IO15 is hardware-flow and its like, really hardware, not muxable :/

solar whale
#

On the ESP32 it uses IO15 but on the argon it is IO19

idle owl
#

@marble hornet Looking good! You're making a ton of progress!

marble hornet
#

Thank you! You did a very good job at explaining😁

#

Is there a meeting Monday?

idle owl
#

Nope, it's happening on Thursday, 27 December.

solar whale
idle owl
#

It's in the pinned messages. I could send out another announcement. Might do tomorrow.

solar whale
#

ah -- just the ssid password ?

meager fog
#

@solar whale oh its a dict

#

sorry was launderin'

#

ill commit an example

solar whale
#

ok thanks -- having issues with getting flow contol to work -- I think I'm confusing RTS/CTS

marble hornet
#

Pinned messages?

#

Oh

meager fog
#

@solar whale it is confusing, you want to enable CTS

solar whale
#

on the ESP32 side

meager fog
#

and use the "CTS" pin

#

yeah

#

the RTS pin on the feather is output, CTS pin on esp32 is input

solar whale
#

on argon -- I think the labeling is confusing -- the pin labels are from the ESP32 side -- at least for TX/RX they are ...

#

or my pin definitons are not quite right yet

meager fog
#

i just do it by experiementation :/

solar whale
#

thats what I'm doing.. getting there.

solar whale
#

@meager fog I have your latest running OK on my metrom4 with ESP32 -- al three examples run fine -- still struggling with argon flow contol but it's nice to have the metrom4 for comparison -- thanks for getting it all working!! I'll keep working on the argon....I'm getting closer, I think...

meager fog
#

yep!

#

well meanwhile im getting the code better n better πŸ˜ƒ

solar whale
#

I'll try to get the POST demo working agin tomorrow.

manic glacierBOT
meager fog
#

@solar whale ok i will be doing more upheavals later this week

#

so don't get too attached πŸ˜ƒ

solar whale
#

no -- looking forward to constant improvements!

#

mean "np" not "no"

manic glacierBOT
manic glacierBOT
solar whale
#

Giving up for tonight -- good night all πŸ’€

meager fog
#

l88r

manic glacierBOT
manic glacierBOT
#

@eighthree You can make changes in the mpconfigboard.h for the board or, look in mpconfigport.h and see the conditional compiles for pirKey and other smaller boards. Also see mpconfigboard.mk for adding frozen libs.

Note that removing things does NOT create more RAM space by itself. It allows you to freeze more libraries, which does increase RAM space, because when the frozen libraries are imported they don't take much space in RAM, unlike libraries imported from lib/.

marble hornet
#

@idle owl is there a reason for the gfx class to not have an x,y component?

#

I will post use case a minute

#

In**

marble hornet
#

My though was that with an xy input (defaulted to 0) then different gfx could be made as different windows

tulip sleet
#

<@&356864093652516868> NO discord audio meeting today. Next meeting is this Thursday, Dec 27, at 2pm Eastern time / 11 am Pacific. Regular Monday meetings resume Mon, Jan 7, 2019. See pinned msgs.

solar whale
#

@meager fog Woohoo! I finally have "stargazer" running on an argon! flow control seems to be working -- long story -- but the short version is I was using physical pin numbers and not GPIO pin numbers for the build. I have some cleanup/testing to do, but this is very encouraging πŸ˜ƒ As part of my experimentation - I did verify that I can build/reload the argon_ncp_firmware, but I still think it is not the way to go since it is missing so many of the AT commands we wise on the external ESP32. But it was nice to know I could reload it if desired.

meager fog
#

oh wow yayyy

#

ok i did update the demo for 'more generic' json->number

#

like merged em all together

#

but yeah good work - very nice πŸ˜ƒ

#

what baud are yous stargazin

#

i need to clean up the repo and add comments/lint

solar whale
#

right now just 115200 -- will try stepping it up after get a few things cleaned up

raven canopy
#

the argon-ncp-firmware not having common AT commands enrages me. entirely because the documentation says that it contains the "Basic and WiFi" commands. 😠

solar whale
#

@raven canopy yeah -- it is missing some really basic ones -- UART_CUR/DEF are the real problems.

raven canopy
#

unless you're referring to the TCP/IP commands missing, then i understand that.

main meteor
#

Wow, that display looks lavender in that picture! I don't know of any (non-RGB) displays that color. Too bad, I'd buy one.

meager fog
#

i only use UART_CUR

solar whale
#

@meager fog at 921600 I am getting errors --will back down a bit

meager fog
#

in my updated code, you pass both 'default hardware' and 'desired baudrate' in

#

i think its best to have a known fallback

solar whale
#

how fast are you able to run startgazer?

#

230400 works

#

it was more than UART_CUR -- I got frustrated trying to work with it. It only takes a few minutes to update it.

#

460800 works

#

@main meteor the 7segment is blue -- tough lighting.

tidal kiln
solar whale
#

@meager fog I don't seem to be able to get above 460800 -- just tried the latest countview demo -- works at 460800 but not at 921600. I can live with that πŸ˜‰ but will keep looking into it. I'm still having some issue with hard resets of the ESP32 on the Argon. Looking at that too, but it is a great relief to have this working.

solar whale
#

921600 works fine on the metrom4 with ESP32 -- except too many counts to fit on 4 digit display πŸ˜‰

manic glacierBOT
meager fog
#

@solar whale hey back

#

amazin'

#

i think you're hitting some nrf52840 uart stuffs

#

m4 is just more solid

#

ill say that i really like doing a hard reset immediately after object creation

#

unless im doing fast iteration, just cause it will still connect to wifi in a few second

#

only thing thats still being iffy is the first SSL connection. it hangs for many seconds, errors out, it works 2nd or 3rd go

solar whale
#

It's come a long way!!!

meager fog
#

epic

#

wanna try a cheerlights?

solar whale
#

no audioio on nrf52840 😦 at least not in my builds

#

but I'll try it on the metrom4

meager fog
#

oh yeha you'll need to remove the audioio parts, or you can put it under a if

exotic pumice
#

yeehaw πŸ˜‰

solar whale
#

got some lights on the counter -- nice!

#

OK -- time to do some wrapping πŸ˜‰ be back later.

manic glacierBOT
neat folio
#

@solar whale I think maybe you meant to post that image in pet-photos (?) πŸ˜‰

river quest
solar whale
#

Cheerlights running on argon πŸŽ„

manic glacierBOT
manic glacierBOT
marble hornet
#

Feliz navidad por quien lo celebrar

lost moss
#

Translate?

marble hornet
#

Marry Christmas to those who celebrate

lost moss
#

Thenks

manic glacierBOT
umbral dagger
#

@marble hornet Terrific Tuesday to those who don't (of which I largely count myself... I do have a couple PiHut trees blicnking away in my livingroom, though).

tawny creek
#

@umbral dagger I spent the morning trying out your new neotrellis tutorials! have been going through tabletopaudio stuff πŸ˜„

umbral dagger
#

@tawny creek Cool. They're worth throwing some patronage at... beautiful sounds.

#

I really had fun with the memory game project, too. I think minesweeper would be a fun one for it.

manic glacierBOT
tawny creek
#

@umbral dagger the demo mode was a nice touch ❀

exotic pumice
#

I melted my swd breakout 😦

#

protip: don't solder the pins on upside down using 1950s plumbing solder and then try to yank them out with pliers while applying heat πŸ˜‚

umbral dagger
#

@tawny creek It pushed the design in a nice direction.

#

@tawny creek It a nice gadget. Lots of hackability. I’d like an onboard speaker option, though.

shut osprey
#

the cpx (circuitplayground express) circuitpythone library has a cpx.play_file but it's syncrhonous - is there a way to play asyncrhonously? I don't want the playing of a sound to block the rest of the code

#

So - 2 questions, is it possible to play async? If so, can the play_file get a param for it? I'm happy to write it and make the pull request if someone lets me know how it's done. I'm new to python, but not code...

exotic pumice
#

I think it's async but it binds the pin.

tidal kiln
#

you don't have to use the CPX library - it just makes using the CPX easier. the current code just sits in a parking loop until playback is done:
https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/blob/master/adafruit_circuitplayground/express.py#L690
and when you import the CPX library, it does take over some of the pins:
https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/blob/master/adafruit_circuitplayground/express.py#L80
so try without importing the CPX module

shut osprey
#

Cater, to stop using cpx means I have to rewrite quite a bit of my code, but if that is the only way, I will give a try thanks

tidal kiln
#

yep. that's the trade off. it's written in a lot of code functionality. but also, it is what it is. so if you're hitting a limitation in how it does things, then you'll have write your own.

#

you can propose a change via a PR if you want. or, as a first step, create an issue.

exotic pumice
#

I'm trying to use some test clips or whatever they're called in lieu of a swd breakout and getting a blinking tx light but "unknown" state in openocd. Anyone know what that means?

#

on a metro m4

manic glacierBOT
teal bear
#

how come when I put a white plastic (or paper) over the CPX, the lights and nummber swing from 0 to 10 pretty erratically

shut osprey
#

@tidal kiln thank you - i opened an issue, we'll see what comes of it

teal bear
#

print(int(peak),end='') # Remapped light levels 0000000000000000000000000000000101150034215426153148411703182530362239132800302701036313603001641581119032026312924192

#

when I hold my phones light over it, numbers are solid, or jitter by 1

tidal kiln
#

it might be picking up light from the neopixels. try commenting out the code so it's just looping the cpx.light value and see if that makes the reading more stable.

teal bear
#

I know it is picking up light from the neopixels

#

what I don't understand is why it is so erratic

#

I have a theory: LEDs flash faster then the human eye can notice ...

#

if they are off 1/2 the time that the sensor is reading...

exotic pumice
#

@tidal kiln have you ever done swd on metro m4?

tidal kiln
#

it probably has to do with the flashing. they are PWMing pretty fast, so it's not always on. you get the erratic higher readings when the analog read just happens to sync up.

#

@exotic pumice a little, sometime ago, and it was using a jlink

exotic pumice
#

do you know what a blinking tx light means in this context?

#

I thought it was just for uart

#

or usb

#

it's blinking about 1hz

#

and it stops when I disconnect swd

tidal kiln
#

are you powering it any other way?

exotic pumice
#

I've tried usb power from the pi and usb power from a wall wart

#

gnds are connected tho

tidal kiln
#

but when you're using the SWD, are you powering only via connector?

exotic pumice
#

no

tidal kiln
#

hmm. not sure. and been so long ago can't remember the behavior.

exotic pumice
#

k thx anyway

tidal kiln
#

that led is control by a separate pin

#

are you using a jlink also?

exotic pumice
#

no I'm using a pi

#

also, the tx light blinks when openocd is off or on

tidal kiln
#

how are you making connections between pi gpio and metro swd connector?

exotic pumice
#

test clips

#

I ordered a swd breakout but I broke it

tidal kiln
#

are you able to talk to it ok otherwise? via openocd?

exotic pumice
#

no it's in unknown state

#

does nothing

#

no gdb server

tidal kiln
#

it might be the connections then

exotic pumice
#

yeah but it's weird to me that the tx light is on as well

#

I thought it might be a clue

#

or there's something special I have to do to enter swd fully

#

perhaps I should see what's running

#

lol

#

I'm an idiot

#

I left a sketch running and it was blinking because the sketch was printing

#

once a second

#

I thought it wasn't happening with swd disconnected but I must be wrong

tidal kiln
#

ha. that explains it at least.

exotic pumice
#

yup

exotic pumice
#

I gave up on the test clips

#

too big and finicky

marble hornet
#

so i am working on adding a background to the gfx font method but i'm running into a python problem. i have a dict and tuple saved to the class instance that is the background info (an args and kwargs form a set color font). but i'm trying to input them on the end of a method witht eh below code:

#

self.fill_rect(size*x+x0, size*(height-y)+y0, size, size, *self.text_bkgnd_args, **self.text_bkgnd_kwargs)

#

i'm getting this error :

#
Traceback (most recent call last):
  File "code.py", line 24, in <module>
  File "adafruit_gfx/gfx.py", line 439, in _very_slow_text
  File "adafruit_gfx/gfx.py", line 436, in _very_slow_text
  File "adafruit_gfx/gfx.py", line 400, in _place_char
TypeError: function takes 6 positional arguments but 5 were given```
#

but it worls if the tuple and dict arn't empty

#

so a try and except makes it work but

manic glacierBOT
tidal kiln
#

@marble hornet how is fill_rect defined in the class?

manic glacierBOT
#

This PR isn't done yet, it lacks a way to configure pull up/down and which edge(s) to count.
It was meant for the async discussion in #1380 and shows a way to do pin interrupts with async/await through the example in #1415.

Do you think it's a good addition on its own?

If we decide to support regular pin interrupts, then I could do without this PR myself, even though this is a better fit for me than pin interrupts because a counter is interrupt storm resilient (if we do VM inline callb...

manic glacierBOT
#

I have done both <code>git submodule sync</code> and <code>git submodule update --init --recursive</code> with no difference locally : I have the same error with audio from adafruit_usb_descriptor .
<code>git status</code> shows nothing new or remove to commit...
I don't understand where I messed up my fork and how to repair.

upbeat plover
#

today i want to learn how to use UART, ill be using feather m4 and CPX... Id like to send commands from featherM4 to CPX. Is there a learn guild?

#

i got this example like 10.30.18

import board
import busio
import time

RX = board.RX
TX = board.TX

with  busio.UART(TX, RX, baudrate=115200, timeout=3000) as uart:
    while True:
        data=input()
        if "reset" in data:
            uart.write("\x03")
            uart.write("\x04")
        else:
            uart.write(data+"\n"+"\r")
        getresponse = True
        while getresponse:
            response=uart.readline()
            print(response)
            if(response==b''):
                getresponse=False
manic glacierBOT
#

somehow, I couldn't upload atcommand lib using ampy

ampy -d 1.5 --port /dev/ttyUSB0 put adafruit_espatcontrol.mpy
Traceback (most recent call last):
  File "/home/hathach/.local/bin/ampy", line 11, in <module>
    sys.exit(cli())
  File "/home/hathach/.local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/hathach/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
 ...
manic glacierBOT
#

I cloned your repo and took a look. It appears that at some point on your master you did something that caused some submodules to be checked out with older versions. No amount of merging from adafruit/master is fixing that.

I think I managed to get things back into sync by doing something like this clone of your repo (making some guesses about your remote names here):

# WARNING: SAVE `fr.po` out of repo and anything else you want to save here, before you do the `git reset`
git f...
marble hornet
#

It's from another classπŸ€¦β€β™‚οΈ

manic glacierBOT
#

@hathach the adafruit_espatcontrol.py does not run on the esp8266 -- It runs on the board using it as the coprocessor. Which board do you have? ESP8266 needs to be flashed with a new "AT Firmware load" as in this guide https://learn.adafruit.com/adding-a-wifi-co-processor-to-circuitpython-esp8266-esp32/firmware-upload If you are using an ESP32 - If you have an ESP32 I have a newer Firmware file -- let me know if you need it.

solar whale
#

@upbeat plover there have been some recent changes t the UART in busio - I you are using the 4.0-alpha5 release you will need to modify the example. here is a new version ```import board
import busio
import time

RX = board.RX
TX = board.TX

with busio.UART(TX, RX, baudrate=115200, timeout=3) as uart:
while True:
data=input()
if "reset" in data:
uart.write(bytes("\x03",'utf-8'))
uart.write(bytes("\x04",'utf-8'))
else:
uart.write(bytes(data+"\n"+"\r",'utf-8'))
getresponse = True
while getresponse:
response=uart.readline()
print(response)
if(response==b'' or response == None):
getresponse=False

#

If the CPX only has to receive, the link from @tidal kiln should also work with this on the M4

manic glacierBOT
meager fog
#

@solar whale heya to replicate the nrf52840 issue

#

can you use an esp8266? or just the '32?

solar whale
#

I think the ep8266 is best for reproducing it.

meager fog
#

@solar whale ok cool

#

whats the easiest way to repro?

#

@gentle bronze is loadin' up the esp now

#

and can test tomorrow

solar whale
#

I think this simple comm program on the 52840 ```import board
import busio
import time

RX = board.RX
TX = board.TX

with busio.UART(TX, RX, baudrate=115200, timeout=3) as uart:
while True:
data=input()
if "reset" in data:
uart.write(bytes("\x03",'utf-8'))
uart.write(bytes("\x04",'utf-8'))
else:
uart.write(bytes(data+"\n"+"\r",'utf-8'))
getresponse = True
while getresponse:
response=uart.readline()
print(response)
if(response==b'' or response == None):
getresponse=False

#

i'll hook mine (particle xenon) back up and verify later today.

#

oh wait -- its all set up - just a sec

#

yup -- that does it.

#

I don't thinnk you even need the AT firmware on the ESP8266 -- Even CP might do it.

solar whale
#

I will post some clearer steps to the issue later today.

manic glacierBOT
#

Could you run make-translate and re-commit and re-push? I'm seeing this error in Travis:

python3 tools/check_translations.py locale/circuitpython.pot locale/es.po locale/it_IT.po locale/fr.po locale/en_US.po locale/pt_BR.po locale/fil.po locale/de_DE.po
Checking locale/es.po
ok
Checking locale/it_IT.po
ok
Checking locale/fr.po
Missing message id. Please run `make translate`
Makefile:203: recipe for target 'check-translate' failed
make: *** [check-translate] Error 255
solar whale
#

BTW @gentle bronze if you are trying to us CP on the esp8266 -- you ahve to go back to 4.0.0 Alpha2 - it has been broken since then -- it boots, but the Filesystem soes not work -- that is propbably ehy you had the ampy errors you reported .

meager fog
#

yeah we wont be supporting esp at all from 4 onwards

solar whale
#

@gentle bronze @meager fog I just confirmed that even loading the current master build of CP onto the ESP82266 and then connecting to an nrf52840 and sing the comm srcipt above, I can reproduce the isse by reetting the EPS8266

meager fog
#

people can use micropy or this co-proc

#

@umbral dagger hey lookin at your guide, do you need noe's guide live first?

umbral dagger
#

@meager fog That was my thought. It’s revisiting the code from Noe’s guide.

meager fog
#

ok they'll be done later this week

#

so ill maek the guide live at the same time

manic glacierBOT
#

@hathach I can reproduce the issue by connecting an ESP8266 (with with either the AT Firmware or the latest CP build) to a nrf52840 (I am using a Particle xenon) -- Connect VUSB,GND, TX<->RX, RX <->TX

Then I use this test script on the nrf52840 to comminacate
For tha AT Firmware enetr AT then return and you should see a response
For CP on the ESp8266 just enter return and you should see the REPL prompt ">>>"

then press the RESET button on the ESP8266 and no more responses will b...

umbral dagger
#

@meager fog Cool. Once I have the final 3Ds, the LIDAR guide is a few photos away from completion.

marble hornet
#

does code need to be 100% lint free to pass?

exotic pumice
#

If I were you I'd look for a plugin for your editor of choice to apply the lint automatically

#

I think for vim it's something like :PymodeLintAuto

meager fog
#

@solar whale heya can the argon repro the bug too? or just esp8266?

manic glacierBOT
idle owl
#

@marble hornet Yes.

marble hornet
#

Okay, thank you

#

It says the class has too many params. Is there a bypass for that?

idle owl
#

@marble hornet The bypass is always provided in the linting failure message shown in parentheses. So # pylint: disable=pylint-failure-message

marble hornet
#

Thank you

idle owl
#

Side note, in the event that you need to disable more than one thing it's # pylint: disable=foo-message,bar-messageetc.

marble hornet
#

πŸ‘πŸ˜tnx

marble hornet
#

what if it is already disabled? and is still giving the error?

#
  https://github.com/adafruit/circuitpython/releases

"""

__version__ = "0.0.0-auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_GFX.git"

# pylint: disable=invalid-name
# pylint: disable=too-many-attributes
class GFX:
    """Create an instance of the GFX drawing class.```
#

still saying there are too mahy

idle owl
#

You're not disabling it in the right place

marble hornet
#

okay... under class def?

idle owl
#

There or under init, I'm not sure, but tabbed over within the object that's giving you the error

manic glacierBOT
marble hornet
#

under init worked, not under class def tho. thank you

idle owl
#

You're welcome

#

What was giving you invalid-name?

#

We typically try to avoid having any disables that high in a file, because it disables it globally, and then you lose out on getting the benefit of that error later if it's actually legitimate.

marble hornet
#

it wasn;t that;s not my handywork 🀷

idle owl
#

Ah ok

#

Leave it then.

#

You're already rocking it hard, I'm not going to ask you to troubleshoot someone else's decisions πŸ˜„

twilit geyser
#

Can I ask for some mPY help here?

meager fog
#

we can help with circuitpython, micropython perhaps not

twilit geyser
#

import urequests
r = urequests.get("http://api.xively.com/")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'get'

meager fog
#

what board is this one?

twilit geyser
#

esp8266

meager fog
#

whatcha running on it?