#circuitpython-dev
1 messages · Page 225 of 1
if you have otehr stuff goin on the it will stay lit if set onece outsisde the loop, as long as there is a loop and code.py does not exit.
it will turn off when code.py exits.
I'll try the time.sleep and see if that makes a difference. I thought i could just set it high and leave.
Thanks
https://github.com/adafruit/circuitpython/blob/master/main.c#L205 the board is reset when code.py exits.
Thanks! This is making more sense now. I put time.sleep(10) and it stayed lit for 10 seconds and then the program exited.
secifically the red_led is reset! https://github.com/adafruit/circuitpython/blob/master/main.c#L206
actaull, I think the status_led (line 206) is the neopixel, but the board reset is probably what truns off the D13 LED.
basically you have a"clean start" after code.py exits.
That's awesome. I'd struggle for awhile before I saw the Discord channel on Adafruit. Thanks so much.
you are welcome! We are here to help any time.
@idle owl want to run tomorrow's meeting?
@slender iron Oh right, I think we had planned on that. Can you send me a link to a notes template though? I couldn't get the Google doc headers to work last time.
did you have trouble after copying the stats?
I don't remember now.
I think the line endings in it are wrong
Ah
I don't have trouble until I copy that it
Well we end up changing it up for GitHub anyway. I guess it doesn't matter.
Right on, good to know
@slender iron Do you want to take notes?
ya, I can help
I ended up doing both for the meeting you weren't here, so it's doable
😃
😃
Feel free to remind me about time codes though. We'll see if it's sunk in yet 😄
haha, ok. still want me to start the doc?
@umbral dagger elu! we've had some reqs for "how to burn the bootloader" onto a bricked M0 or M4 feather/metro/itsy/gemma/trinket
would you be interested in writing a guide?
i think easiest way is with jlink + arduino IDE
but command line would also be helpful perhaps
@slender iron Sure if you could, then I can have your template to start with. And I'll have it for next time.
I don't have a template but I can create one
Oh. I can create one then. Don't worry about it. I was thinking you had one.
nope, 😃
Fair enough 😄
kk, thanks! I'm off to run since the sun is out
Have fun!
thanks!
I've made a lot of progress rendering things on the 2.4" TFT FeatherWing with the Feather M4 Express: https://gist.github.com/tjpeden/eebb85001aee98489723453510246fa9
My journey with CircuitPython on the Feather M4 Express with the 2.4" TFT FeatherWing - code.py
posted this up today, and will be in newsletter, good stuff' https://blog.adafruit.com/2019/01/13/adafruit-library-usage-on-raspberry-pi-raspberry_pi-adafruit-circuitpython-raspberrypi-circuitpython/
I also made an Angular app to convert images to the binary format that the ILI9341 expects (16 bit color; big endian) which has made rendering a bit faster, but it's still not as fast as I'd like (reading from SD card in chunks and then writing those chunks to the display in turn adds some unavoidable overhead)
I'll post more about that after I get a few things cleaned up on it
Does anyone have a better way to use the stmpe610 than what I've done? It's pretty clunky the way I've done it.
I wrote an app once that pulled images off an SD card and displayed them, but it was tough to get smooth animation. I ended using the on-chip flash for my images, which was much faster.
The 2MB flash?
Sorry, I keep µGame in a separate branch in my fork, since it doesn't work with the recent masters: https://github.com/python-ugame/circuitpython/tree/ugame10
Yes. If your images will fit there along with the code (mine did), it's an option.
Or the program flash on the CPU (which is what I used)
@solar basin That sounds awesome! I would love to check it out when you have something you're willing to share
@pastel panther I'll share it in a day or two
@solar basin have you done any work with html5 canvas or other similar things?
( i think canvas is html5, maybe not)
Yeah, that's actually what I'm using. I load the images using the browser, draw them to canvas and then I can read the image from canvas in 32 bit color
nice! Mind if I hit you with a DM?
Not at all
hah using canvas is awesome. i'd probably have use Python and PIL.
expose width/height so we can center images :)
I'm a web developer in my day job so I am more comfortable in JS, I've only been writing Python for a little over a week, and only CircuitPython lol
@solar basin I learned Python through CircuitPython! 😃
It's certainly a lot easier than writing c/c++ for hardware lol
That is true!
Are you a C/C++ hardware coder guy by day?
(I'm a polyglot, dealing with many languages most days, but preferring Python)
I too am a polyglot. I use JS/NodeJS at work, C/C++ for most of my hardware project (until now), I'm also super interested Rust for hardware
Ooo in the Embedded Working Group?
sorta, not contributing to the working group directly, we have our own github organization for samd
Does that work on the atsamd51?
Now that I have the M4 Express, it'd be fun to play with Rust on it
I have a blinky working on samd51, but not uart/spi/i2c afaik so some things still need work
but the 21 is plenty competent
it's not like rust is so memory hungry or something you need the 51
the PR for '51 is here https://github.com/atsamd-rs/atsamd/pull/31
and neopixel stuff is going down here https://github.com/smart-leds-rs
@exotic pumice I don't have a 21 lol
ok
maybe you can help me figure out what's wrong with the 51 lol
I think it's to do with peripheral clocks but it's hard to tell
do you have metro m4 express or feather or what?
Feather M4 Express
ok, that's good, once we get this pr in I can add a board def for that and get you to test it
if you'd be willing
we have BMP support - JPEG would be used by a lot of people but needs to be in C for any reasonable speed/memory usage i think
here's a public domain decoder - https://github.com/Bodmer/JPEGDecoder
would you like to join our gitter? https://gitter.im/atsamd-rs/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link
Done
you'll bump into these too but listing them here:
- TX on PB12
- RX on PB13
- SDA on PB02
- SCL on PB03
- D3 on PB00
- D4 on PB01
Does anybody know of a straightforward way of mixing RGB colors in CircuitPython for a "dumb" RGB strip led? I found FancyLED, but I think it's just for the NeoPixel.
@meager turret You can probably pull the individual RGB values out of the FancyLED magic and feed them to the individual LEDs
It doesn't directly drive the addressable leds, it just generates color values so the end target should be flexible
I'm trying to usePWM and the duty cycle to mix the colors. Do you mean to scale the duty cycle consistent with the value of 255 for each color?
Yes
I'll give it a go. I was googling for some sort of library, but I don't think it exists. Thanks!
If you roll your own class to handle the color setting for the individual LEDs, it would be cool to share it here if you're willing
That's a bit beyond my skill level, but it'll be my stretch goal 😃
Don't short change yourself. I think you can probably do it 😉
Thanks for the encouragement. If I get it, I'll absolutely share it.
So I have yet another question
I'm using a for loop to make a fade animation with my strip of neopixels
It looks something like this:
for i in range(251):
pixels[0:150] = [(0,0,i)] * 150
pixels.show()
for i in reversed(list(range(251))):
pixels[0:150] = [(0,0,i)] * 150
pixels.show()
Now I want to be able to make every other pixel be a different color
Than the pixel before it
Oh wait I think I figured it out!
@cinder dune adding a step to the slice? did it work? (not sure if stepping is implemented)
I did this pixels[1::2] = [(0,0,i)] * 75 @raven canopy
Not sure if that is what stepping is or not
yep. that is stepping. [start:end:step]
no worries. its basically the same thing that range will do: for i in range(0, 10, 10) is the same as for i in range(1).
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> for i in range(0,10,10):
print(i)
0
>>>
oh. hehe. happens. 😄
I really am enjoying my neopixels, I'm trying to get it where I can get a nice rainbow effect on each indvidual led
All at the same time
@cinder dune It can be fun and educational to code something like that yourself, however if you'd like a canned solution, the FancyLED library does fades very well
It's easy enough to have all the LEDs progress through a rainbow in synchrony. It's a little trickier to have them out of phase, so the rainbow appears to move down the road, but not that hard.
<@&356864093652516868> Here is the notes doc for tomorrow's CircuitPython Weekly: https://docs.google.com/document/d/14lsAkhJql6-TrnJUBMyj5CPC2iu-hz2ry3HFqY2VHyo/edit?usp=sharing
right now we have 1 (?) pixel between glyphs - for bigger fonts thats compressed looking. maybe see if BDF specifies spacing?
Yeah, 1 pixel between glyphs doesn't always look right
having to seek thru a 20-50K file one-per-char takes 1-2 seconds per glyph. if your first string has a bunch of chars it takes 20-30 seconds. good news is it works, but makes workflow sluggish. if we're going to keep it in python, lets have a way cache/load the whole font into memory upon request. e.g. font = bitmap_font.load_font("fonts/Checkbook-25.bdf", load_all=True)
note to self: when subtracting unsigned integers, and checking if the result is greater than n...make sure you place the numbers on the correct side of the operator. or, remain puzzled... 😄
I've made that gaffe too.
i started looking into my debug output, thinking that the number resolution was getting reduced. then that moment came: "i'm subtracting a larger number, from a smaller number, all without a sign bit. aren't i?". 🤦
That sounds all too familiar! You aren't the only one who's done that!
woohoo! i am not alone! hehe
@solar whale heya since you have it set up could you make me a custom esp32 firmware zip
with RTS on IO33
(and RX/TX on the RXD0 and TXD0 pads)
@main meteor @raven canopy its best done when looping
It should be based on the BDF: https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/blob/master/adafruit_display_text/text_area.py#L85
It's possible I'm reading from the wrong field in it.
i think you want SWIDTH or DWIDTH? it varies by char of course :/
https://en.wikipedia.org/wiki/Glyph_Bitmap_Distribution_Format
oh fun, fighting with submodules
bleh. i don't look forward to fixing the conflicts if i ever get FrequencyIn finished. i think i'm still pre-tinyusb. 😬
I gave up because I couldn't get the build to go anymore thanks to submodules.
I did make the merge succeed, with effort, but then just copied everything over to a clean repo
And then force pushed that to my fork
hehe. manual copy files, hard reset, glue everything back in. 😄
yep.
much easier w/o submodules
but add submodules in and... ... not worth the time.
well, mine requires a submodule update of its own. adds that extra layer of fun.
This is ready for another look, along with the code in:
which one(s) are you getting stuck on?.... oh, n/m. looks like you got it. 🎉
I'm likely going to need submodule updates, but I've got like 5 different ideas about how we might migrate to pixelbuf.
oh, i wasn't stuck.
I gave up and did it the "easy" way.
I've been doing git for ... uh ... since 2006.
its a magical place, that git.
better than svn, cvs, rcs, hg.
my only experience is with git. can't imagine others having a higher barrier to entry... 😬
then git is where i'll stay. well, assuming that is a logical line to draw in the sand.
SPI is good, but 8 bit is 8x better ;)
isnt the audio var in makeMixer function has no references to it, its gc'd after the call is complete - so they'd have to make that audio object global (defined outside function)?
I don't think we'll want all characters but we could < 256 to get all of ASCII to start. Loading all may get a lot of extra unicode characters.
How often are you updating a large portion of the screen? It might be better to do partial updates before doing 8 bit parallel support.
partial is better - but 8 bit lets me finalize hardware - so even tho its less useful, its slightly more of a blocker
yah - 32~127 by default (visible ascii) http://www.asciitable.com/
kk, does @PaintYourDragon have C code for it already? It'd be great to DMA it so we can compute pixels while we transmit.
you can....but its held together with duct tape n string because you have to toggle the Write Latch after each 8-bit write. https://github.com/adafruit/Adafruit_TFTDMA
Aww. I guess this board is being abandoned as "too small" now that the easy fit nrf52840 is shipping?
the nrf52840 has native USB so its a much better experience - that's what we'll be focusing on :)
FYI - ./bluetooth/download_ble_stack.sh is still mentioned in a few of the README.md files though it appears that step is now obsolete as there are redistributable .hex files checked in.
@meager fog here is the esp32-at build with RTS on gpio33 - also attaching the flash command I used to load it via USB. I loaded it to an ESPRESSIF ESP32 board. After loading, I can talk to it via the USB port so it looks like it is using RX0,TX0 OK but I am not able to get it to work with a feather_m4_express. Not sure why. How are you planning to use this? Let me know if you need something different.
@meager fog FYI -- I have never been able to get the ESPRESSIF ESP32 board to work with my featherm4_express via TX0/RX0 -- it works if I lost the standard AT firmware and use GPIO16/17.
@gpshead - Thanks, I'll review the README.md files and bring them up to date.
@meager fog do I have to remove the R17/R18 (zero ohm resistors) to TXD0/RXD0 on the ESPressif board to be able to ust the TX/RX GPIO pins? From the schematic, they are tied to the USB bridge via R17/R18. https://dl.espressif.com/dl/schematics/esp32_devkitc_v4-sch-20180607a.pdf I think this explains why I have not been able to get this to work via TX/RX. If I remove them, then USB wont work, but I should be able to use miniesptool, correct? Looks like you cannot have the USB connected via R17/R18 and use TX/RX
Thanks! Will clean up the README's as part of the next PR.
Would it be allright if I joined today's call just as a fly on the wall? I'm working on a few things here so I can't chat, but I'd like to hear what's new....
@modern wing of course it is! Just mention you're lurking at the start..
@raven canopy Awesome 😃 Is it at 11 eastern today, or did I get that mixed up?
@modern wing The CP weekly is at 2PM EST 11 PST
Thank you @solar whale 😃 Usually I'm a day late and a dollar short....I'm way early this time.
isnt the
audiovar in makeMixer function has no references to it, its gc'd after the call is complete - so they'd have to make thataudioobject global (defined outside function)?
Then this code should work with and without the class defined, right?
import board
import audioio
audio = audioio.AudioOut(board.A1, right_channel=board.A0)
mixer = audioio.Mixer(voice_count=1,
sample_rate=22050,
channel_count=2,
...
hey that's me ^ 😅
Using adafruit_stmpe610, what is the best way to detect a single "click"? I've tried reading the first touch point from the buffer and "draining" the rest, but it's kind of flakey that way. Some "clicks" don't tend to start out in the boundaries of "buttons" but I feel like the "average" of the touch points of a "click" might be a more accurate representation of "where the click happened." Thoughts? Examples (other than the two in the library)? Solutions?
There is a PNG library in MicroPython: https://github.com/Ratfink/micropython-png
@slender iron @idle owl can't make meeting today. nothing much to report on the CP front. hugs added to notes. cheers.
@tidal kiln cheers! Thanks for letting us know!
hey all, here is my #circuitpython-dev2019 post; better late than never?
https://github.com/siddacious/CircuitPython2019
@slender iron I haven't proofed it yet, and I will blog it up sometime today, but here is my post: https://docs.google.com/document/d/1mEuxN9sHbZF4jKvBpvjcfztR1SgtD8ANqxvnDMHqoNw/edit?usp=sharing
No idea, lol. I'm kind of out of the meme loop.
😃
oooh ok - i didnt test it! that's even more concise :)
<@&356864093652516868> and anyone else interested, CircuitPython weekly meeting in a few minutes!
Howdy everyone -- I'll be just lurking during the call if that's allright 😃
@modern wing That's perfect 😃
Text only for me today!
We're still in another meeting - so we're going to be a few minutes late.
Happy new year everyone, not been on here since the start of Jan.
I'm lurking
I'm lurking too
@idle owl I can't make it today; if someone can read my notes, that would be great
I know we have micropython on the micro:bit but will CircuitPython ever come to the micro:bit? there may be no need but was just wondering
@tall yacht it would require incredible trimming to make it fit
Yeah, i've noticed that a lot of add ons skip micropython due to the size limits. it's hard to fit their libraries on
Had a day_job call. Should be back in a few...
anyone lurking but haven't let us know?
i'll be able to do voice now btw, got a working mic
kk
notes doc is here: https://docs.google.com/document/d/14lsAkhJql6-TrnJUBMyj5CPC2iu-hz2ry3HFqY2VHyo/edit#
Have a good day everyone! 👋 Viva #circuitpython-dev2019!
Yay for BLE!
I'm lurking
back
@meager fog hug reports and status updates we can read later?
- @Takaklas for, I think, their first contribution with a PR to the LSM303 library.
- Just a group hug beyond that!
hiya current status is more wifi and displayio testing - grand central is shipping
hugz to @idle owl for helping with getting guide done!
my audio's not working so can't listen/speak
(was talkin to ladyada - no hugz this week)
thanks to @tulip sleet and @solar whale for help with nrf52 feathers and to @meager fog and @slender iron for work on displayio
@idle owl 🦅 !
Last Week:
- Adabot:
- Added Blinka to PyPi download stats. How did I miss that?
- Added total PyPi download stats, and re-fotmatted to a Markdown table.
- Catgeorized "needs release, new commits" by time elapsed since the oldest-new-commit.
- FrequencyIn:
- Changed the event action from RETRIGGER to COUNT. This helps fold @notro's counter in. Working out timing relations with the reference and capture TCs (overflow, resolution, etc).
This Week:
- FrequencyIn
Last Week:
- Not much circuitpython, but some python goin' on, workin on other adafruit things.
- Updated the #help-with-wippersnapper-and-adafruitio Python Client to include the Dark Sky Weather API
integration (for IO Plus users!)..API HTTP and MQTT examples added - Adafruit IO Project with the Ruiz Bros that'll go live this week :)
This Week: - going back to working on LoRa & circuitpython things
Congrats!
no progress on the TextMode library, maybe I can do something this week, started work on a 2xanalog joystick shield for controlling robots
oops, forgot to change those when i copied the folder
@stuck elbow see this? https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/
@slender iron not yet, I saw some issues reported on github, but didn't dig any deeper yet
kk
day_job is disruptive today. gotta run. if I can't make it back, have a great day everyone!
Finally cleanly rebased this branch so I can knock this out this week - the number of PO/POT file changes after a simple make translate is mildly terrifying (couple hundred lines of stuff moved around) but I'll make sure nothing is suddenly broken in those.
you too @raven canopy
In the next generation of @edu_blocks you’ll be able to create python programs on PC, Mac, iOS and Android!
This will help make edublocks more accessible for those who don’t own a Raspberry Pi, micro:bit etc
Here is a preview, will be hosted online when released. htt...
Thanks!
I'll write one this afternoon @slender iron
will next weeks meeting be on Monday?
(cool, i'll give it a shot. have a few paragraphs worth of thoughts anyhow.)
where can we see what people have written before?
thanks!
links in there
back
👋

thanks !
thank you 😃
Thanks
@solar whale heya yeah - this is for a 'hardwired' board like the argon
@meager fog OK -- I hope it works - let me know if not...
Is there any major core stuff coming up in 4.0 that's wortha adding to edublocks? @slender iron
Np -- its real easy to set up
We're removing support in 4.0 because it doesn't have native usb.
@solar whale @ruby atlas id like to get into socket implementation and then requests for URL fetching
so you can have it more like CPython
@slender iron i have a question on how to do that
because there's import weirdness i think
How do I update my fork to match the master cp repo?
git pull
git pull --rebase upstream master
git push --force-with-lease origin master```
thats my favorite link
thnx
trying....
fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Jonahs-MacBook-Pro:circuitpython jonahym$ ```
you need to add another remote, usually named either upstream or adafruit
git remote add adafruit https://github.com/adafruit/circuitpython
scott recommends using adafruit rather than upstream, since you might have multiple remotes. I had to break my muscle memory, but have switched over.
awesome thanks! and noted! this remote is new to me
(resists making pirkey / remote pun)
is blob the non-sun mirosystems bwos?
in:
and being serious:
what is the sh module? in the build_too_info.py tool
it makes it easy to run shell commands
@slender iron is there some way I can be of help in displayio development? I'm new to Python and the C code behind it isn't immediately obvious, but I'd be willing to learn if I can be of help there. I also have a Feather M4 Express with a 2.4" TFT FeatherWing so I could do some testing if that is helpful.
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
make: *** No rule to make target `peripherals/samd/clocks.c', needed by `build-metro_m4_express/genhdr/qstr.i.last'. Stop.
Jonahs-MacBook-Pro:atmel-samd jonahym$ ```
just cloned and submoduleded
@marble hornet try git submodule sync then redo the git submodule update --init --recursive
@solar basin that would be cool! its a bit tricky to get going but help on the python libs would be welcome
@gilded cradle did i see you wanted to work on an RA8875 library 😃
@meager fog Re: burning a bootloader guide. Not something I've had much need to do, so I'm sure that there are some others in here more qualified to write it.
npnp
just trying to think of stuff you may be interested in
do you like floppy drives?
You want a CP controlled floppy drive synthesizer?
Who doesn't? I seriously considered learning how to program FPGAs to run a bunch of floppy drives.
I do kind of miss that grinding noise ... SSD is just not the same acoustically.
@umbral dagger who doesnt?
Although I tried it
a grand central could control many 😃
Am I wrong for wishing we could have a C64 SID on a chip?
and there's MIDI
floppy drive synths would be cool, though
can you simplify it down to just the steppers or do you really need the whole floppy?
@magic wing ask and ye shall receive
http://www.fpgasid.de/project-definition
@magic wing I hope you're OK with two SIDs on one chip
@pastel panther oh the horror
I already sent an email to ask if they're willing to open source it but no dice so far
Yeah, that would be a cool breakout board -- FPGASID + amp + connectors for speakers
To be fair they never responded so for all I know they're working on a push to github as we speak, but I doubt it. They have a lot of work put into it
@marble hornet did you do make BOARD=metro_m4_express clean before final make?
I just ran make BOARD=metro_m4_express V=2 and it completed normally.
Just got a big batch of WS2801 LED strands donated for the Magic Wheelchair. Before I go forward with the Raspberry Pi Python library, has anyone gotten these working using CircuitPython on M0/M4?
I know they're SPI based so it should be possible, just looking for the shortest path
but wow - that V=2 produces a lot of output !!!
okay, i just re-cloned
and i am trying to make build_release_files.py
**run
and i am getting this error
@tough flax there's a driver https://github.com/adafruit/Adafruit_CircuitPython_WS2801
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
usage: mpy-tool.py [-h] [-d] [-f] [-q QSTR_HEADER]
[-mlongint-impl {none,longlong,mpz}] [-mmpz-dig-size N]
files [files ...]
mpy-tool.py: error: the following arguments are required: files
make: *** [build-pca10059/frozen_mpy.c] Error 2
make: *** Deleting file `build-pca10059/frozen_mpy.c'
Cannot find file ../ports/nrf/build-pca10059/firmware.uf2
for every single board and language
i have not edited the script
@meager fog Possibly. I want to do some CP work, but have been slowly familiarizing myself with the codebase and the guides for working on it. Just came across the one for creating libraries and was reading it.
@gilded cradle i'd love to help you with it if you'd like to try it out!
its a lot easier to write drivers in circuitpy than arduino, i think
and i dont know when i'd get to the RA8875 driver on my ow
but with an M4 - could be fun to have a big display 😃
@marble hornet is this a new clone -- you may have to make -C mpy-cross not sure
Thanks. I will probably take a stab at it. I have all the datasheets for the RA8875 already, but feel I need to do some prerequisite reading first. 😃
Also I have a Feather M4 and a nice 5" display.
trying
@gilded cradle sounds good, you can ping me on github when you need eyez 👀
okay, it is running
For developing CP libraries, should they be developed against 4.0A5 or the latest stable?
@gilded cradle You may run into bugs with the alpha release, but it'll have all the newest features we're working on. You'll eventually want to test it with both, but I think it's probably up to you. Simply be aware that if you run into an issue while testing with the alpha release, it might not be your library. At that point you can swap to the stable release and test it pretty easily. I've been doing my dev with the alpha.
Thanks @idle owl
@meager fog - thanks for the pointer!
OwO I missed the C64 discussion
I've been thinking it would be cool to make a sid-based ipod
@meager fog that would be awesome (socket, requests). Stupid busy day at work today. Just reading discord now.
<@&356864093652516868> I assume retroactively changing the tag/version for a prior release of a library is a bad idea? the 34x releases are a bit out of whack because they're going from 1.0.0 to 1.10 to 1.1.1 and PyPi of course sees 1.10 as > 1.1.1
I considered retconning 1.10 to 1.1.0 but I'm now thinking that it could cause issues. Perhaps I could just either re-release the latest as 1.10.1 or edit the tag.
Thoughts?
@pastel panther I'd do 1.10.1, don't try to go backwards. or is 2.0.0 in order?? As someone said, there are a lot of numbers available...
2.0.0 isn't in order, at least not for this version as it was just a bugfix. 1.10.1 sounds fine
Yes retroactively changing it does nothing
There's a whole process for this
I can explain it
👂
Ok if you want to delete a release, you have to first edit it and delete all the assets. Then it lets you delete the release. Then delete the tag. Then create a new release with a new tag number (the proper one in order this time, oops) and put the same notes in it and call it good.
blergh.
Dropped refs/stash@{0} (f86e558c74ecc740cd9aaf4bd275a9647c0b7aad)
PyPI upload failed.
failed to deploy
previously, yes. I then removed it and did 1.10.1
Ok you didn't delete the tag.
baaahg
looks like it barfed again.
@pastel panther I went through this so many times when I did all the PyPI stuff. No worries. It is a Process ™
Rerunning it once. If it fails, we do the delete/delete process one more time so it runs on the correct tag on the first try.
I've burned through an entire set of 0.0.x numbers on one lib trying to get it right.
well single digit anyway.
It just kicked off another build; did you do that or is it automagic?
weee
That last failure was a glitch type failure. So I reran it.
looks like PyPi is happy:
https://pypi.org/project/adafruit-circuitpython-adxl34x/
🖐
My CircuitPython2019 final post: https://blog.adafruit.com/2019/01/14/a-story-and-some-thoughts-from-kattni-for-circuitpython2019/ @slender iron
@pastel panther Mike blogged it...
I don't see it? Am I going blind?
not a big deal; it's in the notes and I posted it here so I imagine interested folks have seen it
it's in process
The scheduler on Wordpress didn't do the right scheduling. Should be coming right up!
It was scheduled for a couple of hours ago 😉
@pastel panther ^^ https://blog.adafruit.com/2019/01/14/siddaciouss-take-on-circuitpython2019-circuitpython-adafruit-adafruit/
Yay! Thanks everyone!
tnx @idle owl for following up with Mike
@tulip sleet Np!
@pastel panther and @idle owl In the adafruit-github-feed channel I'm seeing the announcement for 1.1.1 at 2.17pm and then for 1.10.1 at 3:10pm. Is that what the latest number is supposed to be or is the feed behind?
yeah I was following the discussion I just wasn't sure what the latest version was supposed to be at the end
Sometimes I wish that versioning labels added the zeros so they were easily sortable by text tools
I have a quick question. So in place of using a swtich statement, which python does not have, I'm using a dictionary. My dictionary has this format:
myDict = {
1 : '(i,0,0)'
2 : '(0,i,0)'
3 : '(0,0,i)'
4 : '(i,i,0)'
5 : '(0,i,i)'
6 : '(i,0,i)'
7 : '(i,i,i)'
}
My question is can use it like this:
num=randint(1,7)
pixels[0:150] = [myDict.get(num)] * 150
I tested this in an interpreter and it returned the tuple with the quotes
Without the quotes python expectedly gives an error about i not being defined
If anyone has any tip they'd be much appreciated
I can probably use strip() to remove the quotes but I'd need some guidance because I can't get it working in my interpreter
@cinder dune You should be able to use the tuples themselves in the dictionary. Is there a reason you're using strings?
Because i is not defined
I don't define it until the for loop
And this needs to work across for loops
You can redefine the myDict in every iteration of the loop (assuming i is the iterated value)
I feel like there is a way where I could only define it once lol but I guess that would require a function with multiple arguments
One for the key I'm getting and one for i
That's an option, sure. Define seven functions that take i as the parameter, then put those seven functions in the dictionary
Oh I was thinking a function with just the single dictionary
Two arguments: i and the key
😃
Wouldn't be that hard
thanks @idle owl will read it once I'm through this code work
Sure, but it may be faster to have seven functions stored in a dictionary.
Caveat: I'm new here, and I haven't explored all of Circuit Python, so my next suggestion may not work:
You could even (shudder) build it with lambda expressions (assuming CP can handle them)
CP supports lambdas.
Great. Ugly, but great : )
I recommend using if/elif where a switch/case would be. dictionary of functions is much more advanced
Yeah....
I think I'm going to do that
I have everything writtern
*written
But python doesn't like keys that are integers in dictionaries
at least in my solution
That's strange. I haven't heard of Python griping about integers as keys. Is it throwing an error?
2 : (0,0,i)
^
SyntaxError: invalid syntax
That's inside the dictionary definition?
Add a comma to the end of the line
Oh my goodness lol
Okay, I'm dumb
But also that did not do what I thought it would lol
Like with the lights
I doubt that. Python is very good at doing what you tell it to, not what you want it to do : )
What were you expecting and what did you get?
I have a fade animation thing that runs through for loops and brightens every other light and then does the ones that aren't lit
I had just been doing a color for the first set to come and a color for the last set
I was trying to make it random
But this makes the lights flicker, which makes sense sense it radomizes the incremented value of i in the tuple
If you can follow that explanation I commend you lol
I think I see what you're running into. You are setting all 150 lights in a loop, right?
right: pixels[0:150] was in your original question
import neopixel
import board
from random import randint
num_pixels = 150
ORDER = neopixel.GRB
pixels = neopixel.NeoPixel(board.D18, 150, brightness=1, auto_write=False, pixel_order = ORDER)
def randColor(i):
num = randint(1,7)
myDict = {
1 : (i,0,0),
2 : (0,i,0),
3 : (0,0,i),
4 : (i,i,0),
5 : (0,i,i),
6 : (i,0,i),
7 : (i,i,i)
}
return myDict.get(num)
def fade():
for i in range(251):
pixels[1::2] = [randColor(i)] * 75
pixels.show()
for i in range(251):
pixels[::2] = [randColor(i)] * 75
pixels.show()
for i in reversed(list(range(251))):
pixels[1::2] = [randColor(i)] * 75
pixels.show()
for i in reversed(list(range(251))):
pixels[::2] = [randColor(i)] * 75
pixels.show()
def Main():
try:
while True:
fade()
except KeyboardInterrupt:
for i in reversed(list(range(251))):
pixels[0:150] = [(0,0,0)] * 150
pixels.show()
Main()
I'm using slicing to select every other pixel
And light it
Aha. I think I see it.
You're using i as the index of each for loop, and you're calling randColor with i as the parameter
I see why I got the behavior I did
I just am not sure how to go about getting the behavior I want
And yes
@tulip sleet got the subclassing working 😃
hold on, that's not what I was thinking was the error.
You want to pick a random color, assign that to every other pixel, fading from black to the color, then pick another color and fade the rest of the pixels that color?
Then pick a color before each for loop
Oh, that would work better I guess
I want every pixel to be different than the pixel before it
Lol, I just got these the other day and now I'm trying to do this
I'm sorry 😃
Hey, that's the fun of it, right?
Right
Not an actual color, because you are using the for loops to fill out the tuple
@slender iron re subclassing Yay!
where do I find the current list of python libraries
https://circuitpython.readthedocs.io/en/latest/docs/drivers.html has a pretty good list
Got the WS2401 leds working with python on pi. That (non CP) library is a bit out of date so I’m going to try the CP driver with Blinka(?). Or I’ll update the api in the lib to match the dotstar lib
We had 12 strands of 84 leds donated to the magic wheelchair project. So glad we can make them work!
Added language above board in directory structure. Did not remove board directories from being replicated under every language. So, every language directory has all board directories. Maybe instead board directories should not be created?
@ruby atlas what issue did you have with subclassing and pixelbuf?
Can we put language below board so that we reuse the existing folders? I'm not sure whether they'll end up at the top though.
@inland tusk https://github.com/adafruit/Adafruit_CircuitPython_Bundle/blob/master/circuitpython_library_list.md
That list is updated nightly.
@idle owl thank you very much for the info
If you move {language} infront of the adafruit_foo_bar{}{}{} in the final_filename variablei think it will do what you're asking. I'm curious why you want board first? I would always to to English then the specific board. Yo hablo un poco español pero solo usar una lengua cuando estoy coding
You're welcome!
added language directories under exist board directories for #1441
Rock, paper, scissors for which version :)
I don't think you want the - before {}
good catch, I think I updated it correctly now to remove the {}
@terse kayak thats true but I meant the -
fixed ... I will self review better in the future .. was thinking it was just a quick thing and now on version 4 😳
Zoltan has been experimenting with fast font rendering in MicroPython using a C module for the heavy lifting; it may also be of some use to you folks? @slender iron I know this topic is close to your heart... :)
https://forum.micropython.org/viewtopic.php?f=15&t=5815&p=33342
@terse kayak No worries! That's what reviews are for. We're all in this together. 😃
I have a question about creating the RA8875 driver. Should it be a subset of Adafruit_CircuitPython_RGB_Display or its own package?
@slender iron where should I start? I assume at the very least I'll need to get a development version of CP running?
@gilded cradle hihi
Hi
Adafruit_CircuitPython_RA8875 should do it 😃
Thanks
@umbral dagger https://github.com/MockbaTheBorg/RunCPM
wanna try it on M4?
@slender iron non-specific crashing of overridden methods. I didn't spend any time with a debuger. I tried it. It crashed. I moved on.
@solar whale wanna try requests?
@clear halo thanks for the link! will look now
@solar basin what displays and boards do you have? I may be able to give you a build initially
@ruby atlas ok, it may be worth another shot. I'm fixing an issue with subclassing a class that takes kwargs into the native make_new
@solar whale ok i ripped out the old URL stuff
requests is a tiny bit slower, cause it does multiple writes, but worth the nicer interface - and of course you can POST, send headers, etc.
nice job @meager fog
~ yay ~
its a party
i think we can POST to adafruit.io feeds properly now with the built in requests header thingy
Oh goodie, I was going to work on that but I guess I don't have to!
or is it a different lib from the esp at control lib? Either way, yay proper POST with auth headers!
Adds support for https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/.
A cheap nRF52840 USB stick with optional headers, very Trinket and Itsy like.
@meager fog Looks fun, yes.
@meager fog I'll be happy to try requests - I don't see anythin new in the repo - is it in your local repo?
oh yeah - I see it there --- I'll grab it and try it out later today - may not be until this evening 😦
Hi folks... a quick heads up... I just hit the big green "release" button for the bugfix Mu 1.0.2 (http://madewith.mu/mu/users/2019/01/15/happy-mu-year-2019.html). Many thanks for the contributions from folks in this neck of the woods. As always, comments and suggestions most welcome. Hopefully, next stop will be 1.1 (with NEW features). 😃 🐮 ❤ 
@slender iron let me know what branch to rebase from, or when to merge from master.
https://hackaday.io/list/163331-circuitpython <-- there is a new list of projects
@plucky flint ahhh you merged in the particle with
pr I submitted, works gr8
@prime flower thanks for the contribution..! 😃
thanks for makin' mu!
We are the Mu makers,
And we are the dreamers of dreams,
Wandering by lone sea-breakers,
And sitting by desolate streams;—
World-losers and world-forsakers,
On whom the pale Mu gleams:
Yet we are the Mu'vers and shakers
Of the world for ever, it seems.
(sorry) 😛
@slender iron right now, I just have a Feather M4 Express and a 2.4" TFT FeatherWing (ILI9341 + STMPE610).
@slender iron some feedback on syntax resulting from using separate classes for enum like things:
https://forums.adafruit.com/viewtopic.php?f=60&t=145928#p722836
@tulip sleet you might be interested also
i know there are Reasons© for this, so just passing on user's perspective
@solar whale yah i just need to lint and merge, you can then change your post example
@tidal kiln hihi could you help me with some of the mini guide fixes you emailed about
im swamped today :/
sure. which ones?
yep. see it. sure. np.
@solar basin cool. I have that here I think. I'll get you a build
@ruby atlas I don't want to block your change on it
we can always update it later
will look at it all this morning
@meager fog for i2s - use arduino I2S or adafruit ZeroI2S?
7669ab8 Tweak artifact path for upload - tannewt
someone want to approve https://github.com/adafruit/circuitpython/pull/1471?
Why is this here? I think the .c can include "shared-bindings/neopixel_write/init.h" instead IIRC.
I'd leave this as RGBW LED because there are others to support as well.
How much space does it take up?
@slender iron this is for per-lang folders?
ya
ya, might as well
travis won't actually test it until its merged
since we don't save PR artifacts
thanks! I'll keep an eye on it
displayio.Shape is a subclassable class that stores shapes by storing boundaries of the shape for each row of pixels. It also allows for mirroring to save memory.
Most of the changes are to enable subclassing native classes which take keyword args. To do so, the signature of make_new changed to take a separate kw_arg map. The basic argument checking changed as a result as well.
FourWire and Group now handle accepting subclasses as well by calling mp_instance_cast_to_native_base to get...
@gilded cradle I can create a repo for you to fork so it's ready for you when you're ready to PR if you'd like. Did the cookiecutter stuff in the Creating and Sharing a Library guide make sense and work for you?
Yes kattni. I put up a repo already on my github, but can remove it and fork if that's easier.
You'll eventually need to PR to our repo so it might be easier to fork it now instead of dealing with it later in the process
Ok, sounds good.
Ok give me a few minutes 😃
Will do. Thanks
@gilded cradle Adafruit_CircuitPython_RA8875 is accurate?
yes
Thanks!
@gilded cradle https://github.com/adafruit/Adafruit_CircuitPython_RA8875 Here you go! One note: when you fork it and clone it locally, make sure you delete the current README.md, because it will default to that one which will have no contents, over the README.rst that comes with cookiecutter.
Thanks for doing this!
Ok. Thanks.
Ok, got it forked, cloned, removed README and pushed previous work back up. Not ready for a PR yet though. 😃
Excellent! That's totally fine! It's there when you're ready 😃
Sounds good. Thanks
@raven canopy Thank you so much!!! It was over 100 when I last looked. Library has new commits since last release within the last month. - 57
Trying to update the Library issue and failing. Two different browsers, same thing, it simply won't update. I've run into this before but usually it starts working after a couple of tries. Bleh.
we now have subfolders thanks to @terse kayak : https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/feather_m4_express/en_US/
Nice!
Done! Thanks @vgoodwinv. https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/feather_m4_express/en_US/
They are listed at the bottom. We'll clean out old intermediate builds soon to make the page shorter.
Trying to figure out how to file a Github bug..... TONS of info on filing an issue on a repo.... Not so much on filing an issue with GitHub itself. 😆
Found a support email finally.
@slender iron depending on the changes, it will make my code cleaner and faster. Especially if it's easily possibly to call a python method from C base classes. But as you say, if what's there so far passes review, we just need to figure out how we want to structure the testing versions of the _pixelbuf based neopixel.py and adafruit_dotstar.py
what are the options?
@solar basin I have a build for when you are around. my featherwing display isn't working but the spi traffic looks ok
What I’ve done so far is just have a new repo that holds pypixelbuf, and the other two pixelbuf compatible libraries . Not sure the name is even relevant anymore as it has rgbled in the name 😃
I was wondering if we should have new repos, or use new branches for the _pixelbuf supporting ones and freeze into circuitpython where appropriate.
@idle owl it was at 97 when I started. I didn't even realize I did 40. 😆 I can hit a few more later.
@umbral dagger eluuu
@umbral dagger dano's working on a solenoid xylobot
do you want to help out with the MIDI code
@ruby atlas I'd just add a pixelbuf library and update the existing neopixel and dotstar to use it
@meager fog Sure, That should be straight forward,
t's jusWe already have code to parse MIDI events/files. It's just different output.
I'm tied up with HackSpace for another day, likely, but time to chat is fine in the meanwhile.
@slender iron whenever you're ready, I'm in and out of meetings today, but I'll have my laptop with me
@umbral dagger ok np l8r!
Pythonista for iOS has a very nice little 2D Scene package made for making simple games. I think the API design is easy to pick up and effective. http://omz-software.com/pythonista/docs/ios/scene.html
I like the event handling and how animations can be tied to scene graph elements a lot.
@meager fog requests is working great - I have a working post example
@idle owl - I hate to be the Git newbie again.. I'm trying to reset my fork of adafruit/circuitpython so that I can make some changes to the HID stuff @tulip sleet and I are working on. So I want to rebase to adafruit/master and drop all my changes (there aren't any). I followed these directions and it seems to have worked from the command line. However, when I look at my fork on the web, it says I am 590 commits behind. What am I missing? https://gist.github.com/ravibhure/a7e0918ff4937c9ea1c456698dcd58aa
Did you push to your fork when you were done? git push your_remote_name master
these is the magic incantation I use to “rebase” fork — bring into line with adafruit master git pull git pull --rebase upstream master git push --force-with-lease origin master
root@DESKTOP-QK2QQSA:~/circuitpython# git pull
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
Something is wrong
probaby needd to git checkout master
root@DESKTOP-QK2QQSA:~/circuitpython# git checkout master
error: pathspec 'master' did not match any file(s) known to git.
I should start over with a new clone
push shouldn't want origin/master.
root@DESKTOP-QK2QQSA:~/circuitpython# git status
HEAD detached at origin/master
nothing to commit, working tree clean
Never seen that before
that means you are at the state of adafruit
"Head detached"? Sounds painful
it means you don't have a local branch
so git checkout -b <name related to what you are going to do>
Ok, I've never not been on a branch - it made everything act wonky
what do you mean by everything?
root@DESKTOP-QK2QQSA:~/circuitpython# git checkout -b hid_joystick
Switched to a new branch 'hid_joystick'
root@DESKTOP-QK2QQSA:~/circuitpython# git push
fatal: The current branch hid_joystick has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin hid_joystick
Stuff like that
Still should be able to checkout master I would think....
I'm going to start a new clone and try this again - I think it's hosed
I mean, that's what I would do. But I also try to avoid rebasing when I can, so I take the long way round.
Do you create new forks?
No
Unless it really hosed the fork too somehow
but usually I hose things locally when something like this happens, so same fork is fine
Starting over
But deleting and reforking is also an option if you really want to burn the place to the ground.
but you'll lose any remote work
so be careful with that one if you do it
I'm good with that
Got it! Ok, the default branch for my fork was set to 3.x
which made a cluster
it's better now - thank you 😃
You did all the work there 😃
Great!
Sorry, I've been away on vacation. The new '840 Feather has arrived, so
I'll give it a crack ASAP.
@slender iron looked over the Shape + subclass PR - looks great! One q, how would I typecheck an incoming arg to make sure it was, say, a Shape or a subclass of Shape? Do I use mp_instance_cast_to_native_base() and that returns mp_obj_null or NULL or something if it can't cast?
correct. it returns MP_OBJ_NULL if its unable to
ok, that should be perfect. Approve and merge shortly and then I'll try to use it!
great!
i don't see any issues and you cleaned up a few constructors so they can use kwd args, which is great - excellent work!!
ya, some of the arg checks were bad
it was a good opportunity to go over them
there were actually fewer than I thought
nice
😃
if i can get away from work for a few minutes i'll look too!
also at your PR comments
k cool!
unless you can do this kubernetes configmap for me, then update the postgis deployment to mount that configmap entry as files in a specific dir so that postgis has an extension enabled? 😃
you'll be much faster at it
i can spell kubernetes. only because you typed it first though... 😄
I wasn't aware it was an ancient greek word.
i imagine its something like "net of ghoulish spiders". well, that may be biased towards my limited understanding of the modern kubernetes. 🕸
from Ancient Greek κυβερνήτης (kubernḗtēs, “captain, steersman”), also appears in the New Testament. [1]
@idle owl The Debouncer library isn't pypi'd yet. I submitted a simple PR to fix the travis build but I didn't see that it's missing a chunk of other stuff. Is this in your queue?
Not yet. But I was messaging you. The hyphen isn't needed until there are multiple providers. So I'm not sure that's the issue with Travis.
it was complaining about "api_key"
Totally unrelated
I have to generate that and add it to the Travis CI settings
I can do that now
🤷 i am behind on these things.
@tulip sleet Added. It should run successfully now. Your PR isn't necessary. That'll get dealt with when I deploy it to PyPI.
k, I'll close it.
yay! welcome back
On Jan 15, 2019, at 6:50 PM, Nick Moore notifications@github.com wrote:
Sorry, I've been away on vacation. The new '840 Feather has arrived, so
I'll give it a crack ASAP.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.
now it's happy
Question... I've been looking to use BLE on the nRF52840 with CircuitPython, but for the life of me can find no good info on it (Have CP up and running on the board already). Perhaps my google-foo is failing, but not finding anything of substance. I do know that it should be supported through ubluepy, however, this isn't included in the latest adafruit 4.x bundle. Anyone have any pointers?
@empty tartan that's because it's being worked on right now (like, literally, I'm working on it at this moment). The latest master has an initial API, and also see https://github.com/adafruit/Adafruit_CircuitPython_BLE. Warning: API and examples will change, but we'd love it if you try things out
but the latter includes Device, which you should ignore for now.
ubluepy has gone away and is being replaced with bleio.
Haha... Ok, well that explains it. I'll take a look at those links. We have an nRF52 device and want to use CP running on a dev-board to do some latency testing. I'll dig into it more tomorrow morning. Thanks for the quick feedback!
fyi - I finally got the MDK nRF52840 USB Dongle to usefully run CircuitPython last night https://github.com/adafruit/circuitpython/pull/1470 😃
Adds support for https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/.
A cheap nRF52840 USB stick with optional headers, very Trinket and Itsy like.
thanks @meager warren will look now
Hello guys, I am kinda new here. My name is Hendra, I am one of the language contributor for Bahasa Indonesia. I am still learning to understand how the github work (pull, merge, commit, etc), so I am sorry if I am creating a weird pull request on the repo🙏
Thanks @idle owl 😊
@fluid cape git/github give us all head-scratching moments. and i'll second...you did great. welcome, and thanks for the contribution! 👋
@raven canopy thank you. It still WiP, I will try to finish it by the end of the month
WIP...its where most of my projects live. 😆
does a yellow pulsing neopixel on a feather mean undercurrent?
@exotic pumice running circuitpython? or just the bootloader?
I can't remember what it's running tbh
haha. if circuitpython: pulsing YELLOW: Circuit Python is in safe mode: it crashed and restarted
yeah it's circuitpython 4.0.0 maybe that's why
alpha 3
I should update it while I'm here
oh it's running my broken dap thing
f667d4d Update mpconfigboard.mk - TG-Techie
c1dfee6 Merge pull request #1466 from TG-Techie/patch-1 - tannewt
He's doing it again....
🙃
only like 10 or so left...i think.
i finally ran across one that requires thought for the release notes.
I'd say have a strokey-beard meeting but... no beards allowed for you. So no meetings of that sort either.
Wait! Wut? No beards?!
You can be as beardy as you want.
As promised, here's my image conversion tool: https://image-converter.stackblitz.io/
Here's the code: https://stackblitz.com/edit/image-converter
Does anyone know if we can have multiple declarations for the same CPU pin in the pins.c?
do you mean multiple names for the same pin? Yes, we do that all the time
i can find an example
Yeah, i thought so. No example needed
add declaration for RED_LED as D3 to match silkscreen.
Just wanted to check i wasn't being dumb before submitting that
@thick tundra see my review - good PR, just minor style fixup requested
@thick tundra Great! will approve after Travis finishes
Ok, should I break them out with newlines too? i guess that would make it more readable.
sure, go ahead; white space is free and makes things readable
Ahh man! I've been paying for that! ^
Well my students have been looking out for you then!
@solar whale hrm im having problems getting compiled ESP32 AT to work
using their IDF and firmware
can you send me your sdkconfig
oh blah RTS/CTS are fixed, they cant be changed - oi
@meager fog here is the sdkconfig I used - let me know if yo uwant me to try something.
can interpreter (the supervisor? what's teh "right" name?) store info in flash about how to boot up next? or info for itself in the future?
@marble hornet as far as i am aware, you can only write-enable the flash in boot.py - then you can write to it but it will b read-only as a mass stoarge device. - you can't have masss storage (CIRCUITPY) be writable and and write from CP at the same time. If yo just have a few values to store (<8K) you can use the NVM -- it will remain after boot/power cycle.
i should have specied, from c code
ah -- sorry - you would probably have to create a special section of the flash -- like the nvm -- just guessing.
how much information do you need to store?
why not use NVM?
you know the svm module i'm VERY SLOWLY learning c to make?
ah - NVM is not in all builds ...
what is that?
static volatile memory, saved bytes between soft reboots, but not resets. it will be used ot replace unmounting from storage
the number of bytes of ram to set aside needs to be stored
i'll find the issue
**scratch volatile memory
This topic was discussed in CP Weekly November 19th, 2018. At about time 35:50 here: https://youtu.be/l1dRzurIXq0?t=2150 The discussion stemmed from a desire to prevent memory errors when switching...
try these https://github.com/adafruit/circuitpython/tree/master/shared-bindings/storage https://github.com/adafruit/circuitpython/tree/master/ports/atmel-samd/common-hal/nvm
thanks
how do i include displayio in an m4 build ?
@marble hornet it should be included already
hrmmm i just built it, i couldn't import displayio
from master?
hmm, I thought it was included, but maybe not in general, it probably should be
i think we'll include it in all builds eventually - it was special-cased for hallowing and pyportal initiallly
thanks for pointing that out
okay, so that line isn;t working . can you show how to include it correctly? (i'll also reclone just in case
)
like does it go in .mk?
>>> import displayio
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'displayio'```
@marble hornet it should be in mpconfigboard.h like the hallowing
building...
Hi all, I just got an SGP30 and hooked it up to a Circuit Playground Express. I'm trying to follow the python example and I'm running into the same "SDA or SCL needs a pull" error. From the discussion above, is this an issue with the library, or do I need to actually put some sort of resistor?
how are you connecting it to the CPX?
I followed the wiring diagram from here: https://learn.adafruit.com/adafruit-sgp30-gas-tvoc-eco2-mox-sensor/circuitpython-wiring-test#circuitpython-microcontroller-wiring-6-2
can you post a photo of your actual connections to the CPX?
those crocodile clips are not going to give you a good connection like that
be very careful not to short the red/black clips
and is it just me, or is the gnd shorted to 1v8?
I would add some wires to it and clip the clips on those wires
or at least pins
K, I'll grab some wires and try it
yah, i think using the gator clips on the sensor directly like that is going to be very tricky
got it
@tulip sleet Thanks for the info yesterday - I am able to import bleio using build adafruit-circuitpython-pca10056-en_US-20190114-738e8f0 (actually running on BMD-340 devkit, but they were nice enough to keep all the pins and XTALs the same - we always target pca10056 without issue.) I tried running the scanner code but it returned an empty set, maybe I need to pull and build to see what's going on. I use Keil for work, so will have to get the GCC environment set up.
One question that I had yesterday which may also be related... Do I need to flash the softradio separately, or is it included in the build (looking through the build instructions, it appears to be part of the build)?
are you able to solder?
@stuck elbow i've got a pygame question. you've used that a lot i think?
shoot
audio related - how to generate simple pure tones?
generate and play - like what's the way to do play_tone(440)
On a high level what you do is take samples at regular intervals of a sine wave that oscillates with 440Hz and feed those values to the DAC
here's a sneak peak of our CircuitPython powered IoT display... this live-updates when we get a star on on the CircuitPython repo' ....
@tidal kiln sound array looks like what you're looking for? https://www.pygame.org/docs/ref/sndarray.html
@raven canopy yep. also googled this:
https://gist.github.com/ohsqueezy/6540433
but surprised it requires that much code. wondering if there's something more simple/builtin for pure tones
@tidal kiln I don't think you can easily do that with pygame, it's more made with the idea of playing ready files
@stuck elbow ok. thanks. that's the impression i was getting.
@tidal kiln soundgen is something I'd love to see in circuitpython
https://circuitpython.readthedocs.io/en/3.x/shared-bindings/audioio/RawSample.html has a pure sine example
@slender iron fwiw - use case is rpi + crickit w/ python
ah, I don't know how to play buffers on cpython
it's kind of an outlier. the other things like servo, etc. have CP libs that can be used and make things nice and easy, like servo.angle = 90. but audio is just an i2s amp. it's supported in the OS, but trying to find a nice easy way to use it from python....
I imagine all the game roms are sample based, but maybe there are some overzealous romers that went full chip tune?
@slender iron displayio isn;t compiled into the alpha on the metro m4
oooh
😃
that was meant for my robotics chat !!! SORRY!
no problem -- I though my dog was speaking to me 😉
your dog just wants you to think i typed that
"greetings professor falken..."
so i can;t get displayio to compile in
<artificial>:(.text.run_background_tasks+0x2a8): undefined reference to `board_display_obj'
/var/folders/08/4sg6c7j12zqbxz6wtmh3ggrw0000gn/T//ccU2Ns7M.ltrans17.ltrans.o:<artificial>:(.text.run_background_tasks+0x2ac): more undefined references to `board_display_obj' follow
collect2: error: ld returned 1 exit status
make: *** [build-metro_m4_express/firmware.elf] Error 1
Jonahs-MacBook-Pro:atmel-samd jonahym$
i'm getting that error
it says it needs more resources, does it need more inclued in the mpconfig.h?
@tidal kiln seems similar to pygame as it requires NumPy outside of wav file usage: https://simpleaudio.readthedocs.io/en/latest/index.html
"simple" 😃
@marble hornet I've not tried to build it recently -- you may want to look at board.c file for the hallowwing. it has some displayio stuff in it.
trying..,.
anyone have tips for debugging a missing CIRCUITPY drive on raspbian?
check output of dmesg
tificial>:(.text.run_background_tasks+0x2ac): more undefined references to `board_display_obj' follow
@marble hornet its only built into the hallowing
@marble hornet just for check - can you build the hallowing image
did you do a clean after adding the CIRCUITPY_DISPLAYIO define to make sure it picked up new source files
look in the board.c for hallowing as well
I have no idea how to cut and paste, but dmesg looks promising, it sees the metro and even talks about mass storage and attaching a removable disk. let me check this mount point
hmm. not a mount point, a device
what does df show after plugging in the board
i'll try it
no CIRCUITPY, misc/dev, /run,/boot
mine just mounts to /media/pi/CIRCUITPY -- pops up file manager window --
I had to manually mount it
my laptop is having its battery replaced so I'm giving an RPi a run for its money as a desktop
don't get your hopes up 😉 what kind of pi?
it'll work fairly well, but it'll be really sluggish
heeey, I got a REPL 🎉
what more can you need 😉
did the updates to the esp at library get merged? I would like to see if I can get this thing talking to IO
uses his own eyeballs to check
not yet -- there are a bunch of new things that Limor has done -- added requests -- make is much simple to use
check her repo
are they still in her fork?
kk
just remembered I'm on an RPi; should probably close some of these chrome tabs
anyone have a 2.4" featherwing and feather m4?
Probably? I have all the FeatherWings, so presumably yes.
k I have a build that will use the display
Hey I even knew right where it was. Do you need testing?
sure 😃
/var/folders/08/4sg6c7j12zqbxz6wtmh3ggrw0000gn/T//ccx0y9V2.ltrans17.ltrans.o:<artificial>:(.text.run_background_tasks+0x2ac): more undefined references to `board_display_obj' follow
if you have cycles @meager fog has been filing bugs
@stuck elbow @tidal kiln Thanks for the help! I soldered headers and used the clips from the CPX to the wires and the code works now!
@marble hornet there is stuff you need in board.c
@inner tree I had to do the same for a Flora project I was using. It was a powerful lesson for me (one in a series) of how important good ground connections can be.
I was avoiding soldering as we're just trying to prototype something for my son's FIRST Robotics project
He's going to be mad when he gets home from school and finds out that I soldered the headers 😃
because he wanted to?
yeah
He can solder the real wires from the sensor to the CPX though. All is not lost.
do i need to change pin defs ?
you'll need to add the DISPLAY entry
@inner tree as an option on the CPX side - you could use screws to attach the wires to the CPX pads. the holes are big enough. that way you wouldn't be soldering wires to the CPX in case you want to reuse it for something later.
That's a great idea
I'm surprised there is no terminal block "shield" for the CPX
dastels might have done something like that
adds to the pile of board ideas
but i think that was to header pins. you're thinking something like this:
https://www.adafruit.com/product/2926
but CPX shaped?
yup
@slender iron I have those
I can’t find any info on getting the featherwing‘s buttons working. I haven’t used I2C yet so any help is appreciated!
Featherwing OLED*
(The Display works fine)
@solar whale let me know if you want to test. beware there are lots of bugs
sure
@craggy harbor aren't they just tied to gpio?
displayio for feather m4 + 2.4" featherwing
It loads! Well done! (I have no idea how to use displayio 😄 )
@craggy harbor from the guide page on pinouts:
Button A is #9 (note this is also used for the battery voltage divider so if you want to use both make sure you disable the pullup when you analog read, then turn on the pullup for button reads)
Button B is #6
Button C is #5
ya, I'm realizing I'm too on the critical path for it
Ohh I see! A bit unfortunate since those are already used in my case 😄
time to teach others 😃
But oh well
Probably better right now anyway, I'm in the middle of something else 😆
Still, step 2 works 😃
@slender iron loaded and booted -- what should I do to test?
@craggy harbor I think there is a way to change the pins
What’s the thing with the battery voltage divider?
@craggy harbor careful then, one of them has a pullup
@pastel panther that would be cool!
@solar whale https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/blob/master/examples/pyportal.py
that is the most complex example so far
@tidal kiln would that mean it „pulls up“ always, as long as the wing is attached?
@craggy harbor I think I spoke too soon. Some featherwings have jumpers you can cut but I don't see any one this one (having to look at pics)
i don't think can easily be changed
I mean you could find the traces and cut them but that's probably more than you want to do
@pastel panther okkkk
@craggy harbor on the wing, the pin for button b is connected to 3.3V via a 100k resistor.
@caternuson Do you have cycles for this? It's similar to the other core work you did.
@tidal kiln so as Long as I don’t push it, it won’t affect the functionality of the SPI devices that I control from that pin right?
is it working ok now?
actually, wouldn't be too hard to move them. you could cut the trace between the headers and the secondary row. and then solder jumpers from there.
but i'd try to just not use those pins. what all is attached? why not use the dedicated SPI pins?
@slender iron do yyou know offhand if PB21 is correct for the backlight for the feather m4 or do I need to change it ..
you need to change it
ok -- looking
@solar whale well the chip selects etc. I already did a board layout etc so don’t want to change it now.
@craggy harbor ?? not sure what you are referring to
@slender iron do I need to set backlight or can it be None -- its not wired up on the 2.4 TFT
I think you can remove it from the example
ok - will try
Ups i wanted to mention @tidal kiln
ah. you have some kind of custom PCB you've made up?
fade up
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pyportal.py", line 29, in <module>
ValueError: Group must have size at least 1
>>>
@slender iron do I need special fonts -- I cloned adafruit_bitmap_font and put it on the board
you need a .bdf file
ah -- ok -- nay ones you recomend -- jsut put at root or in adafruit_bitmap_font folder
in the root I think
@tidal kiln yup!
do you want to use the buttons?
@tidal kiln it would be cool but it’s not necessary 😊
The most important thing is that they just don’t interfere with my current setup (PCB).
I would be willing to e.g. just pull out the 5,6,9 pins from the shield if it’s necessary 😃
that's one option. those are the buttons. just don't connect them down to the feather.
time travel and use different pins 😃