#circuitpython-dev

1 messages ยท Page 289 of 1

silver tapir
#

@slender iron Noted, spliting micropython and python.

silver tapir
manic glacierBOT
#

CIRCUITPY_INTERNAL_NVM_SIZE should be a multiple of 8192 on the SAMD51, because that's the page erase size. When bytes are written to the nvm, the page is erased and then the undisturbed data is written back, so if there's vital data in the erased part, it will temporarily be all ones.

We should put a compile-time check in for this restriction in mpconfigport.h to catch this -- sorry!

#

I started doing this when doing #2613, by adding a desired_frequency argument to the constructor. But there are other considerations about picking a SPI peripheral, like whether it is shared with I2C, and realized it was hard to specify all of those in the constructor. So I documented that the "best" SPI is picked first (highest frequency), and they are picked in decreasing order of desirability (like non-shared ones picked after that).

manic glacierBOT
tulip sleet
raven canopy
#

@tulip sleet did you add the pypi user and pass to the repo's secrets? They should be named TWINE_USERNAME & TWINE_PASSWORD.

tulip sleet
#

no, but it didn't do that on a previous repo either (heart rate) and it was ok (but maybe someone else did) but in any case, I'll do that, thanks

raven canopy
#

Hmm. Is the repo supposed to be on PyPI?

tulip sleet
#

no, not yet

#

i'll compare the actions with heart_rate

#

heart rate is on pypi, and ancs is too, but not other ble libs. I'll try to make this all consistent

#

we are interested in getting ble to work under blinka, so we may as well put them on pypi

raven canopy
#

Hmm. I wonder if we should add a conditional that gives a better message for missing twine secrets... ๐Ÿค”

tulip sleet
#

@raven canopy I'm looking in the "adding a library" Learn Guide and I don't see anything about twine stuff either in the public pages or limor's private checklist. Also that guide still talks about travis. I removed some travis info from the checklist

#

all set now

raven canopy
#

Sorry about the secret name mixup! Need more coffee. ๐Ÿ˜

prime flower
#

@tulip sleet do we have a port of circuitpython for the nRF52832

tulip sleet
#

not anymore, we had a weak version maybe in 3.x or early 4.x

#

it's too small

#

and no native USB

prime flower
#

:\ dang, got a RAK4600 module in for evaluation (NRF52832+SX1276 LoRa module) and was wondering

#

thanks!

tulip sleet
#

:wish it were better news:

prime flower
#

np - would've tried porting it this weekend. wanted to check first

tulip sleet
#

@prime floweru I was just updating the bundle doc, we have these overlapping sections:

Internet of Things Web Service Helpers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Helpers for connecting with hosted and self-hosted internet-of-things web services.

.. toctree::

    Adafruit IO <https://circuitpython.readthedocs.io/projects/adafruitio/en/latest/>
    Amazon AWS IoT <https://circuitpython.readthedocs.io/projects/aws_iot/en/latest/>
    Azure IoT <https://circuitpython.readthedocs.io/projects/azureiot/en/latest/>
    Google Cloud IoT Core <https://circuitpython.readthedocs.io/projects/gc_iot_core/en/latest/>
    LIFX Lights <https://circuitpython.readthedocs.io/projects/lifx/en/latest/>
    Hue Lights <https://circuitpython.readthedocs.io/projects/hue/en/latest/>


Internet-of-Things/Wireless/Bluetooth/BLE Protocol Helpers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Helpers for interfacing with the internet or wireless communication.

.. toctree::

    Bluefruit LE Connect App <https://circuitpython.readthedocs.io/projects/bluefruitconnect/en/latest/>
    Bluetooth Low Energy (BLE) <https://circuitpython.readthedocs.io/projects/ble/en/latest/>
    TinyLoRa TTN Helper <https://circuitpython.readthedocs.io/projects/tinylora/en/latest/>
    Mini ESP Tool <https://circuitpython.readthedocs.io/projects/miniesptool/en/latest/>
    MiniMQTT <https://circuitpython.readthedocs.io/projects/minimqtt/en/latest/>
    JSON Web Token (JWT) <https://circuitpython.readthedocs.io/projects/jwt/en/latest/>
    Requests <https://circuitpython.readthedocs.io/projects/requests/en/latest/>
    NTP (Network time Protocol) <https://circuitpython.readthedocs.io/projects/ntp/en/latest/>
#

should we merge this or move some stuff from the second IoT into the first IoT and change the title of the second? I was thinking of splitting off a BLE section but you were talking about interoperating BLE and MQTT support later

#

i guess "service" and "protocol" are slightly different, but not in the BLE world

prime flower
#

@tulip sleet Service and protocol are different in the IoT-world. Possibly "Services" is a better term?

tulip sleet
#

well, they are different in BLE really, but we have "BLE Services". This list of BLE stuff is only going to grow: it probably deserves its own section

#

the title of the second section is misleading: it's actually just "Internet-of-Things/Wireless Protocol Helpers" right now. I was in the middle of editing.

#

i'm not sure I want to lump BLE and Wireless together, and NTP, etc. are not only "Wireless:

prime flower
#

I think you should spit off a BLE section

#

I agree

tulip sleet
#

is LoRa also "wireless", lumped in with http, mqtt, ntp, etc?

#

it's "wireless communication"

prime flower
#

We might want to do something like: a section for each transport type (BLE, LoRa, LoRaWAN, Ethernet, WiFi). Then a section for our protocol implementations - like NTP and MQTT, since those will be agnostic to transport

tulip sleet
#

maybe let's wait to split that later, because right now there's only the one lora helper. but I have more than four for BLE. We can rethink this after the next round of IoT and LoRa libraries

#

also helpers vs drivers : there's a "Radio" drivers section

prime flower
#

Yeah, saw that. tinylora is a wrapper over a driver (rfm9x), i'd consider that a helper.

tulip sleet
#

ok, i will do something or other

manic glacierBOT
ionic elk
#

thanks @half sedge, PWMOut is fully supported on STM32 already but I couldn't find a nice control program for PulseOut, so that double Circuit Playground one is super useful.

slender iron
#

@tulip sleet how did you test ibeacon and eddystone? was it useful? it looks like most of the auto-url stuff was discontinued

ionic elk
#

@slender iron so, on atmel-samd, are timers not actually mapped to pins? It seems all the existing ports just shuffle through a list of timers and pick one that's unallocated for the PulseOut interrupt counter system.

slender iron
#

a single pin can have multiple timers so there is a list to go through

ionic elk
#

I don't see anything that checks the "carrier" pwm object before the timer is selected though

#

So I'm having trouble understanding what the pool of timers is

slender iron
#

ah, pulseout's pin association is already done through the given pwmout

#

the second timer for pulseout is only used for the interrupt

#

pulseout just uses the pinmux to turn off and on the pwm carrier

ionic elk
#

right, it's that second timer, the one that's found in the // Find a spare timer. section

#

what pool of timers is that picked from? If I just pick from a list of timers on STM, I'm going to lock big swathes of pins out of having PWM

slender iron
#

we look at all of them but start with the ones that impact the fewest pins

ionic elk
#

so tc_insts[index] is some kind of built-in array of timers that's ordered in terms of their pin impact?

slender iron
#

thats what you could do. samd has tccs for complex timers so any tc is ok

tulip sleet
#

@slender iron I used some iPhone apps for testing; I still have "nRF Beacons" and "Locate" on my phone so those were probably the most useful. Many beacon apps have heavy filtering, so you have to use the Apple company id and/or give specific UUID's in advance in order to see the beacons. Given that the whole beaconing trend seems to have become moribund, we could revisit whether to fix the implementation of these or drop it for now.

slender iron
#

ya, @meager fog and I talked about fixing it up for a quick demo by @split ocean next week. I'm thinking getting the radio library released would be more useful

ionic elk
#

@slender iron I could use timers 6 or 7, which have no pins and are restricted to internal use or DAC use - but is there a chance we'd need those for audio?

slender iron
#

just use them for now and we can rework it later if needed

timber mango
#

@gilded cradle PR #60 is the correct one. I closed PR #59.

manic glacierBOT
#

The problem is the compiler can't tell what alignment the uint8_t in the
call has come in with....so you could have a uint32_t misaligned over the
top of it. In general you'd get away with it no problem, but if you called
this routine with &chararray[1] as the starting point to dump the result
into without this fix it wouldn't be pleasant.

