#circuitpython-dev

1 messages ยท Page 295 of 1

timber mango
#

This is the problem. The guide does not seem to specify when it makes a switch and what it is talking about in a given section.

solar whale
#

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.

timber mango
#

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.

solar whale
#

Good luck! There is also A CP library for for Adafruit_CircuitPython_BluefruitSPI

lethal abyss
timber mango
#

@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.

timber mango
#

@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.

crimson ferry
#

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.

slender iron
#

@crimson ferry I haven't used it long enough to know. It's all early so it wouldn't surprise me.

crimson ferry
#

OK, thanks, If I can isolate, I'll file an issue.

slender iron
#

thanks!

crimson ferry
#

Good news is... it makes it through all of the setup: SPI, I2C, Storage, RTC, ESP32SPI, HTTPS, etc. ๐Ÿ™‚

timber mango
#

@tulip sleet I had to change a few pins, but bluefruitspi_simpletest.py works! ๐Ÿ˜‰ ๐Ÿ™‚

solar whale
#

@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.

crimson ferry
#

@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.

onyx hinge
#

@slender iron When you pin the new meeting link, can you promote the new calendar file too?

manic glacierBOT
#

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...

onyx hinge
#

set my phone to CET (mainland europe time) and the meeting times still look right. should have checked it sooner, glad it's correct

manic glacierBOT
#

@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 like ints, strs, tuples, etc but mutable objects should not be duplicated. I think when the list is edit...

slender iron
#

@onyx hinge yup! I think @idle owl was going to make the notes doc for next week. We can add it there.

onyx hinge
#

awesome thanks both

idle owl
#

<@&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.

slender iron
#

thanks @idle owl

onyx hinge
#

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

idle owl
#

Looks fine to me

onyx hinge
manic glacierBOT
#

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...

orchid basinBOT
lone axle
#

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?

slender iron
#

@lone axle you can make a comment but a follow up PR is easier if you can do it

idle owl
#

Or file an issue if you're not in a position to create a new PR.

lone axle
#

Got it. Thank you both.

idle owl
#

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.

lone axle
#

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
#

@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 find atan2() function so I use atan = 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 condor atan2 is 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.

cursive condor
#

thanks . I'll file a couple of issues likewise in the next days, and i'll keep an eye on this one too ๐Ÿ™‚

lapis hemlock
#

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)

cursive condor
#

with floats in a, basically yes

lapis hemlock
#

@cursive condor a is automatically a float array.

cursive condor
#

yeah, ok

lapis hemlock
#

@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

cursive condor
#

and I noticedabs() was missing, and round() too , but floor() or ceil() will do the job...

lapis hemlock
#

@cursive condor You can call abs directly (it is a unary operator) as a = array([1, 2, -3]); abs(a). We can add round.

lone axle
#

Is there a correct person or team to request review from for the circuitpython-org repo?

idle owl
#

@lone axle You can probably request from CircuitPythonLibrarians there as well.

cursive condor
#

nice for abs()

lapis hemlock
#

nice for abs()
@cursive condor I forgot to mention that abs should be fast (it is aware of the array type), it is implemented in ulab itself.

manic glacierBOT
lapis hemlock
#

@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.

cursive condor
#

yes, this round()... I think it can be usefull

#

and you did an amazing job already

lapis hemlock
#

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...

cursive condor
#

or not...

lapis hemlock
#

I think this is a different function. That is part of python itself, and has nothing to do with numpy.

cursive condor
#

I just wanted to know how it was implemented elsewhere

lapis hemlock
cursive condor
#

oh no, not yet. I'm not fluent in C.

#

I try to read code, and understand it, for now

lapis hemlock
#

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.

lone sandalBOT
lapis hemlock
#

@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.

lone axle
#

@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.

onyx hinge
#

@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
#

@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 constant y in 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.

onyx hinge
#

when you ./build.sh it should leave .out files, and renaming them to the exp file should ... work

lapis hemlock
#

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, numpy always 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.sh calls micropython itself, so one can't compare the results to those in numpy. Is that correct? I actually ran the scripts in numpy, and copied the results to the .exp files.

onyx hinge
#

@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

slender iron
#

@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.

lapis hemlock
#

@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.

onyx hinge
#

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

lapis hemlock
#

That's true, especially with floating point numbers.

ionic elk
#

@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.

onyx hinge
#

@ionic elk did you do the git submodules dance?

ionic elk
#

oh hmm k

onyx hinge
#

ulab is in a new-ish submodule and even more recently we made stm32 use it

ionic elk
#

ok it is fix

#

Sorry, didn't pick up that it was a submodule issue from that error message.

raven canopy
#

@slender iron hmm... let me look at your base change again for getting away from SysTick. and, refresh myself on my own code. ๐Ÿ˜†

slender iron
#

it looks like there is a reference timer but ticks is used for the actual period and computation

raven canopy
#

yeah. it uses ticks_ms for the time domain. iirc

orchid basinBOT
raven canopy
#

@slender iron so, would it switch to using port_get_raw_ticks, and then adjust the math from 1000 to 1024?

