#circuitpython-dev
1 messages ยท Page 295 of 1
I just ignore any references to the MODE switch.. IIRC, it is only referenced with respect to using a Serial UART which you are not doing with an SPI Friend. You can provide feedback to the guide.
OK, I will do that, because this has confused me. I am a beginner when it comes to writing my own code to use Bluetooth.
Thank you.
sorry wrong place, I'll remove and put it in #help-with-circuitpython
@solar whale I have that library and am working on learning to use it.
I could not find any Circuitpython examples for the Bluefruit LE SPI Friend.
@solar whale So, I cloned the repo for the libraries (Circuitpython and Arduino) and am creating my own Circuitpython scripts for the Bluefruit LE SPI Friend.
@tulip sleet Thank you. I just saw your link and can not imagine how I managed to overlook that. ๐ ๐
I think I need a nap.
Has anyone seen instability on Teensy 4.0? I'm trying my app on Teensy (5.0.0, latest libs), and it hangs hard after just a couple of loops doing nothing but checking elapsed time to see if should do an action. I'll try to get a small reproducible code, but thought I'd sense check with those further on the curve.
@crimson ferry I haven't used it long enough to know. It's all early so it wouldn't surprise me.
OK, thanks, If I can isolate, I'll file an issue.
thanks!
Good news is... it makes it through all of the setup: SPI, I2C, Storage, RTC, ESP32SPI, HTTPS, etc. ๐
@tulip sleet I had to change a few pins, but bluefruitspi_simpletest.py works! ๐ ๐
@crimson ferry I have had Teensy 4.0 (CP5 latest master) running with a radio (rfm69) for several hours at a time - I have had a few occasions where the REPL hung (could not control-C out) but it kept running.. have not dug into that yet.
@solar whale Thanks, I'm also not able to ctrl-C out, but it seems to hang up USB too and I have to power cycle. I'll work on narrowing it down.
@slender iron When you pin the new meeting link, can you promote the new calendar file too?
For those not using the auto_refresh mode, the current refresh() in displayio is tailored toward applications which would like to achieve a constant frame rate with a feature to drop updates under certain conditions. The current algorithm/options are described in detail in https://github.com/adafruit/circuitpython/issues/2310#issuecomment-596834307
For the use case of applications which want to manipulate displayio objects and then do a manual refresh at the end of those updates whic...
set my phone to CET (mainland europe time) and the meeting times still look right. should have checked it sooner, glad it's correct
@tannewt I agree it should be ling term. I think very few people will find this bug and the temporary fix is quite easy.
It could be that I am miss-interpreting "the correct thing would be to have the later id of l[0] be 536896144":
I think that the object shouldn't be made into a separate copy after import. I think that would be perfectly acceptable for immutable objects likeints,strs,tuples, etc but mutable objects should not be duplicated. I think when the list is edit...
@onyx hinge yup! I think @idle owl was going to make the notes doc for next week. We can add it there.
awesome thanks both
<@&356864093652516868> Here is the notes document for Mondayโs CircuitPython Weekly meeting. Everyone is encouraged to attend! Please add your hug reports and status updates even if youโll be attending the meeting - itโs super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and weโll read them off during the meeting. Hope to see you there! https://docs.google.com/document/d/1Ev0a-zNbTzmMbo__zPvqba9rX3kdfS6LahXAfJQveu0/edit
@onyx hinge Please add info to the top.
thanks @idle owl
done, re-word if it's too clumsy. Now we just need to remember to update this file if we ever vary the date, and to regenerate it in 2021
Looks fine to me
The meeting schedule is also in an โicalendar/icsโ format calendar, which works with many calendar packages. Copy and paste this URL into any compatible software: https://raw.githubusercontent.com/adafruit/adafruit-circuitpython-weekly-meeting/master/meeting.ical
Thanks for the PR! I'm excited to see CircuitPython watches!
Please delete these comments to simplify the file.
Delete this. No need to change this file.
No need to add this README since it is about a different board. (So, please delete it.)
Displayio does it's best to minimize what areas on the screen are refreshed. In the fill example it will do intermediate refreshes of sub areas as the frame timer decides it should refresh. Bitmap tracks a single dirty rectangle between frames.
You could try turning off auto refresh when running the test for a more accurate measurement. A C implemented fill will still be faster since it can both prevent the intermediate refresh and quickly fill the underlying buffer. Bitmap's values are bi...
I love the idea of having these links on the download pages.
I did find a few small possible typo's with some of them.
quick question on Github PR reviewing procedures. If I find a PR that has already been merged but I notice some things that might need to be changed. What is the proper procedure? Leaving a review on the (merged) PR? Or make a new PR with the changes that were noticed?
@lone axle you can make a comment but a follow up PR is easier if you can do it
Or file an issue if you're not in a position to create a new PR.
Got it. Thank you both.
And issue might be better because it's separate and remains visible to everyone who views the repo vs. only being on the merged PR.
Better than commenting on the PR I mean. A new PR is even better.
Okay, yep I made a review on the PR first instinctually but then thought about a second and realized it's pretty much hidden.
@lapis hemlock : I'm experimenting with ulab since yesterday... it's amazing. I have a few questions (maybe someone else can answer too)
I can't findatan2()function so I useatan = ulab.array([math.atan2(y, row[i]) for i in range(width)])with row being a ulab.array and y an int. is there a faster way to do it ?
@cursive condoratan2is indeed missing. I have opened an issue here: https://github.com/v923z/micropython-ulab/issues/60. The implementation should not be too difficult, though, one might have to think about broadcasting (since the function involves two operands). Give me a couple of days.
thanks . I'll file a couple of issues likewise in the next days, and i'll keep an eye on this one too ๐
I don't think there's atan2() and I don't know about conversion to integer.
@onyx hinge @cursive condor You basically want to be able to initialise an integer array from a floating point one, right, like so ```python
a = array([1, 2, 3])
b = array(a, dtype=int8)
with floats in a, basically yes
@cursive condor a is automatically a float array.
yeah, ok
@onyx hinge It is a bit embarrassing: I have tried to add test modules for a couple of functions, but they all fail. I don't see an obvious error, though. Do you think you could cast a glance? It must be something really trivial, like wrong indentation or similar. https://github.com/v923z/micropython-ulab/tree/cholesky-test/tests
and I noticedabs() was missing, and round() too , but floor() or ceil() will do the job...
@cursive condor You can call abs directly (it is a unary operator) as a = array([1, 2, -3]); abs(a). We can add round.
Is there a correct person or team to request review from for the circuitpython-org repo?
@lone axle You can probably request from CircuitPythonLibrarians there as well.
nice for abs()
and I noticed
abs()was missing, andround()too , butfloor()orceil()will do the job...
@cursive condor Do you mean https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.round.html?
nice for abs()
@cursive condor I forgot to mention thatabsshould be fast (it is aware of the array type), it is implemented inulabitself.
Ah, I did misinterpret. Sounds perfect
@cursive condor In numpy, round is actually not a function on its own, but a method of the ndarray, and I think, that's why I missed it.
yes, this round()... I think it can be usefull
and you did an amazing job already
and you did an amazing job already
@cursive condor Thanks! One tries to please๐
@onyx hinge @cursive condor Could you comment on how this should be implemented? I have never used the function, but it is not simply the round function from math.h: it truncates on decimal places. My hunch is that we would have to multiply by some power of 10, call round from C, and then divice by the same power of 10. I wonder, whether, by doing so, we introduce truncation errors...
in cpython it's here : https://github.com/python/cpython/blob/master/Python/pymath.c#L72
or not...
I think this is a different function. That is part of python itself, and has nothing to do with numpy.
If you want to have round, then it must be a method of the ndarray, as in https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.round.html .
I just wanted to know how it was implemented elsewhere
@onyx hinge Jeff, here is an example, where the speedup with the C code is very spectacular: https://micropython-ulab.readthedocs.io/en/latest/ulab.html#benchmarks . Factor of 50. True, the python code could probably be optimised...
like here : https://github.com/python/cpython/blob/master/Lib/_pydecimal.py#L1830
@cursive condor Do you want to try it yourself?
oh no, not yet. I'm not fluent in C.
I try to read code, and understand it, for now
Well, in that case, you might have to wait a couple of days.๐
@cursive condor As far as arctan2 is concerned, we might have to restrict it to ndarrays only. numpy allows general iterables and scalars, but treating everything might be too much hassle.
@cursive condor Instead of atan = ulab.array([math.atan2(y, row[i]) for i in range(width)]), you could do vector.atan(y/row), and shift it, if necessary: you have a single y value, and you know the sign of that. That should be much faster than iterating in python.
@idle owl thank you. Took me a minute to get back to but I've done that now, found some unrelated fires at work that needed putting out shortly after I said that before.
@lapis hemlock huh that is weird, I don't know what would change the spacing like that.
@lapis hemlock atan2() gives answers in 4 quadrants, so while you can sometimes substitute atan() of a division for it, you can't always
for round(), I guess I'd start with the case which does NOT specify precision, and converts to an integer while detecting overflow .. (which is not quite the same as round(val, 0), which rounds to 0 digits but returns a float. my oh my.)
@lapis hemlock atan2() gives answers in 4 quadrants, so while you can sometimes substitute atan() of a division for it, you can't always
@onyx hinge That's right, but the specific example has a constantyin it, so it is known at the outset, in which half plane you are. This is definitely not the general case, I get that.
@lapis hemlock huh that is weird, I don't know what would change the spacing like that.
@onyx hinge We can remove those tests, if you don't know what could be wrong.
when you ./build.sh it should leave .out files, and renaming them to the exp file should ... work
for round(), I guess I'd start with the case which does NOT specify precision, and converts to an integer while detecting overflow .. (which is not quite the same as
round(val, 0), which rounds to 0 digits but returns a float. my oh my.)
@onyx hinge As far as I see,numpyalways returns a float, even if the result is an integer.
when you ./build.sh it should leave .out files, and renaming them to the exp file should ... work
@onyx hinge Oh, so that was the trick. I will try that.
@onyx hinge But
./build.shcallsmicropythonitself, so one can't compare the results to those innumpy. Is that correct? I actually ran the scripts innumpy, and copied the results to the.expfiles.
@lapis hemlock if there is no .exp file, then the result is compared to the result of running desktop python3
if there is a .exp file then the micropython output is compared to the .exp file
@raven canopy or anyone else actively using FrequencyIn? I'm going to wean it off the ticks_ms value and wondering what the best approach will be.
@onyx hinge The trick with `./build.sh' eliminated the problem. Thanks a lot! I will just merge the branch. I haven't changed anything beyond test script, so no review is necessary, I believe.
I think that the exact text of running with numpy and running with ulab are not likely to be the same
unless a lot of attention is paid to the problem anyway
That's true, especially with floating point numbers.
@onyx hinge I just merged master and now I can't compile anything D:
make: *** No rule to make target \"extmod/ulab/code/create.c\", needed by "build-meowbit_v121/genhdr/qstr.i.last". Stop.
@ionic elk did you do the git submodules dance?
oh hmm k
ulab is in a new-ish submodule and even more recently we made stm32 use it
ok it is fix
Sorry, didn't pick up that it was a submodule issue from that error message.
@slender iron hmm... let me look at your base change again for getting away from SysTick. and, refresh myself on my own code. ๐
it looks like there is a reference timer but ticks is used for the actual period and computation
yeah. it uses ticks_ms for the time domain. iirc
Thanks @foamyguy. Maybe for the ones that have a search, we could leave both links in there so people can see other tutorials.
@slender iron so, would it switch to using port_get_raw_ticks, and then adjust the math from 1000 to 1024?
@ionic elk great
@lapis hemlock thanks for the hint. it worked well with ย atan(row / y)ย so 1.5 secs become 0.15 secs
This PR adds the PulseIn module to the STM32 port, used for IR pulse reading. Tested on the Feather STM32F405 and PybNano V2 - records the same data as a control M4 Express, and sends trigger pulses of the correct duration. Currently handles all interrupts generated by EXTI - if external interrupts are eventually used for power wakeup, some of this HAL-level code may need to be factored out into Microcontroller or a similar shared location.
@cursive condor Great!
atan(y/row) made an error, I can't divide something by an array
atan(y/row)made an error, I can't divide something by an array
@cursive condor I know about that issue, and it is related to the order of the operands. @onyx hinge mentioned that in his tutorial. I will fix that, in fact, there is already an open issue for that on github.
row*(1/y) in the interim?
How does that work? I don't see that at the moment. He needs y/row, doesn't he?
@slender iron ahh. with the loss of current_us = current_ms / 1000 (basically), that's going to force more recalculation beyond 1000->1024. not sure how much that's going to affect accuracy. i'd have to sit down with the math and some raw data to re-orient myself to it.
But atan(row/y) is just a rotation of the coordinate system, so that should be OK. At least, for this special case.
@onyx hinge I think tan(row*(1/y)) should have the same result
and tan(row/y) was good only for 2 quarters of the image
row/y works, but y/row doesn't, because y is not an ndarray.
and
tan(row/y)was good only for 2 quarters of the image
@cursive condor Sinceyis fixed, it doesn't matter.
Sounds good to me. I'll make a new commit in a little while to put those back.
the resulting image was not as expected ... soooo ...
But if y > 0, then you know that you are on the upper half plane, so atan2 doesn't bring in any extra information.
You need atan2 only because there is an ambiguity in the sign, which you don't have.
well ... every intensive bits are now handled by ulab ... with the same parameters, worst version took 51 sec, best is now 6.6 sec
I don't know why it works one way and not the other equivalent way ...
y is a float, and it can be negative. it is fixed for one row, but change ...
double atan2(double y, double x);
These functions calculate the principal value of the arc tangent of y/x
so maybe it's tan(row/y) to get the expected result ?
y is a float, and it can be negative. it is fixed for one row, but change ...
@cursive condor But in your example,ywas fix: you hadatan2(y, row), whererowwas anndarray. I understand that you might still have to iterate overy, but you can still remove the iteration overrow.
oh what I said is nonsense, carry on
so maybe it's
tan(row/y)to get the expected result ?
@onyx hinge Thex->yis just a coordinate transformation. I can callyx, if I want to...
@cursive condor if you are plotting stuff, it would be cool if you could share a photo of something you're plotting just for the sake of excitement ๐
yeah it's what i'm doing
.. stepping away again ..
I am signing off, too.๐
just a heads up -- needs more investigation, but I am seeing an issue where I need a hard reset to get an SPI device working after a soft reset. without the hard reset it appears to hang -- using current master commit d988af0 - observed on both Teensy4.0 and feather_m4_express -- I'll try to get a good test case and file an issue - probably not util tomorrow. Note - I am using board.SPI() if that could be relevant...
neat!
thanks!
I don't know how many hours I spent with Fractint and Xaos way back in the 90s and early 00s
my pleasure. I'm cleaning the code to update the github repo
I wonder if these are doable on CircuitPython. I did a sort of similar 1D simulation for neopixel, but going to 2D would be really neat https://en.wikipedia.org/wiki/Reactionโdiffusion_system
(well, mine is a 1D wave simulation, but they're all differential equations which can lead to interesting behavior over time)
I just had a weird problem. Multiple CircuitPython devices would show the CIRCUITPY device when plugged in, but serial programs couldn't receive characters from them. Re-plugging the USB hub I use fixed it.
I'm about to show this USB hub the door
@slender iron For the F7/H7 additions I'm guessing I should rename the port directory from stm32f4 to either stm32 or stm - do you have a preference?
@ionic elk different from micropython
stm then?
Probably worth doing that as a PR by itself, I think - otherwise git won't highlight specific changes
Micropython is stm32
@raven canopy I don't think we need ticks at all. the reference timer can give us a frequency to compare to
fyi - chat about the circuitpython powered nRF52840-based OHS20 wrist badge is over on the OHSummit discord: https://discordapp.com/channels/687040227272818724/687378975030247442
I don't think this link works :(
@fierce girder this link does not work for me
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 5.0.0 on 2020-03-02; Teensy 4.0 with IMXRT1062DVJ6A
>>>
>>>
>>> import microcontroller
>>> print(microcontroller.cpu.frequency)
600000000
>>> print(microcontroller.cpu.voltage)
None
>>> print(microcontroller.cpu.uid)
bytearray(b'\x1d\x01\x7fg\xd2i1;\x18\x00\x00P\x02\x00B\x00')
>>> print(microcontroller.cpu.temper...
"You find yourself in a strange place. You don't have access to any text channels, or there are none in this server."
in the distance: sirens
@prime flower darn... not sure how to link to a discord channel
I think you need an invite link
This PR changes the directory name of the stm32f4 port to stm, to account for new non-f4 additions. This PR should not be submitted before #2697. Also breaks #2598, which will need a very minor revision.
@slender iron with the reference timer triggering the handler based on the counter overflow, will it be consistent/accurate enough? the clock is set to 98.304MHz, which overflows 1500.nn times per second with a 16bit counter. if my equation is correct. (i haven't had to stretch these muscles in quite some time)
what happens when higher priority interrupts skew the handler?
ticks_ms has the same problem
really? i thought SysTick was at the highest priority... hmm
we could use the capture functionality of the counting TC to grab it faster
it is but interrupts still have lag
what frequencies are important?
capture
arg. that mode...brings back horrible memories. ๐ its blocking.
what do you mean blocking?
using capture forces the interrupt handler to fire at each event, which is what was locking up pulsein above certain frequencies. blocking may have been the wrong term to use.
I was thinking the reference tc triggers the capture
on overflow
the tc itself can also give you frequency
the reference triggers reading the actual counter. the others are just in count mode.
using ppw capture
re: OHS nrf82540 badge, https://discord.gg/38C57Uf
Michael Welling started a "#badge-hacking" channelโ
โ
I guess I can't link directly to a channel
ah, I'm thinking the TC could take two input events, which it can't
we could change the TC event from COUNT to PPW and it could measure anything slower than the base clock
trying to find all my old notes
@raven canopy you're the go to for the docs system, right?
hehe. i was chasing that notification!
"go to"...i wouldn't put myself at that level, but i know a thing or two. ๐
Lol no pressure. Just had a wee CI failure that I don't understand, couldn't remember who to loop in.
link me in, and i'll gladly take a look.
added you to review but it's here https://github.com/adafruit/circuitpython/pull/2699
thanks much
hmm. looks like it's pulling in all of the HAL files to parse.
I think there is a blacklist for files in docs/ somewhere
yep. need to change these exclusions: https://github.com/adafruit/circuitpython/blob/master/conf.py#L143
seems like there's some junk in that file. want me to clean it up while I'm here?
sure
@raven canopy did you try PPW at all?
seems like that could greatly simplify it
i remember trying it, but there was a reason it didn't work. that's what i'm trying to find notes on.
@ionic elk ๐ that's one down. incremental progress is the best, right? ๐
@slender iron i think this is the best i'll get, note-wise. https://github.com/adafruit/circuitpython/pull/1144#issuecomment-416008353
it was in response to that (PPW interrupt loop), that we switched to the reference timer setup. i took what seems to be horrible notes in the weekly meetings.
are you referring to me chipping away at CI here ๐คจ
At least it isn't failing just for giggles like on my PulseIO
That one's giving me big red github banners and stuff, "cannot request CI action at this time" etc
picking random new tests to fail that it passed last time โ
i think Dan has fought through those...
Well, it's a finicky beastie. I might just return to it tomorrow and find it working fine again.
Now I'm moving on to the fact that I can't install any STM32 tools on Catalina ๐
@raven canopy I think if we use PPW we don't need an interrupt at all, we just read the register as needed
it won't average but the python code can do it
i vaguely remember the COPENx register not working with a pin (==1), which is what forced the use of EVSYS. does that require an interrupt (i've been out of that datasheet for too long)? its of course, not in the errata that it doesn't work. can definitely be revisited though. being combative has not been my purpose here. ๐
hrm, will have to look into it
no worries, I appreciate anything you can remember
it's been two years so it may be in the errata now
its not. just pulled a fresh one. ๐
totally. it could very well have been my blundering.
mmmmm chili
we just had fresh bread I made while frustrated about hard fault handler ๐
Hmmm... Would it be possible at some point to use AudioIO with a DAC over SPI/I2C/I2S?
@ivory yew we have I2SOut on some MCUs, I2C is probably too slow for audio (400kHz vs 1.5Mbit/s for uncompressed CD quality audio). SPI would be interesting, but I don't know of any HW for it. https://circuitpython.readthedocs.io/en/5.0.x/shared-bindings/audiobusio/I2SOut.html
Ah cool I didn't know about audiobusio
Sol's dac is on spi, I wonder if I could port i2sout to spiout
It'd have to specific to a particular dac though. Hmm. No worries, just doing some research.
yeah. First DAC I looked at, MCP492x, would probably work without too much trouble. Trigger a 32 bit transfer from a 44.1kHz timer. Tie /LDAC low. Sample updates will be offset by 22.7us. I think you have an AD5686xRUZ which is less likely to match up with the SPI hardware because you need to write 24 bits per channel you want to update
yeah
FYI, the axoloti board which is designed for audio work uses an ADAU1961WBCPZ driven by an STM32F4something according to its schematic. It runs at 48k 24bit and notes say it's capable of 96k.
I've added back the guide search links to the ones that I changed. I also found some other devices that have a good list of search results and added links for them as well.
Re-tested on 5.0.0 and still get the same results.
Just received a STM32F405 Feather Express today. Thinking the USB A MALE / micro B MALE cable on my bench would fit. No go, no joy. So what is the USB port on this device, what am I looking for? Micro-B FEMALE? Is it a micro variation of USB C?
@mellow turret It is USB-C
@timber mango Thanx, I'm on it, ordered a right A to C adapter. have plenty of USB A floating' around the lab. When the adapter arrives, it should be 'All the way with LBJ!' ๐
I've got a complete refresh on a few millisecs, but you must trade memory for speed :
>>> start = time.monotonic(); pixels = displayio.Bitmap(240,240,255);palette = displayio.Palette(255); tile_grid = displayio.TileGrid(pixels, pixel_shader=palette);group.pop();group.append(tile_grid);print(time.monotonic()-start, "secs to create and show a bitmap")
<TileGrid>
0.00708008 secs to create and show a bitmap
>>>
A fill() method for the bitmap object would still be amazing, and even...
@tulip sleet I'm running into an odd issue -- where should i file this issue? When using my rfm69 on a feather_m4_express or teensy4.0 I find that the accessing SPI hangs after a soft reboot if I create the SPI interface with board.SPI() rather than busio.SPI(board.SCK.......). After a power cycle, either method works. Should I file an issue with CP , Bus_Devoce or RFM69? I am using the current master commit d988af0 ...
I'd tried that on a CLUE bit with a real application I ran out of memory immediately :(
The CLUE's less tight than the 32kB in the SAMD21 stuff like CPX but as soon as you bring in the clue mega-object it chews through a lot its memory:
Adafruit CircuitPython 5.0.0 on 2020-03-02; Adafruit CLUE nRF52840 Express with nRF52840
>>>
>>> import gc
>>> gc.collect() ; print(gc.mem_free())
144736
>>> from adafruit_clue import clue
>>> gc.collect() ; print(gc.mem_free())
92224
with less colors it may work too. Replace 255 value by 16, 4 or even 2, it take less memory (again a trade-off)
I had a 200x201x2, and a 200x201x9 but anymore blew up even though I was no longer using the 200x201x9 one so it would have been subject to GC. One of my images is a grid so I'm going to try and use TileGrid to reduce memory usage for that if I run into more memory issues - the pattern repeats more-or-less...
@solar whale are you using some RFM library that needs SPI? Do you pass it the SPI object or does it create it?
that sounds like a circuitpython issue: we are not clearing the lock on soft-reload after an exception or ctrl-c
that seems to be the issue..
i can transfer the issue to circuitpython
OK thanks
When using my rfm69 on a feather_m4_express or teensy4.0 I find that the accessing SPI hangs after a soft reboot if I create the SPI interface with board.SPI() rather than busio.SPI(board.SCK.......). After a power cycle, either method works. I am using the current master commit d988af0 ...
The hang is apprarently happening here:
https://github.com/adafruit/Adafruit_CircuitPython_BusDevice/blob/master/adafruit_bus_device/spi_device.py#L81
Is there is differece in how the lock is hand...
@tannewt could you check out the CI on this? I'm not sure how to get it to restart properly. It passed the failed tests previously.
@ionic elk the checkout failed again. maybe try merging from upstream and pushing again
i restarted the jobs, but the checkout failed again. @hierophect could you maybe merge from upstream and push again?
@tulip sleet it's already up to date. I'll try force pushing
nvm it won't even let me do that
I pushed a minor comment change, we'll see what it does
@ionic elk it's getting past the checkout problem, yay
@tulip sleet I'm also trying to figure out the best way to handle our submodule for the STM32 material https://github.com/adafruit/stm32f4 - it needs to be renamed and updated with the stm32F7 and H7 libraries.
i would just call it stm32 if they are all going to be merged
the only issue with stm32 was the ports/stm32 name in micropython, but I got rid of that directory, right?
sure, the name doesn't matter. I was going to go with STM32_HAL_lib
is that what it's called in the STM world? (
yeah @slender iron still wanted our directory name to be different so it's moving to stm, I've got a PR up for that now
@tulip sleet the actual HAL directories are all named things like STM32F4xx_HAL_Driver so I figured it'd be more descriptive than just calling it "stm32" and it's distinct from micropythons stm32lib
or stm32haldriver
In any case, though, if I change the submodule repo name that probably needs to be a coordinated process, right? Since it'll break things for a short period. We'll want to approve the PR and change the repo name at basically the same time.
@tulip sleet CI cancelled for no reason again. I know for a fact the F4 discovery passed before
@slender iron any ideas on this?
https://forums.adafruit.com/viewtopic.php?f=19&t=163189
looks
@tidal kiln very weird! can you have them copy the contents of their CIRCUITPY over to you?
seems like a software issue
like a zip of the entire CIRCUITPY folder?
ya, of the drive
ok, requested. i'll ping you again when it's up.
thanks! it kinda looks like the color processing used for eink
@dhalbert it cancelled itself again but it's on a board that passed previously - it's passed every test at this point, it just can't seem to do them all at once.
@slender iron quick ping about my last couple PRs - PulseIn is having some trouble with CI but has passed every test at some point, and the stm namechange is ready to go but will probably incur merge conflicts with PulseIn regardless of whether it is merged before or after. Once the namechange PR is through I think we'll need to do a coordinated bit of work where we change the stm32f4/ submodule name and also submit quick PR to acknowledge the change.
That should allow future F7 and H7 submissions to go through more smoothly.
Does that sound ok by you?
@onyx hinge @cursive condor As requested, I have added the around function, and you can also convert dtypes between arrays. https://github.com/v923z/micropython-ulab/pull/63 Here is the documentation https://github.com/v923z/micropython-ulab/blob/round/docs/manual/source/ulab.rst#initialising-by-passing-arrays, https://github.com/v923z/micropython-ulab/blob/round/docs/manual/source/ulab.rst#around Jeff, if you think that it is OK, you can merge the branch.
@ionic elk will look now. just went for run to get out of the house.
Two minor suggestions on the interrupt handlers but good otherwise.
How about moving this into pulsein_handler? That will factor it out.
Don't do else if here and below because more than one pin may actually have interrupted. Getting them all in the same handler will save the overhead of re-calling it.
This looks good to me! I'll let you merge when ready.
@tannewt revised, thanks!
Looks good to me! Nice for loops! I hadn't thought that far ahead.
Feel free to merge once CI is happy.
@tulip sleet Can you take a look at this one? There's a ton of chatter but none of it is Adafruit folks. https://forums.adafruit.com/viewtopic.php?f=60&t=162938
I wish I had a WiFi FeatherWing. I would add it to my FrankenCircuit that has Bluetooth (Bluefruit LE SPI Friend breakout board) and RFM69 radio (also breakout board). Bluetooth and RFM69 are both working. ๐ ๐ ```python
FrankenCircuit v0.0
Initializing Bluetooth
BLESPIFRIEND
nRF51822 QFACA10
A061ADEB7464CE53
0.8.1
0.8.1
Apr 10 2019
S110 8.0.0, 0.2
Initializing the RFM69 radio
RFM69 Radio Data
Temperature: 87.8ยฐF (31.0ยฐC)
Frequency: 915.0 MHz
Bit rate: 250.0 kbit/s
Frequency deviation: 250.0 kHz```
@slender iron ok, merges are in. Could you approve the additions to https://github.com/adafruit/stm32f4 so I can test them out? Then we can do the hotswap of the submodule
Oh wait, I guess I don't even need approval on this repo ๐
I don't really like the suggestion of playing dropping egg with a CLUE. I believe a lot of kids or adults might destroy their CLUE doing that...
Even in the YouTube video one CLUE stopped to boot.
It's great, it's fun, but it is potentially destructive.
@slender iron you free to do this submodule swap? I don't have permission to rename adafruit/stm32f4
needs to be renamed to stm32drivers and then I'll quickly get a PR in to change it in Circuitpython
right
are those the same drivers as : https://github.com/STMicroelectronics/STM32CubeF4
?
since we're switching maybe we should move to a world where we're based on st's repos or forks of them
there are repos for H7 and F7 too
Oh, did they even have that last time we checked?
it isn't very compact... lot of cruft that isn't the drivers
we shouldn't do much in there though
I'd prefer those repos since they make it clear how to update them and where it came from
Where do you want it? Should I keep it in ports/stm? or add them all to Lib?
maybe a subdir in ports/stm?
I wish they had a combo one... it's going to copy all the projects and CMSIS stuff for every chip family.
looks for a way to do a subfolder
I don't see any way to do it. You are right that it is heavier weight but I think the history and ease of updating is worth it. It's one of my major gripes with HALs. Maybe @tulip sleet and @onyx hinge have other ideas.
๎ฑ git clone -o st git@github.com:STMicroelectronics/STM32CubeF7.git Thu Mar 12 13:14:51 2020
Cloning into 'STM32CubeF7'...
remote: Enumerating objects: 5109, done.
remote: Counting objects: 100% (5109/5109), done.
remote: Compressing objects: 100% (3128/3128), done.
remote: Total 30608 (delta 1911), reused 4179 (delta 1878), pack-reused 25499
Receiving objects: 100% (30608/30608), 454.34 MiB | 34.93 MiB/s, done.
Resolving deltas: 100% (15161/15161), done.
Updating files: 100% (31156/31156), done.
/V/GitRepos ๎ฐ
๎ฑ git clone -o adafruit git@github.com:adafruit/stm32f4.git 27.3s ๎ณ Thu Mar 12 13:15:46 2020
Cloning into 'stm32f4'...
remote: Enumerating objects: 3121, done.
remote: Counting objects: 100% (3121/3121), done.
remote: Compressing objects: 100% (942/942), done.
remote: Total 3121 (delta 2278), reused 2976 (delta 2138), pack-reused 0
Receiving objects: 100% (3121/3121), 30.44 MiB | 35.54 MiB/s, done.
Resolving deltas: 100% (2278/2278), done.
you/we could clone the submodules shallow and only do deep if we are going to alter them
ah true
I must have to practice my git-funise - what is a shallow clone?
didn't seem to help
๎ฑ git clone --depth 1 --single-branch -o st git@github.com:STMicroelectronics/STM32CubeF7.git Thu Mar 12 13:19:19 2020
Cloning into 'STM32CubeF7'...
remote: Enumerating objects: 27204, done.
remote: Counting objects: 100% (27204/27204), done.
remote: Compressing objects: 100% (12958/12958), done.
remote: Total 27204 (delta 14330), reused 25900 (delta 13925), pack-reused 0
Receiving objects: 100% (27204/27204), 449.36 MiB | 37.10 MiB/s, done.
Resolving deltas: 100% (14330/14330), done.
Updating files: 100% (31156/31156), done.
shallow is only cloning the current version of the repo instead of the whole history
it's weird, it gets to 99%, fetching only ~~100MB and then it has to fetch a dozen or so huge objects
Doesn't seem to save much
i wonder if they need to git gc
@tulip sleet do you have a preference on which to use in circuitpython? the heavy st repos or our own
@dmopalmer Could you please elaborate on why you want these things? I'm reworking some clock stuff now to enable sleep and am revisiting both PulseIn and FrequencyIn to do it.
@rafi021 What is the frequency range you are trying to measure?
@slender iron @ionic elk is the tinyusb ST repo good enough or is it incomplete? Given that we are using tinyusb, it has to include what we need
not if we don't include the tinyusb submodules
I mean the contents of it are fine I just figured it wasn't a good idea to include another submodules submodule
but i mean we can include that same submodule as a first-level submodule
doesn't tinyusb need its ST submodule to be able to compile??
well the Adafruit repo is just a copy of Tinyusb's repo right now
i guess tinyusb is just looking on the -I path, so it needs to find them somewhere.
You were mentioning that it was an advantage to have our own clones of some submodules to reduce the chance of breaking changes
right, generally we have a parallel copy of the submodule to use
so tinyusb has its own trimmed ST HAL repo, I thought
isn't that what we are using now? I'm confused
heh, looks familiar
we could nab Zephyr's nice tidy repo https://github.com/zephyrproject-rtos/hal_st/tree/v1.14-branch
is it the same API?
yes
the only problem is that the STMicroElectronics one is a pig, probably because of unnecessary history (like someone accidentally or deliberately checked in some binaries or zip files)
yup
(a pig?)
we could fork and delete stuff
so we could use the tinyusb one or clone our own and throw out some old history and see how big it is
gmta
a pig = huge
I started working on this and have nRF working, atmel-samd in progress. I plan on doing STM and iMX RT as well. My work is here: https://github.com/tannewt/circuitpython/tree/lower_power
I don't have pin wake yet. Now it is simply that the CPU will sleep when time.sleep() is called. I do intend on adding pin wake soon after.
@Hieropehect can you just expand on that?
@ionic elk my issue with that repo is that it doesn't share history with the st ones
it's based off TinyUSB
then it should be a fork
Is that the best option out of the three? 1) fork TinyUSB's officially 2) fork each of the STM32 ones and cut cruft 3) use raw STM32 ones and ignore ginormousness
my vote would to be to use thach's repo directly
that way we're in sync with tinyusb and I like the commit messages since they include version numbers
yup and we can always fork if we really need to
Ok. Cool. I will do this. Now I just gotta go back and remove all those ST submodules I just added ๐ฉ
My i.MXRT port of CPY got me a Runner Up place in the Hackster NXP Challenge ๐ https://www.hackster.io/contests/nxpcrossover
sorry for the indecision @ionic elk
is k
@slender iron zip added:
https://forums.adafruit.com/viewtopic.php?f=19&t=163189#p803199
i still can't recreate it, even with their bmp's, lib's, and code.
hrm interesting!
This PR moves the ST and CMSIS drivers from an old single-purpose repo to the one maintained by TinyUSB: https://github.com/hathach/st_driver. This will enable F7 and H7 features to be added, and will ensure the tinyUSB and Circuitpython STM32 implementations remain tightly synced.
@tidal kiln it works for me too. it's probably cheaper/easier to just replace it
ok. weird that the hardware checked out OK with arduino sketch.
ya, two other ideas would be to get them to erase the fs
could also give them a CP prog that uses shapes lib to just draw colors
but any corruption would have been copied into the zip
could ask for a picture of the terminal
see if it is right or not
ok, i'll try a few more things. will let you know if anything comes up.
it's weird that it's only on bitmaps
you could also ask for exact plug/unplug and button press instructions
yep, you'd think if it were a HW issue it wouldn't matter
BMPs vs. colored rectangles
but i was focusing on display HW - maybe it is a fs thing
I would expect any fs issues to be copied over
Trying to use older hardware really does not get one anything except frustrated. I can not get the information I need to set my Bluefruit LE SPI Friend to be a URI Beacon. Nothing I have tried works.
Can you rotate that image? It is hard to to tell what everything is. It will be a long time until I can afford to order more toys from Adafruit. ๐ฆ
@timber mango did you try AT+BLEURIBEACON or AT+EDDYSTONEURL AT commands?
The simpletest in the bluefruitspi library appears to be writing AT commands to the BLE device. I don't see any example specifically for beacon. But looking at the list of AT commands these ones seem like the ones to use for making a beacon.
@lone axle I tried the first but not the second. I do not have the fancy new nRF52840 hardware. I have the Bluefruit LE SPI Friend breakout.
I found them here: https://learn.adafruit.com/introducing-the-adafruit-bluefruit-spi-breakout?view=all#version-0-dot-6-7-18-4
I have been through that tutorial.
@lone axle I think I am just going to have to let this go because it has become way to frustrating for me to deal with. ๐ฆ ๐ฆ
I noticed after merging in that the links are on the same line. Maybe we can make these bulleted if you'd like to submit another PR @FoamyGuy?
@makermelissa Hmm I thought were in bulleted lists already. Do you know which ones you saw that were on the same line? I took a look at a few of them on circuitpython.org/downloads and the ones I saw do seem to be appearing in a bulleted list now. I can definitely make a new PR to fix any that need it though.
<img width="506" alt="Screen Shot 2020-03-12 at 6 44 50 PM" src="https://user-images.githubusercontent.com/2681417/76581711-97522500-6491-11ea-8c82-cfcc0c4a3aa0.png">
Ah thank you. #422 fixes the CLUE links.
Greetings all, is this a good place to ask about adafruit_touchscreen running on a Pyportal? (running CircuitPython 5.0.0-rc.1)
STM-based meowbit_v121 has a uf2 bootloader. Build and upload a .uf2 for the board, not a `.bin.
Thanks pcoxall aka @Mr-coxall from https://forums.adafruit.com/viewtopic.php?f=60&t=163432.
So, if I'm reading this right, _bleio scans the entire data section for each prefix, yeah?
@solar basin advertising data? yup
each set of advertising data is length encoded so it looks at the prefix of each set
Good night. I will be back in a few hours, or maybe sooner if I can not sleep. ๐
@tidal kiln If you've run out of things to try, it might be interesting (if it's possible/easy) to drop the display's SPI bus speed substantially to see if that makes any difference for https://forums.adafruit.com/viewtopic.php?f=19&t=163189
The soldered side of my connector looks a bit different to the misbehaving CLUE. I have black rather than green boards and with mine I can see the dark matte board between the soldered pins on left side. On the misbehaving one there's not much green on show but perhaps the light is just catching the lacquer?
I just upgraded a CLUE to 5.0.0 and libs from today's bundle. Is there a known issue?
File "code.py", line 7, in <module>
File "adafruit_clue.py", line 917, in <module>
File "adafruit_clue.py", line 207, in __init__
File "adafruit_lsm6ds.py", line 247, in __init__
File "adafruit_register/i2c_struct.py", line 85, in __get__
File "adafruit_register/i2c_struct.py", line 85, in __get__
File "adafruit_bus_device/i2c_device.py", line 139, in write_then_readinto
OSError: [Errno 19] Unsupported operation```
code.py is the slideshow code straight from the guide.
not that I know of
@tidal kiln what markings does your display ribbon cable have on it?
mine doesn't match the user who is having trouble
OK, when it first comes back from having the CP UF2 copied onto it:```Adafruit CircuitPython 5.0.0 on 2020-03-02; Adafruit CLUE nRF52840 Express with
nRF52840
Traceback (most recent call last):
File "code.py", line 7, in <module>
File "adafruit_clue.py", line 917, in <module>
File "adafruit_clue.py", line 207, in init
File "adafruit_lsm6ds.py", line 244, in init
File "adafruit_bus_device/i2c_device.py", line 68, in init
File "adafruit_bus_device/i2c_device.py", line 178, in __probe_for_device
File "adafruit_bus_device/i2c_device.py", line 176, in __probe_for_device
ValueError: No I2C device at address: 6a ```
NFP133H-05A @slender iron
This is after erasing and recopying the latest libraries again, then recopying the latest CP for the board.
same for me
If I CTRL-D then I get the unsupported operation error.
It's a green CLUE if that makes a difference
PSA: I will be running another library patch in about an hour. This one is a "manual" patch, so notifications will be sent with the new Pull Requests. Sorry for the inbox pain.
FYI, my two (black-board) CLUEs both have NFP133H-05A in white writing on the display ribbon connector.
@umbral dagger what happens if you do an i2c scan?
(can you also tell us what the display ribbon markings are?)
if they match what carter posted
@umbral dagger -- tried 5.0.0 and it still is working OK for me.
@tidal kiln the user's display marking matches the internally documented one
@slender iron display cable markings the same as @opaque musk
hrm, ok
It seems better on a black CLUE
i2c is better?
hmm -- I'll try my green one ... just a sec
Works fine on the black one (once I figured out where the images needed to be ๐ )
Hmmm.. soldering looks a little light handed on the green board around the LSM6DS
@umbral dagger works on my green board as well
@slender iron fyi - i passed that forum thread up the line
@simple pulsar thanks for the suggestion. i'm also wondering if it might be a marginal connection. maybe slower spi could help? would also be interesting to try a BMP display via arduino. but at this point sort of running out of amount of iterations the poster might be willing to cope with.
@solar whale I'll try retouching that pin with an smt tip. There one that is noticeably missing the usuall bit of solder that's visible.
good luck! those are small pins
@tidal kiln I have seen displayport (or perhaps it was DVI) fail in strange unpredictable ways with overly long cable / splitter and that was a bit data dependent as to when your monitors would misbehave. In that case it was going beyond the spec but it reminded me of that. This is problaby happening more with (variable height) standing desks being in vogue.
Heh, didn't realize it sorted that way. Ok for now!
@tannewt thanks for getting this in even with the summit going on!
patches starting.... ๐ฌ
@tough flax I rebased my lower_power branch
My specific use-case is rather idiosyncratic. (I want to time the detections of photons from a telescope tracking a satellite to read out an optical identification beacon) but there are many other applications.
e.g. If you want to do period timing, e.g. for a tachometer or frequency counter, then measuring the individual times of each of a second's worth of pulses gives a more accurate frequency than counting how many pulses you ge...
I noticed clue is back in stock at the moment, I was getting twitchy with just 1 on hand
@raven canopy just a thought -- couldn't things like the Code of Conduct be a link so changes don't have to be updated in every repo...
or just change it to "Be kind" ๐
@solar whale i don't disagree with the thought, but that question is "too big" for me. :D
I could see a counter argument that it should be available when a repo is locally cloned (or created, via cookiecutter).
prospective in the weeds for monday?
No problem -- new mail rules are working ๐
@idle owl Not that I want it changed, but shouldn't this have refered to community_moderators not helpers https://github.com/adafruit/Adafruit_CircuitPython_FeatherWing/pull/59/files#diff-a1ee87dafebc22cbd96979f1b2b7e837R77
line 77
sorry -- I won't tell...
@solar whale Nah, good catch. But it turns out a patch will work after we get them all standardised. They were too all over the board before for a patch to work.
That is much simpler than this.
I'm almost finished with my new board UARTlogger2. To finish bootloader and circuitpython configuration and get everything in order before opening pull requests.
Searching guidelines for builds "How to Add a New Board to CircuitPython" and other sources I could not find any information more than "We only guarantee support for the flash chips used on Adafruit boards"
I would suggest creating a list of supported SPIFlash which are supported by CircuitPython, this would help makers to ensure that the component which they are going to use is actually supported.
@NightSkySK I think this is certainly a good idea and would be helpful to have. In the meanwhile you can find a list of currently supported chips in this file:
https://github.com/adafruit/circuitpython/blob/master/supervisor/shared/external_flash/devices.h
It may be a bit terse but the info you need is there.
I think it would be a good approach to have the list you suggested generated from that file
UARTLogger2 VID 0x239A PID 0x0095 # bootloader
PID 0x8095 # arduino
PID 0x8096 # circuitpython
We can provide a cross-reference to that file from the Learn Guide, since the file is the "ground truth" on what is supported.
@slender iron I'm working on the Adafruit Services library. All the services provide measurement_period and service_version characteristics. Can the service class definitions share the same declarative object that defines those characteristics, or do I need to instantiate new Characteristic objects for each service class? I'm not remembering whether the declarative objects are tied to a service or not.
@solar whale GitHub does some repo health checks and linking that'd we miss if we used a link I believe
@tulip sleet I'd subclass Characteristic to save uuid and such and then just instantiate it for every class
but i do need a separate instance for each class? e.g. (code is not correct for the args)
_measurement_period = Int32Characteristic(uuid=VendorUUID(adafruit_uuid_str(0x0001)),
properties=(Characteristic.READ |
Characteristic.WRITE_NO_RESPONSE),
read_perm=Attribute.OPEN,
write_perm=Attribute.OPEN)
_service_version = UInt32Characteristic(uuid=VendorUUID("ADAF0002-C332-42A8-93BD-25E905756CB8"),
properties=(Characteristic.READ |
Characteristic.WRITE_NO_RESPONSE),
read_perm=Attribute.OPEN,
write_perm=Attribute.OPEN)
class TemperatureService(Service):
"""Temperature sensor
uuid = StandardUUID(adafruit_uuid_str(0x100))
temperature = FloatCharacteristic(uuid=VendorUUID(adafruit_uuid_str(0x100)),
properties=(Characteristic.READ |
Characteristic.Notify),
read_perm=Attribute.OPEN,
write_perm=Attribute.NO_ACCESS)
measurement_period = _measurement_period
service_version = _service_version
so this is wrong?
yes you do
ok, thanks!, will structure as appropriate
you can have all those attributes wrapped in a subclass though
yes, looking to make an AdafruitService superclass
that would work too I think
yeah, not sure about instantiation of the class vars
@NightSkySK - you can also add a new flash to the list - I did this before, if you find one you'd like to use. You'll want to test it out first. They pulled in my change request to support my board into the linked devices.h file.
add UARTLogger2 board support for CircuitPython. VID and PID set according to issue #2703
@bwshockley Lucky me, my W25Q32JVSSIQ is on the list as W25Q32JV_IQ, I've just struggled to find any place where I can find the list of all supported devices. I've searched other board definitions to find if any other has the same flashSPI.
I'm getting an attribute error when trying to set the PWM frequency on a Trinket M0:
>>> pwm.frequency = 440
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError:
that doesn't seem normal
also it's weird that it has no details
@ivory yew did you construct it with variable_frequency=True ?
the "no details" thing is probaly still worth bug filing!
I'll see if I can send a PR once I get done with my experiments
that would be awesome
ofc
I did a search on forums and found Adafruit Forums: Is using circuitpython on rPi the only way to use a debugger.
I have some moderately complex code now in CircuitPython and this has some bugs in it. Normally this would be when I would add a breakpoint and then single-step the (python) code and I think I'd be able to work it out in a few minutes...
I think this is going to become more common and more of a gap as the bigger CPUs...
I've just realised that a CircuitPython debugger would be very useful for some bugs I wrote over last few days, hence that comment on issue 298
Thanks @slender iron
@simple pulsar That thread looks very familiar. Is that the one I started?
I have a script that is heading towards 1000 lines really fast. Sometimes, I wish for a debugger, but so far the print method is still working for me.
A lot of people disapprove of print debugging, but it's quick and surprisingly versatile and effective
If ARM MCUs keep going the way they are now, they WILL supplant Intel and AMD at some point. I remember when we drooled over 600 MHz Pentium systems...
@main meteor It is still working well for me.
It's getting pretty close, as efficient as ARM is: the only way forward for X86 is more cores at this point. I remember the days when a 66MHz pentium was considered fast and a 22MHz Sparc would outrun it easily.
I remember that too! The price of an x86 system, even with an AMD CPU will not evade ARM for too long.
And now, look what NXP is doing... ๐ ๐
I remember when a VAX 11/780 was the size of a refrigerator and gave you all of ... 1 MIPS. And we'd have dozens of users on it at once.
Oh yes, the age of the dinosaurs!
@main meteor I think users were slower back then. ๐
We just had the command line then, and were still impressed when we could ftp a 1MB tar file across the room in a few seconds.
You must be as old as I am.
Quite possibly.
This is weird. I am getting a UnicodeError, but there is no other information about the problem except a line number.
I am only sending printable text strings back and forth over an RFM69 radio link and somehow a string seems to have become badly corrupted. Strange.
@dmopalmer I'd recommend using pulseio.PulseIn in CircuitPython rather than frequencyio. It'll gives you ~1us accuracy of the gap between edges. The one tricky bit might be that it looks like the pulse high is only 2us long. That might confuse PulseIn and we'll need to adjust it.
(Looking back at the top I see you addressed PulseIn issues.)
- PulseIn gives you time of both high and low portions of...
@main meteor I'm a print-debugger first and foremost. It's the only debugging technique that works across language and platform in the same way. I was shocked to have to debug with an led blink on some micros.
@slender iron It would just be really useful to be able to get inside code, step through it, maybe print some variables, and continue on. I am pretty sure nothing like that will exist though, so I march on with my trusty print().
@slender iron How do I work on more Circuitpython library stuff when I do not have the sensors, boards, or peripherals necessary to test stuff out? I was just lucky with the HT16K33 library stuff because I happen to have one here.
Print debugging is ALWAYS usable too, no matter what environment you find yourself in!
G'Night. I may be back later.
I've added information about looking in supervisor/shared/external-flash/devics.h to https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython/initial-configuration. I think that should clarify things.
@slender iron It would just be really useful to be able to get inside code, step through it, maybe print some variables, and continue on. I am pretty sure nothing like that will exist though, so I march on with my trusty print().
@timber mango I'm not prioritizing a debugger because it's not blocking anyone from doing anything. I'd rather spend time unlocking new projects like solar powered sensors or python badges with better battery life.
@slender iron How do I work on more Circuitpython library stuff when I do not have the sensors, boards, or peripherals necessary to test stuff out? I was just lucky with the HT16K33 library stuff because I happen to have one here.
@timber mango What do you have already? You could also start poking at the core of CircuitPython.
@slender iron I do understand. I have become quite skilled in placing my print() statements over the years and knowing where problems are. I think knowing where a problem is is more than half the battle to hunting down a bug and squashing it.
@slender iron I have a couple displays (ht16k33 and charliewing), sht31d and htu21 temperature/humidity sensors, tcs34725 RGB, Fxas/Fxos NXP IMU, lsm303dlhc, lis3dh, vl53l0x, and apds9960. Of course, I have five various format rfm69 900 MHz radio modules to. I really like that little lis3dh - I got one because that is what is on the Circuit Playground Express (I have five of these now).
Poking at the core of Circuitpython sounds like poking a mama bear with cubs.
The core isn't that bad. A debugger is helpful when doing it though. Do you have any of the esp32spi airlifts? You could also try to make a library for bluefruit spi that implements _bleio
I do not have any of the airlifts or new bluetooth stuff. Do you mean write a _bleio compatible library for my Bluefruit LE SPI Friend?
ya, for the ble spi friend
That will be an interesting project. I am just learning how to use Bluetooth.
Not that I have any BLE SPI Friend, but that sound interesting. I can tell that searching BLE things on Adafruit learn guide or product can be confusing. The confusion increase when you figure out that CircuitPython support the serial protocol and so the App that was done for the old BLE stuff. Of course it is great and directly provide a lof of feature and make lot's of project accessible. It is just that I was missing a starting point that say what are the BLE (or BlueFruit) stuff in Adafruit universe.
@gilded cradle Any hit, piece of code, learning guide in preparation to control my Bit:Buggy?
@half sedge, no learning guide in progress yet (I'm finishing a couple others), but hopefully soon. In the meantime, I started off with this as a base: https://learn.adafruit.com/circuitpython-ble-crickit-rover, used the neopixel and adafruit_motor libraries and found pixels are on board.D0 and left servo is on board.D1, and right servo is on board.D2. I don't want to give away too much, but that should get you started.
Just had this happen again after about maybe 30 mins. I'd added loads of print style debugging to some code. Stopped after printing the first of five arguments to print().
Hi, I was involved in the translation of cp into Spanish, but forgot the process of getting started with it, is it documented somewhere?
I don't think it is actually. The easiest way to get started is to edit the .po file on GitHub. https://github.com/adafruit/circuitpython/blob/master/locale/es.po
IIRC there was a step I should do after editing the po file, make translation?
This is a work in progress commit so that if I'm still stuck, @tannewt can have the same code as me to facilitate pair debugging. this branch will be rebased ruthlessly.
@granite crow there is some information and discussion here: https://github.com/adafruit/circuitpython/issues/1098. Not sure if it includes what you are looking for though for certain.
@granite crow make translate is only needed when adding new strings in the code
Thanks for the link @lone axle i will check it out
Ok @slender iron I guess I have all the information to get started
๐
@slender iron I can confirm that with the ESP32 connected, 5.0.0 boots and runs fine.. your low power version doesn't start CIRCUITPY
This is on an Feather Bluefruit Sense + Airlift Wing
kk, will look this week at it. I think my approach is to change it all and then test and fix it up
anybody familiar with the 480 x 320 TFT LCD display with CircuitPython?
keep getting memory allocation errors
Which CPU? That display does eat a lot of RAM.
Metro Express M0
configured for SPI and here is what I get
Traceback (most recent call last):
File "code.py", line 30, in <module>
MemoryError: memory allocation failed, allocating 19200 bytes
here is the line its trying to execute
color_bitmap = displayio.Bitmap(480, 320, 1)
I think the M0 devices do not have enough RAM to to hold a bmp that size in memory along with everything else needed to work the display (and do whatever else your code does). On the Circuit Playground with Gizmo I believe I ended up needing to use OnDiskBitmap for any bitmaps that are the size of the screen. And it's even a bit smaller at 240x240.
Depending on what you are trying to do there is a "trick" where you can make a much smaller bitmap object than the screen and then put it inside of a Group that is scaled up enough to make it fit the screen. Then you can still edit the bitmap object which is now scaled to fit the screen
You lose the ability to make finer resolution things within the bitmap, but gain some efficiency. Totally depends on your use case though whether that technique could work for you.
thanks ..... where can I learn more about that
is there a way to place it on the SD card slot on the back?
Hmm I am not sure if the technique is fully documented anywhere DavidGlaude is the one who showed me how to do it. The only thing I know of off the top of my head to point to is this CLUE BLE patchwork demo that he and I worked on: https://github.com/FoamyGuy/Adafruit_CircuitPython_CLUE_ble_patchwork/blob/master/examples/clue_ble_color_patchwork.py
the variable bitmap is created as 8x8. then put into patchwork_group which is scaled up 30x so the final size is 240x240 (same as the screen on CLUE)
Yes, I would think you could put a bmp file on an SDcard and then put it in the slot and use OnDiskBitmap to draw it to the screen.
thanks, maybe its time to get the m4
Attempting to access the RGB_GREEN_LED on a Xenon throws this error:
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-87-g3a5f79ace on 2020-03-13; Particle Xenon with nRF52840
>>> import time
>>> import board
>>> from digitalio import DigitalInOut, Direction, Pull
>>> led = DigitalInOut(board.RGB_LED_GREEN)
Traceback (most recent call last):
File "", line 1, i...
@slender iron No problem with the approach
I notice that xenon has
#define CP_RGB_STATUS_R (&pin_P0_13)
while argon/boron have a macro called MICROPY_HW_RGB_LED_RED. Only the former is used. I think this means that there are two bugs: first that boards that use CP_RGB_STATUS_LED don't cooperate with DigitalInOut in the way that neopixels do (this bug, affecting Xenon); second, that the status LED doesn't operate on Argon/Boron.
@jerryneedell can you confirm whether or not the status LED works normally on Argon/...
I think I found the issue but I don't understand what the purpose is.
@tannewt in commit 5610e0 there is this:
#if defined(CP_RGB_STATUS_LED) // TODO: Support sharing status LED with user. #endif
It looks like before that commit the pins underlying the status LED are reset in a similar manner to the Argon and Boron. Can you explain to me the thoughts behind making the Xenon have a different implementation of the status LED?
@lone axle @digital elbow Yes get an M4 (that is what you have on PyPortal) or nRF52840. The scaling trick is only to speed up display if what you want is to display big square... This does not change the memory that displayio might need to "mirror" the screen content into buffer. The speedup come that scaling is done in C and not in Python.
displayio on M0 has only been made possible because of the Gizmo on Circuit Playground Express and HalloWing M0 Express. Both do require special "firmware" with frozen displayio inside.
The title pretty well says it all. There is no pin D6 on a Feather M4 Express. There is a pin D7 though. You might want to check the pins for the Feather M0 boards also.
Pin D9 also seems to be affected.
@jepler On my Argon the Status LED is not lit at all in CP. IT is red briefly after RESET the off. I can set it manually.
on the Xenon the Led is red briefly after RESET then white all the time.
In the bootloader - the XENON LED is Green - same for the ARGON
board.D6 and board.D9 are defined: https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/boards/feather_m4_express/pins.c. Maybe you installed a different .uf2 on your Feather M4? Which board is listed in boot_out.txt, or what shows up in the initial REPL prompt?
My interpretation is: Argon/Boron don't have the defines that create the PWM'd RGB status LED. This leaves the pins able to be used for other purposes. The Xenon does have the defines, but because of the TODO you can't take over the pins for your own use. However, it has an additional bug which causes the LED to show white instead of the normal CP status colors. Three ... three bugs.
If you didn't mind making your own build, you can simply remove the CP_RGB_STATUS_R, G, and B in por...
You are right, of course. It is the ItsyBitsy that has D7, ACK.
@jepler Thanks for tracking this down. I posted the issue in response to a discord conversation where this was reported. I don't have an immediate need for it.
Should the Xenon be changed to have the same configuration as the Argon/Boron? I'll be happy to look into that and put in a PR.
Or should this wait for the full implementation of the status LED.
@half sedge Ah, I see. thank you for the clarifying.
For anyone who was following this ticket which was mentioned in https://forums.adafruit.com/viewtopic.php?f=58&t=141504, the CircuitPython library has been around for a while now and can be found in the standard bundle and on GitHub as https://github.com/adafruit/Adafruit_CircuitPython_MIDI
@half sedge, no learning guide in progress yet (I'm finishing a couple others), but hopefully soon. In the meantime, I started off with this as a base: https://learn.adafruit.com/circuitpython-ble-crickit-rover, used the neopixel and adafruit_motor libraries and found pixels are on board.D0 and left servo is on board.D1, and right servo is on board.D2. I don't want to give away too much, but that should get you started.
@gilded cradle I have a working Bit:Buggy thanks to you: https://gist.github.com/dglaude/3338c5ebd48bbd0d9f8b6c221ba7d07c ... maybe I can adds the White_LEDs, detect proximity or diplay a changing image.
@prime flower (when you have time) https://forums.adafruit.com/viewtopic.php?f=60&t=162631
@jerryneedell Since it appears the status LED doesn't work properly on any board in the family, I am not bothered by the idea of Xenon to match Argon/Boron so the LED and let it be controlled by user code. If someone wants to contribute a proper fix that makes the status LED work, and also makes the user use of the pins work down the line, it doesn't create much additional work from what I see.
@slender iron I'm not feeling well, afk for a bit. could u email this to me so i remember when im back? thx
Yup! Take it easy!
@jerryneedell What exactly are the functional specs of the status LED supposed to be?
@jerryneedell What exactly are the functional specs of the status LED supposed to be?
I think it is all controlled here https://github.com/adafruit/circuitpython/blob/master/supervisor/shared/rgb_led_status.c but I would check with @tannewt or @dhalbert.
I was wondering if the teensey 4.0 verion of CP is available for testing?
@inland tusk yes . https://circuitpython.org/board/teensy40/
You can use the teensy loader to upload the .hex file https://www.pjrc.com/teensy/loader_cli.html
good morning!
๐ฅฑ I woke up at 3:14 am.
And had pie?
Feeling a bit irrational...
When I generate a PR, will it automatically be reviewed, or do I have to close it first?
I've been doing a bit of tweaking to CP code any copying code.py and two extra .py files onto a CLUE running 5.0.0. In general this works fine but I've just noticed the terminal session lock-up over USB. The screen output for USB was slightly more than appeared on the LCD.
Traceback (most recent call last):
File "code.py", line 169, in <module>
NameError: name 'MU_PLOTTER_OUTPUT' is not defined
Press any key to enter the REPL. Use CTRL-D to reload.
The `displayi...
don't close it. the review isn't automatic though, it's a manual process - someone has to actually look at the code. the only auto things are the CI stuff, which is up to you to get to a passing state.
My PR has passed all checks. Is there a way to request a review?
I did not see any way to do that.
@timber mango check the right hand column:
if you see a "reviewers" section with a gear you can click the gear and choose the appropriate team or person to request review. I'm not 100% sure if requesting review requires write access or not though. So possibly it may not let you.
@timber mango can you link to the PR?
@tidal kiln I see the reviewers section, but there is no gear there. My PR is https://github.com/adafruit/Adafruit_CircuitPython_RFM69/pull/27
added reviewers. i think you need permissions to do it.
Thank you.
<@&356864093652516868> Meeting in just under 1.5 hours. Please remember to add your Hug Reports and Status updates to the notes doc even if you'll be attending the meeting - it's super helpful! Thanks! https://docs.google.com/document/d/1Ev0a-zNbTzmMbo__zPvqba9rX3kdfS6LahXAfJQveu0/edit
Are you subscribed to the weekly email CircuitPython newsletter? You can easily with no spam or selling your email to a list - see this blog post with all the details https://blog.adafruit.com/2020/03/16/the-informative-python-on-microcontrollers-newsletter-subscribe-now-circuitpython-python-circuitpython-micropython-thepsf-2/
@fierce girder thanks !
Lurking, doing the ICYMI MakeCode newsletter for JP
I will be absent. Group hug to all!
lurking
overlapping meeting ๐
Group hug to everyone
Quite so, that is how you do a virtual conference. I think folks will use that as a template for smaller communities that want to put on an event but don't have the resources for one.
I'll be a few minutes late. It's meetings meetings meetings... ๐ซ
lurking today
I am absent today
lurking
lurking today
as we get going folks, feel free to put any questions you may have for adafruit, what we are doing, how we are doing, anything at all, i can address and answer them during the community section. consider it an AMA "ask me anything" - pt
Just mostly lurking today.
I woke up at 3:14 am this morning (PST).
@inland tusk will you have hug reports and status updates?
I am lurking
@maiden chasm will you have hug reports or status updates for us?
@inland tusk thanks, ๐
We are 17,000 people! Post going up later!
https://discord.gg/adafruit
lurking today
wow 2,000+ online
The biggest worldwide online Show and Tell begins Wednesday, March 18th, 2020 at 7pm ET
http://adafruit.com/showandtell
https://youtu.be/VmVkX_7PkLs
To show and share your project at 7pm today, view the chat or in discord https://adafru.it/discord and look for the JOIN link to join.
For best results be on a wired connection and have a headset and mic!
๐
micro:mag issue 7, CLUE 10 of 10!
http://go.micromag.cc/issue7
๐ฅณ
10/10 --> ๐ฏ
hackster.io gets a CLUE!
https://youtu.be/E7NJklkyCBA
We got a CLUE! This new board from Adafruit Industries is packed to the brim with features, in a Micro:bit form factor. Let's take a look!
// https://learn.adafruit.com/adafruit-clue
// https://microbit.org/get-started/user-guide/overview/
// https://blog.adafruit.com/2020/02...
CircuitPython is fast for prototypers
https://twitter.com/infosnek/status/1239334447423426561
I'd rather focus on hardware so I'm pleased with how little time I needed to spend in programming the Feather. CircuitPython is fast for prototypers. The working code is ~100 lines and is totally readable if you already know Python. No tooling is necessary.
What Is Adafruit IO?
https://youtu.be/bYhRhDvTP5c
Build IOT projects with Adafruit IO! Control your projects over the internet and create a dashboard to visually see your sensor data. #IOT #CircuitPython #Arduino #RaspberryPi
Adafruit IO Welcome Learn Guide
https://learn.adafruit.com/welcome-to-adafruit-io/overview
Adafruit...
Video is posted: IoT Design Week with Microchipโs โWizard of Makeโ Bob Martin and Adafruit
https://youtu.be/fu37Uf-CXNE
Day 2 - Machine Learning and Artificial Intelligence โ Afternoon with Guests from Adafruit
Register for IoT Design Week atโฏwww.microchip.com/IoT-Design-Week
Join us for a special afternoon session to talk about artificial intelligence with Adafruit.
Cloud
https://io.adaf...
March 12, 2020: added USB device support (tinyusb stack), clarified that 2MB PSRAM is supported, not 4MB:
https://esp32.com/viewtopic.php?f=10&t=14532
Espressif ESP32 Official Forum
Open Hardware Summit video, lots of CircuitPython:
https://www.youtube.com/watch?v=Ifin8nPZpGA
Livestream for the 2020 Open Hardware Summit.
Join us in the discord server to chat! https://discord.gg/38C57Uf
Free teaching resources for CircuitPython - Google Docs:
https://docs.google.com/document/d/1IFW0hVlbdIL8TCOloOHHzwv5pYj0YG106IjXT6b7Qq8/edit
Preview/Draft here, thank you everyone for the @ # and more!
https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2020-03-17-draft.md
Thanks PT ๐
Just for Pi day
lurking
๐
totes agree. huge hug to pt.
A late bit of lurking
merely lurking today
Simon is totaly ok
@ionic elk I think there's a flexy one actually
If you've played with multiplexed RGB matrices, you may have wondered "hey, could we possibly manufacture these on a thin enough PCB so it's flexible?" and the answer is ...
I don't know how far you can bend it ... you can find out, but then you need a new panel
and yeah cutting eye holes will wreck it all
Driving aย @Pimoroni Scroll pHAT HD from anย @Adafruit CLUE running @CircuitPython
Use of BIT:2:Pi to connect Raspberry Pi accessories to a CLUE with @microbit_edu form factor.
All the example work, it has the same orientation than the CharliePlex Bonnet:
https://t.co/yNbVCok...
Fun withย @Pimoroni Scroll pHAT HD + @Adafruit CLUE running @CircuitPython + @PiSupply BIT:2:Pi
Scroll text received in BLE UART.
Based on https://t.co/ZjwPPTOzko & support for Scroll pHAT HD in https://t.co/OCQQI7aX4p use this code https://t.co/IFzH02xiJy to replicate: http...
@steady osprey do you have any status updates or hug reports?
I got one of the 32blits myself, but haven't had any time to explore it yet.
@modern wing Mine sits a few feet away largely unused ๐
I can't play Doom Eternal in my COVID exile so I guess I'll have to program classic instead ยฏ_(ใ)_/ยฏ
@onyx hinge re RGB LED: @brazen cedar is working on that now, so you'll want to coordinate
[For Adafruit IO data logging] The size of the binary or the size of memory on popular boards when it's running?
@tulip sleet awesome, I am happy to step out of their way on this one ๐
if only
@tulip sleet awesome, I am happy to step out of their way on this one ๐
@onyx hinge Is this bug a really gnarly one? Its my first attempt at a contribution.
@timber mango you have an rfm69 right?
@brazen cedar I hope not, but you never know. Remember we're here to talk about it if you're feeling stuck
Yes, several. ๐
would you mind testing for jerry?
Sure. I do not have his latest code though.
its in pr24 of the repo
@onyx hinge I'm currently reading through rgb_led_status.c and trying to wrap my head around the functions. I'm coming from a C# background so I might not use the right terminology for a C/C++ project.
@brazen cedar we can help with terminology too, and also we don't snark at you when you get it wrong ๐
3 players and a ... judge? we have the word "arbiter" in english but it doesn't seem the right one.
yeah a judge
@solar whale Where in PR24 do I look for it? Is it an archive or separate scripts?
nope
Oh, wait, I have to checkout your branch, right?
@geeguy -- waht I do is - in my fork of the repo - checkout and update master then do git fetch upstream pull/24/head:pr_24 this creates a branch called pr_24. Then git checkout pr_24 and it is all there.
@maiden chasm We have a guide on the recommended workflow for CircuitPython on Git and GitHub, if you were not aware of it.
yes I've gone through, it was great point to start
@maiden chasm Excellent ๐ That's the goal.
or you can clone my fork of repo and then checkout jerryn_ack but I think it it is better to work from the PR
points to some issues that mention pdb
etc.
@solar whale That command did not work for me.
@slender iron you mean https://github.com/joedevivo/vscode-circuitpython
do you have upstream defined or is it just origin. If it is not a fork use origin not upstream
I need to drop off. Thank you everyone for participating today. Stay safe and remember we're here to help you in the ways we are able during this time - if nothing else, we can help you while keeping busy with projects. Remember to reach out if you need contact. We're all in this together. Cheers, all.
yes it is only 0.0.1 version released
git fetch origin pull/24/head:pr_24
it's been quite a while since we pulled from upstream micropython?
@solar whale I do not know how to work from the PR. There is much I still have to learn. ๐
yeah we have some changes in py that deviate from upstream. ๐ฆ
who can I ask for pythonistas role ?
@cursive condor I can add you
yes please ๐
@cursive condor here you go
thanks ๐
@timber mango you can clone it from here https://github.com/jerryneedell/Adafruit_CircuitPython_RFM69 and then git checkout jerryn_ack
fatal: Couldn't find remote ref pull/24/head
type the command you used
are you in your fork or just a clone of the adafruit repo?
I'm going to drop off.
OK, I have it now. I cloned your repo and then got your branch.
@tulip sleet can you mute?
Gotta drop too. ๐
I will start looking at it this afternoon hopefully. I am a little under the weather right now.
No rush -- hope you fell better -- I'll test/approve your PR later this afternoon
Ok, sounds good!
@slender iron I am actually in Spring Valley, CA right now, but hoping to move to WY before the end of summer.
Oh I'm excited now I gotta get my projects ready
I think an hour long is a great length, the half hour time has been feeling a bit crunched for time.
It's a great problem to have ๐
Gotta burn the slogans into everyones brains
but 90 minutes begins to feel like a slog sometimes ๐ฆ
but not you all, you're great ๐ผ
We could also timecap status updates :/
In my former life we were all about timeboxes, but they always felt a bit unfriendly. Not sure how it fits with the community nature of the meeting.
afk, time to take out the laundry and then go on a walk even though it's cold
It's feasible we could split off the library stuff from the core
I agree, it's nice having it recorded -- I can't always join so being able to spin it up later is my only option.
@slender iron your stream about logic analyser was great, I enjoy to see how programming on low level looks, please continue streaming about this project
My neighbors must think I'm bonkers, seemingly talking to myself all the time.
Have a great week -- dog walk time...๐ถ ๐
My 2001 outback had a similar tape deck, no AUX input. So i got one of those tape adapters to connect my phone to the car's speakers.
Allrighty, I'm out. See y'all later
Hi all! Next week's community meeting will be at the normal time on Monday at 11 am Pacific / 2 pm Eastern here on Discord. If you are outside the US please double check the time locally because the US has already shifted for daylight savings time. All are welcome to attend. The notes doc for next week is: https://docs.google.com/document/d/1XThAvWXJ-9gQJQ9y4ME6Tz7oRQsSzMzG_aE_cGeWzt8/edit?usp=sharing <@&356864093652516868>
Anyone have time for some C questions about the CP source files?
I've gotta grab lunch but can answer after that
ok ttyl
@onyx hinge No updates as of yet. I've tried the solution for the feather, which was unsuccessful. It seems like it isn't really fixable without a J-Link.
@brazen cedar always feel free to ask, someone else might be able to answer. ๐
@ivory yew ok thanks! I'm digging in to the code for the RGB status LED on the Xenon. There's two things wrong (show the correct status colors, and allow the user to take control of status LED). There's a bifurcation of logic between the Xenon and Argon/Boron code. Which set of code is the one I should build out more or bugfix?
User control of the status LED seems to work on the Argon/Boron but not on the Xenon
the file I'm looking at is /supervisor/shared/rgb_led_status.c
I'm back now too. good point @ivory yew
@brazen cedar in a quick look from my phone, there are differences in ports/boards/nrf/particle_[argon, boron, xenon]/mpconfigboard.h. The xenon has odd-man-out names: CP_RGB_STATUS_ vs MICROPY_HW_RGB_LED_ for argon & boron.
I have just got home, completely missed the weekly meeting. Sorry.
@raven canopy I noticed that too, that's why I asked which is the correct name/methodology to build further upon and bugfix
the status led/user control should be that same across all the particle series I would imagine
I'd have to look deeper; heading home from work. But, if argon and boron work, that'd be an easy starting point to test.
@raven canopy ok I look forward to your analysis
I'd suggest doing the one that works. ๐
@slender iron There's a todo in the code on the Xenon side that made me think that method was developed later but not completed so...idk. lol I'll give the Argon/Boron stuff a deeper look
ya, sounds like it could lead to that
Is a functioning status led and user control of the same led mutually exclusive?
consistency is good ๐
no, you should be able to do both. there are some tricks to do in the pin_reset and claim_pin though
@brazen cedar https://github.com/adafruit/circuitpython/blob/master/ports/nrf/common-hal/microcontroller/Pin.c#L76
@slender iron Scott, @cursive condor requested two functions, around, and arctan2 to ulab. I have implemented those as part of the vector sub-module. However, these two functions add around 2 kB to the firmware. In the long term, would you like to keep them in vector, or should they be moved to extras?
my C chops are so rusty haha this should be interesting
@lapis hemlock I think vector is ok if they fit in existing builds. do we have other arctan implementations already that we could share with?
@brazen cedar ๐ we're happy to help get the rust off
@lapis hemlock I think vector is ok if they fit in existing builds. do we have other arctan implementations already that we could share with?
@slender iron I don't think so.arctan2is special in the sense that it requires two arguments with all the hassle that comes with it. It is significantly more complicated (i.e., adds more to the firmware size) than a vectorised single-argument function. Nowhere else isarctan2used/implemented.
@brazen cedar C is like riding a bicycle ๐
kk, all good then @lapis hemlock
@lapis hemlock I think vector is ok if they fit in existing builds.
@slender iron Actually, that was my question. I have no oversight of the tightness of the firmware on all your hardware.
@lapis hemlock I think it'll be fine since ulab is only in larger builds. The easiest way to test is to update the submodule and see if everything builds
OK. I've got to log off now.
thanks @lapis hemlock
@slender iron As soon as @onyx hinge can review the code, it can be merged.
๐
you can merge it without my oversight, I am sure it is fine
@slender iron I don't mind, if you review it๐ I just don't want to push into master without a second opinion.
you can merge it without my oversight, I am sure it is fine
@onyx hinge If it is not, someone will complain about it, and it can then be fixed๐ OK, I will do that, then.
I don't see a CircuitPython ulab PR yet
I will not complain ๐
@lapis hemlock is there a way for atan2 to leverage the code that binary operators like '+' use to reduce code space? Or perhaps you did that and it still cost 2kB..
@slender iron let me make sure my code is pushed for Protomatter before we chat
okay, not tidied, but pushed
This pulls in all of @v923z's updates to ulab so that we can check that they build. It also needs testing and doc updates in the CPy copy of the documentation before it can be merged.
@lapis hemlock is there a way for atan2 to leverage the code that binary operators like '+' use to reduce code space? Or perhaps you did that and it still cost 2kB..
@onyx hinge I wouldn't do that: the binary operators are type aware, whilearctan2doesn't have to be, because the result is always afloat, so we already save a lot of space there. I don't see an obvious way of reducing the code size further. And the 2 kB wasarctan2, andaroundtogether.arctan2alone is around 1.3 kB, if I remember correctly.
I see, thanks
๐
gonna run and get water then we can video
gonna run and get water then we can video
@brazen cedar just read the issue thread; sorry to jump in late and point out what has already been pointed out. ๐
What boards is ulab available for/on, btw?
I'm just flicking through https://learn.adafruit.com/ulab-crunch-numbers-fast-with-circuitpython - first page doesn't tell me what boards are supported but I'll carry on flicking through it...
@raven canopy no worries, we're all communicating asynchronously so it happens
@simple pulsar I think it's M4s and up
good feedback for the guide so please file it in Learn too
I stuck some feedback in.
thanks!
hrm. its a corner-case for the support matrix too...
ahh. the MICROPY prefix explains it:
# ulab numerics library
ifndef MICROPY_PY_ULAB
MICROPY_PY_ULAB = $(CIRCUITPY_FULL_BUILD)
endif
What's the "support matrix"?
Looks great! Please add it to the website here: https://github.com/adafruit/circuitpython-org
Please reopen or create a new PR if this is still an issue. Thanks!
My neighbors must think I'm bonkers, seemingly talking to myself all the time.
@modern wing There is a cup I want that says "Of course I talk to myself. Sometimes I need expert advice." ๐
@raven canopy if I should change it on my end, can you send me a GitHub issue for it? (Ulab gating define)
@onyx hinge i'm not sure that changing solely for support matrix is warranted. but, it is the only entry in circuitpy_mpconfig.mk that has the micropy prefix. is there a reason for that?
@raven canopy there's not a strong reason for it, no. I think it's related to wanting to enable it in the UNIX port for testing purposes
but I'm not sure that I can't rename it
ahh. that's a very valid reason, if so.
i understand the difficult bridge with ulab. the support matrix builder is a better candidate to adjust, imo.
I might have a bad Feather M4 Express. ๐ฆ All indications so far are pointing in that direction.
Hi. I'm trying to port CircuitPython to a custom STM32F12Cx board and everything seems to work, except USB. (doesn't mount drive or serial device). Does anyone have any troubleshooting suggestions. Here's a more thorough explanation of what I'm running into: https://forums.adafruit.com/viewtopic.php?f=60&t=163516&p=803857
Today I will "officially" use discord for business purpose. Thank you to the CP community, thanks to you I am an expert already! Also I look less old/stupid when talking to my son. I don't know who started this. For me it started with Pimoroni and also Gadgetoid own server. But this is where I use it the most. I also know Phil is promoting that usage for communities. You are awesome.
A tiny, CircuitPython-compatible ARM Cortex-M4 module
https://www.crowdsupply.com/null-byte-labs/circuitbrains-deluxe
fyi - my friend Kevin is launching this soon on CrowdSupply
@idle owl do we need to update our local pylint installations to be consistent with the new changes. If so, what do we have to do? will the guide be updated?
@idle owl @trim elm sorry -- I merged a PR to the RFM69 library that created a conflict with your pending PR. I did not realize you were changing the adafruit_rfm69.py file - I thought your changes were all in the support files. This will also - I also have a pending PR that will requires a lot of updating to resolve conflicts with your PR. Thats not a problem. I just was not expecting it. Go ahead and merge your PR is you are ready an I'll make the necessary changes to mine to resolve the conflicts. I see you also are doing the same to the RFM9X library which I have been working on as well. I guess I was not paying attention to the pending changes....
@solar whale thatโs fine. Thanks for the heads up
@trim elm do you know if I need to change my local pylint setup to be consistent so I can check my PR's before pushing them.
@solar whale using the latest version of pylint and running black should do it
I have no idea what black is
I learned yesterday about it a bit. It's a python code formatter
makes changes to whitespace and some other non-functional changes like " in favor of ' for strings and things.
@solar whale https://github.com/psf/black install this and run it by using โblack .โ In the repository you want it to reformat
Do I also have to update pylint?
ther eis a now outdated guide to using pylint https://learn.adafruit.com/improve-your-code-with-pylint
I am not 100% certain but I think you would need to update your local one if what you had is 1.9.2
Is running black now a requirement on all commits?
In the build file it's changed from pylint==1.9.2 to just pylint. If I understand correctly that means it should be using the newest available version which looks like 2.4.4 at the moment.
not sure about whether black needs to be run locally or not though sorry.
I guess, what I am confused about, is has there been a change in what we all need to be doing. I guess i missed the memo ...
Well on the pylint front I believe actions will be using the new version due to the change in the build file. So if your local version was different the only risk is that there would be some things flagged differently if you run local vs. when it runs automatically after a commit.
I every repo being revised to conform to black? i just had no idea so now need to correct a lot of conflicts in things I have been working on. Just caught by surprise
The guide does probably need updating to not specify the 1.9.2. I hadn't seen this guide before actually. I need to read through it to get a better idea of how to use pylint locally to be honest. I've been relying on the default behavior of PyCharm + the github actions pylint for everything.
I believe every repo is being updated (all of the libraries certainly). If I understand correctly there was an automated script that pulled each repo ran black formatting on it and then pushed the results and made a PR.
The current process is reviewing those PRs to make sure that no functional changes slipped in, and that it didn't mangle any formatting that was intentional for code clarity.
But I'm not sure what the process is moving forward after all of these PRs are merged.
There was a real push awhile back to get everyone to install and use pylint locally before pushing changes. I just want to keep up to date. I'll stop grumbling and update my pylint.. I just wanted to be sure it would still be consistent with what I get from from the updated repos.
I think 2.4.4 would get it to match what the github actions are doing at this point. Though worth noting that with it not specifying a version in the build file I believe it's always going to take the latest version which is 2.4.4 now, but will continue to increase as time goes on.
You could setup a couple venvs, and keep things happy that way.
@solar whale In theory, if you "black"-formatted your code before merging, it will reduce (rather than increase) the amount of conflicts. In practice, I don't know how it works out and I don't know it well enough to talk you through doing it
@raven canopy looks like I can rename the ulab-define just fine
@raven canopy for the support matrix
But does Unix port stay happy?
yes
๐
anyone know what this is trying to tell me Traceback (most recent call last): File "/home/pi/.local/bin/black", line 10, in <module> sys.exit(main()) File "/home/pi/.local/lib/python3.7/site-packages/black.py", line 5, in main raise NotImplementedError("This is still being implemented.") NotImplementedError: This is still being implemented.
I think it means black does not work with python 3.7 yet -- is that correct?
What black version did you get? I got $ python3 -mpip show black | grep Version Version: 19.10b0 and line 5 is an import, not a raise.
hmm pi@gjnpi4ram4g:~/junk $ python3 -mpip show black | grep Version Version: 0.0
i just did pip3 install black
@fierce girder I looked at the specifications on that, and it does look very interesting. I hope it gets fully funded!
that's sure wrong! python3 -mpip install --upgrade black?
I do not use the "-m" - I just do pip3 install --upgrade black
on my Mac I get [Jerry-desktop-mini:circuitpython/ports/atmel-samd] jerryneedell% python3 -mpip show black | grep Version Version: 19.10b0 the previous was on a Raspberry Pi .... will try update
raspbian buster?
yes
Same here.
upgrade does not help ```pi@gjnpi4ram4g:~/junk $ python3 -mpip install --upgrade black
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: black in /home/pi/.local/lib/python3.7/site-packages (0.0)
Requirement already satisfied, skipping upgrade: click in /usr/lib/python3/dist-packages (from black) (7.0)
Requirement already satisfied, skipping upgrade: attrs in /home/pi/.local/lib/python3.7/site-packages (from black) (19.3.0)
pi@gjnpi4ram4g:~/junk $ python3 -mpip show black | grep Version
Version: 0.0
pi@gjnpi4ram4g:~/junk $
one of my computers tells me to run it as python3 -mpip but maybe it's my own mistake. ```$ pip3
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
same result either way -- pip3 or python3 -mpip
on my mac I also have python 3.6.5 not 3.7 as on the RPi
it looks like something has requested black version 0.0 to be installed. I don't know how to clear out that 0.0 to get the latest.
black is happy on the Mac with 3.6.5
oh that's interesting, I get exactly the same thing as you on my pi4 with raspbian buster
:smh:
@solar whale Is it easy to install different versions (at the same time) of Python on Macs? I've not used them since a brief dabble in the early 90s, things have probably changed since then...
@simple pulsar - probably, but I am not willing to do that....
Yeah, I use virtual environments on my Mac all the time, I'm probably running 5 different versions of Python in dozens of different environments
The Mac is not the problem
Sorry -- I'm just frustrated by the flurry of changes in the necessary build environment. Old dog...
@solar whale I really, really would recommend using virtual environments, no matter the experience level. It avoids so, so much awful garbage.
@main meteor I am just starting to try virtual environments here.
@ionic elk but right now the problem is, a bad version of black is installed by pip; virtual environments don't help address that afaik
it's not "I need version 9 and version 11 of black", it's "I keep getting version 0.0 of black, but nobody wants it"
@onyx hinge Have you tried uninstalling black and reinstalling it?
For Macs, are you guys talking about Python's virtualenv or something different?
I misunderstood then sorry
np @ionic elk
@timber mango on this pi4 it was not previously installed. as jerryn said, upgrade and force-reinstall don't make a difference.
I understand and appreciate the suggestion. i'll work on that. I would also find it helpful if I knew what environment I needed to setup ๐
Are you sure a virtualenv wouldn't help, though, in isolating the issue?
@solar whale What are you trying to do?
Yes, python's virtualenv. I like to use the one built in to python3 like ```python3 -m venv myvirtualenv
source myvirtualenv/bin/activate
I am trying to make sure my development environment is consistent with the github repo so when I submit a PR, it does not fail the build process.
Thereafter, running "python" and "pip" automatically use the ones in the virtual environment, and store things inside it, avoiding system-wide incompatibilities.
the broken black is coming from these people, who presumably mean well https://www.piwheels.org/
somehow, pip3 determines that a version 0.0 of black uploaded to pywheels is better than 19.10b0
this is enabled on raspbian but not on normal debian
workaround 1: Specify the version of black you want, to avoid getting 0.0. python3 -mpip install --user black==19.10b0
workaround 2: disable piwheels, permanently or temporarily; but I don't know how. "python3 -mpip config unset global.extra-index-url` doesn't do it
I am filing an issue with piwheels
one new trick for this old dog...
workaround 3: install --pre to install prereleases might work, not sure. In PyPI all the releases are prereleases and there is no 0.0, so I guess it installs a prerelease anyway. but on piwheels, there's a version 0.0 which is a released version so without --pre the versions like 19.10b0 are not considered for installation.
๐ฆ
well now I know more about python packaging than before ๐
issue is https://github.com/piwheels/packages/issues/97 if you want to track it @solar whale
Package name: black Issue type: Broken package Link to PyPI page: https://pypi.org/project/black/ Link to piwheels page: https://www.piwheels.org/project/black Version: gets version 0.0, but should...
@onyx hinge thanks for the followup and explanations.
@solar whale of course. I always want an excuse to learn something
@solar whale The guide needs to be updated, yes. We need to document somewhere that we're using Black as well. You can figure out what versions are necessary by looking at the build.yml file in any library repo - it has the install line necessary to install the proper bits. We recently moved that out of hiding so it was easier to find and replicate. If you'd rather a quick audio chat sometime today, I'm happy to go through what changes we've made and what they mean to you. Otherwise, I'm also happy to discuss it here.
I wouldn't have been able to help on Raspbian though.
@idle owl i think the main thing I need to know is what version of pylint to install
Also there is something called pyenv that lets you SUPER easily have different versions of Python for different things on Mac at least (I'm assuming on Linux as well), you can specify it per folder even if you want a particular repo to remain on a different version of Python.
The latest should be 2.4.4 - pip3 install pylint is what you should, in theory, run. We're running it without a version number, so if you install it without a version number, you'll be on par with us.
OK -- great -- that should get me going ok. I'll let you know if I have other questions. I have black installed now -- on the Mac and Pi !! So I should be able to use them to keep my mods "compliant"
Excellent.
I feel like, at least for me, it's something I'll eventually get used to and format "properly" myself without Black running, but it'll be a little time.
Or rather, Black will run and find less and less over time.
First post: my Trinket MO flashed with the latest 5.0.0 firmware only have 45K left on the CIRCUITPY drive; is it normal? Is there a way to get more space? I also asked on the forum: https://forums.adafruit.com/viewtopic.php?f=52&t=163572
I have been perusing build.yml -- it is very helpful
It was less helpful not long ago. We fixed that.
@solar whale Apologies for not being clearer or more vocal about the changes. I guess I thought we had been, but thinking back on it, we were certainly not.
@timber mango I don't know the correct number for sure off the top of my head but that does sound correct to me. The Trinket M0 (and any other non-express devices) have very little storage.
@timber mango I'm afraid that is normal and a limit of the Trinket flash size.
@idle owl I think I was "out of the loop" at a bad time. trying to catch up.
@solar whale You shouldn't have to be in the loop to know about things like this. We should have documented it better and announced it here a few times and so on.
In other words, it should have been more obvious even if you're out of the loop. Easier to find when you returned.
Well -- in an ideal world ... Clearly, you have heard my concerns today and i appreciate that .
Your concerns are entirely valid. It's something I will take into account moving forward and try to ensure we're more communicative about things like this before and as they're happening.
As long as we learn from mistakes, that's what matters. Making them in the first place is unavoidable.
@solar whale Thank you for voicing your concerns.
It's nice to be part of a community where I feel comfortable voicing them.
@idle owl I do have a question about all the repo updates. Since the refomatting makes many changes to the actual library code, (for example - rfm69) are you planning to test them all on hardware before merging? or just looking over the code?
Most of it is whitespace and changing ' to ". If it changes functionality, yes, we're testing. But 99% of the changes are not functional changes.
Or changing hex addresses to capital letters.
So mostly looking over the code.
@solar whale I agree! I have always been hesitant to voice my opinions everywhere, because doing that usually leads to bad things happening. I do not feel that way here though!
It's that "if it changes functionality" part that can be tricky .... it's not supposed to, but... I have not seen any issues in the ones I have looked at (rfm69, rfm9x) -- feel free to ping me to test ones I have hardware for if you need any help.
@solar whale Agreed. I've erred on the safe side, in my opinion. But that doesn't mean I won't miss something. I'll ping you if I think something needs testing to see if you have hardware. Thanks!
I come from a background where even if you only change a comment, it has to be fully tested. Not advocating for that -- just explaining my initial reaction to the seeing the changes...
I understand. It made me a little itchy at first as well, but I read up more on Black and felt a bit better. You were also in a far more specialised situation.... you break things, you lose things in space. We break things, we submit a PR to fix it and it's good to go.
move fast -- break things..
I wish I was moving faster. This is taking much longer than I though it would, though if I had given it more consideration, I probably would have expected it. Going through the entire PR for each of them. ๐
I'll leave you to the fun -- good luck!
Thanks!