This is with gcc-9 (sorry, not at my desk, so can't tell you exact version)
which has, I think, got considerably more uptight about these things.

Regar...

timber mango
#

@trim elm My PR on Adafruit_Circuitpython_MSA301 seems to be in conflict with one that was opened before it. Did I do something wrong?

onyx hinge
#
    { MP_ROM_QSTR(MP_QSTR_dot), (mp_obj_t)&linalg_dot_obj },
``` I think I need to figure ut the difference between `MP_ROM_QSTR` and `MP_OBJ_NEW_QSTR`
#

#define MP_ROM_QSTR(q) {MP_OBJ_NEW_QSTR(q)}

#

hm

trim elm
#

@timber mango I closed it because someone else had already opened a pr doing the same thing but they needed to also update examples.rst. Doesnโ€™t seem like theyโ€™re going to do that so Iโ€™ll merge yours

timber mango
#

@trim elm Thank you. I did both parts.

timber mango
#

When a PR is merged, does the person who did it get an email?

manic glacierBOT
#

I think we talked about this on Discord but I'll recap here. The idea is to split ulab into smaller modules than what numpy has so that functionality can be enabled at a more granular level. Enabling and disabling on module boundaries means that errors will be generated when an unsupported module is imported rather than when an unsupported function is called in the middle of code.

@tannewt
Scott, I have managed to separate out the modules. Here is an example that works

import u...
tulip sleet
slender iron
#

@lapis hemlock nice! I'm happy to look at the changes whenever they are ready

lapis hemlock
#

@slender iron will probably be tomorrow.

#

I wanted to point out that here were are going to lose compatibility with numpy...

slender iron
#

๐Ÿ‘ I'm gone all weekend (we have a holiday monday)

#

would it still work if the imports were import numpy as ulab import numpy as fft import numpy as poly ?

lapis hemlock
#

That's actually right. I have never seen such an import.

slender iron
#

๐Ÿ™‚ I thought so

#

it is definitely weird but it does give us compatibility if we want it

lapis hemlock
#

@slender iron We have to reckon that the MCU is smaller than a computer. I will just wrap up the code along these lines.

#

How do you insert code blocks into a discord message?

ionic elk
slender iron
#

I'm not sure how it relates to PulseOut. Can't you just copy how samd does it?

#

nrf does it the same way as well

ionic elk
#

I'm just confused by what you're doing - you have a PWMOut, but it's just used to pull a pin high and low? And there's a second, arbitrary timer, that isn't mapped to a pin, that's used to time out the intervals?

#

Why not just use one timer and a digitalIO?

onyx hinge
#
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> import ulab
>>> import ulab.matrix
>>> ulab.matrix
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'matrix'
>>> import ulab.matrix as ulab_matrix
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'matrix'
>>> from ulab.matrix import inv
>>> 
``` hmm something about builtins with submodules doesn't quite work as expected.
tulip sleet
#

@lapis hemlock you surround the code in triple backquotes for multiple lines. For a single word or line, use single backquotes.

#

basically like markdown in github

lapis hemlock
#

Oh, so exactly as in github. Well, then for the rest of the gang, this would have been my first post today: ```python
import ulab
from ulab import fft
from ulab import poly

a = ulab.array([1, 2, 3, 4])
poly.polyval(ulab.array([1, 2, 3]), fft.spectrum(a))

slender iron
#

@ionic elk IR has a 38khz carrier wave that the PWMOut generates

ionic elk
#

Wait so it's not actually a pulse at all, it's a pulse train on an interval?

slender iron
tulip sleet
#

you can add a language designator after backquotes like "python" to to get it color-coded

lapis hemlock
#

@onyx hinge Jeff, you have to do the import as in the earlier post.

ionic elk
#

Ok, I get it now, I missed the carrier instance, I thought these were literal pulses

tulip sleet
#

immediately after the triple backquotes

ionic elk
#

"N-pulse waveform generation using timer synchronization" then

tulip sleet
#

you can edit the previous post by clicking on the three dots you get when you hover over the post

lapis hemlock
#

Doesn't seem to work. Well, whatever.

timber mango
#

@tulip sleet OK, thank you.

tulip sleet
#

'''python
a = 1
'''

#

except with backquotes

lapis hemlock
#

@tulip sleet there must not be a space after python, that was the problem.

tulip sleet
#

same is true in github

lapis hemlock
#

@tulip sleet ๐Ÿ‘

slender iron
#

@ionic elk please just copy how atmel and nrf do it

grim jetty
#

I'm working through the basic tutorial for adding a C-code module to circuitpython. The directions seemed good until I got to the part about modifying the ports/atmel-samd Makefile. I made (what I think was) a good guess, but then the next step of modifying the mpconfigport.h file has me completely lost. I can't find anything in that file similar to what the instructions suggest will be there. Can anyone guide me through this part? @slender iron? Thank in advance!

slender iron
#

@grim jetty would you mind posting your modifications to github? I'm going to grab lunch and will get back to you after. @tulip sleet we should update @umbral dagger guide since the CIRCUITPY_ rework.

tulip sleet
#

I'll take a look and do some editing!

lapis hemlock
onyx hinge
#

fast work! I will try to take a look tomorrow.

lapis hemlock
#

OK, thanks! I will clean up the three remaining functions, and fix the issue that we discussed on github over the weekend.

lapis hemlock
grim jetty
#

@slender iron I'm following guide here: https://learn.adafruit.com/extending-circuitpython/inside-the-virtual-machine but I lose sync between the actual code I'm finding versus the instruction when I get to the point where I'm supposed to edit the Makefile and the mpconfigport.h file. So my code is (hopefully) just the example in the tutorial up until the point where the instructions don't match the v5 source code anymore.

Adafruit Learning System

Turn the dials to 11 by writing CircuitPython modules in C.

tulip sleet
#

or you could open an issue for each major addition and close it when added

lapis hemlock
#

@tulip sleet I like the idea of checkboxes, but the second proposal is also sound. It is still OK, though, the list is getting long and somewhat chaotic, hence my question.

tulip sleet
#

we tend to open an issue for each suggestion. Then there can be a thread for a suggestion and it can be discussed if necessary. And when a PR fixes it or it gets rejected, we can just close it

#

I don't think we've done a lot of task list issues. If we use them, it's for subtasks to implement a single major feature.

lapis hemlock
#

@tulip sleet But if you open a new issue for each item, then the wish list is rendered redundant, isn't it?

tulip sleet
#

yup, so you could edit each suggestion, point to an issue, and then close the wishlist. In the future each wish can be its own issue

#

@grim jetty take a look at py/circuitpy_mpconfig.h and py/circuitpy_mpconfig.mk. These consolidate naming features and turning them on and off across ports.

lapis hemlock
#

@tulip sleet My initial idea was that having a sticky issue at the very top would encourage people to toss ideas. I don't know, whether that has materialised.

tulip sleet
#

@grim jetty also py/circuitpy_defns.mk

#

we have an enhancement label we put on suggestions, and we also assign it a milestone, usually 'Long Term', or the upcoming next release.

#

your sticky wishlist issue could be locked, but with instructions to open a new issue, and with a GitHub search URL to show all the 'wishlist' or 'enhancement' issues.

#

i think we feel issues are cheap, it's fine to have plenty

lapis hemlock
#

Sounds good.

slender iron
#

@lapis hemlock diff looks good to me!

grim jetty
#

@tulip sleet I think I managed to get a new teensy40 image built with the demo module (but can't test it until I get home tonight), but there were some other issues with the online tutorial in addition to the ones mentioned.

timber mango
#

I am reading the docs for displayio. There does not seem to be a sample.bmp file provided for the example.

half sedge
#

@half sedge The library was updated an hour ago with what I believe is a fix to that issue. We haven't released it yet until it's tested more thoroughly, but you can get the updated .py file from the repo.
@idle owl adafruit-circuitpython-bundle-5.x-mpy-20200213.zip does not contain the corrected version, maybe because a new release should be created: https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/releases ... I am safe because I now use label.py on all my board.

manic glacierBOT
half sedge
#

If anybody has a PyPortal Titano handy, I would like to test a piece of code to see if I have the right scale_factor (I used 12) for that screen resolution. It does not require any other hardware. https://github.com/dglaude/CircuitPython_MLX90640_PyGamer_Plus/blob/master/nomlx_scale_pyportal_titano.py Thanks in advance. (I also need to know your feeling about font readability on that screen...)

river quest
#

The new Adafruit Bluefruit Playground app is out! Here's a preview of Bluetooth Wireless puppets! https://apps.apple.com/us/app/bluefruit-playground/id1489549571 ... https://youtu.be/EhiJ-OzZh1Y

App Store

โ€ŽCircuit Playground Bluefruit is the most fun you can have with a circuit board โ€“ and Bluefruit Playground makes it even better.

Connect Bluefruit Playground to a Circuit Playground Bluefruit board and you can:

โ€ข Control LED color & animation
โ€ข View continuous light sensor r...

The new Adafruit Bluefruit Playground app is out! Here's a preview of Bluetooth Wireless puppets!

https://apps.apple.com/us/app/bluefruit-playground/id1489549571

#ar #vr #ios

Visit the Adafruit shop online - http://www.adafruit.com

-----------------------------------------...

โ–ถ Play video
timber mango
#

The example on this page does not work. I have a version that works on my PyGamer now.

tulip sleet
timber mango
#

@tulip sleet Sure!

tulip sleet
timber mango
#

Nope, it has not been fixed.

manic glacierBOT
#

I worked with displayio on my PyGamer a bit and discovered that the example on this page does not work.

I worked on this example with my PyGamer and have a new version of the script that does work:[code]import board
import displayio
import time
import pulseio

board.DISPLAY.auto_brightness = False
board.DISPLAY.brightness = 0
splash = displayio.Group()
board.DISPLAY.show(splash)

with ope...

onyx hinge
#

@slender iron @lapis hemlock I'll work on pulling in the module changes and reorganizing the docs in cpy tomorrow morning (us time)

manic glacierBOT
grim jetty
#

Quick followup question on incorporating an external C-code module into the circuitpython build. I think I got further yesterday with @tulip sleet 's suggestion that some of the edits required are now moved to py/circuitpy_mpconfig.h instead of the old places still listed in the tutorials. However now I'm getting a new error compiling the "mymodule" demo code. As far as I know this is copied exactly from the tutorial. Any thoughts on where I should go from here:
CC ../../shared-bindings/mymodule/init.c
In file included from ../../shared-bindings/mymodule/init.c:3:
../../shared-bindings/mymodule/init.c:11:19: error: 'MP_QSTR_MyClass' undeclared here (not in a function); did you mean 'MP_QSTR_Flash'?
11 | { MP_ROM_QSTR(MP_QSTR_MyClass), MP_ROM_PTR(&mymodule_myclass_type) },
| ^~~~~~~~~~~~~~~
../../py/obj.h:168:56: note: in definition of macro 'MP_OBJ_NEW_QSTR'
168 | #define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 0x00000006))
| ^~~
../../shared-bindings/mymodule/init.c:11:7: note: in expansion of macro 'MP_ROM_QSTR'
11 | { MP_ROM_QSTR(MP_QSTR_MyClass), MP_ROM_PTR(&mymodule_myclass_type) },
| ^~~~~~~~~~~
make: *** [../../py/mkrules.mk:55: build-teensy40/shared-bindings/mymodule/init.o] Error 1

#

(Ok, I see pasting error messages doesn't work exactly right because discord things some of the characters are for formatting, is there a way to post 'literal' stuff here?)

raven canopy
#

you can use a code block, with 3 backticks before and after:
```
text
```

text
lone axle
#

is there an escape or something? how did you get it so the first text didn't get put into the code box?

grim jetty
#

Ok, let me try again to post my error message trying to build my example c-code module from the tutorial:

CC build-teensy40/autogen_usb_descriptor.c
CC ../../shared-bindings/mymodule/__init__.c
In file included from ../../shared-bindings/mymodule/__init__.c:3:
../../shared-bindings/mymodule/__init__.c:11:19: error: 'MP_QSTR_MyClass' undeclared here (not in a function); did you mean 'MP_QSTR_Flash'?
   11 |     { MP_ROM_QSTR(MP_QSTR_MyClass), MP_ROM_PTR(&mymodule_myclass_type) },
      |                   ^~~~~~~~~~~~~~~
../../py/obj.h:168:56: note: in definition of macro 'MP_OBJ_NEW_QSTR'
  168 | #define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 0x00000006))
      |                                                        ^~~
../../shared-bindings/mymodule/__init__.c:11:7: note: in expansion of macro 'MP_ROM_QSTR'
   11 |     { MP_ROM_QSTR(MP_QSTR_MyClass), MP_ROM_PTR(&mymodule_myclass_type) },
      |       ^~~~~~~~~~~
make: *** [../../py/mkrules.mk:55: build-teensy40/shared-bindings/mymodule/__init__.o] Error 1
raven canopy
#

@lone axle yep. you can escape characters with the usual \.

manic glacierBOT
fallen anvil
#

@indigo wedge If you think that's bad, wait till you see what's coming next ๐Ÿ™‚ So...is there a coding standard or similar around?

meager fog
#

@indigo wedge if/when ya are around and can send me new binaries to try on my feather - i'd try it out!

fallen anvil
#

I think memcpy would have the same alignment issue I'm afraid, although I doubt it could be caught by the compiler since it's a void * ... raises an interesting question!

indigo wedge
#

@meager fog will do in a few, i can first send you the ones I made for 4MB flash and I think they should also work for 8MB, if not, I can modify the build

meager fog
#

kool

#

yes!

#

ill do the rework now

indigo wedge
#

@fallen anvil not sure if there's a documented standard, I kinda went by looking at existing code in the samd port

fallen anvil
#

Ah...memcpy deals with the unaligned copy...see lib/libc/string0.c . I'll tidy to be more inline with what else is in the file(s) and resubmit.

meager fog
#

@indigo wedge ok! reworked

#

grabbing jlink

#

lemme know next stepz

idle owl
#

@gilded cradle Thanks for testing the PyBadger updates!

gilded cradle
#

Yw, @lone axle was helpful too.

slender iron
manic glacierBOT
tulip sleet
#

@slender iron I merged the service data PR> I'll make a new release of the BLE library unless you want to wait.

slender iron
#

thanks @tulip sleet

#

I think it can go out. it mostly just adds stuff

tulip sleet
#

done

slender iron
#

thanks!

#

getting my first taste of python asyncio with bleak

tulip sleet
#

is it raw asyncio or is it curio or trio?

slender iron
#

raw

#

kinda silly that it's all async but still waits to return the results until a timeout is hit

lapis hemlock
#

@slender iron @lapis hemlock I'll work on pulling in the module changes and reorganizing the docs in cpy tomorrow morning (us time)
@onyx hinge You mean the code from master, right? I have a problem in the 2dim branch. If I have attributes, I can't attach own methods to ndarray: ```python
import ulab

a = ulab.array([[1, 2], [3, 4]])
print(a)
a.transpose()

slender iron
#

how does it fail?

lapis hemlock
#

Here is the traceback: ```Traceback (most recent call last):
File "/dev/shm/micropython.py", line 6, in <module>
AttributeError: 'ndarray' object has no attribute 'transpose'

slender iron
#

are your changes somewhere? that is likely an issue with the ndarray type definition

lapis hemlock
#

Here is my locals_dict: c STATIC const mp_rom_map_elem_t ulab_ndarray_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_flatten), MP_ROM_PTR(&ndarray_flatten_obj) }, { MP_ROM_QSTR(MP_QSTR_reshape), MP_ROM_PTR(&ndarray_reshape_obj) }, { MP_ROM_QSTR(MP_QSTR_transpose), MP_ROM_PTR(&ndarray_transpose_obj) }, // { MP_ROM_QSTR(MP_QSTR_sort), MP_ROM_PTR(&numerical_sort_inplace_obj) }, };

slender iron
#

that looks right. what does dir(a) show?

lapis hemlock
#

The method is not shown.

slender iron
#

but it shows the other two?

lapis hemlock
#

No. That was just an example. All methods from the local dictionary are gone.

#

Weirdest thing.

slender iron
#

setting attr might be the problem

lapis hemlock
#

I can call module methods all right, it is a problem with the locals_dict.

#

I mean, if I comment the line out.

slender iron
#

ah

#

we use properties to implement attributes

#

finds an example

lapis hemlock
#

Probably that is the way to go.

slender iron
#

ya, I wouldn't make your own .attr if you can avoid it

lapis hemlock
#

By the way, what is the difference between properties and attributes. Beyond the fact that attributes obviously mess something up.

#

The first sentence was a question:)

slender iron
#

properties are the mechanic to have attribute access call functions

#

they are a special case of data descriptors which let you factor out the functions called on attribute access

#

functions on an object are really just attributes whose values are bound function objects

lapis hemlock
#

In any case, I will patch up the code with properties, and hopefully that fixes the issue.

slender iron
#

the locals dict lookup is done by the default attr implementation

#

so by overriding the .attr you are ignoring the locals dict

lapis hemlock
#

Oh, well, that explains something...

slender iron
#

slice can do that because it only has plain attributes

lapis hemlock
#

That's true.

#

Thanks for the pointer!

slender iron
#

it's much better to use it rather than override it

lapis hemlock
#

Darn it, I completely overlooked this!

slender iron
#

๐Ÿ™‚ np. it's complicated

lapis hemlock
#

I might need the weekend to fix everything. I don't know what your timeframe is.

slender iron
#

no rush

lapis hemlock
#

OK. I have to dash off now, but I think we have sorted out the problem. Thanks again!

slender iron
#

thanks @lapis hemlock !

timber mango
#

@gilded cradle I should have specified that I ran it under 5.x.

#

I could have been much more specific in my description of the issue too.

onyx hinge
#

@lapis hemlock I used properties in my wip after seeing a similar problem

gilded cradle
#

@timber mango, I figured. I already submitted and merged a PR to fix it.

timber mango
#

Thanks. How do I link a PR to an issue?

idle owl
#

@timber mango In a GitHub comment type # and it'll bring up a list, type the number of the PR, and it'll reference it.

slender iron
#

GitHub recently added a way to do it on the right side as well

idle owl
#

Click on the Preview tab if you want to verify it took the number you provided.

#

Ah nice.

slender iron
#

under "Linked Issues"

timber mango
#

@idle owl I just tried that on an issue but the PR does not show under Linked PRs.

idle owl
#

I didn't know about that feature until now. If you look at the PR, it should show the issue as having referenced it.

#

I don't know how the "Linked" feature works yet.

gilded cradle
#

@timber mango, just paste a url link in a comment and github handles it.

timber mango
#

Oh, OK.

idle owl
#

@slender iron Am I seeing right that gamepadshift isn't included for every board?

#

specifically CLUE at the moment.

slender iron
#

I assume so

#

shift should only be needed if the buttons are connected through a shift register

manic glacierBOT
idle owl
#

@slender iron Ok thanks. Trying to adapt something to CLUE and wanted to understand what I was working with.

slender iron
#

did you get it going?

idle owl
#

yeah, it's ugly but it works. Now I have to figure out the best way to do it.

manic glacierBOT
orchid basinBOT
idle owl
#

@tulip sleet Do you have a few minutes to discuss some code?

tulip sleet
#

for just a few minutes, yes

#

I have to leave in 45 mins or so

idle owl
#

I have to leave in 25

#

So we're good

tulip sleet
#

๐Ÿ™‚

idle owl
#

vid?

tulip sleet
#

sure

lapis hemlock
#

@onyx hinge I think the code is relatively straightforward now, but I would like to fix the docs before merging everything into master.

#

Speaking of docs, do you want to sync it with mine, or would you rather do that separately for adafruit?

#

I see that you do most of it in-line, correct?

umbral dagger
#

It'll crash even without any interaction on the keypad.

manic glacierBOT
lapis hemlock
slender iron
#

@lapis hemlock we may have had to make it public. I bet the types in it are available somewhere. They don't use properties in their native api because they are slightly slower

lapis hemlock
#

@slender iron We will have to include/not include, depending on the value of the CIRCUITPY flag. Well, what the heck! Or, perhaps, what the hack!

#

I could also ask micropython to make that public.

slender iron
lapis hemlock
#

Right, but then we can't include it.

#

I wanted to see what their rationale was.

slender iron
#

I don't think mp ever had it as a .h

#

I think I just moved it out

lapis hemlock
slender iron
#

I just preserved them

lapis hemlock
#

And this issue is really not ulab-specific. Any external module might need properties, so I would claim that there is a pressing reason for moving the typedef into a header file.

#

I just preserved them
@slender iron Oh, I see.

lapis hemlock
#

@onyx hinge Jeff, does python import ulab a = ulab.array([1, 2, 3]) a.itemsize work? I get <property>, nothing more, and I know that the corresponding function is not called at all, because I have a printf in that, and I don't see anything.

#

At least, transpose is not missing anymore, but I can't properly attach the properties.

slender iron
#

what is your attr set to? anything?

#

are you testing on circuitpython or micropython?

lapis hemlock
#

.attr is commented out. I am testing on micropython.

slender iron
#

micropython may have property support commented out... I'm not sure

lapis hemlock
#

That must be the case. Really odd.

slender iron
#

totally possible we fixed native properties in circuitpython

lapis hemlock
#

Can you show me how you brought that in?

#

The fact that there is no header file in micropython is a smoking gun...

slender iron
#

ya, it's been a while since we added support

#

I can't remember exactly what I did

lapis hemlock
#

I will ask on the forum what they think about it.

slender iron
#

its probably the pr where I add that header

lapis hemlock
#

OK, I will check.

manic glacierBOT
#

I first noticed this issue with a larger project when I upgraded a NeoTrellis M4 from 4.1.2 to cp 5 beta-5. With that project I found that I hear a pop sound when the file starts on voice 0 but no other voices. I eventually shifted all voices up by 1 skipping 0 and hear no artifacts.

I've narrowed it down to this code which runs on the CLUE:

import board
from audiopwmio import PWMAudioOut as AudioOut
import audi...
timber mango
#

I am running my boards from a Raspberry Pi 4 which is running from its recommended power supply. Is there a reason they should get into safe mode when I connect them? Usually they are both just fine.

#

How do I get out of safe mode without changing a power source?

tulip sleet
#

@umbral dagger I am trying it

onyx hinge
#

@lapis hemlock yes the properties do work in circuitpython. ```>>> ulab.zeros(3).shape
(1, 3)

#

if it turns out that we have to make this different in circuitpython, then the code structure where all the "bindings" go in your ulab.c works great for us, we can put it in our shared-bindings/ulab/__init__.c . but, is the payoff for having properties in circuitpython's ulab worth making code not portable between them? I'm less convinced. Would want to know what @slender iron thinks

ivory yew
tulip sleet
#

@umbral dagger I answered in forum thread; I'm pretty sure it's excess power consumption

tulip sleet
#

I added some info to the board Learn Guide FAQ about this.

ivory yew
#

nvm I got another programmer working

#

is there an easy way to convert uf2 to elf/hex?

#

nvm I'm dumb

#

ignore me

#

I'm very excited. Sol's production sample came today.

onyx hinge
#

@ivory yew yay!

golden sail
#

quick question, I connected an esp8266 to a itsybitsy m4 express

#

im trying to get data from sensors connected to the itsy bitsy m4 and collect them with the esp8266 to later upload them on an app

#

how would I go about doing this?

ivory yew
onyx hinge
ivory yew
river quest
#

here's the DRAFT of the upcoming โ€œPython for microcontrollersโ€ newsletter that ships out tuesday at 11am ET via adafruitdaily.com - please send any links, news, events and more via an issue/PR, or @ us or really any thing ๐Ÿ™‚ we'll get it added! https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2020-02-18-draft.md

timber mango
#

I added to error checks to a script and MzPyLint is tagging me for lines too long. I can not move the error checks. Can I just disable the line too long check? If so, how?

tulip sleet
#

post some example too-long lines

#

are they just strings?

#

or point me to the repo

timber mango
#
                raise ValueError('Digit value must be an integer in the range: 0-3')

            for bits in bitmasks:
                if not 0 <= bits <= 0xFFFF:
                    raise ValueError('Bitmask value must be an integer in the range: 0-65535')
#

The error messages are the long lines. These are the only to places the script does not get past PyLint.

tulip sleet
#
            if not 0 <= dig <= 3:
                raise ValueError(
                    'Digit value must be an integer in the range: 0-3')

            for bits in bitmasks:
                if not 0 <= bits <= 0xFFFF:
                    raise ValueError(
                        'Bitmask value must be an integer in the range: 0-65535')
#

anything in parentheses can be split across multiple lines

#

You can also split a string with a \:

>>> print ("a\
... bc")
abc
#

the backslash-newline is ignored

timber mango
#

I hate doing that, but I guess I can.

tulip sleet
#

but i think the first thing is easier if it will work, just do a newline after the opening paren

timber mango
#

OK.

tulip sleet
#

and you can get pylint to ignore longer lines, but it makes for noise in the code, so if it can be made readable without, that's probably a bit better

timber mango
#

OK, I will do that then.

#

That should fix up my two PRs for the HT16K33 library. After that, I have one more thing to do to it.

timber mango
#

Out for now.

gusty topaz
#

Guys, I'm working on a project using Audio on Pyportal. Everything is working fine and as expected (I followed all the learn guides). When touching the screen a wav file plays per the code below. However, when the PP portal is idle (no interaction with it), I can hear a static/white noise coming out of the small speaker. Sometimes it gets really loud and then goes back to a low volume. Have any of you experienced something like this in the past?.

while True:
    touch = ts.touch_point
    # a larger time wait minimizes rogue coord. detection.
    # 0.08 works fine.
    time.sleep(0.08)

    if touch:
        audio.play(sound)

        touch_data = get_data()
        action(touch_data)
        update_screen(touch_data)
lapis hemlock
#

@lapis hemlock yes the properties do work in circuitpython. ```>>> ulab.zeros(3).shape
(1, 3)

@onyx hinge I know what the problem is here, and it is really high on my list. As soon as properties are sorted out, I can fix this.

#

if it turns out that we have to make this different in circuitpython, then the code structure where all the "bindings" go in your ulab.c works great for us, we can put it in our shared-bindings/ulab/__init__.c . but, is the payoff for having properties in circuitpython's ulab worth making code not portable between them? I'm less convinced. Would want to know what @slender iron thinks
@onyx hinge I am not going to break compatibility. In fact, I wanted to ask, whether you really have to move stuff into __init__.c. I could do that, if that is necessary. Properties are quite important, I think. I wouldn't like to remove them.

fallen anvil
#

On IMXRT UART pin definitions theres no pull enabled, and hysteresis is off. The lack of pull will generate noise and false inputs on the pin...was there a specific reason for doing this? Normally I would have 100K Pullup and hysteresis (because, why not?) on these. If there's no specific reason then I'll change it in the stuff I'm working on.

lapis hemlock
#

@onyx hinge @slender iron jimmo from micropython says that properties are currently not implemented in an accessible way in micropython, but that it could be made to work with some plumbing. He suggested that I lift the required code from circuitpython's runtime.c, so that it what I am going to do: https://forum.micropython.org/viewtopic.php?f=3&t=7762&p=44283#p44283

gusty topaz
#

Guys, I'm working on a project using Audio on Pyportal. Everything is working fine and as expected (I followed all the learn guides). When touching the screen a wav file plays per the code below. However, when the PP portal is idle (no interaction with it), I can hear a static/white noise coming out of the small speaker. Sometimes it gets really loud and then goes back to a low volume. Have any of you experienced something like this in the past?.

while True:
    touch = ts.touch_point
    # a larger time wait minimizes rogue coord. detection.
    # 0.08 works fine.
    time.sleep(0.08)

    if touch:
        audio.play(sound)

        touch_data = get_data()
        action(touch_data)
        update_screen(touch_data)

@gusty topaz has anybody seen this before?

timber mango
#

@gilded cradle I have been playing with a modified version of the animation script that works with auto_write=Trueon display initialization.

#

I switched the default for animate() to auto_write=False, which is what most of the animations I created require. This means fewer parameters have to be specified.

meager fog
#

@indigo wedge hi finally have a moment to try nxploader

indigo wedge
#

I'm afk but can try to support

meager fog
#

im a little confused by what its askin here. i se the nxt MCU device, and the Boot Device to W25xxJV

#

then connected, and its sitting here with the bottom green bar advancing slowly

indigo wedge
#

Can you see the bootloader in devices in control panel?

meager fog
#

yah def

#

like it connected to it

#

and its 'doing something'?

indigo wedge
#

I think that's just like a fake loading bar,id you don't get the blue light then it didn't connect

meager fog
#

the tool found the VID/PID

#

hmm

#

ok

#

the sound effects are funny ๐Ÿ˜„

indigo wedge
#

You can also try unchecking One Step and doing it one step at a time waiting a bit between

#

You can disable those in tools

#

Oh also I think I had to change mode in tools

#

To master

#

It was like 1st or 2nd submenu

meager fog
#

yah i changed to master

#

i get this in the cmd window

#
toolStatus: 0
commandOutput: {
   "command" : "error-status",
   "response" : [ 858993459 ],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

Executing: C:\Users\ladyada\Dropbox (Personal)\micropython\NXP-MCUBootUtility\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0145 -j -- error-status
toolStatus: 0
commandOutput: {
   "command" : "error-status",
   "response" : [ 858993459 ],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

Executing: C:\Users\ladyada\Dropbox (Personal)\micropython\NXP-MCUBootUtility\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0145 -j -- write-file 538990592 C:\Users\ladyada\Dropbox (Personal)\micropython\NXP-MCUBootUtility\src\targets\MIMXRT1011\ivt_flashloader.bin
toolStatus: 0
commandOutput: {
   "command" : "write-file",
   "response" : [ 2290649224 ],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

Executing: C:\Users\ladyada\Dropbox (Personal)\micropython\NXP-MCUBootUtility\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0145 -j -- jump-address 538990592
toolStatus: 0
commandOutput: {
   "command" : "jump-address",
   "response" : [],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}```
#
Executing C:\Users\ladyada\Dropbox (Personal)\micropython\NXP-MCUBootUtility\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0145 -j -- error-status
Executing C:\Users\ladyada\Dropbox (Personal)\micropython\NXP-MCUBootUtility\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0145 -j -- error-status
Executing C:\Users\ladyada\Dropbox (Personal)\micropython\NXP-MCUBootUtility\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0145 -j -- write-file 538990592 C:\Users\ladyada\Dropbox (Personal)\micropython\NXP-MCUBootUtility\src\targets\MIMXRT1011\ivt_flashloader.bin
Executing C:\Users\ladyada\Dropbox (Personal)\micropython\NXP-MCUBootUtility\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0145 -j -- jump-address 538990592
#

so maybe it loads the bootloader but fails on the jump-address

#

it never comes back as the secondary flashloader

indigo wedge
#

Yes for me the initial bootloader disappears and a new one appears

#

Try disconnecting and connecting again sometimes its flimsy, I have to run for now

meager fog
#

np l8r

#

@indigo wedge fyi i think your two stemma resistors are rotated

indigo wedge
#

Oh, lol

#

Impressive that it still works

umbral dagger
#

@tulip sleet Thanks, Dan. Good call. Might have been nice to have a barrel jack as an alternate (higher current) power source.

meager fog
#

@indigo wedge did some light rework, checked values - 24 mhz crystal is giving me a nice 1Vpp but...still nothin

#

ill wait till ya send me boards

timber mango
#

I think a good use for the animation function I created is for small robot signaling and communication. Small robots do not have much space for networking and communication tools. I would love to expand the HT16K33 library to use multiple displays.

indigo wedge
#

@meager fog I think if you get the usb bootloader then the crystal should be fine

fallen anvil
#

@indigo wedge I'm implementing CTS/RTS/RS485 on IMXRT. That was straightforward, but I think I've found some issues with the serial which are down to the fsl driver rather than anything you've done...are you the right person to ping this off of?

indigo wedge
#

I'm preparing to go to sleep now but you can DM me and I'll read in the morning ๐Ÿ™‚

fallen anvil
#

OK. No worries.

#

I'll see if I can get closer to a resolution before sending you something.

#

cracked it - when asking for a uart read with timeout and the timeout triggered then the full requested length would be returned, even if no data had been received. That's because LPUART_TransferAboveReceive nukes the rxDataSize back to zero. Just changed the return to be self->handle.rxData-data and all is good for both the timeout and read complete cases. Sweet dreams.

manic glacierBOT
#

Hi,

while playing around with Adafruit CircuitPython 5.0.0-beta.5 on 2020-02-05; Adafruit ItsyBitsy M4 Express with samd51g19 I did the following:

  1. import microcontroller
  2. dir(microcontroller.cpu)
    This results in a frozen repl !
    And after a while, the Windows serial device "goes away"...

I don't consider this at all serious, but worth to notice.

Thomas

timber mango
#

Other than BDF, which font format is used throughout Circuitpython? There is no ยฐ (degree) symbol in font5x8.bin, which is used in the IS31FL3731 library for the Charlieplex displays. Would it be reasonable to convert the library to use a different font format? Would it be worthwhile to do this?

meager fog
#

thats the only two

#

could use 'o' or '*'

timber mango
#

I guess the "*" is better than nothing, but not as good as I would like.

manic glacierBOT
#

FOR COMMENT ONLY, NOT FOR PULL YET

These patches implement RTS/CTS and RS485 handling for UART. This pull is for comment on style and approach (first sizeable patch to this project). It is not complete. It also addresses a few bugs in the UART handler.

Still to do;

  • Address comments raised in review
  • Add RS485
  • Port to other members of IMXRT families
  • Provide stubs for all other boards so they compile cleanly and functionality can be added by board responsibles.
timber mango
onyx hinge
lapis hemlock
pastel panther
#

heya @slender iron, if I get a seg fault trying to debug why a bootloader doesn't appear to be running properly is there something else I can look at to keep tracking down the problem? I'm about at the edge of my debugging ability:

ionic elk
#

I have gotten the flu real bad this weekend and might miss the start of next week, sorry! I'll check discord every day but probably won't be working on much since I'm riding it out at my folks house.

stuck elbow
#

get well soon

manic glacierBOT
#

For UTF-8 characters the fix seems simple: In lib/mp-readline/readline.c replace line 209
} else if (32 <= c && c <= 126) {
with
} else if (32 <= c ) {

This allows REPL to handle at least the UTF-8 characters

s='27ยฐ C'
print(s)
27ยฐ C

But there seem to be some other issues:

s='27ยฐ C'
s
'27 C' // no degree symbol
print (len(s))
4 //should be 5 if the degree symbol is included

And, of course, UTF-16 characters aren't covered.

...

gusty topaz
#

Guys, I'm working on a project using Audio on Pyportal. Everything is working mostly fine (I followed all the learn guides). When touching the screen a wav file plays per the code below. However, when the PP portal is idle (no interaction with it), I can hear a static/white noise coming out of the small speaker. Sometimes it gets really loud and then goes back to a low volume. Have any of you experienced something like this in the past?. Here is the main part of the scrip (this is the only place where the audio.play() is called:

while True:
    touch = ts.touch_point
    # a larger time wait minimizes rogue coord. detection.
    # 0.08 works fine.
    time.sleep(0.08)

    if touch:
        audio.play(sound)

        touch_data = get_data()
        action(touch_data)
        update_screen(touch_data)

Do you guys have any idea why the speaker would constantly generate that white noise?.

pastel panther
#

@ionic elk Dr's advice: Stay off the interwebs and drink plenty of fluids

bright aspen
#

Is there a way to generate an MCLK (audio system clock) for I2S output on Feather M4 Express or Feather STM32F405 Express?

main meteor
bright aspen
#

@main meteor Thanks! I have used the UDA1334 with the M4 Express. The uda1334a board doesn't need an an MCLK, it derives it from the BCLK. However, I'm now moving on to a DAC that needs an MCLK, a multiple of the LRCLK (WSEL) and locked in. The multiple is typically 256, I think 128n in general.

main meteor
#

Oho, you're already ahead of me then

onyx hinge
#

Also hopefully the pin you need is broken out

lone sandalBOT
bright aspen
#

@onyx hinge Thank you! I had been using the UDA1334 and another that did not need an MCLK, so I had forgotten about it and I'm in a panic. For my DAC the MCLK doesn't have to have a phase relationship with BCLK, it just needs to be at a frequency that is an appropriate multiple of LRCLK (eg, 12.2880 MHz or 18.4320 MHz) and derived from the same clock source (can't use a separate oscillator). Options that I'm currently considering are these:

2   Add MCLK to CircuitPython I2S for a candidate processor (as you suggested), using an all-the-pins for the prototype if need be.
3   Find another way to make a candidate processor generate, say, 12.2880 MHz.
4   Drop down to C.
5   Switch to a pic32mx270F256B (in a DIP).```
idle owl
gilded cradle
#

Sure @idle owl

idle owl
#

Thanks!

#

I'll do the release if you merge.

#

Thanks @gilded cradle

gilded cradle
#

You're welcome

orchid basinBOT
manic glacierBOT
pastel panther
slender iron
#

@pastel panther that segfault looks a bit like a red herring to me

#

on arm you typically end up in the HardFault_Handler (you can set a breakpoint on it)

#

Just a reminder. The CircuitPython Weekly is tomorrow, Tuesday, at 11am Pacific / 2pm Eastern here on Discord. All are encouraged to attend. Meetings are normally Monday but today is a US holiday so we bumped it one day forwards. Meeting notes doc is here: https://docs.google.com/document/d/1cTRyH_oxjhgRwpQPM-oSOIB-chxbplCkyqx2NYRPJ8o/edit <@&356864093652516868>

manic glacierBOT
meager fog
#

@indigo wedge ! that worked

#

actually ... no it didnt

#

it did once ๐Ÿ˜ฆ

slender iron
#

@meager fog working once sounds like it was loaded into memory

indigo wedge
#

@meager fog I can make a quick video of how I do it when I'm back from work

manic glacierBOT
indigo wedge
#

I'm now blocked waiting for PCBs for a week or two so will try to get more imx port work done ๐Ÿ™‚

manic glacierBOT
meager fog
#

@indigo wedge yah

#

so i did the pull-boot-pin low thing

#

the nxp loader at least got to the second stage - and i tried loading the feather_mimxrt1011-firmware.elf

#

but then nothing, and now i cant get back to the second stage

indigo wedge
#

hmm, did you configure the boot device before flashing?

meager fog
#

nothing

#

i just ran the program

fallen anvil
#

Welcome to the circle of hell that is imxrt boot configuration :-|

meager fog
#

if there's a step by step process - i'll need to know the steps ๐Ÿ˜‰

#

i "Looks like loading the .elf into Application Image File field in the Image Generation Sequence tab and then pressing "All-In-One Action" flashes the device successfully!"

indigo wedge
#

yes, seems i missed a one-time step cause it was one time ๐Ÿ˜„

#

i'll make a video after work ๐Ÿ™‚

meager fog
#

ok but now i cannot get back into the RAM loader

#

do i have to pull the other boot pin?

#

on my metro design i put two switches, maybe i should finish that design ๐Ÿ˜„

manic glacierBOT
indigo wedge
#

if you pull that line down it should always boot into rom loader the other one is already tied low iirc

fallen anvil
#

@indigo wedge Whats to work on? I'm just finishing up the RS485/RTS/CTS thing (I needed RS485, the others were virtually free) and I'm eyeIng CAN next, but I don't know if there's a standard python API for it?

indigo wedge
#

don't think so

#

also i need to add more functionality to my uf2 lib

fallen anvil
#

yeah, I need uf2 for 1021...that's quite high priority for me actually.

indigo wedge
#

would be cool if someone wanted to port that to a different manufacturer so we could figure out all the issues there

#

like nrf, stm or samd

fallen anvil
#

nrf is on my todo list if no-one else gets to it first, but it's well down that list

indigo wedge
#

my 1011 evk's USB connector broke off so i couldn't test on it anymore

meager fog
#

@indigo wedge ๐Ÿคท i can't get nxp bootloader to get back to the ram loader anymore

indigo wedge
#

you mean the stage 1 "SE" something something

#

strange cause that would mean it wrote something to the flash that makes the rom loader think that there is a valid fw there so it jumps but pulling that pin low should force rom loader

meager fog
#

yah

#

right

#

can you check the other boot pin

#

like are you sure both should not be pulled low

indigo wedge
#

ok so
sdcard d2 is boot_mode[0]
sdcard d1 is boot_mode[1]

both have internal pull downs, [1] has external pull up
so default is [1:0] = 10 - internal boot
if you put 0 on that resistor then we do [1:0] = 00 - boot from fuses which makes the rom loader check flash and boot if it finds something there
if you put 0 on the resistor and 3.3v on d2 of sdcard then we get [1:0] = 01 - force rom loader

#

so you could try that last thing, i understand you might need 4 hands for that ๐Ÿ˜„

meager fog
#

so the matching resistor on the other side

#

?

indigo wedge
#

no, that's for the detect, you have to connect on the sdcard connector pad

#

might need test points for that next time but i didn't think they would be needed

meager fog
#

ok when you have a chance please take a photo pointing to the pad

#

and ill try it!

indigo wedge
#

i could show on the render but no kicad at work

fallen anvil
#

@indigo wedge I've had the problem when you've managed to get some configuration into the flash which is sort-of-valid-but-not-quite. In that circumstance the easiest way out of it I've found was to stop the flash getting read sucessfully by just shorting one of its pins to ground on power-on. With the leaded chip that can easily be done by shorting pins 1 & 2.... (probably not being helpful here, I'll go back under my rock)

indigo wedge
#

guess that's an option @meager fog, short d1 and d2 or something like that when you connect usb, if the rom loaded pops up then you can remove the short and pull the resistor down as i said before

meager fog
#

@indigo wedge yah please show on render

fallen anvil
#

more dumb question time; my PR just failed CI because of check-translate. Am I supposed to submit locale/*.po and locale/circuitpython.pot as part of my patch, or did I miss something?

timber mango
#

@gilded cradle Modify the brightness property is PR #62.

gilded cradle
#

#62 is an issue, not a PR.

timber mango
#

@gilded cradle Are my PRs OK then?

manic glacierBOT
meager fog
#

@indigo wedge (i didnt solder on the SD card so it shouldnt be too hard to add jumper cables)

timber mango
#

There should be a #help-with-github thing.

#

I do not understand what to do to rebase PR #63.

haughty drift
#

Arturo182: Are you aware that one of these discs you show in you post was actually shown in an episode of the detective series Bosch (an Amazon video series)? They called it a tracking device.....

slender iron
#

@fallen anvil yeah, when you add strings in translate() you also need to run make translate at the top level to update the files in locale

fallen anvil
#

OK, so I just commit the resulting files then?

#

done and pushed, let's see if we get a clean CI build...

slender iron
#

@fallen anvil yup! thanks!

manic glacierBOT
fallen anvil
#

@slender iron far be it for me to tell you how to run your project, but what is the idea behind committing derived files? Seems a bit unusual.

slender iron
#

it's so that translators don't need to run any tools, they can just edit the files

#

for example, I know at least one of our regular translators just edits the .po through the github ui

half sedge
#

Hi, I was checking for a Circuit Python board with both BLE and SD card. The idea was to record Heart Rate values (and/or debug information) to know the long time stability. And I did not find any. What would you add/do? (1) Log in the flash (never did that, but if not connected as storage, it should work)? (2) I have a 128x128 TFT display wiht uSD card, that I could use (would that work without using the display part of it)? (3) Is there a feather wing that would do that?

slender iron
#

@half sedge logging to sd card should work. there is someone on the adafruit support forum doing similar and they are having trouble logging at the data rate they'd hoped. You can definitely try a display with SD card slot for prototyping

#

I'm not sure if we have a featherwing with an sd card slot only

half sedge
#

From memory there is a loggin feather, but that would be M0 + SD.

timber mango
#

@half sedge You could add the AdaLogger Featherwing. It has an SD card and RTC. I am using that to timestamp and log data from a group of sensors. It works great!

slender iron
#

heh, I fail in remembering all featherwings ๐Ÿ™‚

timber mango
#

@slender iron That is why there is a great Community Brain here. ๐Ÿ˜€ ๐Ÿ˜Ž

#

I only remember the ones I am actually using. ๐Ÿ™‚

slender iron
#

๐Ÿ™‚

timber mango
#

That AdaLogger Featherwing is one of my favorites, and it is very inexpensive.

onyx hinge
#

@lapis hemlock do you intend for your "2d" branch to be merged to master at some point? What things need to happen before that can be done?

#

I moved Drew Fustini's hug reports to alphabetical order. I'll move status updates too, if it's out of sequence.

lapis hemlock
#

@onyx hinge I think, I review from you would be enough. If you think that it is OK for now, we could merge.

onyx hinge
#

(maybe he's going alphabetical by last name? hm)

#

@lapis hemlock I'd be happy to do that review. I have a couple of hours today I can work on stuff for adafruit, and anything that helps clear the path for our ulab pr in circuitpython would be good use of that time.

lapis hemlock
#

I have started to work on an improvement (matrix branch, not yet uploaded), but as I said earlier, the changes there are going to be internal.

manic glacierBOT
onyx hinge
#

fwiw I also want to review some of the warnings that would occur during a circuitpython build if we used the "usual" C compiler flags, and fix them if it looks like they could cause a real issue or as long as the fixes don't dirty the code..

lapis hemlock
#

@onyx hinge I might go to bear early today. If, because of the time difference, you don't manage the review before that, you can merge into master, I don't mind.

#

@onyx hinge I can't comment on that, since I don't get any warnings in micropython.

onyx hinge
#

sure thing, with your permission

lapis hemlock
#

@onyx hinge this is ridiculous: I wanted to say that I might go to bed early. Ha!

onyx hinge
#

I guessed it

slender iron
#

@lapis hemlock make sure and read the hug reports for you in the circuitpython meeting notes if you are unable to make it ๐Ÿ™‚ https://docs.google.com/document/d/1cTRyH_oxjhgRwpQPM-oSOIB-chxbplCkyqx2NYRPJ8o/edit#

lapis hemlock
#

OK.

#

@slender iron Oh, I thought that @onyx hinge miss-typed the bug report ๐Ÿ˜†

onyx hinge
#

Adding the data property sounds like a good idea. but in circuitpython with the "buffer protocol" implemented, it also works directly, like this in python3. ```>>> n = numpy.zeros(3)

memoryview(n)
<memory at 0x7f3bf590a588>

#

"hug reports" are when we thank people in the community for the good stuff they are doing

lapis hemlock
#

@onyx hinge As you wish, though, array.data is probably more numpythonic. In the long run I would like to have it, but it is not urgent.

#

"hug reports" are when we thank people in the community for the good stuff they are doing
@onyx hinge OK, I have learnt something new today. Thank!

slender iron
#

๐Ÿ™‚

timber mango
#

TEXT only.

lapis hemlock
#

I hope this is not too cheesy, but I have found the circuitpython community very friendly. Not only towards my own self, but I actually skim most of the messages here, and they are all extremely positive. I don't know who the real architect behind all this is, but they should definitely be proud of themselves. I can't place a hug/thumbs-up/high-five whatever here, because @timber mango requested TEXT only, so you have to put up with TEXT only:)

idle owl
#

@lapis hemlock It's not cheesy at all. That's the goal. We strive for that.

lapis hemlock
#

@idle owl very well done.

idle owl
#

CircuitPython Weekly: Construction-on-Kattni's-End-Edition. ๐Ÿ™„

slender iron
#

<@&356864093652516868> meeting is starting

wraith tiger
#

I'm just lurking, btw.

timber mango
#

lurking today

graceful heart
#

lurking

marble hornet
#

Lurking

half sedge
#

Lurking

onyx hinge
#

@lapis hemlock join us in the voice chat if you can!

lapis hemlock
#

@onyx hinge I think I've got to take off now, but next time I would be happy to attend.

onyx hinge
#

see you ! It's usually mondays at this hour.

lapis hemlock
#

@onyx hinge so it was postponed because of the holiday.

onyx hinge
#

right, it was a US holiday yesterday.

lapis hemlock
#

OK, then till Monday!

tidal kiln
#

** lurking **

slender iron
idle owl
#
Adafruit Industries - Makers, hackers, artists, designers and engineers!

Kevinโ€™s CircuitBrains boards are now listed and live on circuitpython.org/downloads. Kevin submitted the Deluxe model to Crowd Supply will have a project to support fabrication and fulfillmenโ€ฆ

ivory yew
#

Can't make it today ๐Ÿ˜ญ but I am working on a new m0 based Eurorack module. ๐Ÿ‘€

onyx hinge
#

@ivory yew take care! ๐Ÿ‘‹

idle owl
#

@kushaldas @PyladiesPune @anweshasrkr @adafruit @kattni @nnja I love this so much. @CircuitPython is bringing Python to more developers and makers around the world.

tiny oriole
#

absolutely!

idle owl
marble hornet
#

** text only

raven canopy
#

Gotta drop. ๐Ÿ˜ฆ ๐Ÿ‘‹

pastel panther
#

byee @raven canopy

onyx hinge
#

dan, curious whether the spi transaction length change made a noticible difference

tulip sleet
#

i could not tell! I was testing with turtle

onyx hinge
#

oh well.

tulip sleet
#

i needed some example that sent a lot more data

#

but it also provoked me to rewrite the DMA loops to be simpler

onyx hinge
#

cool beans

pastel panther
raven canopy
#

yay! That meeting was cancelled. Now I get an extra 30 minutes before the next one. ๐ŸŽ‰

slender iron
#

@raven canopy great! you are next ๐Ÿ™‚

raven canopy
#

Yep

onyx hinge
#

[oops mubes was status updates only]

idle owl
#

There's no hug report from mubes. Only Status Updates.

onyx hinge
half sedge
#

I will add in the note a Hug Report to @lone axle and @gilded cradle , I did not notice they added the background color to Label. I created that "issue", and only figured in this meeting that maybe that's what you were talking about.

timber mango
#

I have a hug report for @gilded cradle for coaching me through the PRs to the HT16K33 library stuff.

onyx hinge
idle owl
#

@inland tusk Please mute.

slender iron
#

@inland tusk please mute

#

๐Ÿ™‚

timber mango
#

Working on the HT16K33 stuff has been so much fun!

lone axle
#

Seeing your messages go by in the chat inspired me to pick up one of the 8x8 grid feather wings over the weekend to play with ๐Ÿ™‚

half sedge
#

No thermal camera required if you have the Titano, I have code that do not require the cam.

onyx hinge
#

David Glaude is a secret time lord with two hearts

half sedge
#

@onyx hinge or a Klingon?

onyx hinge
#

@half sedge I did not know that

half sedge
#

@onyx hinge I just checked, it is a misconception, they have one heart, but with 8 chambers, where human have 4 chambers. Sorry for misleading. ๐Ÿ˜‰

marble hornet
#

Ci stands for?

idle owl
#

Continuous Integration

marble hornet
#

Thanks

half sedge
#

@idle owl At one time I wanted PyPortal for PyGamer+AirLift... because I did not have a PyPortal yet.

tiny oriole
#

interested in helping out with demos once i get my new screen installed ๐Ÿ™‚

half sedge
#

@idle owl Maybe you can consider PyBadge for PyPortal, I did wear a PyPortal as a badge at Fosdem.

tiny oriole
#

awesome, sure

half sedge
#

I want to do BLE broadcast of the color it read.

#

Compatible with the Hide and Seek demo and all the Cheerlight I did.

lone axle
#

Neat idea. It's a bit of a different take on the Gizmo color sender / transmitter

#

allows for a wider group to use it too since it's not just the closest one only

half sedge
#

I wanted to do colour mixing using the Hide and Seek demo. You get the color, and you get the RSSI and you blend them to have the color of your "badge".

lone axle
#

I'm kicking around the thought of a "playground" type Mobile app kind of like the Circuit Playground Bluefruit one that is made to work with CLUE

marble hornet
#

So it would be device specific if rude?

half sedge
#

So if you are near Red and Blue, your badge get a mix of those. To choose your color, you scan a color with the CLUE reader.

onyx hinge
#

I love the quilt idea fwiw

prime flower
#

dropping out - heading out for lecture, listening later on spotify ๐Ÿ™‚

marble hornet
#

What about a mesh to find friends throughout pycon?

raven canopy
#

2nd day_job meeting cancelled. Best. Tuesday. Ever. (For this week, at least.)

idle owl
#

Another idea is like the interaction badge colors that grew out of autism conferences, where you have green if you want to talk to anyone, yellow if you only want to talk to friends, and red if you don't want to talk to anyone. So you could transmit green to others who are in a "green" mode to find new people to talk to.

#

So your CLUE does something if you're in a green mode and someone else in green mode is near enough to you.

slender iron
#

@idle owl maybe it can be scoped by topic?

idle owl
#

@slender iron Nice

onyx hinge
#

[dang sommersoft does a lot of stuff]

raven canopy
#

Not really. Just long-winded. ๐Ÿ˜„

tiny oriole
#

@idle owl That could be interesting. Maybe use A/B buttons to set your mood, and if it is in green mode, then maybe use the speaker to play a noise on both clues if someone else is green and near

idle owl
#

@tiny oriole Yeah, and to add Scott's suggestion, includes a series of topics that you can choose to enable/disable, and if someone else wants to discuss the same thing or "General discussion", then it connects.

inland tusk
#

I have a question about a buffer overflow when I tried to download a config over midi sysex.

timber mango
#

@lone axle You should get one of the HT16K33 Featherwings with the alphanumeric display. Making these do animations has been a blast!๐Ÿ˜ƒ

graceful heart
#

might be worth looking into Yeoman or some other project generator

marble hornet
#

Could the continuous integration pull the repos when it sees said repoโ€™s cookie template is out of date ?

idle owl
#

There's a lot of risk in that, unfortunately.

graceful heart
#

then you might be able to just do a yo upgrade automatically on each repo, assuming its a non breaking change

#

or manually to do it safely

raven canopy
#

That was part of the reason I broke out adabot's validators into a class. It's easier to add them.

marble hornet
#

What is โ€œblack โ€?

half sedge
#

a color?

onyx hinge
#

The uncompromising code formatter

By using Black, you agree to cede control over minutiae of hand-formatting. In return, Black gives you speed, determinism, and freedom from pycodestyle nagging about formatting. You will save time and mental energy for more important matters.

Black makes code review faster by producing the smallest diffs possible. Blackened code looks the same regardless of the project youโ€™re reading. Formatting becomes transparent after a while and you can focus on the content instead.

timber mango
#

I soooooo want a CLUE, Feather Bluefruit Sense (does this have the 2MB for Circuitpython?), and a Circuitplayground Bluefruit!! I would pair the Sense and/or Circuitplayground Bluefruit with a CRICKIT for two robots. I already have both CRICKITs. I would also LOVE to help test the BLE stuff!

raven canopy
#

Caveat: it's one more tool to maintain... ๐Ÿ˜

fallen anvil
#

@idle owl @onyx hinge sorry, did I do something wrong? New to this community, so nudges are welcome if I should do something different...

idle owl
#

@fallen anvil Not at all! We simply didn't want to miss your notes, Jeff didn't realise you'd only put notes in one place, not two.

half sedge
#

None mean you did not provide a parameter...

fallen anvil
#

Ah, fair enough...just wanted folks to know what I was up to in case it needs tuning or something.

pastel panther
idle owl
#

@fallen anvil Thank you for the update! We appreciate it. No worries, you're doing well ๐Ÿ™‚

marble hornet
#

Processing has great docs too. Just a though

lone axle
#

I think it would be great if the Learn Guide(s) / Github Readme / Readthedocs page for related modules and devices would all link to each other so you can get to any one of them from the other.

idle owl
#

@lone axle We try to do that with RTD and Learn Guides.

manic glacierBOT
#

Right now, it's necessary for every class that wants to deal with a color-or-transparent to check for a "None" value and use it to set the palette entry's transparent flag. If "None" was supported by Palette's getitem/setitem in the core C code, then all this using code could be simplified and transparent color would always be available anywhere a numeric color is accepted.

Caveat: this means that displayio now parses a color that neopixel doesn't -- but a transparent neopixel isn't reall...

inland tusk
#

None usually means that a parameter has not been inialized or is not applicable.

raven canopy
#

@pastel panther so move from Sphinx to something else? rST has its limitations...

timber mango
#

I want to pair my PyGamer with wireless to make a robot controller.

#

Will there ever be a BLE Featherwing that can be added to boards that do not have it already?

marble hornet
#

Please post, would love to listen to it

half sedge
#

Today, for a board/sensor, you have: (1) A library (2) A learn guide (3) A simple_example (4) Readme.md (5) Doc generated from the code comment.

#

If you don't know, you could miss that there is (2) or (3).

marble hornet
#

Yes! I do

raven canopy
#

I mean, for nice expandable documentation, you'll have to move.

errant grail
#

Simple documentation mgt characteristics: identifying the owner and building in an expiration date.

slender iron
raven canopy
#

I do not disagree. At all.

half sedge
#

Docs in the code. Does that exist for Python?

idle owl
#

We already do that for libs.

#

And CP.

#

Some of the libraries are well documented within the code. Translates to Read the Docs.

half sedge
#

Could do pseudo code, just the function, not the content and add the doc to that for the code.

#

So write what the python description of the function would look like if they were Python (where they are C).

#

Then process the same way you do for library.

#

Cool.

slender iron
half sedge
#

A 5.1 with uLab is good for marketting uLab.

onyx hinge
#

+1

marble hornet
#

Editing GUI?

manic glacierBOT
pastel panther
#

heading out, ttyl everyone ๐Ÿ‘‹

idle owl
#

Need to drop off. Thanks everyone!

slender iron
timber mango
#

My muli-sensor script is almost 1000 lines of Circuitpython now, with quite a bit of comments. It is mostly code though.

slender iron
timber mango
#

I got an install deps failure on PR #65. How can I clear this?

#

Is that the one I need to rebase? How? I do not understand rebasing or how to use it yet.

idle owl
#

@slender iron @tulip sleet Is there a way to set a unique and chosen identifier when transmitting BLE? So if you and I are near each other, how do you show up to my board? Is there a way to set that to say "tannewt" or something so then I could have code that says "if tannewt, do foo"?

tulip sleet
#

there is an advertising name which you can set: BLERadio.name. As for unique, the serial number burned into the flash is available.

idle owl
#

@tulip sleet Both of those are perfect. Thanks

tulip sleet
#

I use the last four hex digitis of the uid for "CIRCUITPYxxxx"

raven canopy
#

@timber mango that failure looks Action's internal infrastructure related. I would just click the re-run button on it.

timber mango
#

@idle owl he definitely needs more foo! ๐Ÿ˜ƒ ๐Ÿ˜‰

#

OK, I will do that.

slender iron
#

@idle owl we can add something simple for it too

#

I love the idea of twitter handle because I always have a problem meeting folks I only know online

half sedge
#

Just an idea (that can be in the Weed). When there is an example in the library (simple text) write as a comment in the file, the original name of the file, or else link to GitHub. The idea is that the first thing you will do is copy that to your board and rename it to main.py. So keeping the name in help me.

#

Or maybe I do it wrong. I should keep the original name, and use main.py to import it.

onyx hinge
#

@slender iron just want to run something by you about packages implemented in C that affects how we are splitting ulab. I think this is inescapable, and related to how built in module dicts are read-only. Here's a session to show the oddities: ```>>> import ulab

dir(ulab)
['class', 'name', 'version', 'array', 'fft', 'filter', 'float', 'int16', 'int8', 'linalg', 'numerical', 'poly', 'uint16', 'uint8', 'vector']
ulab.fft.fft
<function>
import ulab.fft as fft
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'ulab'
from ulab import fft

half sedge
#

That way main.py contain no code, but just decide what you want to run.

onyx hinge
#

@slender iron vs using ulab, ulab_fft, etc. Maybe we should go the latter way with underscores and not dots? because some of the stuff in that session just seems weird..

slender iron
#

@onyx hinge I think that is a micropython bug. try something similar in cpython. we should just fix it

#

@half sedge jerryn uses imports regularly instead of code.py

onyx hinge
#

I agree, it's different in cpython and even different in micropython when your package is made of py or mpy files

slender iron
#

@half sedge I like the idea of including the original name in a comment

idle owl
#

@slender iron I'm thinking for my interactive badge thing, you can add your friends to a list, and then set it to yellow mode, and it'll only react when your friends are near you. That involves setting what you're transmitting though. Which is why I asked

onyx hinge
#

I suspect the trouble of fixing it may be big. you need ulab's dict to have fft only after you import ulab.fft, but not before; but built in module dicts are rom'd and therefore readonly

slender iron
#

๐Ÿ‘ it's important to note that anything you transmit is public

idle owl
#

right.

timber mango
#

I do not see a rerun button for this PR I need to restart.

half sedge
#

@slender iron I start to do that in my demo, when I had so many files around for various demo. I was doing that, and renaming main.demo_ble_sender.py

#

So it was clear this should be a main.py, but it is not because I work on another demo. So parking a demo on the device ready to use.

#

However Circuit Python and/or my computer was not super happy to see me rename the file, that were maybe open.

#

So change detection could fail and still run the old main.py.

#

I don't know if I am clear, but I did horrible thing that confused Circuit Python and/or my Computer.

#

Even Mu was sometime confused (or I was).

slender iron
#

ya, renaming the file can confuse editors. I run into that myself

pastel panther
#

@slender iron or other salty dogs:
is there a name or shorthand for this type of refactoring?

for number in range(0,10):
    if number > 5:
        if number in range(7, 20):
            do_thing()

vs

for number in range(0, 10):
    if number <= 5:
        continue
    if not number in range(7, 20):
        continue
    do_thing()

(moving to the later)

half sedge
#

What is the target date for demo code for the CLUE? Is that for the conference?

idle owl
#

@half sedge You're welcome to submit it at any time. To have it available for the conference, you'd want to submit it before the conference, yes, which is in the middle of April.

timber mango
#

@pastel panther I do not like the second one at all!

pastel panther
#

why?

slender iron
#

@pastel panther I kind of think of it as short circuiting

pastel panther
#

I was thinking "fail early"

idle owl
#

Failing early is ideal.

slender iron
#

I definitely prefer that style

half sedge
#

@idle owl Ok, then I keep that for later. But you are looking for something that work with zillions on CLUE at a conference...

idle owl
#

Not necessarily. It could work between two CLUEs and it's still something that people can use.

half sedge
#

@idle owl If I write something, I will test with CLUE talking to CPB+Gizmo (both have the same screen, A and B button, maybe more). I count on some of you to give it a try with more than one.

timber mango
#

I would do python for number in range(0, 10): if number > 5 and number in range(7, 20): do_thing()

idle owl
#

@half sedge That's fine, but please make it clear by noting in anything you submit that you have not tested it on multiple CLUE boards.

pastel panther
#

@timber mango sure this was a toy example to demonstrate the fail early type of refactoring

#

@timber mango I think your example is good when the conditions are functionally or otherwise related

timber mango
#

@pastel panther Ah, OK, well,I do not like it.

pastel panther
#

@timber mango ok, but why don't you like it

#

If you're onto something I'd like to learn from you

half sedge
#

@idle owl Did you find a simple/easy way to know on what board you are running? Just like your PyBadge code running on CLUE, how do you know you are on a CLUE?

#

@idle owl Looking for a "import board" + something

slender iron
#

@pastel panther do you have a real example you can link to?

pastel panther
#

probably, let me see

timber mango
#

@pastel panther I just cringe at the use of continue.

slender iron
#

why?

pastel panther
#

ok, why?

timber mango
#

I just do not think it has a place in that context.

#

Conditions should be together if they apply to the same thing.

pastel panther
#

I agree

#

but there could be several unrelated failure cases

timber mango
#

If that is the case, I might do:python if number > 5: if number in range(7, 20): do_thing()

half sedge
#

@idle owl I did not re-order the meeting notes.

idle owl
#

@slender iron ^^

pastel panther
#

@timber mango that' nesting is exactly what I'd be trying to avoid

timber mango
#

Why?

pastel panther
#

because nesting makes code harder to read

#

(imho)

timber mango
#

I am not sure I agree with that. I have never had problems reading code with nested conditionals.

#

But then, that is my style of coding so I am naturally used to reading them.

slender iron
#

@half sedge @idle owl I did ๐Ÿ™‚

pastel panther
#

it also makes for longer lines than are needed and for me at least has a mental burden of having to track which branch you're on

timber mango
#

It can definitely lead to longer lines, and that has gotten me into a little trouble at least once.

pastel panther
#

sure, it's not a absolute but it's a possibility

#

for me it's more succinct to make the fact that you're stopping in certain conditions more explicit.

In the nested case you're "remembering" all the checks that you passed, to no benefit as far as I can tell.

timber mango
#

Even though I might cringe at the thought of using a particular style, I am flexible and can conform if required. Only if absolutely required though. ๐Ÿ˜‰

pastel panther
#

We're not there yet

timber mango
#

I am soooooooooooooooooooo glad!

#

In the case of Adafruit, I would conform without reservations if it were needed.

pastel panther
#

@timber mango what do you think about my comment above about "remembering" all the checks that you've passed?

pastel panther
#

You can think of every indent as a piece of state. Why track it if it's not useful?

timber mango
#

I do not really know. I have never thought about it or had to think about it.

#

Just think about it as my native style and culture, so I do not have to think of those things because they are automatic for me.

timber mango
#

I feel like an old phaht with a young mind sometimes. I can usually soak up new information and apply it pretty quickly, even as I am still learning.

#

I do need good examples that actually work though. Much, if not most, of my Circuitpython stuff starts out by taking Adafruit Learn examples apart, analyzing them, and expanding them to what I need.

pastel panther
#

That's how I learn most new things: find working examples and modify them

#

I've tried and switched away from the style you prefer. I'll suggest that you maybe try the style I like for a while to see if you come around to it

#

or not, your choice

#

I say I "tried" your style but that's not right. It's how I wrote code for the first 5-10 years

timber mango
#

For instance, take the Arduino example for the Mini Robot Rover Chassis Kit. I am still learning from that code and have overloaded all the buttons and the d-pad of the app to get expanded functionality. I am going to recode that in Circuitpython.

#

@pastel panther I might do that the next time I start a project, which is often, and when I can use a new style from the start.

pastel panther
#

ya, I wouldn't switch mid project

timber mango
#

If Adafruit looked at my version of their Arduino code, they would probably not recognize much of it. ๐Ÿ™‚

pastel panther
#

ยฏ_(ใƒ„)_/ยฏ

timber mango
#

Yeah, that!

#

I need to wire up a custom power cable because I can not find a pre-made one anywhere. ๐Ÿ˜ฆ

#

I wonder if the 4400 maH Lion batter would fit on the three-deck round robot chassis. I know the 6600maH battery is too big.

manic glacierBOT
#

Overall this looks really good! It'll need to be updated that #2618 is merged.

As a heads up, as @arturo182 pointed out in the other PR, your code formatting doesn't match our typical format. I try not to nitpick format in reviews but we will be enabling a format check soon. (Once https://github.com/micropython/micropython/issues/4223 is settled.) So, beware that your code will need to be reformatted before merge in the future.

fallen anvil
#

@slender iron Thanks for the review. Will there be an auto-tool for fixing code layout issues? I'm lazy...

manic glacierBOT
slender iron
#

@fallen anvil yup! that is definitely a requirement

fallen anvil
#

Trouble is, the longer you wait, the more it mangles existing code

slender iron
#

looks like it will be astyle

#

ya, true

#

that's why I'm trying to keep the effort moving

fallen anvil
#

don't cae what it is, provided there's a config file :-) On some projects I use astyle, some uncrustify

