#circuitpython-dev
1 messages ยท Page 289 of 1
hi this is adafruit's VID on purpose - arduino would hvae to allocate a PID for this use case and they have not done that
@slender iron Noted, spliting micropython and python.
Date tree ready.
I haven't pull requested to adafruit's git yet. So if anyone has any comments here,
or pull requests on github here: https://github.com/fede2cr/awesome-micropythons
Looks great except for the one thing about nvm size.
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!
Add preprocessor checks to ensure that CIRCUITPY_INTERNAL_NVM_SIZE is a multiple of the page erase size. Otherwise writing the nvm will erase adjacent flash memory temporarily, which could damage vital data or code.
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).
@dhalbert I saw an incredibly speed up with display when using SPIM3 @ 32MHz when getting it on to Arduino. Here is the TFT speed between nrf52840 (left) vs Samd51 (right). The trick is bulk transferring the data ( a frame line or so). If doing small chunk, DMA actually slower than non-dma mode. Just my two cents.
https://photos.app.goo.gl/T37kjetpKzQ7oDnz7
@idle owl @raven canopy I'm getting this error in GitHub Actions trying to publish a new library release: HTTPError: 403 Client Error: Invalid or non-existent authentication information. for url: https://upload.pypi.org/legacy/. Did I fail to update something in the workflow file? https://github.com/adafruit/Adafruit_CircuitPython_BLE_Cycling_Speed_and_Cadence/runs/443818647
@tulip sleet did you add the pypi user and pass to the repo's secrets? They should be named TWINE_USERNAME & TWINE_PASSWORD.
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
Hmm. Is the repo supposed to be on PyPI?
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
Hmm. I wonder if we should add a conditional that gives a better message for missing twine secrets... ๐ค
@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
Sorry about the secret name mixup! Need more coffee. ๐
@tulip sleet do we have a port of circuitpython for the nRF52832
not anymore, we had a weak version maybe in 3.x or early 4.x
it's too small
and no native USB
:\ dang, got a RAK4600 module in for evaluation (NRF52832+SX1276 LoRa module) and was wondering
thanks!
:wish it were better news:
np - would've tried porting it this weekend. wanted to check first
@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
@tulip sleet Service and protocol are different in the IoT-world. Possibly "Services" is a better term?
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:
is LoRa also "wireless", lumped in with http, mqtt, ntp, etc?
it's "wireless communication"
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
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
Yeah, saw that. tinylora is a wrapper over a driver (rfm9x), i'd consider that a helper.
ok, i will do something or other
@tannewt this is ready for your sign off
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.
Opps, my bad. This isn't related to CP at all.
I get the same behaviour on my laptop's fs.
@tulip sleet how did you test ibeacon and eddystone? was it useful? it looks like most of the auto-url stuff was discontinued
@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.
a single pin can have multiple timers so there is a list to go through
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
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
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
we look at all of them but start with the ones that impact the fewest pins
so tc_insts[index] is some kind of built-in array of timers that's ordered in terms of their pin impact?
thats what you could do. samd has tccs for complex timers so any tc is ok
@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.
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
@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?
just use them for now and we can rework it later if needed
Needs merge from upstream due to translation changes.
@siddacious Could you post the files? Thanks.
What warning was this giving? I tend to cast (uint8_t*) to uint16_t* or uint32_t* frequently and am surprised this is the only spot you found it.
Looks good to me! Thank you!
yay! @hierophect @makermelissa please add to our boards download list :)
Much more readable! Thank you so much!
@gilded cradle PR #60 is the correct one. I closed PR #59.
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...
@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?
{ 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
@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
@trim elm Thank you. I did both parts.
When a PR is merged, does the person who did it get an email?
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...
@timber mango if they are set up to receive notifications, yes. See https://github.com/settings/notifications. Also you can "watch" particular repos: https://github.com/watching. See the "Watch" button to the right of the repo name at the top
@lapis hemlock nice! I'm happy to look at the changes whenever they are ready
@slender iron will probably be tomorrow.
I wanted to point out that here were are going to lose compatibility with numpy...
๐ 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 ?
That's actually right. I have never seen such an import.
๐ I thought so
it is definitely weird but it does give us compatibility if we want it
@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?
@slender iron I found an ST appnote that I think outlines the optimal way to implement PulseOut: see "Arbitrary waveform generation using timer DMAburst feature". Could you give it a quick scan and see if it's reasonable? https://www.st.com/content/ccc/resource/technical/document/application_note/group0/91/01/84/3f/7c/67/41/3f/DM00236305/files/DM00236305.pdf/jcr:content/translations/en.DM00236305.pdf
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
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?
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.
@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
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))
@ionic elk IR has a 38khz carrier wave that the PWMOut generates
Wait so it's not actually a pulse at all, it's a pulse train on an interval?
you can add a language designator after backquotes like "python" to to get it color-coded
@onyx hinge Jeff, you have to do the import as in the earlier post.
Ok, I get it now, I missed the carrier instance, I thought these were literal pulses
immediately after the triple backquotes
"N-pulse waveform generation using timer synchronization" then
you can edit the previous post by clicking on the three dots you get when you hover over the post
Doesn't seem to work. Well, whatever.
@tulip sleet OK, thank you.
@tulip sleet there must not be a space after python, that was the problem.
same is true in github
@tulip sleet ๐
@ionic elk please just copy how atmel and nrf do it
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!
@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.
I'll take a look and do some editing!
@onyx hinge @slender iron I have committed my code to https://github.com/v923z/micropython-ulab/tree/2dim/code. I still have to move three functions to ndarray.c, but I haven't time today. In any case, if you have comments on the code, let me know!
fast work! I will try to take a look tomorrow.
OK, thanks! I will clean up the three remaining functions, and fix the issue that we discussed on github over the weekend.
A question, unrelated to anything that I have mentioned so far. There is a wish list here: https://github.com/v923z/micropython-ulab/issues/14 What should one do with requests that have been implemented? Delete from the list, or leave it there for future reference?
@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.
@lapis hemlock you can consolidate all the ideas in a checklist in the top post. If you put "[ ]" at the beginning of each item, they turn into checkboxes. https://help.github.com/en/github/managing-your-work-on-github/about-task-lists
You can use task lists to create a list of items with checkboxes within pull request and issue comments or Markdown files in your repository.
or you could open an issue for each major addition and close it when added
@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.
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.
@tulip sleet But if you open a new issue for each item, then the wish list is rendered redundant, isn't it?
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.
@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.
@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
Sounds good.
@lapis hemlock diff looks good to me!
@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.
I am reading the docs for displayio. There does not seem to be a sample.bmp file provided for the example.
I see! I had not idea this was a limitation. I'll fix and request a re-review. Thanks @dhalbert!
@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.
Fixes #2620.
I was using the wrong values for the minimum flash erase granularity for SAMD51. Fixed and generalized the checks.
I fixed the automatic check (it was using the wrong number) and didn't catch the problem; should work in the future: #2621.
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...)
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
-----------------------------------------...
The example on this page does not work. I have a version that works on my PyGamer now.
@timber mango Could you file an issue about this, with your working version? Thanks! https://github.com/adafruit/circuitpython/issues
@tulip sleet Sure!
Check https://circuitpython.readthedocs.io/en/latest/shared-bindings/displayio/OnDiskBitmap.html just to make sure it wasn't already fixed.
Nope, it has not been fixed.
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...
@slender iron @lapis hemlock I'll work on pulling in the module changes and reorganizing the docs in cpy tomorrow morning (us time)
@tannewt Apparently there was a mistake with the data import and so mithro, the creator of Tomu fixed the issue, therefore now according to the website, Tomu is not compatible with CircuitPython or even MicroPython.
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?)
you can use a code block, with 3 backticks before and after:
```
text
```
text
is there an escape or something? how did you get it so the first text didn't get put into the code box?
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
@lone axle yep. you can escape characters with the usual \.
The code looks fine, could've been a memcpy but a loop works too, however the code style doesn't quite match the rest of the file, you use tabs, put opening braces on new line, and are missing spaces around some of the operators :)
@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?
@indigo wedge if/when ya are around and can send me new binaries to try on my feather - i'd try it out!
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!
@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
@fallen anvil not sure if there's a documented standard, I kinda went by looking at existing code in the samd port
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.
@gilded cradle Thanks for testing the PyBadger updates!
Yw, @lone axle was helpful too.
Tested on 4.1.2 (this is the branch of documentation you are referencing) and the code worked fine.
Tested the "latest" branch on 5.0 beta 5 and that is not working.
@fallen anvil thanks! we'll have a formatter soon. there is a discussion upstream atm: https://github.com/micropython/micropython/pull/5631
I tried to reproduce this and only managed to do it once. Generally it looks ok. @hathach also tried to reproduce and was unable to.
I'll leave this open in case someone else sees it but move it to the Long Term milestone.
I've moved this to 5.x features since we can add it at any point.
@slender iron I merged the service data PR> I'll make a new release of the BLE library unless you want to wait.
done
is it raw asyncio or is it curio or trio?
raw
kinda silly that it's all async but still waits to return the results until a timeout is hit
@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 the2dimbranch. If I have attributes, I can't attach own methods tondarray: ```python
import ulab
a = ulab.array([[1, 2], [3, 4]])
print(a)
a.transpose()
how does it fail?
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'
are your changes somewhere? that is likely an issue with the ndarray type definition
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) }, };
that looks right. what does dir(a) show?
The method is not shown.
but it shows the other two?
No. That was just an example. All methods from the local dictionary are gone.
Weirdest thing.
setting attr might be the problem
I can call module methods all right, it is a problem with the locals_dict.
setting attr might be the problem
@slender iron Exactly. If I uncomment the line here https://github.com/v923z/micropython-ulab/blob/d8bfe46bd8a2d5bdb90521f4bcc8a68325a5f21a/code/ulab.c#L56 then it works again.
I mean, if I comment the line out.
Probably that is the way to go.
ya, I wouldn't make your own .attr if you can avoid it
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:)
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
I do exactly this https://github.com/micropython/micropython/blob/10709846f38f8f6519dee27694ce583926a00cb9/py/objslice.c#L66, and this is why I am a bit baffled.
In any case, I will patch up the code with properties, and hopefully that fixes the issue.
the locals dict lookup is done by the default attr implementation
so by overriding the .attr you are ignoring the locals dict
Oh, well, that explains something...
slice can do that because it only has plain attributes
this is the default impl: https://github.com/micropython/micropython/blob/10709846f38f8f6519dee27694ce583926a00cb9/py/objtype.c#L581
it's much better to use it rather than override it
Darn it, I completely overlooked this!
๐ np. it's complicated
I might need the weekend to fix everything. I don't know what your timeframe is.
no rush
OK. I have to dash off now, but I think we have sorted out the problem. Thanks again!
thanks @lapis hemlock !
@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.
@lapis hemlock I used properties in my wip after seeing a similar problem
@timber mango, I figured. I already submitted and merged a PR to fix it.
Thanks. How do I link a PR to an issue?
@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.
GitHub recently added a way to do it on the right side as well
Click on the Preview tab if you want to verify it took the number you provided.
Ah nice.
under "Linked Issues"
@idle owl I just tried that on an issue but the PR does not show under Linked PRs.
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.
@timber mango, just paste a url link in a comment and github handles it.
Oh, OK.
@slender iron Am I seeing right that gamepadshift isn't included for every board?
specifically CLUE at the moment.
I assume so
shift should only be needed if the buttons are connected through a shift register
Related to #2579. This was harder to fix: the underlying longint routines don't handle signed values.
@slender iron Ok thanks. Trying to adapt something to CLUE and wanted to understand what I was working with.
did you get it going?
yeah, it's ugly but it works. Now I have to figure out the best way to do it.
Fixes #2579.
Uses existing latent support for signed conversions. It was mostly just the arg parsing. Tests added.
Implementing from_bytes(..., signed=True) is harder: #2624.
- Ignores archived library repos
- Adds the Community Bundle to Issue, PR, and Reviewer entries (doesn't validate infrastructure).
@tulip sleet Do you have a few minutes to discuss some code?
๐
vid?
sure
Like this: https://github.com/adafruit/circuitpython/pull/2583/files#diff-21cd947fd3bd1d345da8a0e5a9d0d07cR527
@onyx hinge OK, I will just merge these into2dim.
@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?
Anyone have insight on this issue? I've veryifired the described behaviour. It crashes hard, dismounting CIRCUITPY. Seemingly at arbitrary times. I've seen it crash in the middle of the inner nested for loop. I used 5.0b5 and yesterday's bundle.
https://forums.adafruit.com/viewtopic.php?f=60&t=162230
It'll crash even without any interaction on the keypad.
Fixes #2267.
Returns the number of seconds for 1999-12-31 for os.stat() fields that are times, on smallint builds only. This is instead of 1969-12-31. 1999-12-31 is used for some other fixed dates, so using it is a bit more consistent.
@onyx hinge it seems to me that "py/objproperty.h" is not in micropython https://github.com/micropython/micropython/tree/master/py. That must be a circuitpython file.
@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
@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.
It is only the typedef: https://github.com/adafruit/circuitpython/blob/master/py/objproperty.h
it is in a .c file in mp: https://github.com/micropython/micropython/blob/e83ab7374bf1e8ee7b0644eb35567e30e6c21c36/py/objproperty.c#L34
Right, but then we can't include it.
The funny thing is, I can't find, when it was removed from micropython. From https://github.com/adafruit/circuitpython/blob/master/py/objproperty.h it appears to have been part of micropython earlier.
I wanted to see what their rationale was.
But the comments of https://github.com/adafruit/circuitpython/blob/master/py/objproperty.h are from MP proper, aren't they?
I just preserved them
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.
@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.
what is your attr set to? anything?
are you testing on circuitpython or micropython?
.attr is commented out. I am testing on micropython.
micropython may have property support commented out... I'm not sure
That must be the case. Really odd.
totally possible we fixed native properties in circuitpython
Can you show me how you brought that in?
The fact that there is no header file in micropython is a smoking gun...
I will ask on the forum what they think about it.
its probably the pr where I add that header
OK, I will check.
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...
Clue uses PWM not analog output - it will never sound as good or clean as the SAMD51 or SAMD21! :)
Ah I see, thank you. I will close this issue and post one with code and outcome for the SAMD51 based devices.
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?
@umbral dagger I am trying it
@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
Has anyone gotten https://github.com/myelin/arduino-cmsis-dap to work with macOS?
@umbral dagger I answered in forum thread; I'm pretty sure it's excess power consumption
I added some info to the board Learn Guide FAQ about this.
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.
@ivory yew yay!
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?
@golden sail https://learn.adafruit.com/adding-a-wifi-co-processor-to-circuitpython-esp8266-esp32/firmware-files may be of use to you. you would use the "AT command firmware". #help-with-circuitpython is a better place to ask if you get stuck. Good luck with your project!
oh look, you'll be able to buy Sol soon. ๐ https://twitter.com/theavalkyrie/status/1228506521723531264
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
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?
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.
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
I hate doing that, but I guess I can.
but i think the first thing is easier if it will work, just do a newline after the opening paren
OK.
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
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.
Out for now.
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 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.
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.
@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
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?
@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.
I'm afk but can try to support
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
Can you see the bootloader in devices in control panel?
I think that's just like a fake loading bar,id you don't get the blue light then it didn't connect
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
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
}
}```
but
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
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
@tulip sleet Thanks, Dan. Good call. Might have been nice to have a barrel jack as an alternate (higher current) power source.
@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
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.
@meager fog I think if you get the usb bootloader then the crystal should be fine
@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?
I'm preparing to go to sleep now but you can DM me and I'll read in the morning ๐
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.
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:
- import microcontroller
- 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
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?
I guess the "*" is better than nothing, but not as good as I would like.
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.
I just uploaded an alternate version of my ht16k33 animation demo to my git repo at https://github.com/geekguy-wy/Circuitpython_Goodies
implemented github actions for ulab, but it needs some useful tests. https://github.com/v923z/micropython-ulab/pull/39
implemented github actions for ulab, but it needs some useful tests. https://github.com/v923z/micropython-ulab/pull/39
@onyx hinge Thanks Jeff, I have merged the PR.
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:
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.
get well soon
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.
...
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?.
@ionic elk Dr's advice: Stay off the interwebs and drink plenty of fluids
Is there a way to generate an MCLK (audio system clock) for I2S output on Feather M4 Express or Feather STM32F405 Express?
I know it works on the M4 Express https://learn.adafruit.com/adafruit-i2s-stereo-decoder-uda1334a/circuitpython-wiring-test
@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.
Oho, you're already ahead of me then
@bright aspen circuitpython doesn't do that right now afaik. Looks like the m4 hardware supports it so it should be possible to add.
Also hopefully the pin you need is broken out
@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).```
@gilded cradle If you have a moment, can you review this? I tested it, it works. Extra stuff was from the original example and was unneeded. Would have made the explanation have unnecessary extra bits in it. https://github.com/adafruit/Adafruit_CircuitPython_CLUE/pull/17
Sure @idle owl
You're welcome
#408 was supposed to include these updates, but somehow failed to. This PR includes them. Promise. ๐
- Ignores archived library repos
- Adds the Community Bundle to Issue, PR, and Reviewer entries (doesn't validate infrastructure).
RS485 now incorporated and tested.
heya @gilded cradle (or any other graphics savvy folks) take a look at this? A user is drawing arcs graphs using displayio and running into issues with rounding errors:
https://forums.adafruit.com/viewtopic.php?f=60&t=162185&p=798492#p798492
@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>
Thanks for taking a look at this @DavePutz! I think a small simple patch that improves the current situation would be great. For the other issues we can file separate issues and/or PRs.
I wouldn't worry about UTF-16. UTF-8 is most common.
@meager fog working once sounds like it was loaded into memory
@meager fog I can make a quick video of how I do it when I'm back from work
Hi i want to use PWM-out with my teensy 4.0 to dimm some LEDs.
I can't get it to work, i get an "invaild Pin"-Error. Is PWM already available on Teensy 4?
hi - you would want to comment/subscribe to this issue for updates when PWM is available :)
https://github.com/adafruit/circuitpython/issues/2489
PWM is not fully supported yet, but it should fail later, which pin are you using?
I'm now blocked waiting for PCBs for a week or two so will try to get more imx port work done ๐
PWM is not fully supported yet, but it should fail later, which pin are you using?
I am trying to use Pin 14 & 15
@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
hmm, did you configure the boot device before flashing?
Welcome to the circle of hell that is imxrt boot configuration :-|
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!"
yes, seems i missed a one-time step cause it was one time ๐
i'll make a video after work ๐
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 ๐
Yes, those don't support PWM output, but 0-9 (and more) should, but as I said, it will just fail later in the code :sweat_smile:
if you pull that line down it should always boot into rom loader the other one is already tied low iirc
@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?
don't think so
there's a few things to do https://github.com/adafruit/circuitpython/labels/mimxrt10xx
also i need to add more functionality to my uf2 lib
yeah, I need uf2 for 1021...that's quite high priority for me actually.
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
nrf is on my todo list if no-one else gets to it first, but it's well down that list
my 1011 evk's USB connector broke off so i couldn't test on it anymore
@indigo wedge ๐คท i can't get nxp bootloader to get back to the ram loader anymore
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
yah
right
can you check the other boot pin
like are you sure both should not be pulled low
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 ๐
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
i could show on the render but no kicad at work
@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)
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
@indigo wedge yah please show on render
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?
@gilded cradle Modify the brightness property is PR #62.
@gilded cradle Are my PRs OK then?
The issue reported in #1905 was that UTF-8 characters were not getting echoed in REPL. This was because the code in readline.c made sure the character was 'printable', i.e. between 32 and 126 inclusive. For UTF-8 the character can go up to 255, so simply removing the upper test resolves the issue.
@indigo wedge (i didnt solder on the SD card so it shouldnt be too hard to add jumper cables)
There should be a #help-with-github thing.
I do not understand what to do to rebase PR #63.
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.....
@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
OK, so I just commit the resulting files then?
done and pushed, let's see if we get a clean CI build...
@fallen anvil yup! thanks!
But those Pins should support PWM. In C++ i have no Problems with it.
Do you have any ideas when the PWM Output is possible.
I am not very in to the circuitPython project. Can you explain the problems you have by now?
@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.
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
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?
@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
From memory there is a loggin feather, but that would be M0 + SD.
@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!
heh, I fail in remembering all featherwings ๐
@slender iron That is why there is a great Community Brain here. ๐ ๐
I only remember the ones I am actually using. ๐
๐
That AdaLogger Featherwing is one of my favorites, and it is very inexpensive.
@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.
@onyx hinge I think, I review from you would be enough. If you think that it is OK for now, we could merge.
(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.
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.
This sounds like a good issue for someone who wants to learn how to use a debugger. My guess is that CircuitPython is either crashed or in an infinite loop. Here is a Learn guide to start with: https://learn.adafruit.com/debugging-the-samd21-with-gdb The same process works on the SAMD51 too.
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..
@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.
sure thing, with your permission
Oh, one thing: you wanted to pass ndarrays to DMA. You could do that by implementing the data property: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.ndarray.data.html#numpy.ndarray.data . Do you want to do that, or should I? It is very simple, one needs the old asbytearray code, and simply return the pointer to the array.
@onyx hinge this is ridiculous: I wanted to say that I might go to bed early. Ha!
I guessed it
@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#
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
@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!
๐
TEXT only.
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:)
@lapis hemlock It's not cheesy at all. That's the goal. We strive for that.
@idle owl very well done.
CircuitPython Weekly: Construction-on-Kattni's-End-Edition. ๐
<@&356864093652516868> meeting is starting
I'm just lurking, btw.
lurking today
lurking
Lurking
Lurking
@lapis hemlock join us in the voice chat if you can!
@onyx hinge I think I've got to take off now, but next time I would be happy to attend.
see you ! It's usually mondays at this hour.
@onyx hinge so it was postponed because of the holiday.
right, it was a US holiday yesterday.
OK, then till Monday!
** lurking **
CircuitPython celebration day - Organized By Lamba Labs
Sponsors: AdaFruit and Touch innovation labs
Media sponsor: Kanj Workshop
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โฆ
Can't make it today ๐ญ but I am working on a new m0 based Eurorack module. ๐
@ivory yew take care! ๐
https://twitter.com/WillingCarol/status/1228698325693583360
https://anweshadas.in/february-pyladies-pune-workshop/
@kushaldas @PyladiesPune @anweshasrkr @adafruit @kattni @nnja I love this so much. @CircuitPython is bringing Python to more developers and makers around the world.
Law Explained India
It was the time for โlearning Python with harwareโ in February, 2020 with PyLadies in Pune. Coding in Python becomes fun when one can see the changes it makes in the hardware. Selecting a place for work is always a difficult task as any organizer. College Of Engineering Pune (...
absolutely!
** text only
Gotta drop. ๐ฆ ๐
byee @raven canopy
dan, curious whether the spi transaction length change made a noticible difference
i could not tell! I was testing with turtle
oh well.
i needed some example that sent a lot more data
but it also provoked me to rewrite the DMA loops to be simpler
cool beans
check this out!
yay! That meeting was cancelled. Now I get an extra 30 minutes before the next one. ๐
@raven canopy great! you are next ๐
Yep
The arc graph thread on the forums
https://forums.adafruit.com/viewtopic.php?f=60&t=162185
[oops mubes was status updates only]
There's no hug report from mubes. Only Status Updates.
if you didn't know what black is, https://black.readthedocs.io/en/stable/
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.
I have a hug report for @gilded cradle for coaching me through the PRs to the HT16K33 library stuff.
@inland tusk Please mute.
Working on the HT16K33 stuff has been so much fun!
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 ๐
No thermal camera required if you have the Titano, I have code that do not require the cam.
David Glaude is a secret time lord with two hearts
@onyx hinge or a Klingon?
@half sedge I did not know that
@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. ๐
Ci stands for?
Continuous Integration
Thanks
@idle owl At one time I wanted PyPortal for PyGamer+AirLift... because I did not have a PyPortal yet.
interested in helping out with demos once i get my new screen installed ๐
@idle owl Maybe you can consider PyBadge for PyPortal, I did wear a PyPortal as a badge at Fosdem.
awesome, sure
I want to do BLE broadcast of the color it read.
Compatible with the Hide and Seek demo and all the Cheerlight I did.
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
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".
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
So it would be device specific if rude?
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.
I love the quilt idea fwiw
dropping out - heading out for lecture, listening later on spotify ๐
What about a mesh to find friends throughout pycon?
2nd day_job meeting cancelled. Best. Tuesday. Ever. (For this week, at least.)
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.
@idle owl maybe it can be scoped by topic?
@slender iron Nice
[dang sommersoft does a lot of stuff]
Not really. Just long-winded. ๐
@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
@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.
I have a question about a buffer overflow when I tried to download a config over midi sysex.
@lone axle You should get one of the HT16K33 Featherwings with the alphanumeric display. Making these do animations has been a blast!๐
might be worth looking into Yeoman or some other project generator
Could the continuous integration pull the repos when it sees said repoโs cookie template is out of date ?
There's a lot of risk in that, unfortunately.
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
That was part of the reason I broke out adabot's validators into a class. It's easier to add them.
What is โblack โ?
a color?
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.
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!
Caveat: it's one more tool to maintain... ๐
@idle owl @onyx hinge sorry, did I do something wrong? New to this community, so nudges are welcome if I should do something different...
@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.
None mean you did not provide a parameter...
Ah, fair enough...just wanted folks to know what I was up to in case it needs tuning or something.
@fallen anvil Thank you for the update! We appreciate it. No worries, you're doing well ๐
Processing has great docs too. Just a though
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.
@lone axle We try to do that with RTD and Learn Guides.
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...
None usually means that a parameter has not been inialized or is not applicable.
@pastel panther so move from Sphinx to something else? rST has its limitations...
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?
Please post, would love to listen to it
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).
Yes! I do
I mean, for nice expandable documentation, you'll have to move.
Simple documentation mgt characteristics: identifying the owner and building in an expiration date.
Daniele Procida
http://2017.pycon-au.org/schedule/presentation/15/
#pyconau
This talk was given at PyCon Australia 2017 which was held from 3-8 August, 2017 in Melbourne, Victoria.
PyCon Australia is the national conference for users of the Python Programming Language. In ...
I do not disagree. At all.
Docs in the code. Does that exist for Python?
We already do that for libs.
And CP.
Some of the libraries are well documented within the code. Translates to Read the Docs.
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.
A 5.1 with uLab is good for marketting uLab.
+1
Editing GUI?
The current implementation needs more security and more obviousness about what it provides.
heading out, ttyl everyone ๐
Need to drop off. Thanks everyone!
My muli-sensor script is almost 1000 lines of Circuitpython now, with quite a bit of comments. It is mostly code though.
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.
@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"?
there is an advertising name which you can set: BLERadio.name. As for unique, the serial number burned into the flash is available.
@tulip sleet Both of those are perfect. Thanks
I use the last four hex digitis of the uid for "CIRCUITPYxxxx"
@timber mango that failure looks Action's internal infrastructure related. I would just click the re-run button on it.
@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
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.
@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
@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..
@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
I agree, it's different in cpython and even different in micropython when your package is made of py or mpy files
@half sedge I like the idea of including the original name in a comment
@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
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
๐ it's important to note that anything you transmit is public
right.
I do not see a rerun button for this PR I need to restart.
@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).
ya, renaming the file can confuse editors. I run into that myself
@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)
What is the target date for demo code for the CLUE? Is that for the conference?
@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.
@pastel panther I do not like the second one at all!
why?
@pastel panther I kind of think of it as short circuiting
I was thinking "fail early"
Failing early is ideal.
I definitely prefer that style
@idle owl Ok, then I keep that for later. But you are looking for something that work with zillions on CLUE at a conference...
Not necessarily. It could work between two CLUEs and it's still something that people can use.
@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.
I would do python for number in range(0, 10): if number > 5 and number in range(7, 20): do_thing()
@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.
@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
@pastel panther Ah, OK, well,I do not like it.
@timber mango ok, but why don't you like it
If you're onto something I'd like to learn from you
@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
@pastel panther do you have a real example you can link to?
probably, let me see
@pastel panther I just cringe at the use of continue.
why?
ok, why?
I just do not think it has a place in that context.
Conditions should be together if they apply to the same thing.
If that is the case, I might do:python if number > 5: if number in range(7, 20): do_thing()
@idle owl I did not re-order the meeting notes.
@slender iron ^^
@timber mango that' nesting is exactly what I'd be trying to avoid
Why?
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.
@half sedge @idle owl I did ๐
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
It can definitely lead to longer lines, and that has gotten me into a little trouble at least once.
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.
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. ๐
We're not there yet
I am soooooooooooooooooooo glad!
In the case of Adafruit, I would conform without reservations if it were needed.
@timber mango what do you think about my comment above about "remembering" all the checks that you've passed?
You can think of every indent as a piece of state. Why track it if it's not useful?
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.
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.
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
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.
ya, I wouldn't switch mid project
If Adafruit looked at my version of their Arduino code, they would probably not recognize much of it. ๐
ยฏ_(ใ)_/ยฏ
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.
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.
@slender iron Thanks for the review. Will there be an auto-tool for fixing code layout issues? I'm lazy...
Thanks for the simple fix @DavePutz! I look forward to emojis in the REPL :-)
@fallen anvil yup! that is definitely a requirement
Trouble is, the longer you wait, the more it mangles existing code
looks like it will be astyle
ya, true
that's why I'm trying to keep the effort moving
don't cae what it is, provided there's a config file :-) On some projects I use astyle, some uncrustify
it's also a style that matches most of the existing code
looks up uncrustify
most of my experience is with clang-format
Is there a 'beta'? I don't really want to deliberately submit mangled code
ya, take a look at the issue I linked to
@slender iron is http://astyle.sourceforge.net/ the one?
yeah, I've used that too. It really doesn't matter, as long as there's one and 'make pretty' is a valid target :-)
it has two similar astyle configs
@timber mango yup! related issue is https://github.com/micropython/micropython/issues/4223
@fallen anvil a make pretty target would be great
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'
๐
ya, I'll do that once we decide
which is why I'm ok merging stuff that doesn't fit it now
That site does not mention Python.
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)
@timber mango it is for formatting the C code in CircuitPython
@fallen anvil cool cool! thanks for being receptive to it
for python: https://github.com/psf/black
Oh, OK. Will there be some format that will apply to Circuitpython also?
@timber mango yup, see Black above
I just installed it. ๐
I am still looking for the button to rerun checks on a PR but I can not find it.
@timber mango You may not have permissions. Please post a link and I will rerun the job.
Ok job running.
Thanks
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>
I have really had fun doing the animation and other stuff for the HT16K33 library. So cool!
Puppy is feeling ignored. Got to go for a bit.
@slender iron Hope I did the removal of #2618 properly! If so then it should be ready to ship now.
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)
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?
the easiest way is to checkout the versions from adafruit/master and then rerun make translate
yeah, that's what I figured. Let's see what happens
are you in the 'merging' state?
if git has put the diff lines in them then translate stuff will be unhappy
I'm in the 'git-by-successive-approximation' state. cp -a is my friend.
I have this git checkout --ours 5e789 -- locale/* in my shell history
So I can just run that to get the locale back to a pre-state, then merge?
you can be mid-merge when you do that I think
I'm not sure what the commit hash in there does
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
ya, could be my confusion
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
@onyx hinge I haven't dug into it. I just like the idea of us acting more like real python.
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)?
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?
{ in previous line (same in other places)
Please fix the formatting here to } else {
@indigo wedge whew ok home nao!
๐ i'll drop it on my list to explore.
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...
@meager fog I'm around if you need someone to poke at the imx with
@slender iron tough cause i have the imx feather
and artur is tryin' to help me get firmware loaded
right, through the imx boot rom right?
@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.
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
@meager fog do you plan on using it when you flash them in production?
I ran across the protocol at some point and we could hack up a loader python script
@slender iron no
im looking to just get this feather booted so i can test it
then i design the test fixture later
as a one off you could try flashing the spi flash directly
ill use a jlink most likely
i could...
but i think its the fuses thats the issue, not the SPI flash
or a jlink
cause a programmed the SPI once
yes
i mean, i can connect with gdb
i havent tried reading the fuses
also dont know what the fuse values should be
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
when does this first step occur?
thanks for flexibility @fallen anvil
after reset I assume...
though it may only be on power up
These only exist where there's a daisy-chain register to configure...and for most of the RTS/CTS pins there isn't.
if there is no SPI activity then I'd believe the bootrom fuse bits are set wrong
I believe the first read is always SPI
i could look at clock line
yup
with the default boot pin straps theres lots of activity on the SPI CS line
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?
i see qspi traffic ---- except for the CLK pin
which seems to have some issue - not going full rail to rail
odd
i see qspi traffic ---- except for the CLK pin
I wonder if the first read is ok which would point to the config data structure being incorrect
To 'become' qspi it has to have read properly. What's the b/w of your scope and how are you probing?
ah, true
i think the freq is wrong
my scope is only 100mhz so probably cant read/see the SCLK lines
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
what have you tried to load on it already?
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
have you tried to load uf2 onto it?
have you tried to load uf2 onto it?
my scope is only 100mhz so probably cant read/see the SCLK lines
hrm, ok. I haven't gotten that working myself.
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?
OK, that should be all the review comments addressed and merge issues addressed. Hopefully ready for shipping.
Thats me done for the night. Off to dream of git and merge trees.
thanks @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.
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.
@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.
@timber mango I'm always happy to help you (and anyone else) get ramped up on it.
@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.