onyx hinge
#

@ionic elk great

cursive condor
#

@lapis hemlock thanks for the hint. it worked well with ย atan(row / y)ย  so 1.5 secs become 0.15 secs

manic glacierBOT
#

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.

lapis hemlock
#

@cursive condor Great!

cursive condor
#

atan(y/row) made an error, I can't divide something by an array

lapis hemlock
#

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.

onyx hinge
#

row*(1/y) in the interim?

lapis hemlock
#

How does that work? I don't see that at the moment. He needs y/row, doesn't he?

raven canopy
#

@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.

lapis hemlock
#

But atan(row/y) is just a rotation of the coordinate system, so that should be OK. At least, for this special case.

cursive condor
#

@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

lapis hemlock
#

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 Since y is fixed, it doesn't matter.

orchid basinBOT
cursive condor
#

the resulting image was not as expected ... soooo ...

lapis hemlock
#

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.

cursive condor
#

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 ...

onyx hinge
#

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 ?

lapis hemlock
#

y is a float, and it can be negative. it is fixed for one row, but change ...
@cursive condor But in your example, y was fix: you had atan2(y, row), where row was an ndarray. I understand that you might still have to iterate over y, but you can still remove the iteration over row.

onyx hinge
#

oh what I said is nonsense, carry on

lapis hemlock
#

so maybe it's tan(row/y) to get the expected result ?
@onyx hinge The x->y is just a coordinate transformation. I can call y x, if I want to...

onyx hinge
#

@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 ๐Ÿ™‚

cursive condor
#

yeah it's what i'm doing

onyx hinge
#

.. stepping away again ..

lapis hemlock
#

I am signing off, too.๐Ÿ‘‹

solar whale
#

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...

cursive condor
onyx hinge
#

neat!

#

thanks!

#

I don't know how many hours I spent with Fractint and Xaos way back in the 90s and early 00s

cursive condor
#

my pleasure. I'm cleaning the code to update the github repo

onyx hinge
#

