#circuitpython-dev
1 messages · Page 220 of 1
yeah, for that you'll need to ask in the micropython support forums
we've never used what you're doing 😃
do you have any idea? maybe something like this happens with cPY?
some change in their API, but we have no idea what it could be
thanks.
we've never used that code - the microphython folks will be able to help you for sure!
Super late the the party here, but I would have been in support of a rename. I don't think it would have caused too much trouble at this point in the game. This works too! Thanks for working through this!
Good afternoon. I recently got a circuit playground express and one thing I'd like to do is use it to update my data acquisition prototype. I was using pyserial to pull data from an arduino and write it to a csv. I'd like to do the same with my cpx. Right now I just have it printing (to console) the temperature and light readings. Is there a simple way to get those readings saved to a file? I've updated my pyserial script to read from the cpx com port.
ahg, @idle owl it came back
pylint: disable=too-many-arguments,disable=too-many-attributes
Only the message after the comma
# pylint: disable=too-many-arguments,too-many-attributes
👍 works
so does anyone care to browse over my code and see let me know if they think it would run on a neotrellis m4?
but it doesn;t like the line that is doing the disabling
gfx.py:71:0: E0012: Bad option value 'too-many-attributes' (bad-option-value)
What version of pylint are you using? Are you still linting locally?
Because typically I see that if I lint locally with a different version than remotely and some checks aren't in both versions of pylint.
@marble hornet Do pylint --version
@misty wolf If I understand what you are doing, I think the same code - I would recommend putting it on github so we can take a peek
@marble hornet Ok, hold on, you should be running 1.9.2. Try running pip install --force-reinstall pylint==1.9.2
That's what we're using because it will be an overhaul to update to 2.2.2. And we're not ready for that yet.
hmmm same errors though
Ok. To clarify, if you remove too-many-attributes it gives you that error? But if you add it, it says "bad option"?
Did you spell it exactly right?
R: 46, 0: Too many instance attributes (10/7) (too-many-instance-attributes) if i have # pylint: disable=too-many-arguments
You didn't type it correctly.
It's not too-many-attributes.
It's too-many-instance-attributes.
That's gotten me before 😃
@teal bear will do, I don't use github often, is there a particular place/forum/subthread I need to post it? Thank you for your help
So if you type it incorrectly, it is not a valid option, and will give you that error.
okay, i switched it back to under class and spelled it correctly. thank you
Yep!
okay i;m down to one last one !!
an import error for the font, yet it is working fine since i'm editing right on an m4
i have the adabox 10 and i put the christmas soundboard on there and then it booted up said the merry christmas then everything stopped working pls help
@marble hornet Paste to me what your results are from the linter
E: 94,16: Unable to import 'adafruit_gfx.fonts.gfx_standard_font_01' (import-error)
------------------------------------------------------------------
Your code has been rated at 9.82/10 (previous run: 9.75/10, +0.07)
Ok, I want you to push to GitHub. It may be a local issue.
Because CircuitPython is a bit odd in that the libs aren't necessarily available to your computer because they're located on a board when CP is actually running.
So sometimes remotely it works fine. If it doesn't, we'll sort it.
@misty wolf if you are going to write code (like you are) you should get an account somewhere that you can check your code into. (like github) If you have an account, use it.
@teal bear will do, thank you very much. I'll post it shortly.
@meager fog finally getting around to updating the guide for the miniesptool -- I uploaded the newer particle argon esp32 files and put in a PR to the miniesptool library for the example script. I assume you wasnt me to add a section to the guide for uploading the ESP32 AT Firmware to a Feather Huzzah ESP32 via USB -- Il'll try to get that in tomorrow.
@solar whale i think im confused by your PR 😃
why would u use an esp8266 with argon? :/
I just meant to update miniiesptool_esp32multifile.py so the checksums are correct for the new zip file I put in the guide
do you want a different name than miniesptool_esp32multifile.py?
i think maybe make an esp32argon
keep the current example as is? cause the esp32 argon build is 'special'?
like, a new example
Ok - so leave the miniesptool_esp32mutlifile.py as is -- but there is no .zip that will work with it
np just upload it to the guide
I upladed the new argon .zip -- what .zip shold the miniesptool_esp32multifile point to?
the new .zip will work with a new miniesptool_esp32argon.py
the only other esp32 build I have is the full AT firmware build for loading via USB, not via miniesptool.
sorry if I confused things
the miniesptool will point to a version for the m4
just keep it as is
make a new example for argon
ok - but we don't now have an external esp32 load for the M4 that uses miniesptool. and for the feather huzzah ESP32 -- USB is a lot simpler since the pins for uplooad are not available.
the miniesptool load for the esp8266 is fine
@meager fog my PR remove miniesptool_esp32multifile.py -- do you want me to restore it
@solar whale the current example is for m4, we'll adjust it if necessary - make a new example for argon
and it can have the crc32 for the argon build
dont worry about m4 - its a idfferent crc set anyways
OK -- new example is in the PR -- I'll update the pr to restore the old example
@meager fog sorry about all that confusion -- I'll work on the guide tomorrow.
all good 😃 no biggie
https://gist.github.com/internetfan420/dd5b991094451ae72c46877b7fad5b7d if anyone has some time to give it a look. just trying to have a sequencer with individual 32 wav files.
@marble hornet All good! Life comes first!
Agreed
cpx.pixels[0:5] = [(255, 0, 0)] * 5
ValueError: need more than 2 values to unpack
wut?
never mind
looking at the wrong code.py
Oops 😃
What's the recommended dev environment for CircuitPython (C code) these days? VS Code with custom path setups?
(It's been a while)
@ruby atlas not sure what you mean - I use emacs, Scott uses vi. We don't use an IDE.
hey @tulip sleet, someone was looking for a Feather M4 eraser UF2 earlier today. I couldn't find it. Is it the same as the Metro?
Not necessarily. Could be different pins. I'm not sure we have one built.
ok, I wasn't sure whether the erasers just zeroed everything or are they stock firmware?
did they want to clear the internal flash or the SPI flash chip?
I'm not sure, whichever would help them.
"
I kind of bricked my Feather M4 for CircuitPython, whenever I flash any circuitpython version it doesn't boot anymore and I cant get into the REPL to format the flash. Going into bootloader and flashing Arduino sketches works fine
I think this happens after I tried to write a new library to it and ejected it as it didn't start the file transfer for some reason, after that it never came back up as the cpy drive
any ideas maybe? :/
I need some way to erase the flash without using cpy"
sorry for the ping
@tulip sleet I've used CLion,VS Code, and Sublime Text while working on Circuit Python code. Because of the dynamic build environment, none is really able to provide great autocomplete. I did get VS Code to behave somewhat OK by mucking around with include paths and defines. 😃
@ruby atlas I just use emacs abbrev mode, which does autocomplete based on the currently open buffers.
certainly not perfect
😃 I don't think we can really expect perfect with the number of targets and conditional compiles.
@exotic pumice the latest alpha.5 has a special way of getting into safe mode: it illuminates the RGB LED yellow for 700 ms and if you click the reset during that time, it will restart and go into safe mode. It's basically a "slow" double-click.
I'm thinking you may have a main.py that is crashing
thanks dan
@exotic pumice I'm not sure I'm actually getting this to work, but the code is in there :/
@jerryneedell I just erase_flash and write the AT firmware bin, now esp8266 blink blue led very fast and output a lot to terminal, but it is non-readable, I have tried to connect with FTDI cable with both 115200 and 9600.
@hathach
That happened to me once as well. Try reflashing...
I have tried erase_flash, and wrte_flash several times. I did try flash circuitpython on it previously. Hopefully this doesn't break anything. I am trying to solder the 2nd breakout now to see if it works.
Flashing CP should not cause a problem. Try flashing at a different lower baud rate.
-b 115200
Or
-b 460800
Also, if you have an M4 board, you can try the miniesptool option in the guide to program it via the m4.
It won’t work via the nRF52840 since the reset issue causes a problem.
uploading with 115200 still has the same fast blue led blinking on the 2nd breakout.
uploading with 9600 is timed out :(
s$ esptool.py -c esp8266 -p /dev/ttyUSB0 -b 9600 write_flash 0x0 AT_firmware_1.6.2.0.bin
esptool.py v2.5.1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP8266EX
Features: WiFi
MAC: dc:4f:22:21:5f:4d
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 712704 bytes to 406315...
Writing...
If you can, try programming it via an M4. That has worked well for me. https://learn.adafruit.com/adding-a-wifi-co-processor-to-circuitpython-esp8266-esp32/firmware-upload
Note I just upload the .bin file and miniesptool_edp8266program.py to the m4 then at the REPL
import miniesptool_esp8266program
Rather than naming it code.py
It should worteither way.
@gentle bronze sorry it has been so difficult to get the ESP8266 programed. The same problem happened to me the first time I tried it but I don’t recall what eventually got around it. I have successfully loaded the AT firmware to a few ESP8266 breakouts via an feather M4 with miniesptool. I need to get some sleep now. I’ll try to reproduce this tomorrow.
@solar whale please get some sleep, i have just finished lunch, I will try to use m4 to program esp breakout, not sure why ftdi program failed. No worries
I am new to esp, I may not do things properly, happen all the times :)
Thank you very much for your help. Good night
You are very welcome!
have tried to write the AT firmware with M4, but still the esp8266 keep fast blink blue LED
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
ESP8266 mini prog
Resetting
Synced
ESP8266EX
MAC ADDR: ['0xdc', '0x4f', '0x22', '0x20', '0xf7', '0xb0']
Writing AT_firmware_1.6.2.0.bin w/filesize: 712704
Erase size 647168, num_blocks 696, size 1024, offset 0x0000
Took 1.67s to erase 696 flash blocks
Writing at 0x00000000... (0 %)Wr...
@gentle bronze very strange. Have you tried flashing Circuit Python onto it again just to see if that works?
@gentle bronze ah -- I have reprduced the ESP8266 blinking blue failure -- now to see if I can get out of it!
@gentle bronze yes -- success -- I will post the details to the issue -- basically -- I pre loaded CP to the ESP8266 then flased AT _Firmware without erasing (used FTDI cable) -- It now works.
@hathach I was able to reproduce and workaround this issue.
I found that when using the FTDI cable to flash the ESP8266, it failed if I erased the ESP8266 first!
I then flashed CP to the ESP8266 and then retried flashing the AT_Firmware without erasing and it worked.
I also found that if I was in the failed state, just reflashing the AT_firmware did not work. I had to load CP in between (possible something other than CP could be used but I did not try)
So -- basically -- don't erase the...
I also tried erasing the ESP8266 using y FTDI calble then loading the ATFirmware via miniesptool and a feather m4 and the load failed as before ( flashing blue light)
I then used minesptool to flash a CP image to the ESP8266 - after flashing the ESP8266 still showed the rapidly blinking blue light.
I then repeated the load of the AT Firmware via miniesptool and this load was successful
Interesting.... but there does appear to be a reliable workaround.
Note: it is very reproducible to c...
@ladyada - just a thought - is it possible that the AT_Firmware_1.6.2.0.bin file is missing a necessary component that is loaded when CP is flashed first but is not there if the chip is erased? I'm still a bit fuzzy about what has to go into the flash build for the At firmware combined file
@gentle bronze np -- good luck -- just load CP then reload AT...
that did the trick, I need to do it twice to get it running :)
@solar whale it did the trick, I see the ready mess now when reset
hmm but it does response with AT command manually entered with minicom
@gentle bronze yay! -- It wont work wit minicom -- try miniterm.py
that is weird 😄
it is very fussy about the End of Line and I cant get screen or minicomto work
or try hooking it up and us the small test program to talk to it.
ah, thanks for the tip, hooking up with your cpython script to test with.
once connected yo ushould get something like this ```Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-alpha.5-29-gbce6d124a on 2018-12-21; Particle Xenon with nRF52840
import esp8266comm
AT
b'AT\r\n'
b'\r\n'
b'OK\r\n'
b''
AT+GMR
b'AT+GMR\r\n'
b'AT version:1.6.2.0(Apr 13 2018 11:10:59)\r\n'
b'SDK version:2.2.1(6ab97e9)\r\n'
b'compile time:Jun 7 2018 19:34:26\r\n'
b'Bin version(Wroom 02):1.6.2\r\n'
b'OK\r\n'
b''
I name the script esp8266comm.py
the lines with "b' ... are responses
name this script right
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```
right
Do you have a recent version of CP on your board -- 4.0.0-alpha5?
the script is written for the updated busio.UART in alpha5
ok it work, i have to change your script a bit to get it work with minicom, too lazy to change to other terminal 😄 uart.write(bytes(data+"\r\n",'utf-8'))
finally, we could troubleshoot the real issue 😄
great -- I can trigger the failure on the nrf5284 eitehr by pressing the RESET on the esp8266 or by sending the "AT+RST" command for AT+RST you get a fluury of responses, but then it does not repond any more -- Control-D will clear it . On the M4 -- these do not cause it to hang.
ah yeah, I saw this as well
I did find that if I manully configure the uart in the REPL, I can clear the "hang" by deinit() then re-initialize the uart.
sounds like an currupted state issue with uart io
see -- you have almost fixed it already 😉
@idle owl is the CP meeting today at 2PM EST?
hopefully so 😄
framebuf is no longer needed as abuiltin.
I think there was jsut a typo in the mpconfigboard.mk for the particle ARGON using SPI instead of QSPI.
It works either way. but the XENON and BORON builds use QSPI.
@gentle bronze good luck. I have to go offline for awhile. Let me know if you need anything else to help troubleshoot.
@solar whale thanks a lot, no worries, I wilk try to fix this asap
@idle owl pushed!
and good morning !
it's running through travis
👀
no, the text dict part didn;t pass
okay i fixed the 5/10 (two lines ) and now all the code checks out as 10/10
but travis still says the code fails
oh
/home/travis/build/adafruit/Adafruit_CircuitPython_GFX/adafruit_gfx/fonts/gfx_standard_font_01.py:docstring of adafruit_gfx.fonts.gfx_standard_font_01:7:Bullet list ends without a blank line; unexpected unindent.
The command "cd docs && sphinx-build -E -W -b html . _build/html && cd .." exited with 2.```
@solar whale Yep 2PM ET
<@&356864093652516868> Happy holidays! The CircuitPython Weekly meeting is today at 2pm ET.
I better set an alarm so I remember 😃
@marble hornet That's Sphinx failing now. I can help with that later if it's still giving you trouble.
Thank you @idle owl did it jus fail again? (I'll check
Yes,) I would love some help later
Please
@marble hornet i think you just need to add a blank line after this line:
https://github.com/adafruit/Adafruit_CircuitPython_GFX/pull/6/files#diff-9ad1ea72b2a68905febc26c5c65b424bR28
trying
it's building, thanks!
i'll post if doesn't work
/home/travis/build/adafruit/Adafruit_CircuitPython_GFX/adafruit_gfx/fonts/gfx_standard_font_01.py:docstring of adafruit_gfx.fonts.gfx_standard_font_01:26:Inline emphasis start-string without end-string.
The command "cd docs && sphinx-build -E -W -b html . _build/html && cd .." exited with 2.```
@tidal kiln it failed
what sequence of characters starts an emphasis?
Done : https://github.com/adafruit/circuitpython/pull/1426
There is still a dozen of untranslated strings (~2%)...
the docstrings use restructured text syntax, and i'm no expert on rst 😦
i think it's *emphasis*
looks like maybe you have *emphasis, so are missing the closing *
here:
https://github.com/adafruit/Adafruit_CircuitPython_GFX/pull/6/files#diff-9ad1ea72b2a68905febc26c5c65b424bR40
and here:
https://github.com/adafruit/Adafruit_CircuitPython_GFX/pull/6/files#diff-9ad1ea72b2a68905febc26c5c65b424bR50
if you meant for those to be bullet list entries, then need a space: * list item
root cause is the frame error, stop bit is not valid, data is literally garbage. Reading datasheet for nice way to recover :D
also, fyi, the line number is in the error message:
/home/travis/build/adafruit/Adafruit_CircuitPython_GFX/adafruit_gfx/fonts/gfx_standard_font_01.py:docstring of adafruit_gfx.fonts.gfx_standard_font_01:26:Inline emphasis start-string without end-string.
so in this case 26
but the count is relative to the start of the docstring, so it's not the actual line number in the file, which is...fun.
/home/travis/build/adafruit/Adafruit_CircuitPython_GFX/adafruit_gfx/fonts/gfx_standard_font_01.py:docstring of adafruit_gfx.fonts.gfx_standard_font_01:21:Block quote ends without a blank line; unexpected unindent.
The command "cd docs && sphinx-build -E -W -b html . _build/html && cd .." exited with 2.```
line 21
count is relative to docstring. not file.
oh
line 23 = line 1
It says "block quote ends without a blank line". Seems like an easy enough fix.
@meager fog Let me know if you need more information about the issues with the AT_Firmware_1.6.2.0.bin file that @gentle bronze and I worked through this morning - Could it be an issue with the file?--- Can you tell me how the file was built - I can try to reproduce it and see if there is an issue with it. see the end of https://github.com/adafruit/circuitpython/issues/1407#issuecomment-450191714
thank you
@solar whale i made it by burning in that version ESP8266 firmware piecemeal, then pulling it out as one big file
w/esptool.py
Hmm -- then it should be OK --- not sure what is going on.
I'll poke at it some more
Sphinx is never easy.
Hmmm. I either need a callback or to have pixelbuf.c call a python subclass method (if it exists) so that subclasses of RGBLED can implement auto_write. I wonder how hard that will be or if there's any examples of calling a non-C method in a subclass.
@marble hornet this might help:
http://rst.ninjs.org/#
you can use that to work out the RST. i pasted in the docstring from your latest PR and it gives the same error message. so you can edit the RST there until it's error free and then paste back into your code.
@tidal kiln @marble hornet I can help later today. I've gone through most of the errors you're going to see myself and have a good idea on what needs to be done to resolve them. Sphinx is picky and difficult.
I will have meetings until late afternoon at least, likely.
RST = restructured text
that site let's you put RST markup on the left hand side and see the resulting output on the right hand side
Warning, treated as error:
/home/travis/build/adafruit/Adafruit_CircuitPython_GFX/adafruit_gfx/gfx.py:docstring of adafruit_gfx.gfx:1:'any' reference target not found: adafruit_gfx
The command "cd docs && sphinx-build -E -W -b html . _build/html && cd .." exited with 2.
so line 1?
and thank you, i'll paste it in
or wait til @idle owl can help 😃
@marble hornet I mentioned in my last review comment that you'll need to update docs/api.rst. it's because the files are now in /adafruit_gfx/.
.. automodule:: adafruit_gfx.gfx should work.
.. If you created a package, create one automodule per module in the package.
.. If your library file(s) are nested in a directory (e.g. /adafruit_foo/foo.py)
.. use this format as the module name: "adafruit_foo.foo"
.. automodule:: adafruit_gfx.gfx
:members:
.. automodule:: adafruit_gfx.fonts.gfx_standard_font_01
:members:
i used teh rgb lib as a template
<@&356864093652516868> The notes for today's meeting are here: https://docs.google.com/document/d/1-5GG_bcOYDYpMDeJYoh03fGFLXfnMPItDSfbVZUBt_I/edit?usp=sharing
Ahh. I think I see it. Change gfx.py line 23 to just gfx. It needs to match the file name
When I made the comment before, I didn't realize the filename change.
line 23 of?
oh
building
wooooo hooooo it worked!
thank you @idle owl @raven canopy @tidal kiln
@idle owl once it is merged should i add a line or two to the examples?
soooooooo green.
yes!!!!!!
well....still one more gauntlet to get through - the code review
some of that has already been happening
but usually, it doesn't happen until travis is green
looks like that repo hasn't been added to the CP team, so can't add CP library peeps as reviewers - that's generally what would be done at this point
i think it is still in beta rn so kattni is the leader, i think.
yah. i'm just gonna defer to her.
There will be more changes as I change and add to bleio, so feel free to take a break for now, until more code is added.
Okay
<@&356864093652516868> Updated notes permissions, sorry! Should be able to edit now.
It's my plan.
Althought, I will talk to other people at the fablab about bluetooth vocabulary in january. I never used bluetooth so I'm not very confident about this part of the translation.
Ladyada most likely. We have meetings right now 😃
There's a lot going on today, so it might be a bit
root cause is the frame error, stop bit is not valid (not data overflow as suspected), data is literally garbage. Solution is just ignore the garbage data and keep receiving.
@solar whale I submit a PR that fix the esp issue, please check it out whenever you have time.
@gentle bronze looks good on particle_xenon! -- testing argon next - Thanks
Hi There, I'm just dipping my toe into CircuitPython with an Arduino MKRZERO to start with - I understand this is a supported board but can't find any of the correct files on Github - can anyone point me in the right direction please? Thanks.
@hardy horizon MKRZERO was added to our 4.0-alpha builds after alpha.5. It should work pretty well - the alpha-level features are mostly for the nRF chips. Download an appropriate uf2 for the language you want from here: https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/arduino_mkrzero/ . Those get built on every accepted PR. alpha.6 will include a more "official" mkrzero alpha
@tulip sleet Thanks for the quick respone - I've found the file 😃 Will head off and get it loaded - thanks for your help.
I'll just be listening today... :(... busy building in-world... thought I would be done.
<@&356864093652516868> Meeting in a few minutes! Everyone is welcome 😃
Which channel?
CircuitPython channel
Cp general?
on the left, under Voice
welcome!
!
hello everyone!
👋
Hi all👋
@inland tusk please mute
@inland tusk mute
Just lurkking
@inland tusk we can hear crunchy noises, so please mute your mic
@tulip sleet Thanks for your help locating the MKRZERO uf2 file - fantastic..... now I'm affraid that I seem to be stuck finding the INO bootloader update file for this board? Thanks for any help.
click the mute (mic with red slash button) at the bottom of the left sidebar
Since last meeting?
Last 7 days, I believe.
@hardy horizon we don't have uf2 bootloaders for the MKR boards, but you can use bossac to upload a .bin. Sorry, we didn't build .bin files, but I can make one later. We're having a mtg right now
gratz Scott & family
@hardy horizon @tulip sleet we have a guide on mkrzero here https://learn.adafruit.com/installing-circuitpython-on-samd21-boards/installing-the-uf2-bootloader
😅😁 my pleasure
hug report to @idle owl for many pypi!
@solar whale for wifi project pair-coding and testing
@tulip sleet Thanks for that, a BIN file for BOSSAC would be great when you get some down time - I will also check out ladyada's link - thanks @meager fog
@umbral dagger for helping noe & pedro with their ball drop project
and a group-hug for 2018...what a year! that's my hugz!
@hardy horizon @meager fog @tulip sleet It looks like the last uf2 release was on Nov 2. Even though the mkrzero port is in there, we need an official release for the .ino file to show up in releases. Until that happens, you'll have to build the uf2 project to get it.
👍
@hardy horizon If you message me your email, I can send you the .ino file directly.
Come back to me...
hug report to @solar whale for continued testing of the TinyLoRa library, specifically in assisting me work
through a recent (and confusing) PR, @ tannewt for wedding!, and to to those doing on the gfx work for 4.0, group hug for #circuitpython-dev!
Sorry. :(
sorry if i made noise, trying to get my mic working 😄
At least your system didn't spontaneously kernel panic (and I was attempting to be a backup recording!).
🍪 ✂
will the new framefuf/graphic stuff work on the mini-TFT featherwing?
ooh, i should order me some hardware to mess with the wifi stuff!
socket() and connect() and listen() are my friends. they make the internet work.
@ruby atlas ooooooooh
It is really easy post data to Adafruit IO feeds now!
I have a bunch of M4s (Feather, Metro, 3x Trellis M4 - though 2 are the kids) and thought I had an ESP32 of some kind somewhere, but it might only be ESP8266 boards.
ESP8266 can work...but its not great
Last Week:
- Library README updates for the Travis badge.
This Week:
- Unsure, and open to suggestion! Maybe I should re-attack FrequencyIn; 4 months seems long enough to ignore something. 😄
Yeah, not enough memory/flash.
SSL causes it to fall over
Tried... 😄
and almost everything now has strict TLS 1.2 req's
Oof. Paste fail, to boot. 🤦
Yeah, so really not a great option. I'll dig through my boxes and piles one more time.
kk good news is you can get ESP32 boards like...everywhere. and you can use nearly any of them
just make sure 'RX' 'TX' and 'GPIO15' is exposed
@meager fog who are you talking to?
Ha, I can get the Huzzah32 from a local store that lets me pickup same day. Would that be a good option?
@marble hornet you mean in this chat? i'm chattin' with Roy about ESP32 😃
@ruby atlas huzzah32 is a lil chunky but works well, i actually dont see anythong other than https://www.amazon.ca/Grid-Connect-Starter-Mongoose-Powered/dp/B07562GY9G
yeah, that's the only one i saw too, but i'd prefer to use the same module as you for now.
ok cool - lemme know when you're doin' stuff
I could also use a Pi 3 B+ to upgrade my Octoprint server. 😃
the socket stuff isnt quite done yet but will be soooon
... the "classic MIDI" interface for Stemma. The last project item on my Stemma obsession list.
@meager fog are you referring to https://www.amazon.ca/TCP-IP-Illustrated-1-Protocols/dp/0201633469 😃
me neither. i don't know what past employer it remained at.
Cp vs mp?
@idle owl yay thanks 😃
@ruby atlas adafruit reminded me - if you wanna pick up a Particle Argon, its all-in-one
Will do on my next order from the adafruit store 😃
Which likely won't be long, because I want to adjust my Trellis M4 OpenSCAD design to support huge grids 😃
Another note re: dropped platforms. Older versions are stable and available.
yep we'll say "hey you can use 3.x forever, but its not supported"
Bye All, good luck
later tg!
👋
informed comments on m4 "DSP" instructions: https://forums.adafruit.com/viewtopic.php?f=63&t=143532
oof - sometimes i can't hear others, sorry if i talked over others 😃
adding a "big" math package would make a nice "learn to program" project for 2019 😉
Thanks everyone!! 2019, Year of the Blinka? I say yes, let's make it happen!
👋
👋
👋
Thanks! Happy New Year!
😬
@meager fog I'll pick up a Particle and ESP32 module today, I want to assist testing circuitpython w/WiFi coprocessors
@prime flower yeh grab one from stock
Phone..
@inland tusk It was great that you could make it today, but next time you're lurking, please mute your mic, you were making crunchy noises for the whole meeting. Thanks!
@prime flower we should be able to REST into any service
Worked two weeks ago. 🤷
@idle owl I can chat cookie+pypi starting Saturday at the latest.
@raven canopy Alright thanks, ping me whenever.
I'm dropping out. Power outage is bleeding my cell data. 😄 👋
@raven canopy 👋
@marble hornet Do you want to be added to CircuitPython Helpers? You'll be purple and get tagged when we have announcements and so on.
>>> import neopixel, board
>>> strip=neopixel.NeoPixel(board.D6, 32)
>>> strip[0] = (32,32,0, 0)
>>> strip[1] = (32,32,0, 0)
>>> strip[2] = (32,32,0, 0)
>>> strip.show()
>>> strip[2] = (32, 32, 32, 0)
>>> strip.show()
>>> strip[0:32] = ((32, 32, 32, 0),) * 32
>>> strip.show()
from pixelbuf import RGB, GRB, RGBW, GRBW
except ImportError:
from pypixelbuf import RGB, GRB, RGBW, GRBW
class Neopixel(RGBLED)
@idle owl yes please
@marble hornet Welcome 😃
welcome to "team purple" 😉 altho you were kinda here already 😮
@hardy horizon MKRZERO update-bootloader-mkrzero*.* files are now in https://github.com/adafruit/uf2-samdx1/releases/tag/v2.0.0-adafruit.8. Look toward the end of the list. (I made a new release that includes that new board.)
Errands so I couldn’t even follow along this week. Hugs to everyone for contributing to 2018 being quite likely the best year of my career so far. Certainly the most enjoyable.
@ladyada Later on after today's call a number of us got stuck in a loop about the best way to name and release the pixelbuf work. It was felt that you would have preferences as to what approach to take.
Option 1 is to have a new set of libraries that don't try to be backwards compatible with neopixel.py and adafruit_dotstar.py instead focussing on an API that is mostly compatible but designed for speed.
Option 2 is to do everything possible to make it completely backwards compatible, s...
There are so many cool examples for the Trellis M4, but unfortunately a good number of them depend on Arduino libraries. Having FFT support of some kind in CircuitPython (M4 only) would really rock so we can do some form of streaming audio visualization on M4 boards from CircuitPython directly. I'm sure there's plenty of other applications too.
@tulip sleet Thanks for compiling and uploading the MKRZERO files - much appreciated. I will begin to experiment - sounds like MU support is something to follow?
@hardy horizon the next version of mu will take any board with the Adafuit USB VID (vendor ID), 0x239a. The UF2 bootloader for MKRZERO id's as 0x239a/0x0035. In the meantime, you can add that board to the adafruit.py file that's somewhere in the Mu installation
@tulip sleet Thanks again, I've added 0x239a,0x0035 as a board ID to adafruit.py but no joy yet - I suspect I will get this working in the morning as its getting later here now. Cheers.
@idle owl This was my first time using the app on my phone and I did not find the mute switch until almost the end of the meeting . Sorry that won't happen again.
@tulip sleet I tell a lie - I can now save and load via MU but for some reason the Serial port won't open - I guess that's another issue.
So what's the difference between displayio and gfx? (Besides c vs python level? )
How do I strip first 3 and last 2 of a return, if i don't know what characters they will be?
@upbeat plover carriage return is b'\r' line feed is b'\n'
@upbeat plover you can use str.strip(b'\r\n')
that is if x is a string x.strip(b'\r\n')
sorry, it took me a bit to get there but I think it's right now
now optimized, I wasn't sure if that would work or wrap
how do i do that for a text string
@upbeat plover sorry -- misunderstood -- ignore my comments
strings are just lists/arrays of characters
yourstring[3:-2]
afaik
or maybe they're not but they're indexed the same
yeah, the strip function is kind of confusing, it strips every occurernce of the characters you pass it
anyone have FRAM and want to test this? the storing of strings and read of strings, and some other stuff
I have an issue with FRAM when I have other I2C stuff connected, it cant find the FRAM is this normal?
When I have si7021 and FRAM connected, si7021 works find but FRAM is unable to connect.
should work. how is everything wired together?
we use the neopixel library a lot, so if we can at least have a transitionary period where it uses either pixelbuf or the built in pixel manager, with a try/import/except attempt, that would be best.
lets chat with @tannewt when he's back since there's a lot of API changes and it looks like he was part of the discussion. maybe next thursday Jan 3rd meeting if eveyone's around :)
@tidal kiln its working now... idk what happen before
the magical passage of time
if it happens again, respond back. something like that may happen for reasons©.
aaah! didn't realise today was the cp meeting 😄
be-lated hug reports to @meager fog @solar whale for help with ESP+M4 stuff, along with the refresh of the display related updates, i've been pulling out some displays and esp's to try out over the holidays. thank you! 😃
@umbral dagger for all the awesome M4 Neotrellis tutorials, I had fun playing the memory game! (great demo mode!!) and flappy bird, gaming on a neotrellis m4 = ❤
@tulip sleet ty for reviewing my pull request on the Tagalog translation! Hopefully can bring in some Pythonistas from the Philippines to help improve on the translation for next year :), also for being kind and patient during my times of need here on discord!
@tidal kiln for helping me out with the AS726x stuff and creating subclasses for the library 🙇🏼
@slender iron for SPI flash related support throughout 2018 😂 Congratulations and enjoy Iceland!!!
@pastel panther @exotic pumice @raven canopy @marble hornet @idle owl @opal elk @stuck elbow for helping me out in 2018, thank you!
- general hug to everyone I may have forgotten
@tawny creek Thanks for the belated hug reports!
I got swd working on my metro m4 😃
Some tricky soldering to the pins holding the connector on later
and a bit of melted plastic
now I just gotta get arm-none-eabi-gdb onto my pi somehow
or figure out why I can't access the port through my LAN
did you solder on the metro side?
@tidal kiln not sure what you mean exactly, I soldered on the top of the board, on the outside of the connector
you can use ribbon cables
I don't have a way to go from the 0.05" connector to 0.1" raspberry pi
I had an swd breakout but I broke it
reordered
yup
and rings a bell. we were talking about this already...
I'm just impatient
all good. just wanted to make sure you knew there were solderless options.
yes, thanks
@marble hornet None! It's simply for the purpose of being notified about important CircuitPython things. You're part of the CircuitPython community so you're a member.
😁😁
@marble hornet actually, mild resp. in the future, you must help others climb the linting ladder, since you're a pro now.
hey. me too.
Patience, young padawan.
I don't like sand
Learning Sphinx comes from fighting with Sphinx failures. Eventually you have the same thing fail enough times that you remember what it takes to fix it.
cough cough classes?
And then the next step after that is remembering to preempt the failures. Which takes even more time.
That's how it went for me 😄
Hi all - hope you're having a great holiday season
I'm trying to finish up a guide (my first!) and am having serial problems w/Linux
@tulip sleet tried to help on this a while ago and neither of us found a solution.
I've got CP on a Trinket M0 connected to a rPi 3B+ via USB. I'm trying to send data via serial to the device.
It totally works when I connect via minicom - I can type the commands and it just works.
But I'd like to script this, so I'd like a way to send the commands from the command line.
I try
echo -ne "\n\nred\n\n" > /dev/ttyACM0
And the trinket stops like it received input, but never acts on it.
It's like it isn't returning from input()
So I've tried everything I can to send different line endings
I've played with hardware flow control.. I cannot figure this one out.
Any thoughts?
@tough flax I'd probably try something like this https://pyserial.readthedocs.io/en/latest/shortintro.html
minicom running on pi also?
Yes @tidal kiln (looking @exotic pumice )
abstracts away the details of the protocol that are probably missing when you just echo to the device
Ah - you're suggesting using python on the Pi as well?
yeah
it would require them to install pySerial module
might be a good fallback
hard to believe it's this hard to send a string to a TTY
Weirdly, the string "red", "green" IS sent to the Trinket... if I then connect via Minicom and hit enter it takes effect
i wonder if you might need to do some stty on it to have echo work as expected
Yes, that's what @tulip sleet and I were trying - here's the output of stty:
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 5;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread clocal crtscts
ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl -echoke -flusho -extproc
stty is VERY old braincells
yah, i'm no pro
eol = <undef> that's interesting
yes, and then there's eol2
echo 'green' > /dev/ttyACM0
cat < /dev/ttyACM0
reen
It didn't take the "\n" but did without the quotes (no difference)
what's running on the Trinket? simple loopback?
My HandRaiser code https://github.com/ATMakersOrg/Little-HandRaiser
It checks for input on USB, then reads the line & processes it
So, this works...
socat -t0 STDIO,raw,echo=0,escape=0x03 file:/dev/ttyACM0,b9600,cs8,parenb=0,cstopb=0,clocal=0,raw,echo=0,setlk,flock-ex-nb,nonblock=1
green
yellow
red
@wheel
I got it from this tips page (working my way through lots of notes) http://rdiez.shoutwiki.com/wiki/Serial_Port_Tips_for_Linux
Built-in serial ports tend to get the same device filename everytime, like /dev/ttyS0 for the first one, /dev/ttyS1 for the second one, and so on.
well...let me fire up a trinket and a pi....you running 3.1.1 on the trinket?
No, 3.x as of two weeks ago?
😃
It's not picky though - the input() code hasn't changed
oh wait. there's a UF2 in the repo - so just use that? copy to TRINKETBOOT?
yep
didn't work. is this the code?
https://github.com/ATMakersOrg/Little-HandRaiser/blob/master/src/main.py
@meager fog I have the Huzzah32 (3591) but won't get much time to look till after 9pm. Any getting started pointers?
I'll push my latest just in case
You've got the latest now
I didn't build a new UF2
@tulip sleet yeah it's not working quite right. Some things work, but many do not and I get random crashes from time to time 😃
that's alright, i can just grab from main.py
but looks like i need 4.x:
AttributeError: 'Runtime' object has no attribute 'serial_bytes_available'
No, the latest 3.x has it too
Adafruit CircuitPython 3.1.1 on 2018-11-02; Adafruit Trinket M0 with samd21e18
>>>
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
main.py output:
Traceback (most recent call last):
File "main.py", line 90, in <module>
AttributeError: 'Runtime' object has no attribute 'serial_bytes_available'
@ruby atlas what will you be connecting to the ESP32. I can post a file that you can flash to the ESP32 to install the AT firmware on its UART
That'll be a good starting point 😃
If you hav an m4 then the demos in the ESPATcontol will work with it
@tidal kiln its in the 3.x branch - I wrote the back-port for it
Not sure what release it went into
@solar whale multiple M4s. I'll grab the Metro M4.
Looks like that release that @tulip sleet talks about at the bottom didn't happen
Honestly, for this test, you can just replace that line with if (true)
the wheel and blink won't work, but changing colors will
@ruby atlas here is the AT Firware for the Huzzah ESP32
yep. looks like release didn't happen. latest 3.x is 3.1.1 on nov.2. that comment was nov. 4.
@ruby atlas here is my flash command /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
Would you like a UF2 like mine?
no biggie to just run 4.x
This is a copy of my trinket for @tidal kiln for testing the serial issues with linux
ok. got it. that loaded. yah. looks like you're working with a custom 4.x build.
Adafruit CircuitPython 4.0.0-alpha.2-36-g5360a4161-dirty on 2018-10-23; Adafruit Trinket M0 with samd21e18
>>>
@ruby atlas -- you can use teh library from here (I htink it is in the latest bundle as well) and the demos in the examples should work -- see the demos code for the pins to wire up -- GPIO15 is critical for flow control - you need to connect RX,TX,VUSB,GND,GPIO15,RESET from the ESP32 to the metro M4 -- swap RX/TX - use the recommended or any other GPIO for the GPIO15,RESET
Ok, but it doesn't need anything fancy except that command
stty dump from linux box:
$ stty -F /dev/ttyACM0 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke -flusho -extproc
thanks @solar whale i've noted these for later.
@ruby atlas - once you flash the ATfirware to the ESP32 -- you won't see anything useful on the USB port -- only via TX/RX.
good luck! ping me if you need anything
As one would expect 😃
not yet. figured i just try here before moving to pi.
oh man. i hope i purged that long ago.
Resized and created image to use for README header for CircuitPython logo
> Don't forget you will also need to install the SiLabs CP2104 Driver
Or I can just use a Linux VM because last time I installed that I had more system instability.
@solar whale you don't have to provide an address to esptool.py?
esptool write_flash: error: argument <address> <filename>: Address "/media/psf/Home/Downloads/factory_WROOM-32.bin" must be a number
(trying 0x00000)
and back later!
@tough flax trying minicom to sanity check. does this match your settings?
nvm. it worked.
minicom's working though
But minicom's reading
ah. ok. and echo isn't.
Right
that's why you cat'd....hmmm
i have a github question :
so there is a pr and it says that there is still a request for a change but it was fixed some days ago
the one by scott
It remains until the author of the change request marks it as approved. In any case, whoever does the final review can approve it even if the author of the change request does not approve it. So it won't be a blocking issue if someone else has time to review it.
ah, the wonders of github i see. it's like a summary?
Yes
If someone approves, it'll show partially green on that circle, if another change request is still active.
@tough flax or echo "\n" isn't really the newline input needs to see to return
I tried \x0a as well
@marble hornet I added the CircuitPython Librarians team to the repo so anyone on that team can review it now. And I requested a review from both the team and Ladyada. So it should be on our radar now.
😀 🙇 thank you sensei
I've gotta eat dinner - thanks @tidal kiln for looking at this. I'm very frustrated 😕 Maybe later.
enjoy @tough flax
@tough flax ok. no worries. it is odd. but should be able to figure it out. since it's just software. what's minicom doing that CLI isn't? etc....
Yeah... problem is it's arcane 1975 knowledge that we'd need someone who wrote the original "more" command to help with 😉
indeed
(yes, that was a hat-tip to @tulip sleet but I couldn't figure out a way to sneak his ID into it 😃
now an okay time to throw up my hw designs?
Anytime is fine. But I don't know who will be around when to take a look. It's not a skill I possess so I will be of no help on this one.
mmmmm...castellated
excited or skeptical ?
excited. that's cool.
it's a metro m4 in less than an inch square !
sans power supply
🤞 i'll have them up on tindie sooner than later
i;'m concerned about the u1. it's a microchip sram chip but it's on the same lines as the display spi with a different cs
looks good ! we can always update it as we have make custom graphics :)
if it is just driving the m4 itself
do you know , in the future, how i can figure out how much current a trace can carry
and would a schematic be helpful? thank you for that advice
here is the photos with the ground plane rendered
use the pcb trace width and thickness calculator, such as http://circuitcalculator.com/wordpress/2006/01/31/pcb-trace-width-calculator/
it will show things like temperature derating
@ruby atlas correct -- should have been /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 0 factory_WROOM-32.bin
zeros don't count 😉
Hey @tidal kiln I was thinking - it's possible that we're getting TOO MANY NL/CRs... it might be stuck on the NEXT loop - I can't test from here, but I thought I'd share
hmm. maybe. i was think it might help to add some LED 13 on/offs in there to help determine where it's locking up
I can't debug from here tonight, but I'll look again later or in the morning
sure thing...was just something i was thinking...
Not a bad thought
@tidal kiln @tough flax I was afk for a few hours, but if there's something I can help with, let me know. I'm not sure what the issue is looking at the posts above
@tulip sleet don't know if you saw my note - subclassing only sort of works.
it's starting to look like the at91samd package for openocd doesn't support samd51
@ruby atlas no, just got back here
@tulip sleet same one as before... minicom/socat both control the trinket M0 via serial just fine on linux (rPi or not). echo "red" > /dev/ttyACM0 doesn't
I'm tempted to do some debugging to figure out if I can avoid crashing and wrong behaviour. Otherwise I need to come up with clever ways to avoid having to hit python during [] operations.
something weird with the stty or the like
@exotic pumice yes, it's flaky enough with samd21
i tried a bunch of different stty settings but didn't figure it out. are you expecting \n \r\n or just \r ?
@tulip sleet 😢
It should work with either
is there a suitable alternative package for openocd you know of?
I was thinking it might be getting more, not less (I've been focused on getting less)
@exotic pumice what do you want to do iwth openocd, debugging, flashing, or something else?
@tough flax can you write some kind of test program to record what it's really getting?
debugging
when I said alternative, I meant alternative to the at91samd package, not to openocd
I like openocd and I just got it working
I can, but not at this second - I don't have a power brick that can power my pi here
USB from my laptop is insufficient for the rPi3 B_
B+
@tough flax I love my multiport Anker adapters.
I just found this but I don't seem to have target/atsame5x.cfg https://gitlab.cba.mit.edu/jakeread/atkstepper17/blob/ad652ba5bd6f3ccb5ce7f52ac7e5ccfed9708891/embedded/openocd/program.cfg
@exotic pumice some googling: http://openocd.zylin.com/#/c/4272/
so I probably have to recompile openocd eh?
@exotic pumice I guess, and there are multiple parts to that patch. I just found it referenced elsewhere and followed a trail
I found this https://gitlab.cba.mit.edu/jakeread/atkstepper17/tree/ad652ba5bd6f3ccb5ce7f52ac7e5ccfed9708891/embedded/openocd
it has directions to install
unfortunately I'm having difficulty getting my pi cross compiler going so all of this is gonna have to compile on the super weak processor
and I'm using a new version of gcc so everything errors
fun times
shoot now I'm not getting a gdb server again
@meager fog I found a fix for the ESP8266 AT firware load after erasing the cip
two extra files are needed ```/usr/local/bin/esptool.py -c esp8266 -p /dev/ttyUSB0 write_flash 0 AT_firmware_1.6.2.0.bin 0x3fc000 esp_init_data_default_v05.bin 0x3fe000 blank.bin
the blank is probably not needed but I thin the esp_init_data_default is -- it is loaded as part of a Circuitpyhton build -- that is why the AT load works after a CP load
@solar whale oh yay thank you!
wanna make a new bin?
i was working on ssd1306 stuff
ESP AT GET URL http://wifitest.adafruit.com/testwifi/index.html
Resetting ESP module
Checking connection...
Connecting...
Connected to None
My IP Address: 10.1.67.16
Retrieving URL...OK
----------------------------------------
This is a test of the CC3000 module!
If you can read this, its working :)
----------------------------------------```
yay
since the missing file has to g at 0x3fc000 -- does the /bin have to be that big? or do we have to do it in pieces.
I'm gonna need a lot more and M4 boards. I have a bunch of old things around the house to replace with CircuitPython stuff.
HUZZAH32
oh yeha that works well
Yeah, because it's adafruit hardware :-)!
well, yeah, but adafruit boards aren't crap.
Currently - two humidity probes, a plant moisture probe, external temperature/pressure probe, garage temperature probes (so we know when to bring in the pop in winter), and an automatic humidifier controller that looks at the 24h forecast to set the target point.
sending to adafrui.io?
All of the above use my local mosquitto server to communicate with each other and/or homeassistant.
hmm homeassitant is rest or mqtt?
@meager fog you can do it in just 2 pieces -- the first AT_firmware_1.6.2.0.bin ad normal then a very small /usr/local/bin/esptool.py -c esp8266 -p /dev/ttyUSB0 write_flash 0x3fc000 esp_init_data_default_v05.bin
@meager fog yes (both)
HomeAssistant is tons of things and is in python and is easy to extend.
OK -- just for USB load -- for minesptool will need pieces.
yup
well, we got rest going
I used to hackathon with them at PyCon but CircuitPython caught my attention in 2018 😃
ok so we can jsut add the second step.
I moved my Homeassistant to a VM, but it runs very nicely on Pi 3 B+.
They presented in the past, but many contributors attend PyCon too.
Speaking of PyCon I need to book my flights before the prices start going up.
@meager fog what do you want me to muck around with tomorrow if I get time, now that I have the hardware setup?
oh so homeassistant uses the old Python/mmio version of our DHT library
and id like to move em to circuitpython
BUT its not ready yet!
That'll be easy. They're also on Discord 😃
i need to test on some Pi 1's to make sure it works there
its not as fast, we use libgpiod
Hmm, Pi 1. I have one somewhere.
Heh.
i need help updating their code
its some module somewhere, but not sure where. all i know is they come into the github issues 😃
That'll be easy. They're really good about merging PRs.
An move super fast.
And I'm sure I can help with the PR and ping the project's benevolent dictator.
yay ok ill ping you when its all ready. we're almost done, probably last PR tomorrow to platformdetect
then we'll do the switcheroo
and i can 'kill' that old repo
its ghastly in there
☠
Haha. Their users don't move as fast as their developers.
as long as eventually they all use circuitpython
also now they can add other cool sensors, like BMPs, or air quality sensors
@meager fog I'll update the co-processor guide tomorrow and create a pr to add the second piece to the miniesptool_esp8266program .py example
thanks!
Speaking of users, I haven't updated my Homeasisstant in forever. I need to look at new tablets for the home automation controllers as the ancient ones are stuck on android 4.4.
i have to get energy to work on the socket stuff
@solar whale btw @gentle bronze is working on the OLED/i2c thing now
should not be a big challenge to fix
i've been recharging my energy by not working on billable stuff for clients. i need to fire one or two more in 2019.
@ruby atlas congatulations o getting the ESP32 AT up and running -- have fun!
yah that was fast
It was stupid easy with your pinout notes.
which is good, makes me feel confident-er about the code
And the fact that I can read code.
Way easier than the Pixelbuf I'm doing 😃
And easier than the changes to the FFT example even 😃
loll
good night all 💤
l8r jerry!
I ❤ the FFT stuff. It lets me know when a song sounds good only because it's mixed loudly.
😄
Also was fun to watch the Weekly meeting audio to see who'se voices landed in what frequency bands.
(i have a mixer on my desk with a USB interface, 2 more audio interfaces, and a DAC on my system's optical out, it may be overkill)
ugh, forced to use a single monitor
@meager fog
I have a question about sensors generic in circuitpython.
When i read DHT i think more of a low quality sensor. That's about i had worked now 32 years in industrial and building automation. So we/i use sensors which are from a hihger quality, like BOSCH or VEML sensors. You have some of them in the Adafruit shop when i remember that right
So will these sensors and others also ported to circuitpython or there are sensors which are alraedy ported to circuitpython?
I don't use circuitpython, in my way i use ansi-c, C sharp and C++. I ask because a friend of mine will do some tests in circuitpython and he is sensor guru too ;-).
hi all our sensors are ported to python/circuitpython
you can see them here https://github.com/adafruit/Adafruit_CircuitPython_Bundle/tree/master/libraries/drivers
Bosch, Si7021, SHT3x are all good quality sensors
Thank You @meager fog . I will take a deep look in that to find the right drivers.
->Bosch, Si7021, SHT3x are all good quality sensors
oops moment please
Thats right so far the PCB layouts are done in good way. There are breakout boards out there with temperature issues because the regulator is, as an example, to short placed to the sensor, or the regulator is too small and many other things can happen while development.
So far i have seen has Adafruit done a very good job to have an eye on that specific issue. Hold up that good work.
gdb so drunk
(gdb) break clock51.rs:241
Breakpoint 1 at 0x43de: file /home/paul/rust/atsamd/hal/src/clock51.rs, line 483.
(gdb)
now it's doing this
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x6686
I think because the openocd.cfg has gdb_memory_map disable in it
TWIM0_EASYDMA_MAXCNT_SIZE=16 is bit size, which means each xfer can be up to 65K bytes.
Issue is caused since it is mistaken as 16 bytes. Which auto break the framebuf data into sub transaction
1 frame data (513 bytes) = Control byte (0x40) + 512 bytes (pixel)
That confuse SSD1306 data parser since data is split in odd position due to control byte.
We won't probably write more than 65KB at a time, so it is safe for 840.
Note for 832: the max size is 255 bytes, SSD lib should ...
@jerryneedell 16 is bit size, which means 65KB each transaction. I just pushed PR to fix this #1431
note related, but I need to re-enable MICROPY_PY_FRAMEBUF = 1 to build, otherwise it complain
code.py output:
Traceback (most recent call last):
File "code.py", line 11, in <module>
File "adafruit_ssd1306.py", line 38, in <module>
ImportError: no module named 'adafruit_framebuf'
@hathach FYI - you ddn't need to enable MICRO_PY_FRAMEBUF in the build, but if it i not there, then you do need to install the library adafruit_framebuf and the latest adafruit_ssd1306 library. Both are in the latest "Bundle" https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases or in their individual repos: https://github.com/adafruit/Adafruit_CircuitPython_framebuf https://github.com/adafruit/Adafruit_CircuitPython_SSD1306
ah, I got it, framebuf is now a optional lib instead of built-in. I use the 24 Dec release, which is a few day old :D . @dhalbert
Should this be ( 1UL << TWIM0_EASYDMA_MAXCNT_SIZE) - 1? That's my impression from reading the data sheet.
@jerryneedell should the docs for SSD1306 also add framebuf as its dependency
@hathach yes -- the dependency should be added. It was hidden before as a builtin.
@meager fog is there a problem with travis -- submitted PR for miniesptool, but travis is just "queued"
nevermind - travis is happy now -- that is all that matters 😉
@meager fog is the image support in framebuf/ssd1306 only for linux? looking for module PIL
@solar whale @meager fog got around to trying miniesptool with my custom SAMD51/ESP32 board. It worked great after only some minor adjustments! I'll submit a PR after some validation.
thanks for all your hard work on that. It made things much easier!
You are welcome -- glad to hear you have it up and running.
look forward to hearing more about your implementation
@solar whale it's still quite hacky, but you can take a look at https://github.com/maholli/SAM32/blob/master/firmware/esp32_firmware/main.py
I also have a working "UART bridge" mode for circuitpython that allows you to interact with the esp32 REPL, which is shown in example.py in the parent directory
@lime trellis so you are running micropython on the ESP32 -- not just the AT Firmware. Nice,
yep! circuitpython on the SAMD51 and micropython on the ESP32
interesting -- I may have to try that on the particle_argon. I had not even thought about that.
I'm now working on the low-level C necessary for a camera module in CP. I'm wanting to have an OVM9724 attachment board:
Let me know if you run into any snags! Hadn't seen the particle argon before, but it's similar to my "SAM32" board linked above.
Thanks -- lots of new possibilities
@solar whale I'm about ready to rev the SAM32 to add some CPX-inspired features. let me know if you're interested and I could send a couple boards your way.
@lime trellis I always like checking out new boards -- I'll be happy to be a tester.
awesome! I'll reach out when I have a few assembled
Thanks!
ping me if you (or anyone you know) would be interested in helping with the camera work. Should be a VERY unique capability for CP!
I'm not sure how much I can help - but would be happy to try. Do you have more information about how it is going to work and what is needed in terms of new SW?
its leveraging the "parallel capture controller" capability of the atmel SAMD51. Here's a nice app-note by FTDI on the interface: https://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_158_What_Is_The_Camera_Parallel_Interface.pdf
we've got some code for the PCC
@meager fog yep that's the plan
its in arduinoese - should be portable 😃
😮 oh boy!
lucky you 😉
lemme find it
ah! once again your timing is perfect
you can ignore the ili9341/spi stuff
you need one i2c device for config, and then of course the PCC
warning you need to buffer the full image
so pick a camera with a low res output
320x240 x 2bytecolor = 150KB
@solar whale just loggin' in now
Wow buffering the whole thing?
@meager fog I was trying the image stuff but is it only for Linux?
the pil stuff? yes
its for linux/desktop use only
thats tested tho, if you wanna try it on our nrf52840
you can test the i2c fix and the examples that are not linuxy
I 've been testing them on the particle_argon -- ssd1306_framebuftest works fine now
hmmm I'll have to dig a bit more. I wanted to use the direct-memory access and just shuttle the image off as it came in.
Thank you for the link to get started!!
👍 I'll let you know how it goes
@meager fog on the argon I get a brief flash of random pixels at start, but then the demo runs fine.
@solar whale thats not surprisng
when you turn it on, there may be RAM still
@lime trellis cool! yeah we sorta recommend the OV7670 i think thats the demo, its very common
@lime trellis looks like cool stuff!
each camera is a little different
@solar whale if ya can review https://github.com/adafruit/Adafruit_CircuitPython_SSD1306/pull/17 and https://github.com/adafruit/Adafruit_CircuitPython_framebuf/pull/8
ill do a re-release
ok -- will do
@meager fog sure -- go ahead with miniesp - I'll update the guide this afternoon
roy, the updater code
google's not helpful: "Did you mean: minidsp" 😃
@meager fog is there anything I can do to test image on the nrf52840?
I can try them on a Raspberry Pi
or do you just want me to look over the code and approve?
the ssd1306 docs were updated - we'll be writing a guide soon that will help too
@solar whale nah, @prime flower has done the linux-side testing
@umbral dagger hey given that ssd1306 is working again, wanna re-try your feather project with the oled?
ok -- looks good to me and it doesn't break anything!
cool - re-released minitool
approved framebuf and ssd1306
thanks, brent will take a look too
Great!
@meager fog Will do
off to do errands -- back later
has anyone written CP code to mount an SD card alongside the SAMD flash?
a48a08d Added header image and license badge - kattni
the image location and badges looks good, we can easily update the top image now as desired :)
@lime trellis sounds new to me. you mean when you plug in the board, it mounts along whatever CP mounts as CIRCUITPY? (built in or spi flash)
@lime trellis also cool project! was thinking of using an esp32 beyond just wifi stuff,, seems powerful enough
@tawny creek yeah that's what I was imagining. I could have swore I saw something like that... maybe it was mircopython?
ah! I think I saw it on the pyboard: http://wiki.micropython.org/pyb-SD
@lime trellis first i heard of this, cool idea!
yeah I may end up writing one for CP since I'm always going back and forth for a datalogging project. I'll post if I do
@lime trellis we dont (yet) expose the SD as a separate MSD device
its not entierly unpurposeful, because you can't write to it if so
and most people i think would want to
@meager fog yes, understood. I just find it helpful for accessing data files or loading .mpy files
may be something we add after tinyusb is all sorted - since we'll have more flex
why is mpy on SD not SPI flash?
SPI flash is fsater 😃
very true! but the adalogger boards don't have SPI flash 😃
yep 😃 the students using this datalogging setup haven't complained, but I'm now supplying sd card readers in order for them to easily get their data.
that works!
So has anyone used openocd on metro m4 before or do y'all just use jlink?
Most of us use JLink
I might have to invest in one of those then
There's the JLink EDU Mini that's super affordable as long as you're using it for personal purposes.
Yeah
@exotic pumice I read about openocd after you talked about it yesterday, interesting rabbit hole to go down 😃
@earnest turtle 😎
Cool, glad I could be of interest lol
Yeah I can't figure out why the breakpoints don't work
I shouldn't need the reset line for that should I? I read that you only need it sometimes and I wasn't sure what the "sometimes" fully entailed
I think it's more likely due to the fact that samd51 is barely supported at all. I've used breakpoints before on stm32 with no reset line.
Happy cat! Via blinka!
feather OLED sold out :/
that is on a PiOLED https://www.adafruit.com/product/3527
yep, cool for sure
@meager fog a guide "style" question - -- for something like miniesptool do you prefer to instruct the user to do it via "code.py" and never use the REPL . I alway use the REPL to just import miniesptool_esp8266program but It looks liek you tend to avoid the REPL in the guide. I guess that avoids explaing how to use the REPL - but it is a little scary having the miniesptool execute from code.py 😬 :
I'm assuming somone doing this know how to use the REPL
just a curiosity, would it be possible to run say the AT firmware on a single core on the esp32 and then have the other core run seesaw? @solar whale @meager fog
"possible" is a pretty open term 😉 Actually, I have no idea -- would have to do some research.
not sure how much the esp needs both cores to do the wifi stuff / bluetooth
@solar whale Most guides use the REPL and then include example code at the end
Could be different for that guide.
@idle owl That is what I am used to -- I'm looking at https://learn.adafruit.com/adding-a-wifi-co-processor-to-circuitpython-esp8266-esp32/firmware-upload
under "Program Directly"
Ladyada is AFK, so if you're unsure you can wait, but I'd say use your best judgement, and if it makes sense to run it from the REPL instead, explain that. You can link to the Welcome to CircuitPython guide REPL pages instead of explaining it
np -- no rush on this. I make a stab at it and it can easily be updated.
That's what we do in every library/sensor guide. There's using the REPL in Mu and "Advanced Usage" on that page, you could link to all of them if you wanted to.
True!
Thanks!
I don't suppose anyone can think of a circuitpython builtin API that takes an optional callable (callback) that the C code might invoke? (I'm searching the source for examples still).
Hm, I need to track down this m4 dac noise, might be a chip problem
@ruby atlas I don't think there's such an example, at least in CircuitPython. There are interrupt handlers in MicroPython.
@tulip sleet yeah, that's what I found, plus the Timer stuff.
Will look at both.
looks like the code in timer.c should help me at leas test this.
(ports/stm32/timer.c)
In mpconfig.h, use #define's to enable or disable each native module. These can then be enabled/disabled by port or board, instead of the hodgepodge of #define's that we have now (e.g. PIRKEY_M0, etc.).
For example, create CIRCUITPY_BUSIO, CIRCUITPY_ANALOGIO, etc.
Once this has been done, we can also refactor all the xxx_reset() operations so they are done at the module level. So for instance in port.c or even main.c we can do
#if CIRCUITPY_BUSIO
busio_rese...
@tulip sleet can you think of any reason I might need to use either gc_lock or mp_sched_lock (on those platforms where mp_sched_lock is needed).
mp_call_function_1 turned out to be the answer 😃
I have never used it
I think locking GC and/or the scheduler only matters for interrupt driven callbacks like the timer.
This is directly triggered by python code calling a c module that calls a python callback.
so you're calling from the native C code to subclass Python code. Or is a callback?
got it
the subclass approach... broken in too many ways currently.
yes, native classes aren't really meant to be subclassed, I think. I should look that up more thoroughly
It doesn't seem like it would be hard to make possible.
So the plan is now to have a little bit more code in C that the neopixel and dotstar classes use to return a pixelbuf object that's configured appropriately.
I'm thinking of adding some magic to allow passing neopixel_write object in directly with appropriate extra args so that it can bypass executing a python function to get back to neopixel_write.
Yes.
I was thinking this might be the initializer for a Neopixel buffer: pb = pixelbuf.PixelBuf(32, buf, byteorder=pixelbuf.GRB, bpp=3, rawbuf=rawbuf, write_function=neopixel_write, write_function_args=(pin,), write_data=pixelbuf.WRITE_BYTES)
A dotstar one might then be:
The current behaviour is to pass the write function the pixelbuf object.
hence the flag to change the mode.
I'm still curious about why the subclassing approach is working better than having a PixelBuf as an attribute of NeoPixel or DotStar.
you said it was less code
Performance of index operations is why I tried in the first place.
I don't want to have to go through python intermediaries to do pixel assignment.
ah, I see, so those are done direclty in C. Yes, it makes sense that's the main speedup. I've always found indexing slow in Python, even on "regular" computers
yeah, for example, with pb[0:32] = [(32, n, n) for n in range(32)] it uses the C code to make it much faster.
I wonder if I can expose setitem etc in the C class and then assign those to properties on a Neopixel/Dotstar composed object and have the same performance gain.
In theory that should work, I should try that.
I guess I'll need to benchmark 😃
Oh hmmm, subscr is both setitem and getitem.
However, if I split it up and expose the appropriate parts in STATIC const mp_rom_map_elem_t pixelbuf_pixelbuf_locals_dict_table it should be possible to do something like:
__setitem__ = pixelbuf.Pixelbuf.__setitem__
(Assuming I don't need to rename it).
Sounds promising! There are gotcha shortcuts as you found in the low-level stuff. I don't have a lot of advice to offer here because you're doing things we generally haven't had to do yet.
Yay yes. I would also say not to over-generalize the code if there's not a real use case other than neopixels and dotstars. If those need to be hardcoded I'm not sure that's so terrible in order to get performance.
Also the brightness != 1.0 case
Brightness != 1.0 is the main use case of this code.
got ti
And why I started in the first place.
My tests are all using 0.3
I should check if 1.0 is the same speed.
yep
and my eyes!
they have spots.
i do a lot of nepixel testing with them facing upside down 😃
i need to 3d print more covers.
white plastic, 1mm thick
the dotstars featherwing should be known as the supernova featherwing.
could you just use opaque white sheet acrylic?
i could, but that means finding acrylic.
3d printing means 5 minutes of openscad
and ~10 min of print time
going to a store that might have acrylic would be longer.
i still don't have a 3d printer - I'm into subtractive technology 😃 drilling holes in things, sawing, etc.
i don't have room for a proper workbench for that stuff. sorry to fade off, it's late and I got to a good stopping point with BLE for tonight
looking forward to your end results! good night!
good night! i'm also stopping for the night now that I made it "go" and have real thoughts on how to move ahead.
it's always good to stop when something works instead of not. don't try the next thing
Exactly!
Coming in at the end, of course. @tulip sleet, check out Paul Sellers "newest" version of his workbench. Can be made quite small (like 24"x18ish) and still function well.
he mentions as he's on year 2 of building one. all-hand-tool construction takes time and even more motivation 😆
Maybe we need to reach out to Make on this interview, more info needed on Makecode or Circuit Python? https://makezine.com/2018/12/28/bright-ideas-kari-byron-interviews-debra-ansell/
Has anyone built circuitpython from scratch? I was contemplating the feasibility of building a load for the Trinket M0 that included audio support.
Thanks! I'd be happy to remove stuff I'm not using. Where is the learn guide?