#circuitpython-dev
1 messages Β· Page 219 of 1
I haven't deleted this many emails since the last election
@solar whale does that work for updating libs too like do pip3 install --upgrade adafruit-circuitpython-bme280?
yes
sweet
i foudn the update thing for pip3 install --upgrade adafruit_blinka a couple of pages in so it is there
alright. PRs done. now kattni has the thankless job of merging the rest. @idle owl AVRprog is the last one in my cycle... #GitHubEmails2020
I'll run Adabot when I'm done to make sure I didn't miss any
These issues are resolved. The project is ongoing and will continue, but this issue can be closed.
well done!
only reported errors: README.rst does not exist...so that's a win!
Nice!
@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?
now...to debug my garage door opener. π
Alright, running Adabot now to see what I missed due to Gmail threading things really weirdly
si7021_simpletest.py works on pi zero w
@solar whale nah the detection was bad
we faked the chip detection code. now its "correct"
hex, gr8! have fun π
@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
Only missed 1!
nice work @kattni @brennen and all the circuitpython librarians for making this happen. we'll be checking adabot for any missed libraries in the future
hiya just to update, we won't be supporting the ESP8266 long term, due to the lack of USB and low RAM availability. instead, we'll be using it as a co-processor to bigger chips! check this guide for more details
https://learn.adafruit.com/adding-a-wifi-co-processor-to-circuitpython-esp8266-esp32
thank you :)
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])
@upbeat plover run i2cdetect real quick:
i2cdetect -y 1
hmmm. there it is.
fram may not work
its an odd chip, and isnt tested on pi yet
probably a clock stretch or repeated stop issue
i was just going through stuff, testing and that was first issue
if there isn't a diagram with a pi in the guide then its not tested, i think that library is very new π
fwiw, i did test FRAM i2c a bit ago and also found not working.
Yeah I took it out of the guide.
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 ...
One solution would be to enable MICROPY_ENABLE_SCHEDULER and only allow soft IRQ's, running the callback inline with the VM. This would prevent people from shooting themselves in the foot.
Refs:
@solar whale i haz some framebuf
.* ** ** .
.* * * .
.* ** *** * * *** .
.** * * * * * * * .
.* * ***** * * * * .
.* * * * * * * .
.* * *** *** *** *** .
. .
..................................
@meager fog sparkly text!
@solar whale im gonna move on to getting oleds working ... meanwhile you can check out https://github.com/adafruit/Adafruit_CircuitPython_framebuf/pull/4
ive joined https://github.com/adafruit/micropython-adafruit-bitmap-font into framebuf cause i feel like if you're going to draw text, you'll want lines and pixels too!
i've also fixed t...
@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.
kool
yay
yep i am commiting some example code for ssd1306
cascade, feel free to review either PR
okay! I'm testing out the SSD1306 examples and drawing stuff
@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
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
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 π
Np, I think that code is fine. was able to run the exact code with my version of the SSD1306 driver:
https://gist.github.com/eighthree/232110a6a35e0d8677eddaea2055560e
will comment and report! tyty
tested on an M4 Feather and it works as is
ported from the python library: https://github.com/adafruit/Adafruit_CircuitPython_PCD8544
should be in pypi in the next few days!
i pinned this issue!
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...
Having fun with Trellis+STEMMA+CircuitPython today. The off-camera synth is an M4 Express running CPy, too. https://www.youtube.com/watch?v=XE709cB1a6M
Test of the NeoTrellis M4's STEMMA interface connected to multiple devices: dual 12-bit DAC for CV/Gate, a ToF sensor for gesture control, and an alphanumeri...
awesome @errant grail ! Was talking to someone about the neotrellis and thought of using a gesture sensor with it! π
@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.
where do I log issues against https://learn.adafruit.com/welcome-to-circuitpython/installing-mu-editor#installing-mu-for-linux-4-6
@teal bear there is a "Feedback?" link on the left side of the page, under the page titles.
thanks
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.
and about formatting a byte block for text
@marble hornet not sure I know what you mean
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?
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
Thank you! Okay, and do you know if the gfx will grab the text from displayio? Or if it has even been discussed?
@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.
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?
@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
meanwhile...if you have a cheap nokia display try https://github.com/adafruit/Adafruit_CircuitPython_PCD8544
how do you read pixels from ST7735R displays?
you cannot
SPI displays are one-way
on linux/largermem boards you buffer the display in memory
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
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.
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
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
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
@solar whale aha! thank you π works!
@meager fog will framebuf be used for charlieplex led displays too?
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
thank you @meager fog
@idle owl how is color passed to the displays in the cp gfx?
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
@meager fog though I'd try to find some bugs. I can hold tight thoughπ.
if ya find bugs or have udpates, PRs & issues will work best until people are back from holiday
thanx!
π
the circle is really cool!
the way it is drawn
do doc strings have to be """ ?
@meager fog Hi! I'm around.
ili9341
@marble hornet That's how we do docstrings You can also do # for comments.
thnx
hiya driver is here!
https://github.com/adafruit/Adafruit_CircuitPython_SharpMemoryDisplay
closing this issue, if you have q's, put em in that repo :)
hiii i did a bunch o display things
@stuck elbow they have bi-directional SPI but you cannot read display memory
just status
@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.
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
@meager fog Is there something you wanted me to look at?
Modded gfx (haven't found errors in the already existing methods yet either )
in car, shakey hands
@marble hornet COOL! not dma yet?
SHOW-AND-TELL LIVE VIDEO! LIVE! Visit the Adafruit shop online - http://www.adafruit.com 1) Add +Adafruit Industries to your circles 2) Post a message/commen...
check this bit @marble hornet π
@tawny creek isn;t that just arduino?
@meager fog awesome, I will test it tomorrow
@marble hornet aiyah my bad!
@solar whale nah, i was about to do some esp32 hackin tho
@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
Earlier I ran thoght the configuration of a new argon from scratch to CP with AT firmware -- took about 15-20 minutes -- no problems
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 π
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
yhmm yeah yours has the autoreset chip
so...i dont know!
@solar whale its ok to break
i wont do a release
trying a pioled now
ok -- will commit in a few minutes
same behavior on the pioled
yeah thats very mysterious
have you tried it on a feather52840 yet?
i have not :/
i mean yes - but in arduino only
ok π£ is here, so gonna eat - bbiab
enjoy -- commit to ESP_ATconrol comming now
@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
should I add a "simpletest" for post?
I'll wait -- needs some explanation.
ah - what the heck -- I'll add it
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?
Hey, the following code causes the circuitpython code to hang in the f.write() call. The largest value that completes successfully is 1023 bytes.
with open("/sd/bytes", "wb") as f:
a = b"\x00" * 1030
f.write(a)
I attempted: cpx._speaker_enable - but once i assign the A02 to neopixel, i no longer can use it...
wiz, great!
It sure is nice to have the 8Mbyte QSPI flash enabled on the PCA10056 -- I an retire my SDcard!
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?
do you upload code via USB?
yazz
factory?
Are you using adafruit_sd? This sounds like this library bug: https://github.com/adafruit/Adafruit_CircuitPython_SD/issues/11
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
ok i solderd esp32 feateh
and this is your compiled version of the latest AT firm from ESP?
yes but for TX/RX uart -- do you want the version for on board ERC32 for the argon?
for miniesptool load?
π
oops -- hard habit to break
18 years of coding on that chip
BTW -- just tried a sht31d (I2C) on argon -- no problems
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
I tried invert and it works! -- all the funny pixels stay
yes
if so, I2C works fine
its probably the write-size
you can try breaking it into chunks
its probably a circuitpy bug
ok -- good clue -- bugs in CP - nah π
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
I'll try to look into it tomorrow -- I have to head to the airport to pick up my daughter in a little while.
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
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
I have found the bitcoin test work really well with my version
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
but busio.UART does not have flow control -- just want to do it manually?
yeah
manually
uart is so slow, if you think about it, that digitalio will work fine
...installing latest 4.0 on m4....
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.
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
it also strips "\r\n" in at_respone
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
ESP32 GPIO 14 is RTS 15 is CTS
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
OK -- as I said, I can alway redo my changes -- nothing to complex
I think so -- whatever was in the default build - I did not add anything
all good
the github response is "huge"
yep...
you got it working w/github on esp32 only right?
i couldnt get it working on 8285
ok gonna wire this up now...
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
my POST command works and I get the ful response
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
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
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
I'm oopen to all ideas π -- I have to head to the airport now -- will check in tomorrow and see whare things stand.
yep l8r!
good night!
---------------------------------------- This is a test of the CC3000 module! If you can read this, its working :) ----------------------------------------
Yay!
@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
A0 is analog output, do you mean A2? can you snap a pic showing what you're tring to do
that will help
oh boy yeah you're using all the pins
you cannot use A0 for both analog input and speaker, same pin
4 player 1d pong π i need 4 buttons and 4 LED strips
OK - so is there a way for me to disable A0 as the speaker, and just have speaker go directly to the speaker?
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
AHH ok...
i think your best bet is to share the LED strips
hmm - i guess making the neopixels a single data out is likely the only way
makes the code more complex...
true - but i'm trying to use it as a learning lesson to teach others, so more complexity = harder to teach
hm
I'll figure it out, this was super useful
BTW - Thank you for everything you've done
Adafruit is truly amazing... Your products are amazing, and you're an inspiration
yay thanks for the nice note π
how about 2 neostrips together, that saves you 2 pins, maybe not as bad
Having it set up as a single neopixel strip is likely the "easiest" and most logical thing...
yahhh
single pin would be less complex logic then split as 2, as each strip is a possible player
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
Makes sense - just a limitation of the board I have to play with
you can do it! good luck!
Thanks! I'm excited, I'll certainly post pictures and an explainer video when it's all done
what is the "travis build" that happens when a github pr is posted
https://travis-ci.org @marble hornet
https://github.com/adafruit/Adafruit_CircuitPython_GFX/pull/6 it says the build failed????
added four things:
round_rect, a normal rect with rounded corners,
fill_round_rect, filled version of above
text method (with an overwrite in init)
TGFONT01.py with a dict of data that defines the...
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οΏ½β
...
@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
@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
k i think solved with some gc.collect's and zeroing out big buffers once we're done with 'em
@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.
You flashed the right firmware, but you're probably using the wrong baudrate to connect via your terminal application. Try 115200.
This is more a support question, and is better asked in https://forums.adafruit.com, where our support folks hang out.
@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
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...
@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.
@raven canopy are you thinking you will add it to busio?
@solar whale yeah, that was the thought.
I think it would be a nice option -- I'm surprized it has not come up before.
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
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...
Example task using pulseio.Counter from PR #1423:
import pulseio
class Button:
def __init__(self, pin, invert=True, debounce_ms=50):
self.counter = pulseio.Counter(pin)
self.debounce_ms = debounce_ms
self.invert = invert
self.last = False
def __enter__(self):
return self
def __exit__(self, *args):
self.counter.deinit()
@property
def value(self):
if self.invert:
return not ...
You said you erased the chip first, but it is worth double checking. I have seen similar issues when I did not erase the esp8266 first when transitioning from Arduino to CircuitPython.
@marble hornet some good info here if you haven't seen it yet:
https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github/overview
but i'll also be hanging out here for a bit this morning if you want help understanding the travis fail on your PR
Thank you @tidal kiln and @raven canopy I'll give it a good read
hiya to add more detail, we're almost positive it is a failure in writing 1KB+ of I2C data at once. the displays have 1 or 2 KB that we push out in one call
hiya closing this because it seems more like an an install issue :)
@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!
@tawny creek Everything is on travis-ci.com now.
"parsing JSON".....i feel the potential for a new holiday jingle there...
@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.
I have updated the french strings (and corrected a small typo in the nrf port).
Issue : https://github.com/adafruit/circuitpython/issues/1381
@idle owl Fair. Is our global config align with PEP-8?
I do fairly freely disable some.
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.
Is tap detection actually working in the adxl34x library?
oh, that's a bit of a relief - thought I was being dense π
@solar whale its a lovely day to implement socket
AttributeError: 'ADXL345' object has no attribute 'enable_tap_detection' with the simplest possible code
what version of lib are you using?
https://github.com/adafruit/Adafruit_CircuitPython_ADXL34x/blob/master/adafruit_adxl34x.py#L292
Using the one in today's auto-release - I can try that one...
hmmm. looks like a release wasn't done on the lib to put it in the bundle:
https://github.com/adafruit/Adafruit_CircuitPython_ADXL34x/releases
not sure why...for now just grab directly from repo
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 π
yah. probably just a holidays thing
π
it's running now at least - will test further π
nice!
works!
gr8 ill release
@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.
It looks like the nrf I2C send data in 16 byte chunks -- set by https://github.com/adafruit/nrfx/blob/b96950abf27229c2a3b1719d60691321246bfc94/mdk/nrf52840_peripherals.h#L205 -- it's not clear to me if this can be adjusted or if its a limitation of the HW.. I suppose I can try...
If I change a fork will a pr change to match it?
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
@meager fog nice! the stargazer example works great on metrom4 with esp32 -- now to see if I can make it works on the Argon.
@solar whale wow fast
i just commited a big api change
to match esp more
also i moved the wifi settings to settings.py
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
I have 7 segment on mine -- actually 14 segment on metrom4 π
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
sounds great -- you are fast!
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
np -- I'll pull your stuff and take a look -- did ou commit latest to master?
ok -- I have that
only thing is... argon doesnt connect to IO15 which is the hardware UART. why? i dont know :/
ah -- may need to rebuild that - I was just going to look at it.
hmm -- I left tehn set to 14/15 since I thght tehy would eb accessible
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
thanks @tidal kiln
having a hard time reconciling this with the schematic
because RX/TX are 34/35 but schematic looks like 40/41 ???
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. π
@meager fog @raven canopy I think these are what we want to use -- I just need to make sure the compiled firmare matches https://github.com/adafruit/circuitpython/blob/master/ports/nrf/boards/particle_argon/pins.c#L59
Yeah, according to the block diagram, those would be correct.
@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.
no worries. holidays. two workshops....all good
Is it normal that when Scott mentioned "make releases easy", I immediately thought of adabot doing releases? π 
@raven canopy Adabrain.
@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....
@marble hornet You around?
yeah! i should be for a while. what's up?
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
I'd love some help. what did you see?
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
okay opening...
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:
okay... is the * a star or file names that should be fill in?
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.
pushing
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.
that's part of the fun right! brb getting water
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.
okay, back
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?
pushing
And it looks like mostly whitespace errors.
There are some more complicated errors at the end though.
okay, where are you seeing this interface ?
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?
i have it on the docket to read the page. but a primer would be greatly appreciated
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 π
wow! do i get an as seen on pylint sticker π
Oh man, we need something like that. Alright, quick walkthrough.
kk
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.
okay, of the script's analysis of the code?
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
line 540?
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.
okay... π
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.
@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?
@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!
thank you kattni, i'll do some googling for the editors and start chugging away!
what do you use to code with @marble hornet ?
@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
@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?
VScode and Mu
@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.
Right! And do I pass it the file name when in the directory of the file I'm testing?
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.
That's global only for the Learn guide system. Our global for everything else is different.
ahhh! where is the global one
We decided examples can be more readable than library code since they're for guides.
In any library repo. https://github.com/adafruit/Adafruit_CircuitPython_GFX/blob/master/.pylintrc
thanks @idle owl !
so no travis on examples?
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.
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
where's the script? it's right here:
https://github.com/adafruit/Adafruit_CircuitPython_GFX/blob/master/.travis.yml#L29
it's been written for you, since that's what we want to have run on any PR's
@meager fog @raven canopy Ok - I found out where pins 34/35 came from -- it is the Huzzah ESP32 schematic https://cdn-learn.adafruit.com/assets/assets/000/041/630/original/feather_schem.png?1494449413 - this was to allow the Huzzah ESP32 to do AT vi the USB interface -- Now I am trying to figure out what this has to do with the argon configuration. I have some testing to do - I think I just got lucky with the argon.. more later.
why is pylint? (i'm curious not accusatory)
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
They force our code to conform to a standard.
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
it also makes sure people's PRs dont break things, at a low level
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.
but, yah, like kattni says, they help force all code to a certain style, which is important
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
but don't think lint = fail means the code won't run or is not functional
There are a few errors in that list that I think you will end up needing to disable locally.
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
^^ Yep.
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.
you can also run pylint locally - catches 95% of it
@tidal kiln Without the linter we wouldn't have your hilarious series of linting commit messages though.
Itβs incredibly useful in some cases, and a petulant nag in others.
yah.....2019...the year i'll lint locally! i will! i totally will.
Iβd be happy to get my local pylint working identically to travisβ
its fast to lint locally, doesnt catch some RTD stuff is all
the other trick is to turn on travis for your fork repo
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?
Emacs has it built into python-mode to it marks it up as I work... but itβs not doing quite the same checks.
@marble hornet Give me an example of what you mean.
das, i run it at the command line
if you're in the repo dir, it will use the local .pylintrc
PyCharm picks up most of it, but I still run it from command line.
Nicer to have it mark up the code like text in a word peocessor.
Agreed.
"""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
Yep
and welcome to the band!
after the =? for after the 0?
Emacs also highlights trailing whitespace. Just sayin.
@marble hornet So the answer to your question is yes, please fix up the code that already exists if it has errors.
looks like maybe after #bottom and #top?
Trailing whitespace means after the end of the line, so invisible unless you have an editor that highlights it
the linter is rarely wrong
hmm
Click after radius and then use the arrow? Or does it go to the next line and skip the space.
You may need to try a different editor. Mu may be setup to workaround those things.
okay
use atom editor or something
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))
I just got sucked into PEP-8 π
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 ?
yeah _ _ init _ _ and others like it
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
There are linters for many languages as well as Python.
is pylint written in py? (π€ oh please say yes π€ )
I believe so, yes.
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
yeah...thought so...:(
@marble hornet So here is where we discuss locally disabling
this is the fun part π
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```
like this?
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.
and if there are two do i put two sets of lines on for each ?
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.
enjoy!
@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
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.
what firmware repo are you using?
i can look a lil
odd because you'd think they'd want flow control at 921600
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
this is the argon firrmware https://github.com/particle-iot/argon-ncp-firmware
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...
I am using adafruit_sdcard, yes. This sounds similar but my code hangs consistently when trying to write 1024 bytes, or more, at once. I will create an issue there, thanks
try setting it to 128x64 - thats the display ya got, for a better look? :)
@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
total mystery to me
Scratch that - code that did not work yesterday is working today. The only difference I can think of is SDCard free % - (it was empty yesterday, now it is 100kb fuller). I will try to get more insights through debugging.
@solar whale ok i am redoin' the examples for the new style
OK -- I am burning new argon -- we'll see how it works
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
this is on external ESP32 from metrom4?
ha -- new file does still respond to AT command -- with new pin definitions -- there is hope
yeah im only on M4 + external ESP32, im gonna leave the argon to u
At least now my build matches the schematic!! -- Now I try HW flow control and see if I can run your demo
Its just done via make menuconfig
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
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
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 :/
On the ESP32 it uses IO15 but on the argon it is IO19
@marble hornet Looking good! You're making a ton of progress!
Nope, it's happening on Thursday, 27 December.
@meager fog what is the format for settings.py
It's in the pinned messages. I could send out another announcement. Might do tomorrow.
ah -- just the ssid password ?
ok thanks -- having issues with getting flow contol to work -- I think I'm confusing RTS/CTS
@solar whale it is confusing, you want to enable CTS
on the ESP32 side
and use the "CTS" pin
yeah
the RTS pin on the feather is output, CTS pin on esp32 is input
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
i just do it by experiementation :/
thats what I'm doing.. getting there.
@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...
I'll try to get the POST demo working agin tomorrow.
ALL THE PIXELS!!!!
yep. works. thanks. much better...

:) thats lovely! yes not surprsing it Just Works
i dont know we want to rename it tho..maybe we can just clarify it works for SSD1305's?
@solar whale ok i will be doing more upheavals later this week
so don't get too attached π
Agree. No rename. Just document and clarify this driver works with the SSD1305.
@kattni watcha think, any thoughts? Kind of like TMP006, but a little different. In this case there's no second driver to find a home for.
@caternuson did you make a litle etchascketch :D
yep. pots were just sitting here. had to be done. wanted to add accelo for shake-to-clear but didn't think breadboard would survive.
Giving up for tonight -- good night all π€
l88r
I'm not sure if you tried that already, but you can also remove the parts that you are not using from the CircuitPython image. I discovered that, for example, removing AnalgoIO saves a lot of space. Then HID might fit?
Oooh, I want to try this out, could you provide an example on how to do this? Can one define which defaults gets built in using a board definition?
@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/.
@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**
My though was that with an xy input (defaulted to 0) then different gfx could be made as different windows
<@&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.
@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.
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
right now just 115200 -- will try stepping it up after get a few things cleaned up
the argon-ncp-firmware not having common AT commands enrages me. entirely because the documentation says that it contains the "Basic and WiFi" commands. π
@raven canopy yeah -- it is missing some really basic ones -- UART_CUR/DEF are the real problems.
unless you're referring to the TCP/IP commands missing, then i understand that.
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.
i only use UART_CUR
@meager fog at 921600 I am getting errors --will back down a bit
in my updated code, you pass both 'default hardware' and 'desired baudrate' in
i think its best to have a known fallback
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.
@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.
921600 works fine on the metrom4 with ESP32 -- except too many counts to fit on 4 digit display π
cute, do you want to do a small writeup for learn? i could help if you're swamped, if you can make an animated gif, i can write the rest
@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
It's come a long way!!!
Iβve got some serious debugging to do π
no audioio on nrf52840 π¦ at least not in my builds
but I'll try it on the metrom4
oh yeha you'll need to remove the audioio parts, or you can put it under a if
yeehaw π
got some lights on the counter -- nice!
OK -- time to do some wrapping π be back later.
sure. we can guide if you want. wanna email me to coord w/ that?
For updating info to indicate SSD1306 driver can be used with SSD1305 displays, what needs to be done?
- update README, etc. in adafruit_ssd1306 driver?
- update these two guides?
@solar whale I think maybe you meant to post that image in pet-photos (?) π
WE ARE LIVE! LIVE Cheerlight streaming https://youtu.be/y-N2cLYQTTQ (using circuitpython!)
Multistreaming with https://restream.io/ Live stream of controlling NeoPixels with CircuitPython, FEATHER, ESP32 and more with cheerlights! https://twitter.c...
Cheerlights running on argon π
I filled a PR : https://github.com/adafruit/circuitpython/pull/1424
There is still about a dozen untranslated string where I don't know/I'm really not sur the proper french words in the context.
Feliz navidad por quien lo celebrar
Translate?
Marry Christmas to those who celebrate
Thenks
@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).
@umbral dagger I spent the morning trying out your new neotrellis tutorials! have been going through tabletopaudio stuff π
@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.
- i'll make a todo in BC for the drawing program, iz so cute :)
- readme is easy, did that, see PR!
- we have to redo all of the OLED guides to support circuitpython, i did a bunch o work on them last week so they're close! kattni'll be doing those guides and its in her BC so im gonna call this closed
@umbral dagger the demo mode was a nice touch β€
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 π
@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.
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
when i try to use the audio instructions here: https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-audio-out i get an error because it's saying A02 is already in use because I'm loading the CPX library - because I'm using it for the buttons, etc...
Make faster and easier than ever with MakeCode, code.org CSD, CircuitPython or Arduino!
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...
I think it's async but it binds the pin.
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
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
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.
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
how come when I put a white plastic (or paper) over the CPX, the lights and nummber swing from 0 to 10 pretty erratically
@tidal kiln thank you - i opened an issue, we'll see what comes of it
print(int(peak),end='') # Remapped light levels 0000000000000000000000000000000101150034215426153148411703182530362239132800302701036313603001641581119032026312924192
when I hold my phones light over it, numbers are solid, or jitter by 1
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.
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...
@tidal kiln have you ever done swd on metro m4?
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
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
are you powering it any other way?
I've tried usb power from the pi and usb power from a wall wart
gnds are connected tho
but when you're using the SWD, are you powering only via connector?
no
hmm. not sure. and been so long ago can't remember the behavior.
k thx anyway
no I'm using a pi
also, the tx light blinks when openocd is off or on
how are you making connections between pi gpio and metro swd connector?
are you able to talk to it ok otherwise? via openocd?
it might be the connections then
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
ha. that explains it at least.
yup
I gave up on the test clips
too big and finicky
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
I'd like to wait on this because it's a work in progress, given the contents of TODO.txt.
It looks like the translations for some of the other languages have been reverted to a previous version. Could you merge from adafruit/circuitpython and do make translate and then push this again?
@ladyada Could you approve this if it's OK with you for now? That will get a working Feather 52840 build into master. Thanks.
@chalei Hi, there are conflicts which are preventing a merge. Are you able to merge from adafruit/circuitpython again to bring this PR up to date? Then run make translate and double-check your file, and we should be able to merge this. Thanks!
@marble hornet how is fill_rect defined in the class?
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...
Thank you all for your thoughts and trials on this. I'll follow up in the near future but am deep in Bluetooth at the moment. The soft interrupts idea and the simplified event loop / async / await stuff is very interesting. I think we can make some progress on this.
Thanks @dhalbert for updating, I am gonna try to merge this and continue the translation later this week
Some other translation PR's are showing lots of changes because these files are not up to date.
PR review request is OR of reviewers. Thanks.
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.
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
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)
...
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...
It's from another classπ€¦ββοΈ
@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.
@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
Updated french translation.
Thanks you for your help and advice.
It seems to work. I can compile firmware that I was not able to.
@solar whale heya to replicate the nrf52840 issue
can you use an esp8266? or just the '32?
I think the ep8266 is best for reproducing it.
@solar whale ok cool
whats the easiest way to repro?
@gentle bronze is loadin' up the esp now
and can test tomorrow
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.
I will post some clearer steps to the issue later today.
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
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 .
yeah we wont be supporting esp at all from 4 onwards
@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
people can use micropy or this co-proc
@umbral dagger hey lookin at your guide, do you need noe's guide live first?
@meager fog That was my thought. Itβs revisiting the code from Noeβs guide.
@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...
@meager fog Cool. Once I have the final 3Ds, the LIDAR guide is a few photos away from completion.
does code need to be 100% lint free to pass?
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
@solar whale heya can the argon repro the bug too? or just esp8266?
I hope that it will be OK now.
thanks @jerryneedell , I have the huzzah esp8266 breakout, I am new to this, and didn't know that. Just able to get it up and running as co-processor. Did it the reason why I couldn't run the simpletest example, I couldn't see any replies from the esp8266
code.py output:
ESP AT commands
Resetting ESP module ...
Unneeded, #1426 did the same work.
@marble hornet Yes.
Okay, thank you
It says the class has too many params. Is there a bypass for that?
@marble hornet The bypass is always provided in the linting failure message shown in parentheses. So # pylint: disable=pylint-failure-message
Thank you
Side note, in the event that you need to disable more than one thing it's # pylint: disable=foo-message,bar-messageetc.
ππtnx
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
You're not disabling it in the right place
okay... under class def?
There or under init, I'm not sure, but tabbed over within the object that's giving you the error
I had learned a lot doing this. It is quite different to work on big project like CircuitPython compared to my small projects.
under init worked, not under class def tho. thank you
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.
it wasn;t that;s not my handywork π€·
Ah ok
Leave it then.
You're already rocking it hard, I'm not going to ask you to troubleshoot someone else's decisions π
Can I ask for some mPY help here?
we can help with circuitpython, micropython perhaps not
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'
what board is this one?
esp8266
whatcha running on it?