(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

ionic elk
#

@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?

slender iron
#

@ionic elk different from micropython

ionic elk
#

stm then?

slender iron
#

sure

#

I don't know what micropython is off the top of my head

ionic elk
#

Probably worth doing that as a PR by itself, I think - otherwise git won't highlight specific changes

#

Micropython is stm32

slender iron
#

@raven canopy I don't think we need ticks at all. the reference timer can give us a frequency to compare to

fierce girder
stuck elbow
#

I don't think this link works :(

prime flower
#

@fierce girder this link does not work for me

manic glacierBOT
#
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...
stuck elbow
#

"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

fierce girder
#

@prime flower darn... not sure how to link to a discord channel

stuck elbow
#

I think you need an invite link

fierce girder
#

ah ok

#

needs to edit a bunch of stuff I just wrote

manic glacierBOT
raven canopy
#

@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?

slender iron
#

ticks_ms has the same problem

raven canopy
#

really? i thought SysTick was at the highest priority... hmm

slender iron
#

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?

raven canopy
#

capture
arg. that mode...brings back horrible memories. ๐Ÿ˜„ its blocking.

slender iron
#

what do you mean blocking?

raven canopy
#

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.

slender iron
#

I was thinking the reference tc triggers the capture

#

on overflow

#

the tc itself can also give you frequency

raven canopy
#

the reference triggers reading the actual counter. the others are just in count mode.

slender iron
#

using ppw capture

fierce girder
#

I guess I can't link directly to a channel

slender iron
#

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

raven canopy
#

trying to find all my old notes

ionic elk
#

@raven canopy you're the go to for the docs system, right?

raven canopy
#

hehe. i was chasing that notification!
"go to"...i wouldn't put myself at that level, but i know a thing or two. ๐Ÿ˜‰

ionic elk
#

Lol no pressure. Just had a wee CI failure that I don't understand, couldn't remember who to loop in.

raven canopy
#

link me in, and i'll gladly take a look.

ionic elk
#

thanks much

raven canopy
#

hmm. looks like it's pulling in all of the HAL files to parse.

ionic elk
#

can I make it... not?

#

I presume not is better

slender iron
#

I think there is a blacklist for files in docs/ somewhere

raven canopy
ionic elk
#

seems like there's some junk in that file. want me to clean it up while I'm here?

slender iron
#

sure

#

@raven canopy did you try PPW at all?

#

seems like that could greatly simplify it

raven canopy
#

i remember trying it, but there was a reason it didn't work. that's what i'm trying to find notes on.

slender iron
#

kk

#

it would change the pins that work

raven canopy
#

@ionic elk ๐ŸŽ‰ that's one down. incremental progress is the best, right? ๐Ÿ˜„

ionic elk
#

are you referring to me chipping away at CI here ๐Ÿคจ

raven canopy
#

hehe. yeah

#

its a beast.

ionic elk
#

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 โœ…

raven canopy
#

i think Dan has fought through those...

ionic elk
#

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 ๐Ÿ‘

slender iron
#

@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

raven canopy
#

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. ๐Ÿ˜„

slender iron
#

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

raven canopy
#

its not. just pulled a fresh one. ๐Ÿ˜„

slender iron
#

kk

#

I may give it a shot anyway

#

not tonight though. time for aae and chili making

raven canopy
#

totally. it could very well have been my blundering.

onyx hinge
#

mmmmm chili

#

we just had fresh bread I made while frustrated about hard fault handler ๐Ÿ™‚

ivory yew
#

Hmmm... Would it be possible at some point to use AudioIO with a DAC over SPI/I2C/I2S?

onyx hinge
ivory yew
#

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.

onyx hinge
#

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

ivory yew
#

yeah

simple pulsar
#

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.

orchid basinBOT
mellow turret
#

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?

timber mango
#

@mellow turret It is USB-C

mellow turret
#

@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!' ๐Ÿ˜Ž

manic glacierBOT
#

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...

solar whale
#

@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 ...

manic glacierBOT
#

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
manic glacierBOT
tulip sleet
#

@solar whale are you using some RFM library that needs SPI? Do you pass it the SPI object or does it create it?

solar whale
#

I pass it

#

I posted an issue to bus-device - it is hanging on try-lock

tulip sleet
#

that sounds like a circuitpython issue: we are not clearing the lock on soft-reload after an exception or ctrl-c

solar whale
#

that seems to be the issue..

tulip sleet
#

i can transfer the issue to circuitpython

solar whale
#

OK thanks

manic glacierBOT
#

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...

manic glacierBOT
tulip sleet
#

@ionic elk the checkout failed again. maybe try merging from upstream and pushing again

manic glacierBOT
ionic elk
#

@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

tulip sleet
#

@ionic elk it's getting past the checkout problem, yay

ionic elk
#

@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.

tulip sleet
#

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?

ionic elk
#

sure, the name doesn't matter. I was going to go with STM32_HAL_lib

tulip sleet
#

is that what it's called in the STM world? (

ionic elk
#

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

tidal kiln
slender iron
#

looks

#

@tidal kiln very weird! can you have them copy the contents of their CIRCUITPY over to you?

#

seems like a software issue

tidal kiln
#

like a zip of the entire CIRCUITPY folder?

slender iron
#

ya, of the drive

tidal kiln
#

ok, requested. i'll ping you again when it's up.

slender iron
#

thanks! it kinda looks like the color processing used for eink

manic glacierBOT
ionic elk
#

@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?

lapis hemlock
#

@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.

slender iron
#

@ionic elk will look now. just went for run to get out of the house.

manic glacierBOT
idle owl
timber mango
#

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```

ionic elk
#

@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 ๐Ÿ˜‰

half sedge
#

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.

ionic elk
#

@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

slender iron
#

@ionic elk yup, just back from lunch

#

you want the repo renamed?

ionic elk
#

right

slender iron
#

?

#

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

ionic elk
#

Oh, did they even have that last time we checked?

slender iron
#

I think for only some chipsets

#

they look pretty active

ionic elk
#

it isn't very compact... lot of cruft that isn't the drivers

slender iron
#

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

ionic elk
#

Where do you want it? Should I keep it in ports/stm? or add them all to Lib?

slender iron
#

maybe a subdir in ports/stm?

ionic elk
#

I wish they had a combo one... it's going to copy all the projects and CMSIS stuff for every chip family.

slender iron
#

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.
ionic elk
#

more than 10x size lol

#

st whyyyyy

tulip sleet
#

you/we could clone the submodules shallow and only do deep if we are going to alter them

slender iron
#

ah true

ionic elk
#

I must have to practice my git-funise - what is a shallow clone?

slender iron
#

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

tulip sleet
#

it's weird, it gets to 99%, fetching only ~~100MB and then it has to fetch a dozen or so huge objects

ionic elk
#

Doesn't seem to save much

tulip sleet
#

i wonder if they need to git gc

slender iron
#

@tulip sleet do you have a preference on which to use in circuitpython? the heavy st repos or our own

manic glacierBOT
tulip sleet
#

@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

slender iron
#

not if we don't include the tinyusb submodules

ionic elk
#

I mean the contents of it are fine I just figured it wasn't a good idea to include another submodules submodule

tulip sleet
#

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??

ionic elk
#

well the Adafruit repo is just a copy of Tinyusb's repo right now

tulip sleet
#

i guess tinyusb is just looking on the -I path, so it needs to find them somewhere.

ionic elk
#

You were mentioning that it was an advantage to have our own clones of some submodules to reduce the chance of breaking changes

slender iron
#

right, generally we have a parallel copy of the submodule to use

tulip sleet
#

so tinyusb has its own trimmed ST HAL repo, I thought

#

isn't that what we are using now? I'm confused

slender iron
#

heh, looks familiar

ionic elk
tulip sleet
#

is it the same API?

ionic elk
#

yes

slender iron
#

the zephyr version looks old

#

and master != the v.1.14-branch

tulip sleet
#

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)

slender iron
#

yup

ionic elk
#

(a pig?)

slender iron
#

we could fork and delete stuff

tulip sleet
#

so we could use the tinyusb one or clone our own and throw out some old history and see how big it is

#

gmta

ionic elk
tulip sleet
#

a pig = huge

manic glacierBOT
tulip sleet
#

@Hieropehect can you just expand on that?

slender iron
#

@ionic elk my issue with that repo is that it doesn't share history with the st ones

ionic elk
#

it's based off TinyUSB

slender iron
#

then it should be a fork

ionic elk
#

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

slender iron
#

my vote would to be to use thach's repo directly

ionic elk
#

I mean that's fine too

#

Pretty easy to keep in sync there since he's part of the team

slender iron
#

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

ionic elk
#

Ok. Cool. I will do this. Now I just gotta go back and remove all those ST submodules I just added ๐Ÿ˜ฉ

indigo wedge
slender iron
#

sorry for the indecision @ionic elk

ionic elk
#

is k

tidal kiln
slender iron
#

hrm interesting!

manic glacierBOT
slender iron
#

@tidal kiln it works for me too. it's probably cheaper/easier to just replace it

tidal kiln
#

ok. weird that the hardware checked out OK with arduino sketch.

slender iron
#

ya, two other ideas would be to get them to erase the fs

tidal kiln
#

could also give them a CP prog that uses shapes lib to just draw colors

slender iron
#

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

tidal kiln
#

ok, i'll try a few more things. will let you know if anything comes up.

slender iron
#

it's weird that it's only on bitmaps

#

you could also ask for exact plug/unplug and button press instructions

tidal kiln
#

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

slender iron
#

I would expect any fs issues to be copied over

timber mango
#

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.

wraith tiger
#

Looking forward to exploring displayio.

timber mango
#

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. ๐Ÿ˜ฆ

lone axle
#

@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.

timber mango
#

@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.

lone axle
lone sandalBOT
timber mango
#

I have been through that tutorial.

timber mango
#

@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. ๐Ÿ˜ฆ ๐Ÿ˜ฆ

orchid basinBOT
orchid basinBOT
static jay
#

Greetings all, is this a good place to ask about adafruit_touchscreen running on a Pyportal? (running CircuitPython 5.0.0-rc.1)

manic glacierBOT
solar basin
#

So, if I'm reading this right, _bleio scans the entire data section for each prefix, yeah?

slender iron
#

@solar basin advertising data? yup

#

each set of advertising data is length encoded so it looks at the prefix of each set

timber mango
#

Good night. I will be back in a few hours, or maybe sooner if I can not sleep. ๐Ÿ™‚

simple pulsar
simple pulsar
#

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?

umbral dagger
#

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.

slender iron
#

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

umbral dagger
#

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 ```

tidal kiln
#

NFP133H-05A @slender iron

umbral dagger
#

This is after erasing and recopying the latest libraries again, then recopying the latest CP for the board.

slender iron
#

same for me

umbral dagger
#

If I CTRL-D then I get the unsupported operation error.

#

It's a green CLUE if that makes a difference

raven canopy
#

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.

simple pulsar
#

FYI, my two (black-board) CLUEs both have NFP133H-05A in white writing on the display ribbon connector.

solar whale
#

hmm works for me -- black board

#

using current master build

slender iron
#

@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

solar whale
#

@umbral dagger -- tried 5.0.0 and it still is working OK for me.

slender iron
#

@tidal kiln the user's display marking matches the internally documented one

umbral dagger
#

@slender iron display cable markings the same as @opaque musk

slender iron
#

hrm, ok

umbral dagger
#

It seems better on a black CLUE

slender iron
#

i2c is better?

solar whale
#

hmm -- I'll try my green one ... just a sec

umbral dagger
#

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

solar whale
#

@umbral dagger works on my green board as well

tidal kiln
#

@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.

umbral dagger
#

@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.

solar whale
#

good luck! those are small pins

simple pulsar
#

@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.

raven canopy
#

patches starting.... ๐Ÿ˜ฌ

slender iron
#

@tough flax I rebased my lower_power branch

manic glacierBOT
#

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...

onyx hinge
#

I noticed clue is back in stock at the moment, I was getting twitchy with just 1 on hand

solar whale
#

@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" ๐Ÿ˜‰

raven canopy
#

@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?

solar whale
#

No problem -- new mail rules are working ๐Ÿ˜‰

#

line 77

idle owl
#

Yes. It should have. sigh.

#

I missed it in the original.

solar whale
#

sorry -- I won't tell...

idle owl
#

@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.

manic glacierBOT
#

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.

manic glacierBOT
idle owl
#

Whee! PRs merged!

#

Apologies to your mailboxes.

manic glacierBOT
tulip sleet
#

@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.

slender iron
#

@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

tulip sleet
#

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?

slender iron
#

yes you do

tulip sleet
#

ok, thanks!, will structure as appropriate

slender iron
#

you can have all those attributes wrapped in a subclass though

tulip sleet
#

yes, looking to make an AdafruitService superclass

slender iron
#

that would work too I think

tulip sleet
#

yeah, not sure about instantiation of the class vars

manic glacierBOT
ivory yew
#

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

onyx hinge
#

@ivory yew did you construct it with variable_frequency=True ?

ivory yew
#

oh no

#

silly me

#

there should be an actual error there.

onyx hinge
#

the "no details" thing is probaly still worth bug filing!

ivory yew
#

I'll see if I can send a PR once I get done with my experiments

onyx hinge
#

that would be awesome

ivory yew
#

ofc

manic glacierBOT
#

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...

simple pulsar
#

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

tough flax
#

Thanks @slender iron

timber mango
#

@simple pulsar That thread looks very familiar. Is that the one I started?

simple pulsar
#

Yep.

#

I think all roads eventually lead to the debugger!

timber mango
#

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.

main meteor
#

A lot of people disapprove of print debugging, but it's quick and surprisingly versatile and effective

timber mango
#

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.

main meteor
#

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.

timber mango
#

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... ๐Ÿ™‚ ๐Ÿ™‚

main meteor
#

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.

timber mango
#

Oh yes, the age of the dinosaurs!

#

@main meteor I think users were slower back then. ๐Ÿ˜‰

main meteor
#

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.

timber mango
#

You must be as old as I am.

main meteor
#

Quite possibly.

timber mango
#

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.

manic glacierBOT
#

@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.)

  1. PulseIn gives you time of both high and low portions of...
