#circuitpython-dev
1 messages · Page 247 of 1
hm we still have a few examples that use sendcommand
er writecommand
but we're already doing much better
Ok, so it's in the examples?
Ah, ok
i think we're at a good stopping point with that project
Ok
i think next lets add some extra functions that could be useful for displays
we have invert() i think, but wake/sleep is pretty useful
a lot are single-command writes
Yeah, I started adding some enable/disble one, but I forgot to add it to ili9341.
maybe look at the DS, see if anything else useful is there
i'd like to have the same interface for all tho
then we can look at GFX, maybe fix some bugs
Yeah, that one may have a few outstanding issues
l0ts 😃
Yeah
if you're at all interested, i'd be curious to see if we can add BDF support in arduino
like we did in python, we have the parsing code
would make fonts a lot easier (but you need an M4 or M0)
Yeah, that might be a fun little project
little vgl
littlevGL is the reason I started optimizing the RA8875 driver initially
yep
ok lets start by adding all those functions now that we have a clean basis and safe sendcommand() 😃
and check back once we've closed all the issues
Ok!
here's some inspiration https://github.com/PaulStoffregen/ILI9341_t3/blob/master/ILI9341_t3.h
Ok, cool. like the setScroll function (though it's scrollTo in the ili9341 library right now)
Yeah, I see some other good ones in there too
kk
@slender iron thanks for the http/https fix for #1833 on circuitpython - i'll try to improve my github reaction times 😃
not everybody works on this full time
I'm working on fixing this instead of reverting. I'm seeing if I can simplify it too.
~the~ Damien George → Damien George
~it's~ libraries → its libraries
~it's~ documentation → its documentation
This pulls in a single commit from micropython to allow the unix port to build with gcc 9 (the default on Fedora 30)
I cherry-picked the commit from micropython to make a future merge simpler.
These packages seem necessary for building docs via make html.
Note: make html still fails for me on my machines (macOS 10.14, Python 3.5, 3.6, or 3.7). Failure logs: https://gist.github.com/jreese/a6adf9e5dca020dd77080a08448fe952
@mint prawn no worries! I was extra eager to get it in for the release candidate. Usually I’m more patient
Note: make html still fails for me on my machines (macOS 10.14, Python 3.5, 3.6, or 3.7). Failure logs:
The only difference I see between your logs, and Travis/RTD, is that you're running in Sphinx 2.0.1 vice 1.8.5. I don't see any open issues on GitHub, but maybe try v1.8.5?
Fixes #1875.
- Converts truth values to 0 and 1 appropriately. #1860 introduced a regression that made them not valid.
- Separates out checking small int ranges to speed up the common cases.
@godlygeek You may want to take a look.
That fixed the build error, thank you. I've updated the PR to include pinned versions to make sure the appropriate version is used.
Agh, sorry about the regression. A test case should probably be added to cover it.
Is the fast path for 0 justified? It doesn't seem to save many instructions.
The long int path handles buffer sizes that aren't powers of two, and the short int path doesn't. This test case succeeds in Python 3 and fails with this patch:
(0x10000).to_bytes(3, 'little')
I don't fully understand the rationale of "using signed constants here... to avoid any unintended conversions.", but ...
In my first iteration of #1860 I had implemented this:
bool mp_binary_int_within_range(mp_int_t val, size_t nbytes, bool is_signed)
{
if (!is_signed && val < 0) {
// Negative numbers never fit in an unsigned value
return false;
}
if (nbytes >= sizeof(val)) {
// All non-negative N bit signed integers fit in an unsigned N bit integer.
// This case prevents overflow below.
return true;
}
if (is_signed) {
...
ugh. I caught that mistake with bool values while testing my PR, and I fixed it in the two cases in binary.c and missed fixing it in objint.c. Sorry about that (and nice catch @meager fog !)
Agh, sorry about the regression. A test case should probably be added to cover it.
I realized that after I submitted the PR, and I'll write one.
Is the fast path for 0 justified? It doesn't seem to save many instructions.
I was thinking that the most common case was zeroing a buffer, which may contain signed or unsigned values. The procedure call is quite a bit more expensive than the checks, so this may not be a big deal.
The long int path handles buffer sizes that aren't p...
In my first iteration of #1860 I had implemented this:
...
I expect that's not as fast for the common case of power of two buffer sizes as what you've got here, but it does handle the edge case of ones that aren't.
I may use that for the to_bytes() case. I was trying to use a right-shift instead of a left-shift, because then you can check for 0. But it's not defined in C whether right shift is arithmetic (dupes the sign bit) or logical, and there didn't seem to ...
@godlygeek Could you take another look? Thanks. I've reused your shifting code above, since it's going to be fast for smallints. I could add a fast path for byte-sized values, but this is probably fine. My major reason for splitting the smallint and longint cases was to not use bytecodes to do the basic checking in the smallint case.
I split the tests up so the array overflow test wouldn't be skipped completely if longints were turned off, and I added some more tests.
I'm sorry I didn't...
<@&356864093652516868> Here is the notes doc for the meeting tomorrow: https://docs.google.com/document/d/1LtpdR7a_rG4tJ724Fm6z32PEiyloRAWcPbeqyMakees/edit?usp=sharing Everyone is welcome to join! Let us know if you want to be a <@&356864093652516868> to get pinged.
I didn't know that thing about hex vs decimal, agh.
Neither did I until just now, heh... I spotted that 0xffffffff didn't fit into a signed 32-bit int, and then went looking for what that would actually do, and was surprised by what I learned.
@godlygeek Could you take another look? Thanks
Looks good to me!
I could add a fast path for byte-sized values
Hm, I think that's a better idea than the fast path for zero, actually! We can skip the shifts for stuff that fits in ...
54 PRs merged!
Hopefully we'll get the auto-updates straightened out this week.
I looked at the machine code, and it's pretty minimal.The shifting is only a few instructions. So I think I'll leave well enough alone for now. Thanks for all your help on fixing this long-standing regular Python incompatibility.
@tannewt, this is ready for review.
000123a8 <mp_small_int_buffer_overflow_check>:
123a8: b508 push {r3, lr}
123aa: b180 cbz r0, 123ce <mp_small_int_buffer_overflow_check+0x26>
123ac: b922 cbnz r2, 123b8 <mp_small_int_buffer_o...
@dhalbert @kdb424 I was able to confirm catching the OSError is a valid workaround by testing the following script (ignore the wildly inaccurate "frequency" function, but it gets the job done) against a Feather M4 Express (1) plugged into computer - received no blinks, and (2) plugged into power-only AC adapter - received frantic blinks.
import board
import digitalio
import time
import usb_hid
class HIDUsage:
KEYBOARD = 0x06
MOUSE = 0x02
CONSUMER = 0x01
...
At the moment, the exceptions raised by 'socket', 'network' and 'wiznet' libraries are mostly just in the form mp_raise_OSError(_errno) which leads to irritatingly nonspecific exceptions like OSError: [Errno 4].
We should improve these to have proper error messages.
See also #703 (initial implementation from micropython) #1800 (bugfixes for 4.0.0)
Hi, last weekend I got some free time to work with a circuitpython enabled board and a nrf24l01p radio as I already have a library for it in C. I did a little research and found the Circuitpython Badge project, it's using this radio. Is the source of the nrf24l01p radio available @stuck elbow ? I checked the linked bitbucket repo and couldn't find it
@granite crow I never finished it, but the plan was to adapt the MicroPython library from https://github.com/micropython/micropython/tree/master/drivers/nrf24l01
Cool, I'm afraid my code for it is not pythonic at all, I will take a look at it
I can try to adapt the library if you want me to @stuck elbow
my project is on hold at the moment, but I'm sure it will come useful for other users as well
From @nnja:
from adafruit_bitmap_font import bitmap_font
from adafruit_display_text.label import Label
class TextArea(Label):
def __init__(self):
self.x = 5 # what causes the PyPortal to boot in safe mode
font = bitmap_font.load_font("/fonts/Helvetica-Bold-36.bdf")
super().__init__(font, max_glyphs=3)
text = TextArea()
Comment out line 7 to stop the crash. I made a new class that inherits from Label. everything is fine until ...
Howdy! I've been busy with life, but finally I have an afternoon free! I'll be joining & happily lurking!
Minor change in my plans today so I'll be on as well -- woohoo!
I won’t be able to make it today. My notes are in the notes doc.
I'll be lurking. I'm in an open concept desk farm today and haven't got the right kind of headset.
(My notes and hugs are in the doc)
Just lurking
Lurking
<@&356864093652516868> Starting in a few, still in an internal meeting
lurking
lurking
💯
Loud and clear!
👍
Heya - lurking today
lol
Crowdsupply!
#sickburn
:crow: --- see no crow emoji
🎉
!!
64 PRs! 🎉
Thank you ALL to folks who are helping, old & new!
i gotta bail in a few min - if you wanna hugz + checkin me soon
Yeah!

I want to thank everyone from Adafruit that was at the Pycon sprints. On behalf of all of the high school students there, we would like to thank you guys for your generosity and for allowing us to have such a great experience. Everyone in my group said it was their highlight of Pycon. We've been using the Circuit Playground Expresses a bunch in school, and I've been having so much fun working on the GPS module. Thanks!
k back
that's the best way to start testing
@tannewt - I believe this can be closed after #1860 and #1879.
Just got here sorry I missed the meeting
🍻
gotta go l8r folks
👋
12-bit DAC boards. Breakout on top; 3HP Eurorack version bottom.
3HP Eurorack 16-bit dual DAC; 0 to +10v output
@trim elm You can type out your status update if you'd like to
Precision waveform generator FeatherWing. Limited (by design of output buffer amplifier) to 0-1MHz, 0.1Hz precision. SPI interface.
Since Pycon, I’ve been working mostly on the CircuitPython GPS module. I initially was working on some bug fixes and then went on to expanding some documentation. Now that I feel I understand the module and the NMEA protocol that it uses a bit better, I’ve been working on adding support for parsing more types of NMEA sentences from the GPS. I’ve finished all but one and will probably make a PR in the next day or two.
I forgot to mention this in my hug report, but I’d like thank to @idle owl and @gilded cradle for helping me with Travis and Github, and an especially big thanks to @pastel panther for help with Github, Travis and for some amazing help with the GPS module I was working on.
Ok. I have to head out now
I have to head out too.
nothing from me
Glad everyone had a good time with PyCon, and I too share the jealousy with being unable to go. Thank you to everyone who helped with it.
👋 have to run -- finish packing ... have a great week.
@modern wing next year is in Pittsburgh in April
Thanks all!
@slender iron Does it normally change locations every year?
every two years
Thanks again for a good call!
Does anybody know what version of CP is being loaded on current adafruit boards?
@errant grail those are very nice looking boards. The layout is both technically logical and visually appealing. Colour me impressed!
@main meteor Thanks!
@inland tusk it varies with the tester setup. the newest we load is beta.7 I believe
Any chance this is just because we just pipe the output of find directly to xargs xgettext and find returns files in an arbitrary order? Perhaps piping through sort in the middle would do it.
So it looks like it "just works" in CPython. This prints 1:
class Root:
def __init__(self):
self.x = 1
@property
def x(self):
return self._x
@x.setter
def x(self, new_x):
self._x = new_x
class TextArea(Root):
def __init__(self):
self.x = 5
super().__init__()
text = TextArea()
print(text.x)
I don't think we'll be able to do this in CircuitPython easily because the native class isn't alloca...
I was going to write an awk script or similar, but then discovered that the filenames could be split over multiple lines.
OK that branch is merged back in, @gvcp thanks for your help testing this, if you have further issues please raise a new issue for them and mention me, I'll try and look at it ASAP ...
Some outstanding issues were fixed in #1800 and I've added #1522 and #1880 to cover some potential improvements so closing this one at last.
Updates both the adabot and awesome-circuitpython submodules:
-
adabot: brings in the final fix tourllib3's vulnerability (CVE-2019-9740), as well as a fix for Travis' should-run-day selection. -
awesome-circuitpython: was a little old, as noted in #159.
This has continued to happen inconsistently, but for the most part, it's not happening. I'm going to close this for now and if I keep running into it, I'll reopen.
I'm doing this. I think @godlygeek is right.
Hi
We forgot to declare a pin in Escornabot 😅
Thanks
Either that, or freeze PYTHONHASHSEED.
Does CircuitPython support any STM32 boards?
no
@tall yacht but maybe micropython
Also includes translation file sorting.
@gilded cradle I'm going to be working on a tool to allow people to see what pins are used by featherwings to see which featherwings can be stacked on top of each other, and which pins are left over. Is the only way to get all the pinouts getting them from the eagle files from each individual repository, or is there some place with all of them together?
I like to check out the learn guides for that.
Ok. I'll do that
Hi all, tried searching the conversation history to see if it has been brought up before but couldn't find anything so here goes... Is it possible to run CircuitPython on microcontrollers from NXP running ARM Cortex M0, M0+, or M4? For example: [https://www.digikey.com/product-detail/en/nxp-usa-inc/LPC1102UK118/568-5141-1-ND/2403764]; [https://www.digikey.com/product-detail/en/nxp-usa-inc/LPC11A04UK118/568-13775-1-ND/8041382]; [https://www.arrow.com/en/products/mkl02z32caf4r/nxp-semiconductors]; [https://www.arrow.com/en/products/lpc54114j256uk49z/nxp-semiconductors]; [https://www.arrow.com/en/products/lpc54113j256uk49z/nxp-semiconductors];
@fast harness we don't support them but it may be possible to add support for it
it's not a simple task though
@slender iron #1883 looks good but pybadge builds are failing due to stage, maybe just a #include missing
@slender iron Not surprised to hear it wouldn't be a simple task... sigh
@slender iron Do you know if it has been done yet?
Or does anyone else know??
I don't believe so
tinyusb has some support for nxp chips already: https://github.com/hathach/tinyusb
@slender iron Any insight as to why it would be so difficult? I figured is the microcontrollers were running on the same ARM Cortex processors as the SAMD microcontrollers maybe it would be a similar process
@fast harness the core is the easy part. it's the peripheral support that is hard
@slender iron Ah okay, makes sense...
getting the core workflow is a matter of getting usb and spi (for external flash) or internal flash going
On that note... What is the smallest known MCU compatible (and supported on some level) with CircuitPython?
The SAMD21 is great but I'm looking to go smaller... Maybe it would help to ask what the absolute minimum amount of flash is required in order to be able to run CircuitPython?
you'd be hard pressed to go smaller on ram
flash footprint will depend with what modules you want to support
we do have some samd21 builds that use 64k flash for the filesystem and 192k for circuitpython
The code I'm running is extremely simple... This is all I'm using: {import board
import adafruit_dotstar as dotstar
import time
from touchio import TouchIn}
This is the CircuitPython board definition for the upcoming Programmable USB Hub from Capable Robot Components.
More information about the product:
https://www.crowdsupply.com/capable-robot-components/programmable-usb-hub
CircuitPython firmware is being developed here: https://github.com/CapableRobot/CapableRobot_CircuitPython_USBHub_Firmware
I don't think the -print0 and -z options are needed but if you do use them I think you also need -0 for the xargs command.
@fast harness that would require spi support for dotstar and touch support
@slender iron What do you think about this one? [https://www.arrow.com/en/products/lpc54113j256uk49z/nxp-semiconductors]
will probably fit. not sure how you'd do touch with it
Are you sure it's ok to use a MicroChip VID?
@slender iron "will probably fit. not sure how you'd do touch with it" - What do you mean?
They both have SPI?
They both have SPI.**
the code will probably fit in that much flash
the samd has a touch controller peripheral we use for touchio but the lpc doesn't seem to have one
Hmmm okay, thanks for pointing that out.
Hello all. When I made the library adafruit_ws2801, I based it on adafruit_dotstar It turns out I picked up a bug when the code is used on non-hardware-assisted pins. It hasn't manifested itself yet for dotstars perhaps because of a difference in timing wrt clock https://github.com/adafruit/Adafruit_CircuitPython_DotStar/issues/34. The bug does cause the WS2801 to fail in obvious, colourful ways. I wanted to trace back the code to see if it was based on existing code and who wrote it in case the bug was present elsewhere or author had replicated bug elsewhere. It was originally called ds_writebytes() as seen in https://github.com/adafruit/Adafruit_CircuitPython_DotStar/commit/14205d83ea14c6c0097d8e7132aff986238af03e#diff-18059db786163024e172bdbae20fb7b1R190 but perhaps there are earlier versions elsewhere
DotStars use a synchronous protocol, so they don't care much about timing (you can do it manually and it will work). NeoPixels are the ones where timing is important.
it does matter whether you toggle the data pin or the clock pin first, though
and that is the bug
I suspect the problem is that dotstars use falling edge of the clock, and ws2801 rising, or something like that
That does matter, but I'm having trouble understanding how hardware assistance is required to toggle pins in the correct order.
look at the patch
hardware assistance is not required, just the hardware implementation doesn't have that bug
Amusingly, I debugged a SCSI bug that had a similar underlying cause (tricky, as it worked with some devices but not others).
@smurfix How does PYTHONHASHSEED fit into it?
@main meteor @stuck elbow I stuck diagram in, it's not very detailed but strongly suggests rising edge triggering but the fact it works suggests they must either have a lag or continue to read any data changes for a "large" unspecificed window. But I was less looking for discussion on bug and more looking for its dark (or otherwise) back story.
I understand, I just got confused by my misunderstanding of the real issue.
@simple pulsar that code is old enough that I doubt anyone remembers details
@slender iron I've worked on code that's older than Google. #justsaying
I can completely understand the curiousity. There are some projects out there that use a series of shift register chips that are all clocked together, and the instructions have some vague hints that you have to invert the clock at some point. The real problem is ripple delay, so inverting the clock acts as if it were delayed.
https://www.kickstarter.com/projects/pimoroni/32blit-retro-inspired-handheld-with-open-source-fi reason for asking for circuitpython support is it'd be ace for this to work with it
@fluid helm we've got preliminary work on the stmf4 in tinyusb
and there is plenty of example code in micropython, it's just not circuitpython-ified
Ah-gotcha.
Might have a look to see if I can work something out
that'd be awesome! I'd love to see support there too
they will have a lua port, so probably a lot of code could be lifted from there
@stuck elbow Is it C++ xor LUA or C++ with lua? I have just pledged for some so I will find out soonish. Interesting to see Pimoroni using kickstarter
xor, but I suppose you can always write a lua module in C++, as with C and circuitpython
I went through the sublicense process and was approved.

Looking for some guidance on if it's possible for CircuitPython to not reset pins (on MCU restart / entering REPL), but still allow them to be used. Right now if I use never_reset in board_init, pin state is maintained between resets (great!), but I get pin in use errors when I try to create a pin object in python after the reset.
@zealous barn not sure of your use case, but on the Python side you could wrap it in a try:
try:
pin = digitalio.BlahBlah
except RuntimeError: # i forget the exception
# accept state or deinit() and recreate the object?
Though, I'm not sure you'll ever get to a point where both the physical pin state and the Python object survive reset.
you can't deinit the pin if you don't have the pin object
Hah! Excellent point... 🤦
I don't need the python object to survive reset, but correct that it's pin.deinit() -- I need a deinit(board.NAME)
@zealous barn maybe you could deinit them just before reset?
Good idea. Is there a way to detect a reset before it occurs? Rather not have the pins be create/destroyed on every function call with enter & exit
I think you can catch the ReloadException at least for the auto-reset, and you can catch the KeyboardInterrupt for ^C
out of curiosity, why do you need the pins to not be reset?
Because they control the reset line of a USB hub chip and USB upstream data line DPST switch. I'd rather downstream USB devices attached to the computer not unplug / replug when someone enters the REPL to change board behavior.
Biazarre use case I know. I
so the functions that are going to use them are in C anyways?
you could look at what release_displays does to handle the never_reset pins
No. The MCU runs CircuitPython and upon boot configured the USB4715 with the appropriate register settings, then starts running a monitoring loop. I only want the MCU to reset the USB4715 once per power cycle -- ideally MCU soft resets just run the monitoring loop and don't reset & reconfigure the Hub chip.
I can detect if the chip is configured or not via I2C. The only issue is reclaiming / re-using the reset pin (after MCU soft reset) to allow for the user (or code) to force reset the USB4715.
Hi everyone ! I fear that the (external) flash on my itsybitsy M4 express is dead... Unable to format it, storage.erase_filesystem() works, but the drive is still not readable for the computer, and os.listdir('/') gives "OSError: [Errno 19] Unsupported operation"
Is there anything I can do to troubleshoot this ?
Thanks for the guidance all. I'm going to keep working on this -- have to sign off now
@stuck elbow Adafruit CircuitPython 4.0.0-rc.2, but tried with the latest stable (3.x) wit no luck
ok, next up on the checklist is visual inspection
anything suspicious? burn marks? shorts? fungal growths?
Some green lime from a excess of flux, maybe...
but around the flash chip specifically?
The chip near te SCK mark, I suppose ? Nothing special here...
@zealous barn I'd probably do it as a staticly allocated DigitalInOut that you make available in the board module
(guessed it from the ship size)
Interesting! Thank you for letting me know.
But nothing unusual here
<@&356864093652516868> anything else to get in rc.3?
@slender iron I can't think of anything else.
Nope, I’m good.
kk, will do it now @tulip sleet. I just got back from the dentist so I'm not in the middle of anything
acfabab Have .travis build capablerobot_usbhub - tannewt
@raven canopy Another angle on the problematic first incarnation of https://github.com/adafruit/circuitpython-build-tools/pull/31 is whether there was a better time to schedule it wrt other on-going activities. If Adafruit has a calendar which reflects signficant events then that could be used to schedule when changes happen to fine tune risk and reduce impact from any unforeseen problems. Something like PyCon might trigger a freeze or prompt for higher approval/review.
@sacred blade I would write about this on the support forums
Alternatively, have Travis always build everything.
@slender iron does rc3 have anything relating to that lack of midi uniqueness I mentioned on https://forums.adafruit.com/viewtopic.php?f=60&t=151271 ? I'm just sticking CircuitPython on a spare feather M0 to see how that behaves.
no, it's not clear to me what is causing that issue
and I don't expect many people to have that issue so it's very low priority
I don't need it to work just seemed rather odd. I've just noticed Ableton sees three things when I have one Feather M0 and 2 CPX in the MIDI setup but for some reason it's still not doing its hash2, hash3 append to give them all unique names.
I'd normally assume it would be more unique being a different type of board rather than less unique!
ya, I have no idea what it could be
I just fired up MuLab and it lists three with the same name (CircuitPython MIDI). I'm starting to wonder if Ableton is using a hacky technique to try and make unique names. I'll do a bit more experimenting later on.
I'm working on a circuit python application and hit a road block -
Does anyone know any model or design pattern where you would have a three-way communication? Like between a Server, an App and a Device?
It's like Server-Client-Client
@simple pulsar yeah agreed, it may not have been the best time to merge that in. I'll still shoulder my root cause, even if the silver lining was that it highlighted the need for a test "gate" and just as importantly my personal bad method of testing.
I'll grab it if no one else is...
@raven canopy want to merge too?
ah ok
@raven canopy Yes you do....
I just enabled it
Oh ok
there are separate branch permissions besides the collaborators
Ohh ok. Got it.
😃
🎉 "With these new powers, I pledge to wield them with the utmost discretion and only for the betterment of human and robot kind, alike." or something like that. 😆
Automated website update for release 4.0.0-rc.3 by AdaBot.
New boards:
- capablerobot_usbhub
Thanks for making me a circuitpythonista!
@trim elm You're welcome! Anyone can be, but oi you earned the heck out of it.
<@&356864093652516868> what is the most likely cause of a i2c Input/output error during a readfrominto?
>>> bd.active_input = 0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/lib/adafruit_bd3491fs.py", line 191, in active_input
File "adafruit_register/i2c_bits.py", line 90, in __set__
File "adafruit_register/i2c_bits.py", line 75, in __set__
File "adafruit_bus_device/i2c_device.py", line 167, in write_then_readinto
File "adafruit_bus_device/i2c_device.py", line 97, in readinto
OSError: [Errno 5] Input/output error
Recurring?
It's not wiring,. Or it scans fine at least
yes
every time, haven't made a good read or write from CP
pullups are good
I believe the registers are RO but weeno will at least not fail and return garbage (all 1s)
are there other registers you could try?
They all do the same thing, at least the few I tried
looks like something new? working on a driver?
i'd suggest scoping it
I don't follow
logic scope
ah
so you can see the actual I2C traffic
it seemed like it was going something last I checked but I suppose I can take a more exhaustive look
i pretty much always have my saleewaelaeweeawa attached when writing a driver
I had mine hooked up but after the arduino driver went fairly well, I unplugged it
yep. the software gremlins saw you do that. 😃
This is the first time the CP driver has been the more challenging of the two
or is it hardware...?
I mean, maybe
the spec says the voltages are right. It's a kinda weird chip http://rohmfs.rohm.com/en/products/databook/datasheet/ic/audio_video/audio_processor/bd3491fs-e.pdf
cool beans
looks like a 5V chip?
ya, but sez it can take i2c high as low as 2.3v I think
I may just put in a level shifter
that looks like a stereo receiver in a chip
basically
ya
since vcc can only go to 5-ish I'm assuming that means it doesn't need the logic level to be at vcc
were you using a 5v board with arduino by any chance?
what are you pulling up to on the i2c line?
3v3
ah. you're using register.
are you basically trying to set the value for Input Selector at 0x04?
ya
i'll admit to not having used register much
It's pretty groovy; does all the bitmasking/etc for you
it basically turns chunks of memory into attributes
yep. it's just one of those things i haven't sat down and groc'd yet
And Limor made something similar for weeno
look at @idle owl 's VEML7700 driver. Pretty straighforward
Welp, the level shifter didn't help
scope says it's working as intended
puts on big boy pants
the transaction looked valid and as expected on the scope?
to be perfectly honest I forgot what it's supposed to look like but getting NAKs seems like a problem
another idea - try some low level i2c hacking at the REPL
ya
you don't really need to worry about sharing the bus, so just make a busio.I2C object, grab the bus with try_lock and then start talking
ya
Which level shifter did you use?
got a IO error on a writeto; scope shows NAKs again
I'm going to read this TI i2c thing
<@&356864093652516868> release candidate 3 is out and a 4.0.x branch is set for any fixes. master is 4.1 now
@simple pulsar Congrats on your MIDI and synth Learn Guide! https://learn.adafruit.com/cpx-midi-controller
@tulip sleet Thanks, there's quite a bit in there, hopefully something interesting for everyone. I have a fair number of friends with children who have CPX boards and are into music so perhaps it'll inpsire them, and other folk, of course. My first YouTube videos in a guide too. The image you see is my (matte surface) flat screen monitor off its stand and lying flat on the desk with CPX resting on it. I was surprised the technique worked so well for filming.
oh, usb midi does midi receive now? nice. I'll have to tinker with it.
Can someone have a look at https://github.com/adafruit/Adafruit_CircuitPython_MIDI/pull/13 when they have a moment?
@slender iron Thanks for the suggestion. I don't see an example of that (permanent DigitalIO definition) in current board definitions and think it would be easier to just change a few resistors from pull down to pull up on the prototypes I have. That way the MCU can soft reset fully with no "don't reset" pins. Seems like a more robust long term solution.
one could theoretically use more than one language in a compiled project right? like c and c++?
sure, as long as the binaries are C-compatible (which they are, most of the time), you can link them together
there are some caveats for calling C++ from C, though, but the other way around is relatively easy
think this could work in the kernel ? (I mean cp)
@marble hornet it depends on the code, but should work. If it's C++, you'll need to look up how to do C to C++ calling, but it's not hard
you'll need to write some wrapper routines, probably
Has anyone tackled ATWINC1500 support with CP?
@old smelt we are not going to support ATWINC1500 with CP: The Airlift ESP32 stuff is better for a number of reasons.
cost, flexibility, open-source
Understood
@tidal kiln I found this useful, in case you hadn't seen it http://www.ti.com/lit/an/slva704/slva704.pdf
@simple pulsar two products having the same pid is a bug, please file an issue
@pastel panther did you get it working?
not yet. Limor suggested it may be a repeated-start or not issue. I'm going to switch to something else for a bit and come back
yep. it looks to me like it does not support repeated starts.
Currently we are using gcc-arm-none-eabi-7-2018-q2-update. 8-2018q4-major is available. There will probably be another release sometime in June 2019.
See this comment, which is interesting, and is cautious about moving forward: https://bugs.launchpad.net/gcc-arm-embedded/+bug/1820593/comments/1.
Compiling the en_US Trinket M0 build with the new release produces slightly smaller code:
2972 bytes free in flash out of 188160 bytes ( 183.75 kb )
vs
`2836 bytes free in flash out of ...
I'm wondering if #1870 might have fixed this.
Makes Group iterable and adds index and remove.
@slender iron do you know the general status of this?
https://github.com/adafruit/circuitpython/issues/1020
@tidal kiln I don't
ok, no worries, just re-discovered that trying to use bitbangio on a metro
(because hardware SPI pins are not as easy to get to)
@tidal kiln there are actually several sets of pins you can use for hardware spi on metro
looking... so like other ones that can be muxed internally to spi?
I think this comment is a copypasta leftover?
and then just pass those in to busio.SPI?
neat. let me try that. never tried anything other than board.SCK etc.
you can even mix them -- use board.SCK for clock but board.TX for MOSI, etc.
@tidal kiln https://learn.adafruit.com/circuitpython-essentials/circuitpython-i2c#wheres-my-i2c-15-17 is a simple way of finding working pins (that link is for I2C but you can adapt the search for SPI)
I now need to find 12 pins I can use with pwm on a samd51
same freq? do you need variable freq?
same, it's for servos
a search like the above should work out ok in that case.
I discovered that after fixing bugs, I can only have 10 pwms on the samd21e, so now I'm redesigning it for samd51
yeah, I just need to compile a custom firmware that exposes all pins
it's not hard, just boring :)
you could try it on a Metro or Itsy M4, or even just use one of those temporarily as the firmware load, even though the pins are wrong, since the USB pins will be OK.
If you choose TCC-capable pins, the TCC's have multiple channels that can be shared in case of same freq (or maybe you know that already).
I was surprised too. My guess is that it wasn't done due to speed.
We could auto-detect when we could use one too but then we'd need to test for subscr and unary when trying to construct the iterator.
indeed....this goes on for...quite a ways...
>>> import spi_locator
SCK pin: microcontroller.pin.A2 MOSI pin: microcontroller.pin.A1 MISO pin: microcontroller.pin.D2
SCK pin: microcontroller.pin.A2 MOSI pin: microcontroller.pin.A1 MISO pin: microcontroller.pin.D5
SCK pin: microcontroller.pin.A2 MOSI pin: microcontroller.pin.A1 MISO pin: microcontroller.pin.MISO
SCK pin: microcontroller.pin.A2 MOSI pin: microcontroller.pin.A1 MISO pin: microcontroller.pin.MOSI
SCK pin: microcontroller.pin.A2 MOSI pin: microcontroller.pin.A1 MISO pin: microcontroller.pin.SCK
SCK pin: microcontroller.pin.A2 MOSI pin: microcontroller.pin.D5 MISO pin: microcontroller.pin.A1
now to try it out...
iirc there are SCK pins and MOSI pins, and any of them can be used as MISO
SAMD51 is more restrictive than SAMD21 in choice of SERCOM pads for SPI, if I remember
(that was Metro M0)
oh, thanks, I will keep that in mind
works! thanks @stuck elbow and @tulip sleet
used this:
spi = busio.SPI(board.D13, MOSI=board.D12, MISO=board.D11)
to talk to an RFM69 module:
>>> import rfm69_simpletest
Temperature: 30.0C
Frequency: 914.999mhz
Bit rate: 250.0kbit/s
Frequency deviation: 250000.0hz
Sent hello world message!
are there any non-express m4 boards?
no, but there's latent support: we ran with an internal flash CIRCUITPY while working on external flash support
m4 has more flash, so it might make sense
atmel-samd/boards/samd51x19-bootloader.ld vs samd51x19-bootloader-external-flash.ld
thanks
it was split in half - that was arbitrary
my gameboy cart only uses internal flash
I have a feather m0 rfm96, I'd like to load circuitpython to it, looks like it's the .bin format, I have BOSSA installed but the its version 1.9.1 and it's a GUI version and the adafruit tutorial only shows for the cmd line, any help with this?
@modest atlas you can find bossac inside an arduino installation. If you use the GUI version, MAKE SURE you set the offset to 0x2000 so you don't overwrite the bootloader (if it lets you). Or, even if it doesn't, you'll lose part of the .bin
Got it working , thank you
Turned on this readthedocs build: https://circuitpython.readthedocs.io/en/4.0.x/README.html
Could someone review this PR? I'm trying to put out a release tonight and this was the last tiny thing left to fix
which link?
so it is supposed to look like this? with the lack of code style around two of them?
ok, that's a bug; i didn't see that, thanks
i'll propose a change
ok, thanks!
there's a couple spots. 6 bullets up needs a fix too:
This means you cannot read state from ``code.py`` in the REPL anymore.
hrmm. i though i had already corrected that one 🤔 😕 ah well. @raven canopy look good?
yep. just waiting on Travis.
i think i missed the reason for the change from md to rst.
RTD/Sphinx, as i understand it. Sphinx handles rst natively.
there is a library to convert md to rst, but rst is much better at dynamic html generation.
ah okay. I must admit i never really learned sphinx 😬 , just wrote python script to output html 😅 . thanks for filling me in tho 😃
Sphinx is not easy to learn. i've only scratched the surface on it and rst.
well, "not easy" isn't the right term. its just takes time and exposure.
Reported by forum user lawrenceyy in https://forums.adafruit.com/viewtopic.php?f=60&t=151793:
round(<integer>, <n>) throws NotImplementedError. User found this via round(0, 2). round(<float>, 2) is OK, as is round(<integer>).
This was working in 3.1.2, but broke as early as 4.0.0-beta.2. MicroPython 1.9.4 seems OK.
This has to do with the default setting of MICROPY_PY_BUILTINS_ROUND_INT, which was added by https://github.com/micropython/micropython/commit/b318ebf1015ced6354f8bbaf035308214b3f5c5d. The original idea was to add handling negative rounding of integers, like round(123,-1), but it took significant extra code, so the flag was added. I'm not sure it was Damien's intention to disallow two-arg rounding of integers completely. I filed an issue there and will see what he says. In the meantime, w...
I was reviewing USB PID allocations, as you do, and noted that the PyPortal and GrandCentral M4 use the same one, 0x8032. @tannewt confirmed in discord that this sharing is incorrect.
Here's a summary of all of them in PID order generated from the ports/atmel-samd/board directory:
$ date ; grep USB_PID $(grep 'USB_VID.*=.*0x239[aA]' -l */*.mk) | awk -F: '{ print $2, $1; }' | sort -k 3
Thu 16 May 10:58:36 BST 2019
USB_PID = 0x8012 itsybitsy_m0_express/mpconfigboard.mk
USB...
@slender iron I filed the USB_PID clash as a bug and made a summary for someone to review too: https://github.com/adafruit/circuitpython/issues/1891
If this is a problem, I can get my own USB VID&PID pair for ugame10 and pewpew10 — however, I'm not sure if the CircuitPython drivers for Windows will then work for them?
@deshipu I don't think that's really an issue. No host program I know of uses the PID for significant things except maybe Arduino.
I'll work up a PR for this. @kevinjwalters The Hallowing PID is a joke :)
@dhalbert Mu uses VID/PID to find the devices.
I will apply for the new PIDs then.
@deshipu Mu now uses a wildcard: All boards with the Adafruit VID (0x239a) are recognized.
Fixes #1891. Checked against master internal list. @ladyada tagging you for info.
Oops, I didn't mean to merge! It didn't start a check. Please review anyway. I'll fix the branch settings to require approval.
why does the arduino use an adafruit vid?
We’re replacing the regular bootloader and don’t have multiple pids available from Arduino. This was assigned a long time ago but had errors.
For discussion on Trinket M0 on https://forums.adafruit.com/viewtopic.php?f=48&t=151792 does the Trinket have 3 PWM capable pins? The shop page https://www.adafruit.com/product/3500 says it has, "Two high speed PWM outputs - for servos, LEDs, etc"
@simple pulsar good point, glossed over the board. i think the issue is available timers.
I've got a PyPortal now, a friend from Brooklyn brought it over to the UK for me, just powered it up and an exception error appears on the screen from set_background(). Is that a known issue with the demo code?
what's the exception?
TypeError: extra keyword arguments given
sounds like an out of date library/code issue
Probably, but seems odd to ship them like that. I have two, let me plug in the other one
Other one does more and leaves me on a page with error and suggesting I update secrets.py
fc595b5 add library info link from circuitpython.org - TheKitty
4d785d0 Add Atom helper to frameworks - TheKitty
if you update secrets.py are you still having issues?
@tidal kiln Thanks, I'm fine and now at 4.0.0 rc3. I really just wanted to alert you to PyPortals shipping with bad demo code on.
thanks. yah. i think some of that is generally known. has to do with some stuff still being in works.
Where would I report errors with https://circuitpython.org/libraries/ - that page gives a 404 - is that site still a WIP?
we're looking into it
FYI, I think https://circuitpython.org/awesome was 404ing earlier but that works now. Presumably unrelated auth was misbehaving briefly on forums.adafruit.com - I've reported that to support@adafruit.com with the http response headers from 20 good and bad uns.
CircuitPython Organization
Changing subject, I'm curious what the motivation was for the LC (low cost) version of the PyBadge was https://www.adafruit.com/product/3939 - was main motivation to get to a price point where it's more likely to be considered a give away gift for badge use? A friend and I are discussing vague plans for a summer camp and we might put some hardware in there. What's the spec for PyGamer variant going to be?
This one ? https://www.adafruit.com/product/4200
I was thinking of this one: https://www.youtube.com/watch?v=7KbZiurEg7I&t=0m31s
The news from the Adafruit factory in New York. Broadcast May 15, 2019 We broadcast the weekly ASK an ENGINEER video show and this is the segment on items or...
Ouch missed it. Very very pretty !
This module implements low-level communication with PS/2 keyboard and mouse. The wire protocol resembles UARTs and PulseIn but it is unique and takes a separate C module.
It probably takes a lot of changes to be accepted in main project, but have to start somewhere.
@tannewt Enabling MICROPY_PY_BUILTINS_ROUND_INT adds 151 bytes to image. Fixing the code so that round(x, <negative n>) is still not implemented but `round(<int>, <positive n>) works adds 16 bytes.
Current trinket build with French translation has 1264 bytes free with this turned on. That may be the largest one right now.
Does the new sysfs pwm stuff in blinka work? I seem to be running into an issue getting it to find my pwm channels.
its only enabled for the coral, you can PR to add it for yours
you have to tell it the names/channels, etc
check Coral PR
I was just working on getting the PR together. I have everything in there similar to the Coral. I don't have the channel error anymore. Another error, I will keep messing with it.
I think there is an issue in linux with setting the duty cycle greater than the period
or something to that effect
i could hve made some bugs too
i got it working with the guide as i wrote it
fixes wlecom 😉
Sure thing, I will keep poking
Returning to PyPortal, I put in WiFi ssid and password and I've got a new error from the demo app from set_text NameError: name 'Label' is not defined - same stuff as discussed in https://forums.adafruit.com/viewtopic.php?f=59&t=149573
I worked it out and added to the post. I'd be interested to know what the intention of the try code is at https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/blob/master/adafruit_pyportal.py#L58 - it's currently confusing for new PyPortal owners. Is the code intending just to remind users to upgrade? If so, it needs a sleep after the print to allow user time to read it and if it's not going to be a terminal error then it might be better to do a file exists test or some form of less damaging import.
The update instructions do not say to remove the existing lib directory at the moment
here's the change, it was originally TextArea:
https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/commit/950ef06d3dc4ae2681720426caf56ddbdb366d11
that's like a check and a failsafe:
try:
from adafruit_display_text.text_area import TextArea # pylint: disable=unused-import
print("*** WARNING ***\nPlease update your library bundle to the latest 'adafruit_display_text' version as we've deprecated 'text_area' in favor of 'label'") # pylint: disable=line-too-long
except ImportError:
from adafruit_display_text.Label import Label
if you're running with an older version of the library, the import will work and you'll get the warning
The code then blows up later
if you're running with the current version, the import will fail and the correct import is done in the exception handler
yep. see the warning.
The warning cannot be seen as it's on screen for about a quarter of a second
That import then blows up later with an exception and no quote is seen on screen
The warning is more of an error (in severity terms) as the code as it is at the moment cannot work with that library present.
it'll work with the current version of the library
that view issue is sort of a general issue with the new display
previously, you had to connect to serial output
that still works - so you would see the error there
for the display, having the CP stuff on the screen is super new
On Windows I am not seeing COM entries for my two PyPortals, I've not looked into that.
But I have got a PyPortal, I've followed the upgrade instructions and the demo code fails with an exception for reasons that a typical user would not be able to decipher
Oh, cancel that, I missed this step First, delete all the files from your CIRCUITPY drive (so you don't have any old lingering files)
you followed this?
https://learn.adafruit.com/adafruit-pyportal/updating-your-pyportal
for the COM port - do you have any other CP devices? if so, same issue with them?
I've got a CPX attached at the moemnt and that's fine
That can wait til tomorrow
I've updated forum post with a note on the step that I failed to follow - others must have missed it to.
i can agree with @simple pulsar on what he's saying though. why not raise an exception there? continuing on, only to have it fail later seems confusing.
@raven canopy The only reason to do that (carry on) would be if it worked with some versions/combinations of libs, possibly prior ones, I don't know any history here.
but it won't work... TextArea is never called in the proceeding code. only Label is. which will raise an exception, no?
It looks that way from a quick glance, the pyllint suppression suggests it too
I tagged it onto https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/issues/17 for review. Thanks for your help
i think it's there for Reasons(c)
i can see that whole try/except eventually going away
oh. yah. that issue. there you go.
I did some more looking at Bluetooth File transfer. There are some pre-existing specs There's OBEX, a general object exchange protocol which is used for IrDA, Bluetooth, USB, and other protocols. GOEP (Generalized Object Exchange Protocol) is a Bluetooth profile based on on OBEX. There's a File Transfer Profile (FTP).
https://en.wikipedia.org/wiki/OBject_EXchange
https://en.wikipedia.org/wiki/OBject_EXchange#Protocols
https://en.wikipedia.org/wiki/List_of_Bluetooth_profiles#File_Transfer...
Hi, I'm trying to write a library for the nrf24 radio, it's work in progress, right now I have writing and reading from registers working, I'm sure it can be done in a better way, mind taking a look? https://gist.github.com/C47D/ea15c4a41ba167d023e85f29abf334af
I'm using the adafruit_bus_device
For PyPortal, I have a constant blue light on the LED when it's running the demo code. https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#circuitpython-rgb-status-light-20-18 says "steady BLUE: boot.py is running" and "steady GREEN: code.py (or code.txt, main.py, or main.txt) is running" but doesn't specificall mention PyPortal as conforming to that standard. Should I expect green or blue here?
which demo code? it's possible it has passed in the onboard neopixel so the pyportal will use if for wifi status. ex:
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/PyPortal_Quotes/quote.py#L14
@tidal kiln A good point, I've not yet got into PyPortal coding
then it's probably the RGB status you linked
that's a general CP thing, for boards that have a RGB, so applies to PyPortal also
I'm just searching for docs on what status_neopixel=board.NEOPIXEL does with colours
the PyPortal library (class) let's you pass in a pin to be used for status
it's expected to be a pin to which a NeoPixel is attached, but it can be any pin
for boards with a builtin NeoPixel, that pin is board.NEOPIXEL
The meaning of the colours is what I was after. That might help someone else too, I thought I'd seen someone asking about a possible disconnection issue
in the case of PyPortal? so something other than source code comments?
https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/blob/master/adafruit_pyportal.py#L689
hmm. yah. not really seeing it in the guide or elsewhere.
My COM port is still AWOL for PyPortal. I tried latest mu as I'd seen some discussion about how that scans for devices. When I plug it in there's no complaint about missing device but clicking Serial fails with dialogue. Windows device manager shows no COMx for it. mu's error log as viewed from settings is 2019-05-17 11:30:56,181 - mu.logic:1110(change_mode) INFO: Workspace directory: E:\ 2019-05-17 11:31:00,012 - mu.modes.base:221(find_device) WARNING: Could not find device. 2019-05-17 11:31:00,012 - mu.modes.base:222(find_device) DEBUG: Available ports: 2019-05-17 11:31:00,012 - mu.modes.base:226(find_device) DEBUG: ['PID:0 VID:0 PORT:COM1'] 2019-05-17 11:31:00,059 - mu.interface.main:701(show_message) DEBUG: Could not find an attached device. 2019-05-17 11:31:00,059 - mu.interface.main:702(show_message) DEBUG: Please make sure the device is plugged into this computer.
# blue = connected
# red = not connected
# yellow = fetching data
# green = got data
do you see the CIRCUITPY folder?
yep, and mu has found it as E:
@tidal kiln I put your colour summary on https://forums.adafruit.com/viewtopic.php?f=59&t=149901 as it may help that user
The CircuitPython MIDI device is showing up in device manager and if I walk around the properties i see Driver Management has concluded the process to add Service usbaudio for Device Instance ID USB\VID_239A&PID_8032&MI_05\6&F36488&0&0005 with the following status: 0. so that looks correct and confirms other USB things are fine
@simple pulsar thanks. added a few more possibilities to thread.
Thanks for this! I actually implemented it myself but haven't merged it in because it plugs the keyboard directly into CircuitPython's serial input. My changes are here: https://github.com/adafruit/circuitpython/compare/master...tannewt:ps2io
I'd be happy to merge in this low-level stuff but would prefer it in a separate ps2io module. Having it in pulseio means it will be included in every build that wants PWM. With a separate module we can turn on and off the functionality independently.
That Windows serial driver is 10.2.3.2 dated 30-Jul-2018, I'm about to go look to see if there's a newer one
https://github.com/adafruit/Adafruit_Windows_Drivers/releases/tag/2.3.4 mentions ```
Add Grand Central
Add PyPortal
Add entries for four potential new boards so they'll be installable without needing to update drivers, with generic names. They can get renamed as necessary, but will work with the generic names
Understood, will change the module to ps2io.
It was built inside pulseio because, as you certainly noted, it was based on PulseIn.
@tidal kiln I put some detail in https://forums.adafruit.com/viewtopic.php?f=60&t=151872 on serial issue and Windows for PyPortal users. I think it'll mainly confuse existing (as they are likely to have installed device drivers sometime back which work for most boards) Adafruit users. Might be worth ensuring the wording in the Troubleshooting guides and the PyPortal secific Learn stuff reads well wrt this issue
In Windows I see my new PyPortal boards (running 4.0.0 rc3) as @oem31.inf,%grand_central_m4_express% circuitpython (8032:00);Adafruit Grand Central M4 Express CircuitPython (8032:00). Presumably that's due to the clash?
No, that's a weirdness of driver installation on certain versions of Windows. What version of Windows are you using?
Windows 8.1 with the Adafruit 2.3.4.0 drivers.
Fixes #1890.
Set MICROPY_PY_BUILTINS_ROUND_INT = 1 for all builds, which implements round(n, <negative ndigits>), so that, for instance round(189, -1) will round to the nearest 10.
Also tweaks the implementation so that even if MICROPY_PY_BUILTINS_ROUND_INT = 0, round(<int>, <positive ndigits>) will still work. Previously rounding an int with a specified ndigits would throw NotImplementedError.
Adds 151 bytes or so to a build.
Fixes #1890.
Set MICROPY_PY_BUILTINS_ROUND_INT = 1 for all builds, which implements round(n, <negative ndigits>), so that, for instance round(189, -1) will round to the nearest 10.
Also tweaks the implementation so that even if MICROPY_PY_BUILTINS_ROUND_INT = 0, round(<int>, <positive ndigits>) will still work. Previously rounding an int with a specified ndigits would throw NotImplementedError.
Adds 151 bytes or so to a build.
Yes, that's some mild driver name text formatting bug in Windows 8 and up given certain .inf files. It's not substituting a definition in the .inf file properly. It works in Windows 7.
@kevinjwalters OK, sorry, misread your error report. Yes, the reporting of it as a Grand Central is due to PID mismatch. However, all the CircuitPython boards install the same driver, so it doesn't really matter. I'll need to update the drivers at some point to add new boards.
If you are at all able to upgrade to Windows 10, I would recommend it, since all this would go away. However, I can understand if your machine is stuck on that or it's personal preference or admin reasons.
Does MI...
Yep, MIDI is fine. The only issue I have is with the boards (plural) all calling themselves CircuitPython MIDI, discussed in https://forums.adafruit.com/viewtopic.php?f=60&t=151271. Some things can cope with that to some degree (Ableton Live), other less sophisticated products can't. It would be nice if that could be specified by the programmer / user.
@tulip sleet Win 8 on my desktop is coz I don't want to invest the time and money to upgrade. My rarely used laptop is Win 10 but I lent that to a friend so I now need to burn it / re-install it to purify it. I may "upgrade" Win 8 to OSX but it's a big step for me!
@simple pulsar if your desktop is a Dell, my experience has been that it's still possible to upgrade a Dell for free to Windows 10. I do this all the time. At this very moment I'm prepping a refurbished Dell laptop to upgrade it from 8.1 to 10.
Interesting. It's a 1999 dell dimension xps 500 (over 2000 USD new) but only in its case. I rammed a more modern asus motherboard into it with some masking tape plugging the gaps to tame the airflow.
it has to be a Dell BIOS, ah well
Useful to know though. I still use the original Dell PSU with its non standard connector for powering Dotstars - it groans a bit when you light up 300 of them. I've got good use out of the remnants.
The Microsoft crowd are asking for more info on that FAT12 bug thing https://twitter.com/zooba/status/1129209615743299584 - even if all the info is out there I'd say it's worth spoon feeding them as it would be great to get this fixed.
@kevinjwalters @qubitron We have a question about exactly which file systems are affected - FAT12 or 16, and what capacities? Do you have a page or bug somewhere with accurate details? It's hard to plan a next step, and acquiring/testing all possible devices isn't feasible.
Hey everyone, having trouble reading an image from an SD card on my PyPortal. Anyone around to help me out?
import board
import storage
import adafruit_sdcard
import os
import digitalio
import busio
from adafruit_pyportal import PyPortal
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
cs = digitalio.DigitalInOut(board.SD_CS)
sdcard = adafruit_sdcard.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
cwd = ("/sd"+__file__).rsplit('/', 1)[0]
countdown_background = cwd+"/countdown_background.bmp"
pyportal = PyPortal(status_neopixel=board.NEOPIXEL,
default_bg=countdown_background)
while True:
pyportal.set_background(countdown_background)
@simple pulsar I'll reply to that tweet. I have LOTS of details.
I just backed the 32blit at the Beta Tester level. CircuitPython will be really nice on this.
@umbral dagger I asked about that in questions
The reply about micropython/circuitpython plan (3 days ago) was Initially we're going to focus on the C++ SDK and our Lua layer over that. It certainly *could* run MicroPython/CircuitPython though, it has plenty of power for that!
Yes, the specs are really nice., I don't expect them to get CP running on it.
Although MP/CP support would be a nice stretch goal 😃
Indeed. I think they were hinting at a minor h/w upgrade for initial goal x3
@tall yacht what doesn't work. I've got a brand spanking new PyPortal plugged in and rather randomly i have a selection of SD cards out
Is that coming from the line where the PyPortal object is created?
yep
An uneducated guess is that your code and PyPortal are trying to make it. That would suggest a way is needed for only one to make it. There's an arg you can pass in if you've already made it. I'd give that a go.
Add external_spi=spi to your PyPortal arg list
Just a guess but a reasonable one
Hmm, it's in https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/blob/master/adafruit_pyportal.py - have you got the latest libraries? It's possible source code is ahead of either your lib or latest
My libs are dated (by filestamp) 22-Mar-2019
I'll see what mine does
Me too. I would download that latest file (adafruit_pyportal.py) and give it a go. It may not be in sync with other libs but you've got nothing to lose at the moment.
It's pretty fresh, it arrived on the 8-May-2019, https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/commit/6f3d9e910a69e4649e6c6f7533ebd075aa5565b6#diff-7209b3ef2600c5bf943577353f23623b
@fluid helm good luck, I'm off now, if you get it working I'd suggest a post to forums to let others know. if you don't, perhaps do the same.
Moved to its own module (ps2io) and tested on hardware.
latest bundle release is missing some targets
https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20190517
Hi, question re: pyportal. I've got a diy keyboard that connects to a serial uart. Ie: 3 pins with 5v, ground and 1 tx pin. Can I connect this to pyportal to read from the keyboard?
Ideally to interact with the repl
It looks like the hardware uart for samd is connected to the esp32
you can probably connect to the i2c port and change the sercom to do uart instead
pyportal has an i2c port right?
you'd probably need a resister to bring the 5V from the TX pin down to a safe 3.3v, then switch the i2c pins to be a UART instead like sajattack said but that seems reasonably doable
I believe there's a selector
jumper
just a matter of cutting a trace https://learn.adafruit.com/adafruit-pyportal/pyportal-hardware-faq#faq-4
interacting with the repl will probably take a fair bit more work
I think that's just for the +V output of the connector, you'd need need to bring down the voltage if the device is outputing 5V. You can try powering your keyboard at 3.3 instead of 5 and see if it still works
You could use a level shifter breakout.
Hmm thanks for tips, Does the hardware already on the portal need the i2c for anything?
What about the other pins that are exposed, d3 and d4
The keyboard has has atmega 328 but I could prolly hook a feather or something up instead
The hardware guide seems to indicate the pyportal by default wants 5v?
@tidal kiln mangled Bundle release: looking at the Travis log, seems like there was a hiccup with deploying to GitHub. i was tempted to just restart the Travis job, but not sure how nice that even plays on a good run. hopefully tomorrow runs without hiccups.
has any else had problems with Adafruit_EPD in CP 4.x recently. I am getting an error assiging a int to a bytearray item. OverflowError: value must fit in 1 byte(s)
HI @fading solstice , I've read a few messages in the past days about a change in one of the latest rc* which broke other modules with the same error. I'm not sure if it occured in rc2 or rc3. Which release do you have ?
rc3 fixed the issue that arose in rc2
Yes, that's a new change, intended to point out possible bugs triggered by attempting to put values into variables into which they will not fit. You can fix it by constraining the value to one that will fit in a byte.
There was also an issue where True and False wouldn't 'fit' in a byte, and that's fixed in rc3
@lofty nova 4.0.0 rc3
So for @fading solstice , I would believe that until the EPD library is updated to be aligned with the new policy, he shoud revert to rc1 ?
Maybe i should just fix EDP library
"If you're not part of the solution, you're part of the precipitate"
Long time I've not played with chemistry
Using a feather m0 rfm96, any way to add external spi flash to allow me to use the oled and the rmf module at the same time, having memory issues already
It seems it will not let me create an instance of SPI and I2C at the same time
It will however let me store the necessary libraries on the feather
external flash will not help you with memory issues
only with code storage
Have you converted most of the *.py to *.mpy ? That makes a difference
sneak peek of my current brain-cycle-stealing experiment...
If I understand, the bottom-left started a screen on the top-left to your metro with a screenlog file which is displayed on the top-right
and you're sending commands to the top-left session from the bottom-left term
yep. exploring an automated "phyiscal test environment" controlled by an RPi.
trying to avoid having to use UART, and have as much UX mimicked through USB.
What do you mean by UART ? using the separated TX/RX pair on the Metro instead of the USB CDC ?
yeah.
So through the USB CDC you can send easily commands to the REPL instead of having to code something on the Metro (for a UART protocol)
yep. still very early. thought process goes something like this: RPi has a webhook to trigger tests, downloads the necessary firmware (release, PR, etc), puts connected boards into bootloader mode, copies firmware over, copies over unittest files over, then uses screen to run the tests and capture results.
Do you need to hook a physical wire to do the double-reset trick to put the board in bootloader mode ?
currently plan on using the microcontroller.reset function, but a backup plan if that doesn't work is to use the RST pin.
Hi, is there a way to control the status led from the repl?
I am trying to add support to use RGB LEDs as status leds, I had defined a new board with 3 pins to control the RGB led, implemented the rgb_led_status_init function initializing the three pins as pwmout, and also implemented the new_status_color function, but I can't see the led changing colors at all
@lofty nova and pointers on the py. To .mpy conversion
Let me check...
Which OS ?
You need mpy-crosstool to convert a *.py into a compiled *.mpy. It saves memory when loading because otherwise CircuitPython load the full TEXT of *.py in memory and compile it in-place. So loading the pre-compiled version save memory
I'm still using a pre-built binary of mpy-cross I got from the 3.1.2 release here : https://github.com/adafruit/circuitpython/releases/tag/3.1.2
I can't find a pre-built executable for v4.X but the 3.x version I'm using is still working with CiPy 4.0 ...
I guess not but is cp compiled with debug symbols enabled?
I'm trying to debug a bin for nrf52840 feather, I'm using make BOARD=feather_nrf52840_express to build it
By checking at the makefile I assume that adding DEBUG=1 builds CP with debug symbols?
@solar whale @crimson ferry howdy! You both are awesome! Sorry I've been out-of-touch...personal life got turned on its side and then getting back into coding things took a bit of time.
My testing of the 1.3.1 build of the nina-fw has also gone well. I just got code added to the adafruit_esp32spi_wifimanager library that supports WPA2 Enterprise mode....I somehow forgot to actually spend some time testing WPA2 Enterprise 🙄 stupid life getting in the way of me having a life lol
After I let this enterprise support burn for 12ish or so hours, I'll put things together to submit a PR tomorrow for the NINA firmware and also my additions to the wifi manager library to support Enterprise mode
@sly falcon life does happen 😉. I hope it’s going well! I’m away from hardware for the next week or so but look forward to updates. Good luck!
I think something may have gone wrong with the library release for the 17th May 2019 as it doesn't not have the 3.x and 4.x libs, just 2.x: https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20190517
@simple pulsar yeah. Travis deployment to GitHub had a hiccup. Service side, not ours (that i can tell). i'm hoping it runs today so i can see what's up.
EDIT: here is the specific ded message:
/home/travis/.rvm/gems/ruby-2.4.1/gems/octokit-4.6.2/lib/octokit/response/raise_error.rb:16:in `on_complete': POST https://uploads.github.com/repos/adafruit/Adafruit_CircuitPython_Bundle/releases/17430550/assets?name=adafruit-circuitpython-bundle-2.x-mpy-20190517.zip: 502 - Error updating policy (Octokit::BadGateway)
also, was reading an article on PSF's blog, and bumped into this one:
http://pyfound.blogspot.com/2019/05/scott-shawcroft-history-of-circuitpython.html
<@&356864093652516868> (some who I just added) Here is the meeting notes doc for tomorrow's meeting: https://docs.google.com/document/d/1b6M-KEnnuny2x_3eZn4_ldevk-3DxdYuaHAYJ3_ZShU/edit?usp=sharing It is at 11am Pacific here in the CircuitPython voice and text channels. Everyone is welcome.
Hi, yesterday while trying to add support for RGB status leds I think I bricked my board and will be able to recover it until tomorrow
I declared a custom board, with 3 outputs to drive the RGB led, on the function rgb_led_status_init I initialize the 3 pins as pwmout successfully
what I haven't able to do is how to map the uint32_t rgb parameter to the pwm duty cycle of each color
The uint32_t rgb value packs 3 8bit values, then I need to extract the 8bit value of each color and map it to a 16bit value for the pwm duty cycle
Am I right?
Probably? ```python
rpwm = (rgb & 0xff0000) >> 8
gpwm = (rgb & 0x00ff00)
bpwm = (rgb & 0x0000ff) << 8
I like it
I will test it tomorrow
The least significant byte of the 16bit duty cycle value isn't considered, if I understand correctly
I'm working on a new board, think it would be reasonable to use the swo pin as a digital input? (atsamd51j20)
running cp of course
Don't you need them for the initial programming of the chip ?
yes
but it is the non-required pin... and is ladled as an io. i'm not sure if it is cp compatible
@gilded cradle ok for the orangepi r1 - dya wanna do up the guide for it in blinka
would be a near-clone of the PC one, just new fritzings i think
or if not fritzings, maybe photos
Sure. It's very similar to the existing orange pi guide
dunno if there's a fritzobj for it
yeah hmm maybe you can just add new diagrams to the existing guide then?
Ok, that would probably work better
ok cool yeah i mean, i think armbian is 99% the same
just check the I2C, SPI and UART
you can pretty much do the same tests i did, its a good way to check all the ports
Yeah, sounds good.
another one you can do after is an ODroid C1
but honestly if you end up shopping at a 'sbc store' just get one of each
i did the odroid code and half the guide
i think it just needs a last check
and at the odroid store also get an odroid go 😃 fun
Ok
I also have a Pine64 A64 SBC
@meager fog, just to verify, you meant get one of each of all the different oDroid products. Is that correct?
Hi all, updating one of my boards and it looks like the 4x & 3x libraries bundle aren't showing... clicked thru from circuitpython.org to https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20190517
@tired cloak hi there. I saw some other chatting about this earlier today....looks like it's a known issue on the Travis service side and the auto-generated bundles aren't happening correctly right now
If you go to the main releases URL (https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases) you should be able to grab a previous bundle
@sly falcon, ahh thanks, just wanted to make sure it was known!
@gilded cradle yeah get 1 of each odroid boards
i think once you get one going, the rest are very similar
@dhalbert Did you create a separate bug/enhancement issue ticket to look at the file read triggering a reload? I've just noticed even inspecting properties from the Windows Explorer GUI triggers a reload.
Ok thanks. I decided to not get the ODROID-MC1 since it was basically 4 of the ODROID-MC1 Solo with a fan.
np yeah
even tho there's a lot of boards in the odroid/orangepi family they're not very different, and at least they all use the same distro - i think armbian
which is a pretty good distro
Yeah, I've been using that on my Pine64 for a while
we added PWM sysfs support so you can use that for sure if they expose PWM pins
Ok
and we can add ADC sysfs support too for analogin, its never very good but maybe for basic pot readings itz ok
yeah
The file system of my PyPortal just got corrupted by me renaming a file as reported by chkdsk. I renamed cache.bmp to cache-iffy.bmp. That triggered a reload, of course. It's also more complicated because this is the nasa image viewer from Adafruit Learn and that makes the storage accessible and writeable. I've tried a chkdsk e: /f whilst at REPL prompt and it claims to be better now.
@hathach do you have any thoughts on which one of these would be most universal or best to implement?
is pybadge/gamer st7735r?
Yeah
thanks
@dhalbert Did you create a separate bug/enhancement issue ticket to look at the file read triggering a reload? I've just noticed even inspecting file properties (was looking at
/cache.bmpon a PyPortal) from the Windows Explorer GUI triggers a reload.
There is metadata that's written by Windows sometimes (like access times) that we can't distinguish from other writes. If you have some file monitoring, indexing, or anti-virus software on your machine, it can aggravate this. I don't thin...
micropython's actual behavior is to use the first character of sep if supplied (or... bug to be filed... a null b\x00 character if sep is empty).
related to the bug mentioned in the comment: https://github.com/adafruit/circuitpython/pull/1898
I'm not sure: did you want to submit this to circuitpython or micropython?
Looking at https://docs.python.org/3/library/binascii.html#binascii.hexlify, it appears that CPython doesn't take a second argument in any case. We aspire to be the same as "regular" Python or be a subset, not a superset, so just dropping the second argument is something we'd probably do in the long run.
it's a good question... I'm happy to make a PR removing it instead if you'd like.
I was pondering adding the feature to CPython but realistically, binascii.hexlify is redundant in CPython as bytes, memoryview, and bytearray all have a .hex() method as well as a .fromhex() method on bytes and bytearray - no legacy module function needed. If I were to add it to CPython it'd likely go on those methods.
MicroPython doesn't appear to have those. They would get rid of the nee...
note: See discussion on the other PR, we may remove this feature instead which should include removing the docs for it.
+1 To having CircuitPython work the way you'd do it in CPython. (Though it's tricky if you, @gpshead, makes it a moving target. :-P)
Here is the git voodoo I think you'd need:
- Create a new branch
git checkout -b <new branch name> - In your local CircuitPython repo:
git remote add micropython git@github.com:micropython/micropython.git - Then
git rebase -i micropython/master. It should show four commits in the prompt (same as the PR). It should rebase just fine because I don't ...
It's odd though that a properties view triggers that.
I've been trying to debug a problem with PyPortal / Adafruit IO, see https://forums.adafruit.com/viewtopic.php?f=60&t=151923. I need to be able to preserve images from the file system when it misbehaves for debug.
Years ago a colleague proposed mounting a ufs filesystem read-only from a second host concurrently. I had to explain why even that wasn't safe as there were no read locks, no memory cache coherence and worse case we could c...
Leave the old code in extmod/ so we can continue to see changes from upstream.
Leave the old code in extmod to continue to see upstream changes.
Leave old code in extmod/ so we can see upstream changes.
@gpshead If you'd like to make a PR to remove it that's fine. But another thing on the lis to do is to refactor extmod/modubinascii.c into shared-bindings and shared-module, as we've done with some other modules. It would probably make sense to leave extmod/modubinascii.c and remove the second arg as part of refactoring.
I notice we're missing issues for this refactoring, so I'll open individual ones. Added #1899 for binascii.
Is there any intention to implement this? I'd love to be able to implement a keyboard/mouse composite device in CircuitPython!
@idle owl @slender iron won't make meeting today. group hugs 2 all.
@tidal kiln Thanks!
Yes, it is high on the list of features to implement next.
@idle owl Probably won't be able to make the meeting today. I might lurk if I can. Here's my status update:
I was able to finish adding all of the location and gps-related NMEA sentences that the GPS FeatherWing supports. I was able to do a bunch of testing and I learned even more about the NMEA protocol. I put out a release for that, and was able to use the new features in a personal project I was working on. I also was able to fix a few issues, merge some PRs, and close some issues that had been left open. This week, I want to do some more testing of the MCP23008 and MCP23017 modules to make sure there aren’t any issues with the recently refactored MCP230xx library.
@trim elm Thanks! I'll add it to the notes.
@idle owl Do you think you could run the thing that updates the contributing page on the circuitpython website? Thanks
Yeah I'll do that, thanks
Thanks!
why is there only a 2.x bundle? https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20190517
am I going to the wrong spot for the CP libraries for all the adafruit goodies?
The may16th release has all 8 assets,, https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases
@swift arrow there was an issue between the CI service and GitHub, and the job failed before all bundles were deployed. It's being monitored.
I should be ok using the May16th with the latest RC though correct?
Yep.
danke!
bitte!
😃
It's funny how excited one gets when they get their first "hello world" of leds working.. the single blinking led on a breadboard. 😃
exactly! 😃
It is truly a good feeling.
So I have it working with DigitalIO.. but one should be able to control brightness if they use Analog out correct?
I'm trying to find an example but no luck so far
just using a GrandCentral, and a 10mm red LED on a breadboard with a 400 Ohm resistor.. using CP of course.
found it
<@&356864093652516868> CircuitPython Weekly starts in about 10 minutes. Everyone is welcome!
Notes are here: https://docs.google.com/document/d/1b6M-KEnnuny2x_3eZn4_ldevk-3DxdYuaHAYJ3_ZShU/edit#
@tulip sleet Thanks!
@swift arrow , for dimming a led, better use PWM : https://learn.adafruit.com/circuitpython-basics-analog-inputs-and-outputs/pulse-width-modulation-outputs
Same guide but 3 pages further
Lurking today.
Wooohooooo more blinking goodness!
hi folks! could I be removed from the circuitpython-helpers group? much as I'd like to I haven't had time to do much of anything with it in... forever, and so I keep getting pinged in the group
also hi, I hope all is well 😃
@opal elk Of course, but you're welcome to be a part of it even if you're not involved 😃
waves at @opal elk
👋 @opal elk. hope things are well!
@opal elk I removed you. Let us know if you'd ever like to be added back!
thank you! hopefully someday.
Lurking
Gonna be a little late
no, I can hear
@inland tusk Restart Discord
I'm lurking
@simple pulsar Thanks!
lurking
Crystal clear audio in London too
@inland tusk are you using the app or are in a browser?
CircuitPython Organization
Thanks @idle owl for adding me to the Github organization. In the small amount of time I’ve definitely learned a lot more Python by looking at PRs and issues. Thanks @pastel panther for the MCP230xx modules. Also, thanks to everyone who reviewed my PRs.
Never a problem @idle owl
@gilded cradle 🎉
Thanks everyone 😊
there's always time to eat 🌮s.
@meager fog 's coding skillz are in a separate, rarefied category
@pastel panther 😄
🍴
🍴 
🔱
@slender iron thank you!
@slender iron sure
Don't Ask Its Not Siddacious Yet
oooh, Super Top Secret projects
@pastel panther btw i added the SPI HW & SW to LPS as the test but yea plz do some testing
oh ok, thanks 😃
gotta drop off. brb, i hope
hardware party 🎉
Congrats Brent 🎉
YAY
Thank you!
@sly falcon Ping me directly as well and I can go through it with you.
I've been ready for a while
hurrah
Thanks Everyone
Thanks all!
👋
totally distracted... 😦 good thing it all gets recorded! 😃
@slender iron https://github.com/adafruit/adafruit-circuitpython-weekly-meeting/blob/master/2019/2019-05-20.md
raise AttributeError("abcdefghij" * 12) on my second attempt on REPL on new PyPortal (4.0.0-rc.3) reproduced bug, same place as the previous examples.
I'd be interested if others can reproduce this curiosity: https://github.com/adafruit/circuitpython/issues/1639 - just doing a few raise AttributeError("abcdefghij" * 12) on REPL will provoke it if it's going to do it
whats with the 🍴
It originates from Scott's use of the phrase "stick a fork in it" when referring to 4.0.0 rc3's readiness for GA release.
Automated website update for release 4.0.0 by AdaBot.
I've got a wireshark capture of this if that's of any use? No great revelations based on my inexpert (at USB) glance. When it behaves normally it shows a 208 byte response which I think is 27 header + 181 data. When it doesn't work there's an 80 byte response and then a 157 when user hits a key, as I hit enter an extra CRLF is appended explaining the 183 = 80-27+157-27.
oh dear.. my led stopped blinking
think I fried pwm output
it was blinking for like 30 minutes and just stopped
is there a way to tell it to stop soft rebooting?
I'm on windows 10
This fixes an OverflowError in the read_palette function.
I'm still poking to get everything uploaded. Will merge once everything is uploaded.
@slender iron I won't mess with the 4.0.x -> 4.x branch stuff until you're done, unless you're all done in github, but it should say 4.x in the pointer to readthedocs
That OverflowError is really not something that should be done in RC
4⃣ 4⃣ 4⃣ 4⃣ 4⃣
@tulip sleet I think I setup rtd for it already
I just fixed stage, but I'm afraid we might have more broken code there
@stuck elbow I'm releasing 4.0.0 now. get it into the 4.x branch and it'll go out with 4.0.1
🍀
@slender iron so 4.0.0 will have broken Stage?
we will have a 4.x branch shortly
great
I didn't know it was broken. is there an issue for it that I missed?
@slender iron can I rename the branch yet or are you still building?
I already pushed a 4.x
wawa reported it yesterday, I didn't have time to test rc4 because I was travelling
I just fixed it now
didn't have internet on the plane on sunday night, sorry
np, I'll list it as a known issue. when you are confident with it we'll do 4.0.1
I'm confident with it now
"I just fixed stage, but I'm afraid we might have more broken code there"