slender iron
#

it's also a style that matches most of the existing code

#

looks up uncrustify

#

most of my experience is with clang-format

fallen anvil
#

Is there a 'beta'? I don't really want to deliberately submit mangled code

slender iron
#

ya, take a look at the issue I linked to

timber mango
fallen anvil
#

yeah, I've used that too. It really doesn't matter, as long as there's one and 'make pretty' is a valid target :-)

slender iron
#

it has two similar astyle configs

#

@fallen anvil a make pretty target would be great

fallen anvil
#

The other nice thing about formatters, which people overlook, is I can use the format that I 'think' in, and then submit it in the standard format without upsetting anyone

#

The whole repository will need a run through with the tool though at some point before it can become 'standard'

slender iron
#

๐Ÿ‘

#

ya, I'll do that once we decide

#

which is why I'm ok merging stuff that doesn't fit it now

timber mango
#

That site does not mention Python.

fallen anvil
#

I understand, but I won't do it deliberately. Lets get a tool in use, and deal with the pain it causes while it's still limited.

#

(Now I've got RS485 my modbus stuff will work, woohoo)

slender iron
#

@timber mango it is for formatting the C code in CircuitPython

#

@fallen anvil cool cool! thanks for being receptive to it

timber mango
#

Oh, OK. Will there be some format that will apply to Circuitpython also?

slender iron
#

@timber mango yup, see Black above

timber mango
#

I just installed it. ๐Ÿ™‚

#

I am still looking for the button to rerun checks on a PR but I can not find it.

idle owl
#

@timber mango You may not have permissions. Please post a link and I will rerun the job.

idle owl
#

Ok job running.

timber mango
#

Thanks

slender iron
#

Hi all, next week's CircuitPython Weekly meeting is the normal day and time, Monday the 24th at 11am Pacific / 2 pm Eastern, here on Discord. Everyone is encouraged to attend and participate. The notes doc is here: https://docs.google.com/document/d/1bGuche1SWmuFUABTWpuwapGnSaz4pG9yWR_Y0JOzdbw/edit?usp=sharing <@&356864093652516868>

timber mango
#

I have really had fun doing the animation and other stuff for the HT16K33 library. So cool!

timber mango
#

Puppy is feeling ignored. Got to go for a bit.

fallen anvil
#

@slender iron Hope I did the removal of #2618 properly! If so then it should be ready to ship now.

slender iron
#

k, will look now

#

@fallen anvil doesn't look like it worked. I think you want to merge adafruit/master in order to get the merge pr as well

#

it should also update the .po files

#

(merging the .po can be a pain)

fallen anvil
#

If I do that it gets upset about the po's. My git foo is weak. I guess I can just re-make those with make check-translate again?

slender iron
#

the easiest way is to checkout the versions from adafruit/master and then rerun make translate

fallen anvil
#

yeah, that's what I figured. Let's see what happens

slender iron
#

are you in the 'merging' state?

#

if git has put the diff lines in them then translate stuff will be unhappy

fallen anvil
#

I'm in the 'git-by-successive-approximation' state. cp -a is my friend.

slender iron
#

I have this git checkout --ours 5e789 -- locale/* in my shell history

fallen anvil
#

So I can just run that to get the locale back to a pre-state, then merge?

slender iron
#

you can be mid-merge when you do that I think

#

I'm not sure what the commit hash in there does

onyx hinge
#

it says which commit the content of "locale/*" is taken

#

but when combined with "--ours", it seems like one or the other must be ignored

slender iron
#

ya, could be my confusion

onyx hinge
#

I have my package style ulab working, but it is a bit of a jumble

#

(by using frozen modules)

#

@slender iron unless you have a way to get a toehold on fixing how packages made of built-in C modules work, I think this or "ulab_xxx" parallel modules are the way to go. If you have a direction to point me about the underlying problem I'm happy toc hase it down though

#

quitting for the day and won't look at this much before a week from now, so no rush to reply. just raising the issue

slender iron
#

@onyx hinge I haven't dug into it. I just like the idea of us acting more like real python.

raven canopy
#

watching that PyCon AU documentation talk...

#

@pastel panther mobile keyboard kept me from saying it earlier, but I would like a richer UI for docs. totally wanted some CSS collapsible boxes/dropdowns when working on the module support matrix. would've made navigating so much better than scroll-n-scan.

#

which, actually, pops something in my brain. @slender iron, thoughts on hooking the module support matrix into build_board_info.py and having that info available on circuitpython.org? have we discussed this (i can't remember)?

manic glacierBOT
meager fog
#

@indigo wedge whew ok home nao!

slender iron
#

@raven canopy ya, fine with me to hook it up

#

@fallen anvil how is git going?

raven canopy
#

๐Ÿ‘ i'll drop it on my list to explore.

manic glacierBOT
#

I'm not as strong as @tannewt so I nitpick a bit about the formatting. Other than that, everything looks good! Were the pin fixes that you made in the 1011 and 1062 wrong originally?

Please be careful who you nitpick about formatting. It can deter some folks from contributing more and isn't worth the risk if we can automate that away anyway. (Code review comments on formatting also distract from deeper level review too.)

In this case, I think @mubes is happy to match whatever style we...

slender iron
#

@meager fog I'm around if you need someone to poke at the imx with

meager fog
#

@slender iron tough cause i have the imx feather

#

and artur is tryin' to help me get firmware loaded

slender iron
#

right, through the imx boot rom right?

fallen anvil
#

@slender iron @indigo wedge It's an interesting discussion. I don't think it does any harm for new developers to format according to the established norms of the project and it educates them in what's needed, but some things can, and should, be automated of course. It's no big deal, and I need something with my brain off having just done a few rounds with git.

meager fog
#

but its not sticking and i am unsure what bits to flip and the process to do so

#

@slender iron right - thru the nxp boot util which i think is win only

slender iron
#

@meager fog do you plan on using it when you flash them in production?

slender iron
#

I ran across the protocol at some point and we could hack up a loader python script

meager fog
#

@slender iron no

#

im looking to just get this feather booted so i can test it

#

then i design the test fixture later

slender iron
#

as a one off you could try flashing the spi flash directly

meager fog
#

ill use a jlink most likely

#

i could...

#

but i think its the fuses thats the issue, not the SPI flash

slender iron
#

or a jlink

meager fog
#

cause a programmed the SPI once

slender iron
#

hrm

#

do you have gdb hooked up and can read the fuses?

meager fog
#

yes

#

i mean, i can connect with gdb

#

i havent tried reading the fuses

#

also dont know what the fuse values should be

slender iron
#

I think I saw them in the datasheet

#

it should be so that it loads from spi flash

meager fog
#

its the wrong kind of spi flash

#

(perhaps?)

slender iron
#

can you see any activity on the spi lines? it should attempt to load a struct with info about the flash as a first step

meager fog
#

when does this first step occur?

slender iron
#

thanks for flexibility @fallen anvil

#

after reset I assume...

#

though it may only be on power up

manic glacierBOT
slender iron
#

if there is no SPI activity then I'd believe the bootrom fuse bits are set wrong

meager fog
#

kk

#

is it SPI or QPSI?

slender iron
#

I believe the first read is always SPI

meager fog
#

i could look at clock line

slender iron
#

yup

fallen anvil
#

It always does initial read SPI at 30MHz

#

(assuming bootrom lets it)

slender iron
meager fog
#

with the default boot pin straps theres lots of activity on the SPI CS line

slender iron
#

ok, that is a good sign

#

that means the bootrom is trying to load from flash chip

#

what have you tried to load on it already?

meager fog
#

i see qspi traffic ---- except for the CLK pin

#

which seems to have some issue - not going full rail to rail

#

odd

slender iron
#

ah, that sounds suspect

#

does the very first read look ok?

meager fog
#

i see qspi traffic ---- except for the CLK pin

slender iron
#

I wonder if the first read is ok which would point to the config data structure being incorrect

fallen anvil
#

To 'become' qspi it has to have read properly. What's the b/w of your scope and how are you probing?

slender iron
#

ah, true

meager fog
#

i think the freq is wrong

#

my scope is only 100mhz so probably cant read/see the SCLK lines

fallen anvil
#

It should go to 133MHz when it goes qspi, so if you've not got decent earthing on your signal it won't look rail to rail

slender iron
#

what have you tried to load on it already?

meager fog
#

the uf2 bootloader

#

which loaded thru the romloader tool once...

#

now i cant get the feather to init thru the romloader

#

i have to look up the boot pin

slender iron
#

have you tried to load uf2 onto it?

meager fog
#

the uf2 bootloader

#

the uf2 bootloader

slender iron
#

have you tried to load uf2 onto it?

meager fog
#

my scope is only 100mhz so probably cant read/see the SCLK lines

slender iron
#

hrm, ok. I haven't gotten that working myself.

meager fog
#

woops discord hiccupas

#

woops discord hiccupas

slender iron
#

hrm, ok. I haven't gotten that working myself.

#

hrm, ok. I haven't gotten that working myself.

#

have you tried to load uf2 onto it?

meager fog
#

woops discord hiccupas

#

woops discord hiccupas

manic glacierBOT
fallen anvil
#

Thats me done for the night. Off to dream of git and merge trees.

slender iron
#

thanks @fallen anvil !

fallen anvil
#

Night. I've seen these boot issues before on IMXRT when the flash descriptor is vaguely corrupt. If you can get a JLink onto it then JLinkExe with exec EnableEraseAllFlashBanks followed by erase usually puts its brains back in. Good luck. Goodnight.

meager fog
#

ooh thats a good suggestion @fallen anvil !

#

ill check back on it later ๐ŸŒฎ time

fallen anvil
#

Hmm...that should only take 10-20 secs.

#

Not too much burrito time. Anyway, from that raw state you'll now have access to at least the NXP usb loader...or just burn a hex using loadfile in JLinkExe. Don't use the bin cos you'll need to set the base address and I don't know if that bootable image patch has been folded in yet...

#

Right. Now it's really bedtime.

timber mango
#

@fallen anvil This is most likely true for those who are or have been developers. Those that are casual contributors here and there might not react the same way. I think we want to welcome and keep everyone. I have learned a thing or three from students at all levels.

#

I know that I was at first hesitant about joining in here even though I know Adafruit has a bunch of the best people to work with. I was still hesitant at jumping in and actually trying to change something. This is true even though I have been in and around computers since 7th grade and have been programming since then also. I have even had a couple paid programming jobs and I am still a little sensitive about some things.

#

All the people who work on the guts (low level C/C++) stuff are awesome. I have done a fair amount of C, but not enough C++ to claim it. I would not even consider trying to do anything with the guts of Circuitpython right now.

slender iron
#

@timber mango I'm always happy to help you (and anyone else) get ramped up on it.

timber mango
#

@slender iron Oh, I know! You have all been super to me ever since I got on the forums. Maybe if there are some easier issues, I might try poking a little deeper.