slender iron
#

@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.

timber mango
#

@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.

slender iron
#

@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.

timber mango
#

@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.

slender iron
#

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

timber mango
#

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?

slender iron
#

ya, for the ble spi friend

timber mango
#

That will be an interesting project. I am just learning how to use Bluetooth.

half sedge
#

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.

half sedge
#

@gilded cradle Any hit, piece of code, learning guide in preparation to control my Bit:Buggy?

gilded cradle
#

@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.

manic glacierBOT
granite crow
#

Hi, I was involved in the translation of cp into Spanish, but forgot the process of getting started with it, is it documented somewhere?

slender iron
granite crow
#

IIRC there was a step I should do after editing the po file, make translation?

manic glacierBOT
lone axle
slender iron
#

@granite crow make translate is only needed when adding new strings in the code

granite crow
#

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
#

๐Ÿ‘

tough flax
#

@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

slender iron
#

kk, will look this week at it. I think my approach is to change it all and then test and fix it up

digital elbow
#

anybody familiar with the 480 x 320 TFT LCD display with CircuitPython?

#

keep getting memory allocation errors

main meteor
#

Which CPU? That display does eat a lot of RAM.

digital elbow
#

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)

lone axle
#

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.

digital elbow
#

thanks ..... where can I learn more about that

#

is there a way to place it on the SD card slot on the back?

lone axle
#

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.

digital elbow
#

thanks, maybe its time to get the m4

manic glacierBOT
#

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...
tough flax
#

@slender iron No problem with the approach

manic glacierBOT
#

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/...

manic glacierBOT
#

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?

half sedge
#

@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.

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

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...

manic glacierBOT
lone axle
#

@half sedge Ah, I see. thank you for the clarifying.

manic glacierBOT
half sedge
#

@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.

Gist

Using the CLUE, control the Bit:Buggy in BLE. GitHub Gist: instantly share code, notes, and snippets.

manic glacierBOT
#

@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.

prime flower
#

@slender iron I'm not feeling well, afk for a bit. could u email this to me so i remember when im back? thx

slender iron
#

Yup! Take it easy!

manic glacierBOT
manic glacierBOT
inland tusk
#

I was wondering if the teensey 4.0 verion of CP is available for testing?

solar whale
onyx hinge
#

good morning!

timber mango
#

๐Ÿฅฑ I woke up at 3:14 am.

main meteor
#

And had pie?

timber mango
#

Feeling a bit irrational...

timber mango
#

When I generate a PR, will it automatically be reviewed, or do I have to close it first?

manic glacierBOT
#

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...

tidal kiln
#

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.

timber mango
#

My PR has passed all checks. Is there a way to request a review?

#

I did not see any way to do that.

lone axle
#

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.

tidal kiln
#

@timber mango can you link to the PR?

timber mango
tidal kiln
#

added reviewers. i think you need permissions to do it.

timber mango
#

Thank you.

idle owl
#

<@&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

turbid radish
#

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/

Adafruit Industries - Makers, hackers, artists, designers and engineers!

The Python on Microcontrollers newsletter โ€“ your best source for Python information every week The Python on Microcontrollers newsletter is the place for the latest news involving Python on hardwarโ€ฆ

modern wing
#

Happily lurking adabot

#

Loud and clear ๐Ÿ™‚

fierce girder
#

I'll be text only

#

I added my notes to the doc

onyx hinge
#

@fierce girder thanks !

turbid radish
#

Lurking, doing the ICYMI MakeCode newsletter for JP

tiny oriole
#

I will be absent. Group hug to all!

graceful heart
#

lurking

tiny oriole
#

overlapping meeting ๐Ÿ˜›

turbid radish
#

Group hug to everyone

modern wing
#

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.

raven canopy
#

I'll be a few minutes late. It's meetings meetings meetings... ๐Ÿ˜ซ

sterile bronze
#

lurking today

lone axle
#

I am absent today

tidal kiln
#

lurking

timber mango
#

lurking today

river quest
#

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

timber mango
#

Just mostly lurking today.

river quest
#

314 as in pi day ๐Ÿ™‚

#

good work team ๐Ÿ™‚

timber mango
#

I woke up at 3:14 am this morning (PST).

onyx hinge
#

@inland tusk will you have hug reports and status updates?

inland tusk
#

I am lurking

onyx hinge
#

@maiden chasm will you have hug reports or status updates for us?

#

@inland tusk thanks, ๐Ÿ‘‹

river quest
maiden chasm
#

lurking today

slender iron
#

wow 2,000+ online

river quest
#

The biggest worldwide online Show and Tell begins Wednesday, March 18th, 2020 at 7pm ET
http://adafruit.com/showandtell
https://youtu.be/VmVkX_7PkLs

Adafruit Industries - Makers, hackers, artists, designers and engineers!

show and tell

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!

โ–ถ Play video
slender iron
#

๐ŸŽ‰

river quest
graceful heart
#

๐Ÿฅณ

modern wing
#

10/10 --> ๐Ÿ’ฏ

river quest
#

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.

#

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...

โ–ถ Play video
modern wing
#

Thanks PT ๐Ÿ™‚

onyx hinge
#

"I'm like a truffle pig"

#

OK make us a t-shirt

gilded cradle
#

Just for Pi day

half sedge
#

lurking

idle owl
modern wing
#

๐Ÿ˜

tidal kiln
#

totes agree. huge hug to pt.

slender iron
simple pulsar
#

A late bit of lurking

neat folio
#

merely lurking today

onyx hinge
ionic elk
#

that's a lotta LEDs

#

Can I get it in mask format, like daft punk? ๐Ÿค”

maiden chasm
#

Simon is totaly ok

onyx hinge
#

@ionic elk I think there's a flexy one actually

ionic elk
#

๐Ÿ˜ฎ

#

probly can't cut it though hmmm

onyx hinge
#

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

#

@steady osprey do you have any status updates or hug reports?

modern wing
#

I got one of the 32blits myself, but haven't had any time to explore it yet.

simple pulsar
#

@modern wing Mine sits a few feet away largely unused ๐Ÿ˜ž

slender iron
#

me too ๐Ÿ™‚

#

it's why I've insisted @ionic elk add h7 support ๐Ÿ™‚

ionic elk
#

I can't play Doom Eternal in my COVID exile so I guess I'll have to program classic instead ยฏ_(ใƒ„)_/ยฏ

tulip sleet
#

@onyx hinge re RGB LED: @brazen cedar is working on that now, so you'll want to coordinate

simple pulsar
#

[For Adafruit IO data logging] The size of the binary or the size of memory on popular boards when it's running?

onyx hinge
#

@tulip sleet awesome, I am happy to step out of their way on this one ๐Ÿ™‚

raven canopy
#

if only

brazen cedar
#

@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.

slender iron
#

@timber mango you have an rfm69 right?

onyx hinge
#

@brazen cedar I hope not, but you never know. Remember we're here to talk about it if you're feeling stuck

timber mango
#

Yes, several. ๐Ÿ™‚

slender iron
#

would you mind testing for jerry?

timber mango
#

Sure. I do not have his latest code though.

solar whale
#

its in pr24 of the repo

brazen cedar
#

@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.

onyx hinge
#

@brazen cedar we can help with terminology too, and also we don't snark at you when you get it wrong ๐Ÿ™‚

cursive condor
onyx hinge
#

3 players and a ... judge? we have the word "arbiter" in english but it doesn't seem the right one.

cursive condor
#

yeah a judge

timber mango
#

@solar whale Where in PR24 do I look for it? Is it an archive or separate scripts?

ivory yew
#

nope

timber mango
#

Oh, wait, I have to checkout your branch, right?

solar whale
#

@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.

idle owl
#

@maiden chasm We have a guide on the recommended workflow for CircuitPython on Git and GitHub, if you were not aware of it.

maiden chasm
#

yes I've gone through, it was great point to start

idle owl
#

@maiden chasm Excellent ๐Ÿ™‚ That's the goal.

solar whale
#

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

tulip sleet
#

points to some issues that mention pdb

#

etc.

timber mango
#

@solar whale That command did not work for me.

maiden chasm
solar whale
#

do you have upstream defined or is it just origin. If it is not a fork use origin not upstream

idle owl
#

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.

onyx hinge
maiden chasm
#

yes it is only 0.0.1 version released

solar whale
#

git fetch origin pull/24/head:pr_24

ivory yew
#

it's been quite a while since we pulled from upstream micropython?

timber mango
#

@solar whale I do not know how to work from the PR. There is much I still have to learn. ๐Ÿ™‚

ivory yew
#

yeah we have some changes in py that deviate from upstream. ๐Ÿ˜ฆ

cursive condor
#

who can I ask for pythonistas role ?

onyx hinge
#

@cursive condor I can add you

cursive condor
#

yes please ๐Ÿ™‚

onyx hinge
#

@cursive condor here you go

cursive condor
#

thanks ๐Ÿ˜„

solar whale
timber mango
#

fatal: Couldn't find remote ref pull/24/head

solar whale
#

type the command you used

#

are you in your fork or just a clone of the adafruit repo?

gilded cradle
#

I'm going to drop off.

timber mango
#

OK, I have it now. I cloned your repo and then got your branch.

onyx hinge
#

@tulip sleet can you mute?

raven canopy
#

Gotta drop too. ๐Ÿ‘‹

timber mango
#

I will start looking at it this afternoon hopefully. I am a little under the weather right now.

solar whale
#

No rush -- hope you fell better -- I'll test/approve your PR later this afternoon

timber mango
#

Ok, sounds good!

slender iron
timber mango
#

@slender iron I am actually in Spring Valley, CA right now, but hoping to move to WY before the end of summer.

slender iron
#
ionic elk
#

Is it an hour long forever now? Or just this one time?

#

yeeeeee

modern wing
#

Indeed ๐Ÿ™‚

#

Thanks y'all

ionic elk
#

Oh I'm excited now I gotta get my projects ready

graceful heart
#

I think an hour long is a great length, the half hour time has been feeling a bit crunched for time.

modern wing
#

It's a great problem to have ๐Ÿ™‚

ionic elk
#

Gotta burn the slogans into everyones brains

onyx hinge
#

but 90 minutes begins to feel like a slog sometimes ๐Ÿ’ฆ

#

but not you all, you're great ๐Ÿ‘ผ

ionic elk
#

We could also timecap status updates :/

onyx hinge
#

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.

ionic elk
#

I feel the same way, honestly

#

but there's not that much else to cut

onyx hinge
#

afk, time to take out the laundry and then go on a walk even though it's cold

ionic elk
#

It's feasible we could split off the library stuff from the core

modern wing
#

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.

maiden chasm
#

@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

modern wing
#

My neighbors must think I'm bonkers, seemingly talking to myself all the time.

solar whale
#

Have a great week -- dog walk time...๐Ÿถ ๐Ÿ‘‹

modern wing
#

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

slender iron
#

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>

brazen cedar
#

Anyone have time for some C questions about the CP source files?

slender iron
#

I've gotta grab lunch but can answer after that

brazen cedar
#

ok ttyl

steady osprey
#

@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.

ivory yew
#

@brazen cedar always feel free to ask, someone else might be able to answer. ๐Ÿ™‚

brazen cedar
#

@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

slender iron
#

I'm back now too. good point @ivory yew

raven canopy
#

@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.

lapis hemlock
#

I have just got home, completely missed the weekly meeting. Sorry.

brazen cedar
#

@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

raven canopy
#

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.

brazen cedar
#

@raven canopy ok I look forward to your analysis

slender iron
#

I'd suggest doing the one that works. ๐Ÿ™‚

brazen cedar
#

@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

slender iron
#

ya, sounds like it could lead to that

brazen cedar
#

Is a functioning status led and user control of the same led mutually exclusive?

slender iron
#

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

lapis hemlock
#

@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?

brazen cedar
#

my C chops are so rusty haha this should be interesting

slender iron
#

@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
#

@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. arctan2 is 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 is arctan2 used/implemented.

solar whale
#

@brazen cedar C is like riding a bicycle ๐Ÿ˜‰

slender iron
#

kk, all good then @lapis hemlock

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.

slender iron
#

@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

lapis hemlock
#

OK. I've got to log off now.

slender iron
#

thanks @lapis hemlock

lapis hemlock
#

@slender iron As soon as @onyx hinge can review the code, it can be merged.

slender iron
#

๐Ÿ‘

onyx hinge
#

you can merge it without my oversight, I am sure it is fine

lapis hemlock
#

@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.

slender iron
#

I don't see a CircuitPython ulab PR yet

cursive condor
#

I will not complain ๐Ÿ˜›

onyx hinge
#

@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

manic glacierBOT
lapis hemlock
#

@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, while arctan2 doesn't have to be, because the result is always a float, 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 was arctan2, and around together. arctan2 alone is around 1.3 kB, if I remember correctly.

onyx hinge
#

I see, thanks

slender iron
#

๐Ÿ‘

#

gonna run and get water then we can video

#

gonna run and get water then we can video

raven canopy
#

@brazen cedar just read the issue thread; sorry to jump in late and point out what has already been pointed out. ๐Ÿ˜„

simple pulsar
#

What boards is ulab available for/on, btw?

brazen cedar
#

@raven canopy no worries, we're all communicating asynchronously so it happens

slender iron
#

@simple pulsar I think it's M4s and up

#

good feedback for the guide so please file it in Learn too

simple pulsar
#

I stuck some feedback in.

slender iron
#

thanks!

raven canopy
#

hrm. its a corner-case for the support matrix too...

raven canopy
#

ahh. the MICROPY prefix explains it:

# ulab numerics library
ifndef MICROPY_PY_ULAB
MICROPY_PY_ULAB = $(CIRCUITPY_FULL_BUILD)
endif
simple pulsar
#

What's the "support matrix"?

timber mango
#

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." ๐Ÿ˜‰

onyx hinge
#

@raven canopy if I should change it on my end, can you send me a GitHub issue for it? (Ulab gating define)

raven canopy
#

@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?

onyx hinge
#

@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

raven canopy
#

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.

timber mango
#

I might have a bad Feather M4 Express. ๐Ÿ˜ฆ All indications so far are pointing in that direction.

granite ingot
half sedge
#

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.

fierce girder
solar whale
#

@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....

trim elm
#

@solar whale thatโ€™s fine. Thanks for the heads up

solar whale
#

@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.

trim elm
#

@solar whale using the latest version of pylint and running black should do it

solar whale
#

I have no idea what black is

lone axle
#

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.

trim elm
#

@solar whale https://github.com/psf/black install this and run it by using โ€˜black .โ€™ In the repository you want it to reformat

GitHub

The uncompromising Python code formatter. Contribute to psf/black development by creating an account on GitHub.

solar whale
#

Do I also have to update pylint?

lone axle
#

I am not 100% certain but I think you would need to update your local one if what you had is 1.9.2

solar whale
#

Is running black now a requirement on all commits?

lone axle
#

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.

solar whale
#

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 ...

lone axle
#

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.

solar whale
#

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

lone axle
#

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.

solar whale
#

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.

lone axle
#

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.

raven canopy
#

You could setup a couple venvs, and keep things happy that way.

onyx hinge
#

@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

raven canopy
#

But does Unix port stay happy?

onyx hinge
#

yes

raven canopy
#

๐ŸŽ‰

solar whale
#

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?

onyx hinge
#

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.

solar whale
#

hmm pi@gjnpi4ram4g:~/junk $ python3 -mpip show black | grep Version Version: 0.0

#

i just did pip3 install black

timber mango
#

@fierce girder I looked at the specifications on that, and it does look very interesting. I hope it gets fully funded!

onyx hinge
#

that's sure wrong! python3 -mpip install --upgrade black?

timber mango
#

I do not use the "-m" - I just do pip3 install --upgrade black

solar whale
#

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

onyx hinge
#

raspbian buster?

solar whale
#

yes

timber mango
#

Same here.

solar whale
#

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 $

onyx hinge
#

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.

solar whale
#

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

onyx hinge
#

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.

solar whale
#

black is happy on the Mac with 3.6.5

onyx hinge
#

oh that's interesting, I get exactly the same thing as you on my pi4 with raspbian buster

#

:smh:

simple pulsar
#

@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...

solar whale
#

@simple pulsar - probably, but I am not willing to do that....

main meteor
#

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

solar whale
#

The Mac is not the problem

#

Sorry -- I'm just frustrated by the flurry of changes in the necessary build environment. Old dog...

ionic elk
#

@solar whale I really, really would recommend using virtual environments, no matter the experience level. It avoids so, so much awful garbage.

timber mango
#

@main meteor I am just starting to try virtual environments here.

onyx hinge
#

@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"

timber mango
#

@onyx hinge Have you tried uninstalling black and reinstalling it?

simple pulsar
#

For Macs, are you guys talking about Python's virtualenv or something different?

ionic elk
#

I misunderstood then sorry

onyx hinge
#

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.

solar whale
#

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 ๐Ÿ˜‰

ionic elk
#

Are you sure a virtualenv wouldn't help, though, in isolating the issue?

timber mango
#

@solar whale What are you trying to do?

main meteor
#

Yes, python's virtualenv. I like to use the one built in to python3 like ```python3 -m venv myvirtualenv
source myvirtualenv/bin/activate

solar whale
#

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.

main meteor
#

Thereafter, running "python" and "pip" automatically use the ones in the virtual environment, and store things inside it, avoiding system-wide incompatibilities.

onyx hinge
#

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

solar whale
#

that worked great!

#

Thanks @onyx hinge

onyx hinge
#

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

solar whale
#

one new trick for this old dog...

onyx hinge
#

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 ๐Ÿ™‚

solar whale
#

@onyx hinge thanks for the followup and explanations.

onyx hinge
#

@solar whale of course. I always want an excuse to learn something

idle owl
#

@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.

solar whale
#

@idle owl i think the main thing I need to know is what version of pylint to install

idle owl
#

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.

solar whale
#

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"

idle owl
#

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.

timber mango
solar whale
#

I have been perusing build.yml -- it is very helpful

idle owl
#

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.

lone axle
#

@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.

solar whale
#

@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.

idle owl
#

@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.

solar whale
#

Well -- in an ideal world ... Clearly, you have heard my concerns today and i appreciate that .

idle owl
#

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.

solar whale
#

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?

idle owl
#

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.

timber mango
#

@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!

solar whale
#

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.

idle owl
#

@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!

solar whale
#

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...

idle owl
#

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.

solar whale
#

move fast -- break things..

idle owl
#

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. ๐Ÿ˜„

solar whale
#

I'll leave you to the fun -- good luck!

idle owl
#

Thanks!