#circuitpython-dev

1 messages ยท Page 177 of 1

idle owl
#

It wasn't added to travis correctly.

#

Capitalisation appears to be wrong.

raven canopy
#
.. image:: https://travis-ci.org/adafruit/Adafruit_CircuitPython_L3GD20.svg?branch=master
    :target: https://travis-ci.org/adafruit/Adafruit_CircuitPython_L3GD20
    :alt: Build Status

should be this ^^^

idle owl
#

Wait yes. That.

#

Because it's in travis if you paste the repo name into the travis URL.

raven canopy
idle owl
#

Correct

raven canopy
#

the RTD part...is beyond my realm. other than it needs to be added to the circuitpython drivers list...

fading solstice
#

I will fix that, but the next thing is to get it into the Adafruit CircuitPython RTD.

raven canopy
idle owl
#

Not exactly...

raven canopy
#

hehe. and that is why i still don't understand it fully. ๐Ÿ˜„

idle owl
#

We're talking about adding the lib to RTD so it has an RTD page, correct?

raven canopy
#

yes. it doesn't have one built, best i can tell.

idle owl
#

Yes I have half a page of notes on this. It's a series of steps done on RTD.

fading solstice
#

is that something i should do (can do)?

idle owl
#

Let's find out!

#

@slender iron Is adding a lib to RTD something that @fading solstice has permissions for?

raven canopy
#

I'll hold off on approve-n-merge for the badge fix. I don't think there is anything to do in the lib repo for RTD, but just in case...

idle owl
#

Only getting the URL once it's done, but waiting is fine.

fading solstice
#

after i push the fix to my repo version, i am getting a passing from the builfd badge. but stilll unknown from the docs

idle owl
#

I think because it's not been added to RTD.

raven canopy
#

it isn't listed in the sub projects; just need to find out if adabot will/should do it after adding to drivers.rst, or if it requires addition by hand.

peak thicket
#

Hi,

manic glacierBOT
peak thicket
#

anyone flashed the latest circuitpython on a nrf52? any good results?

solar whale
#

@peak thicket yes - it works on the feather52832

slender iron
#

just ordered an odroid-go ๐Ÿ˜ƒ

ruby atlas
#

soo many things i want to order

#

@slender iron I take it 3.x is the RC branch for 3.0, and that my PR should remain against master?

raven canopy
#

vagrant ssh does not belong in this window... ๐Ÿ˜†

manic glacierBOT
#

apparently the usage storage.VfsFat is limited to the esp8266.

orts/esp8266/modules/inisetup.py:    storage.VfsFat.mkfs(bdev)
ports/esp8266/modules/inisetup.py:    vfs = storage.VfsFat(bdev)
ports/esp8266/modules/_boot.py:        vfs = storage.VfsFat(bdev)
ports/esp8266/build/frozen_mpy/inisetup.py:    storage.VfsFat.mkfs(bdev)
ports/esp8266/build/frozen_mpy/inisetup.py:    vfs = storage.VfsFat(bdev)
Binary file ports/esp8266/build/frozen_mpy/_boot.mpy matches
ports/esp8266/build/...
solar whale
#

@tulip sleet I did not realize there had been a 3.x branch -- I applied the itsybitsy m4 fix for Pins D3/D4 to master - does it also need to get applied to 3.x or will that happen at the next 3.x release.

#

The ESP8266 boot sequence is making my head hurt ๐Ÿ”จ

tulip sleet
#

@solar whale I'll look at the ESP8266 problems tomorrow. Don't worry too much for now. I'll cherry-pick the D3/D4 fix over to 3.x.

solar whale
#

@tulip sleet thanks - I mades ome progress - posted to the issue, but I'm stuck now. Glad to leave it to you.! Good luck.

raven canopy
#

i was reading what you were finding @solar whale. it seems to me that the esp was never expected to have the FS locked. otherwise, ampy wouldn't have worked anyway. right?

tulip sleet
#

any esp8266 fix will go into 3.x and I'll merge it back to master

solar whale
#

@raven canopy I think so, but I can't figure out where it gets locked.

raven canopy
#

i think it's the updated boot_out stuff. unless i misunderstand the changes you made there @tulip sleet?

solar whale
#

but also one of the recent commits caused FS to appear corrupted.

#

but taht is in main.py at root/ esp8266 does not use that .

raven canopy
#

right, based on the bdev not being empty, in inisetup.py.

manic glacierBOT
raven canopy
#

oh yeah...argh! too many thoughts and material at once. ๐Ÿ˜„

solar whale
#

but the bdev seems to be the problem - or at least it is related. I think the FS is never getting mounted since it fails in _boot.py

raven canopy
#

but why are we now hitting that is the caper...

solar whale
#

Thats's where I have been looking -- but hard to see why it would fail

raven canopy
#

if only we had some debug tools... ๐Ÿ˜„

solar whale
#

all that stuff is unique to esp8266 .

#

It was working 6 days ago!

tulip sleet
#

aha, I know the problem, I think, thanks for the pointer to that file. readblocks() and writeblocks() need to return a status. I am now looking for a return code. Formerly it didn't check for errors. We need to add return 0 to the end of each of those rooutines

#

there was a TODO lemme find that

#

extmod/vfs_fat_diskio.c diskread():

        mp_call_method_n_kw(2, 0, vfs->readblocks);
        // TODO handle error return

this used to be true, so I handled the error return, but it turns out a number of file system impls were not bothering to return any status. I had to fix the tests where a toy filesystem was not, for instance.

#

Is it easy for you to add the two return 0 lines and test? That is probably the problem.

solar whale
#

I'll give it a try

raven canopy
#

readies Captain Planet ring
With our powers combined... ๐Ÿ˜„ ๐ŸŒŽ

#

this unsigned math -> MP_NEW_SMALL_INT thing is driving me batty. I don't get it... I see it used successfully elsewhere, my sign bits aren't changing (that i can tell), and the 1 deep ring buffer is functioning correctly so I shouldn't be over/underflowing.

solar whale
#

first try did not work, but I had done some reverts -- unrevrting so only change is to flashbdev.py

#

nope back to corrupted FS when I put the removed commits back. ```erryneedell@Ubuntu-Macmini:~/projects/adafruit_github/circuitpython_master/ports/esp8266$ git diff
diff --git a/ports/esp8266/modules/flashbdev.py b/ports/esp8266/modules/flashbdev.py
index 40ba655..da4194b 100644
--- a/ports/esp8266/modules/flashbdev.py
+++ b/ports/esp8266/modules/flashbdev.py
@@ -13,12 +13,14 @@ class FlashBdev:
def readblocks(self, n, buf):
#print("readblocks(%s, %x(%d))" % (n, id(buf), len(buf)))
esp.flash_read((n + self.START_SEC) * self.SEC_SIZE, buf)

  •    return 0
    

    def writeblocks(self, n, buf):
    #print("writeblocks(%s, %x(%d))" % (n, id(buf), len(buf)))
    #assert len(buf) <= self.SEC_SIZE, len(buf)
    esp.flash_erase(n + self.START_SEC)
    esp.flash_write((n + self.START_SEC) * self.SEC_SIZE, buf)

  •    return 0
    

    def ioctl(self, op, arg):
    #print("ioctl(%d, %r)" % (op, arg))

tulip sleet
#

it's also possible it's forbidding '/' to be mounted on '/', though it's supposed to handle that. All right, enough for tonight.

#

I think there may be multiple issues.

solar whale
#

agreed -- good night -- and good luck !!

raven canopy
#

night all!

tulip sleet
#

so says Edward R. Murrow...

raven canopy
#

admits: had to look him up. but i know after the catchphrase. ๐Ÿ˜„

#

ok. time to turn the brain off... ๐Ÿคค

timber mango
indigo wedge
manic glacierBOT
#

@dhalbert just to recap what we tried last night. I modified flashbdev.py to return 0 for readblocks/writeblocks. With only that change I once again was getting the "corrupted FS" on boot.
If I remove the commit https://github.com/adafruit/circuitpython/commit/f15288993875360dcc2c62b86110ea3c748ee267 thnen I can get past the previous errors in _boot.py but it is still not working correctly.
os.listdir() gives a long string of odd results:

Adafruit CircuitPython 3.0.0-rc.0-4-g5fb4cdc-...
solar whale
#

but it looks like you are going straight to the 4 wires.

indigo wedge
#

Yes, I wanted a 4-wire one, oh well, no worries

tulip sleet
#

@slender iron Did not mean to merge this PR without your review: something odd happened when I thought I was pushing to my local repo, and the PR got merged. But it doesn't really matter. This was just cherry-picking a fix from master that's known to work. https://github.com/adafruit/circuitpython/pull/952

tulip sleet
#

@solar whale are you available to test an esp8266 fix?

marble hornet
#

does anyone have a suggested smd button with nice click (tactile or not)? the one i choose seems to be crappy. many thanks either way.

solar whale
#

@tulip sleet not until about 4 PM

marble hornet
#

it kinda shorts out / messes with the reset and ground rail

tulip sleet
#

I have a fix for the esp8266 problem. The fix allows '/' to be mounted on '/'. with the fix, ampy works fine and no errors on startup.

solar whale
tulip sleet
#

The esp8266 startup appears to mount a '/' twice instead of just once.

marble hornet
#

thanks!

tulip sleet
#

once is in code that isn't error-checked, and once is in the startup .py code, which I added a check for.

#

I'll submit a PR

solar whale
#

@tulip sleet nice - I'll be happy to try it but is sounds like it is working well. Thanks!

tulip sleet
#

also I reworked the error checking so the return 0s aren't necessary: a filesystem impl can return None or 0 on success. Any other return is an error. Not important to you but there might be other ports where there's no status return.

#

k, tnx, ttyl

manic glacierBOT
#

Allow mounting '/' on '/'. This was done in C code in atmel-samd, but esp8266 does it in Python code, which fell afoul of #935.

Also relaxes requirement that filesystem operations readblocks() and writeblocks() return 0 on success. They can return None or 0. Any other return is considered to be an error status code.

@jerryneedell may test this afternoon after 4pm ET.

Fixes #947.

tulip sleet
#

@slender iron increased GitHub branch protection for 3.x branch - made it same as 2.x.

indigo wedge
#

Hey @tulip sleet could you have a look at my nRF patch when you get some time, I know it's rather large but if you go commit by commit then it's pretty clean I think ๐Ÿ˜ƒ Thanks!

tulip sleet
#

@indigo wedge sure, one or more of us will. I have not done any nRF work yet so Scott, hathach and I will work out who reviews what.

wraith tiger
#

Has anyone asked the PSF to list CircuitPython on https://www.python.org/download/alternatives/?

plucky flint
#

@wraith tiger you can submit an issue to the PSF's web team. I believe the repository is on GitHub (but I don't have it to hand). If nothing comes of it, I know one of the maintainers and can give him a kick if there needs to be movement.

slender iron
#

@tulip sleet Thanks for the fixes. No worries on my end about the merged PR. I've been heads down on this gaming stuff though I want to get caught up today

#

@ruby atlas yup, you should target master

timber mango
#

I am using several adafruit feather boards in ubuntu and all works fine when I am running as the logged in user, with the CIRCUITPY device mounted at /media/<user>/CIRCUITPY. However, I need to copy files to the device to run code from inside jenkins. So - can I modify the mount point in fstab so the device is available to eveyone, or can I modify the group permissions for the device mounted at /media/<user>/CIRCUITPY so jenkins can write the code.py file to it ?

slender iron
#

@timber mango I imagine it would require a change to udev rules. I don't know the details though

#

probably the same as other USB drives

timber mango
#

tannewt - I have the adafruit udev rules already setup - the issue is the way ubuntu now automounts all usb devices to /media/<user> and the permissions that are set by default. I am having trouble finding a decent reference online that shows how to change the permissions for the group. I 'fixed' a similar issue for the second hard drive in my linux system by having it mounted via fstab and not in the media folder. I will keep looking as it should be a straight up permissions edited (but I have not found the correct way to do that yet - the joys of open source)

analog folio
#

could I get some pointers on a Python issue in having here?

slender iron
#

@analog folio ask away

solar whale
slender iron
#

thanks @timber mango

#

oops ๐Ÿ˜ƒ

#

thanks @solar whale

solar whale
#

just posted it to the forum

slender iron
#

haha, I did too

solar whale
#

good - mine got blocked by yours -- all good

tidal kiln
wraith tiger
manic glacierBOT
solar whale
#

@tulip sleet @raven canopy can you point me to some information, or give a brief explanation of waht this funtion is doing MP_OBJ_SMALL_INT_VALUE(ret) it seems to be a hot topic these days...

manic glacierBOT
solar whale
#

it look like it just divides by 4

tulip sleet
#

@solar whale it is a macro that converts from object representation to a regular integer

#

#define MP_OBJ_SMALL_INT_VALUE(o) (((mp_int_t)(o)) >> 1)

solar whale
#

oh - I picekd the wrong one to look at

tulip sleet
#

32-bit values can be object pointers, interned string pointers, ints, or floats. The lower 1 or 2 bits indicate the kind of value.

#

if the lowest bit is set, the upper 31 bits are an integer

solar whale
#

static inline bool MP_OBJ_IS_SMALL_INT(mp_const_obj_t o)
    { return ((((mp_int_t)(o)) & 1) != 0); }
#define MP_OBJ_SMALL_INT_VALUE(o) (((mp_int_t)(o)) >> 1)
#

OK thanks --- fog is lifting.

#

How do you know if it is REPR_A/B/C/D ?

tulip sleet
#

If the lower two bits are such and such, it's a float, etc.

#

repr choice is in mpconfigport.h, probably

#

yes, ok, it's REPR_C, chosen in ports/atmel-samd/mpconfigport.h

solar whale
#

ah - thanks

#

also in ports/esp8266/mpconfigport.h ๐Ÿ˜‰

#

and I thought I could read C programs ....

tulip sleet
#

I use ag a lot.

manic glacierBOT
solar whale
#

installing ag now!

#

much nicer than grep .... thanks

raven canopy
#

@solar whale thanks for joining me in MP_OBJ_NEW_SMALL_INT land! ๐Ÿ˜† i'm about to try mp_obj_new_int_from_uint() to try and confirm that i am somehow sending an incompatible uint...

manic glacierBOT
#

I'm getting a problem trying to upgrade a metro m0 express from CircuitPython 2.3.1 to 3.0. I'm using a PC with windows 10 - I switch to the boot drive mode and copy the 3.0.0-rc.0.uf2 file from github into it. As the .uf2 file is copying to the board the PC locks-up (mouse and keyboard unresponsive). The board reboots but PC remains locked. If I reset the board the PC unlocks briefly then locks-up again. When I unplug the board's USB cable the PC unlocks, when I plug the cable back in again ...

slender iron
#

@fading solstice did you get the RTD stuff sorted?

manic glacierBOT
raven canopy
#

@slender iron i don't think so. we left off at "how does the RTD build get triggered/created"...

slender iron
#

the RTD project is created manually (usually by me). the builds get triggered through a github webhook (also set up manually)

raven canopy
#

ok. so those need to happen. along with drivers.rst being updated.

slender iron
#

yup

raven canopy
#

i'll approve and merge the Travis badge fix PR, if it doesn't affect any of that.

#

ohh. nevermind. you did that. 7 minutes ago... ๐Ÿ˜†

manic glacierBOT
manic glacierBOT
slender iron
#

๐Ÿ˜„

timber mango
#

Is there a good visualization tool for git that can run on the local Linux machine I'm editing on? I want to see the diffs before I push commits to a branch.
This way I keep the edit history a bit more tidy, when other folks look at the code on github.

raven canopy
#

i'm thinking about tonym01's uf2 update lockup issue. kind of easy to blame the PC, but i'm wondering if it could be an older version of the bootloader that is giving them fits. this is an issue that is "close", but the symptoms don't exactly match: https://github.com/Microsoft/uf2-samdx1/issues/30

also, having them update would kind of erase the "evidence" they currently have. is there a way we can get a dump of the installed uf2?

manic glacierBOT
tulip sleet
#

@timber mango I use gitk. There's also git-gui.

timber mango
#

The following NEW packages will be installed: git-gui gitk libtcl8.6 libtk8.6 tcl tcl8.6 tk tk8.6 0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. Need to get 3,415 kB of archives. After this operation, 9,798 kB of additional disk space will be used.
@tulip sleet thanks! I found those while waiting for a reply here, so they're about to be installed. Good to know you like to use them!

tulip sleet
#

@raven canopy Since it locks up based on the CPy version, I'm not sure how the UF2 bootloader would be implicated. I just got my Win10 machine back after my wife borrowed it this afternoon, so I'll try this too.

#

@timber mango another harder q is what tool to use if there's a merge conflict (you probably won't encounter that), il.e. what git mergetool uses. I use kdiff3.

raven canopy
#

@tulip sleet fair point. the main reason i was thinking bootloader is because in boot mode it is the one setting the USB descriptors. I am tempted to help them with the microsoft USB diagnostic tool that I used with serial paste mode. but it isn't easy to read/find info...

tulip sleet
#

When tonym01 says the mouse and keyboard are unresponsive, I am wondering if it's the HID descriptors that 3.0 presents, which are more complicated than the 2.3.1 descriptors.

#

3.0 has mouse, keyboard, gamepad, and consumer control all rolled up. Or, it could be a disk mounting issue. I've seen third-party software get confused

raven canopy
#

yeah. the "unlocks/locks on reset" would support that. the original lockup description doesn't clearly state if it locks after the copy is complete, or before.

tulip sleet
#

ok, I can't duplicate. I'll have them erase the filesystem and see if it's some peculiarity there.

ruby atlas
#

@tulip sleet "mouse and keyboard are unresponsive" I get that when I crash CP.

#

Or am running the JLink

#

I'm not sure if it's HID or Mass Storage causing it. Mass storage usually disconnects shortly after that

tulip sleet
#

does it recover after a little while or do you have to unplug the board?

ruby atlas
#

it does recover (this is a Mac), but stalls intermittently until I unplug the board.

tulip sleet
#

The stalling may be that's it's upset about the mass storage being disconnected. @slender iron have you seen anything like this on your Mac?

manic glacierBOT
#

Hi - I tried this on a Windows 10 machine also running 1803 and was unable to duplicate the problem.
A couple of ideas:

  1. There's a small possibility something about the filesystem is confusing Windows. Copy 2.3.1 back on the board. Then copy off any files you want to keep from CIRCUITPY. Then in the REPL, do:
import storage
storage.erase_filesystem()

That will erase CIRCUITPY. Then reload 3.0.0-rc.0 and see if you get the same hang.

  1. Do you have any third-party disk-i...
ruby atlas
#

@tulip sleet i suppose I should probably watch my logs sometime.

#

When working with the JLink next, since I can simulate a hang that way.

tulip sleet
#

yes, whatever the equivalent of syslog is would be interesting

ruby atlas
#

Console ๐Ÿ˜ƒ

#

Turns out it's still syslog: $ ps ax | grep syslog 50 ?? Ss 0:39.08 /usr/sbin/syslogd

tulip sleet
#

tail -f /var/log/syslog ?

ruby atlas
#

I would have expected Apple to replace that with something custom by now.

tulip sleet
#

probably somewhere else

ruby atlas
#

tail -f /var/log/system.log and a few others.

#

but Console app is better for a more overall view of all the logs, as it's likely not in the system.log

tulip sleet
#

I am not a heavy Mac user - I have an old one for cross-platform testing only.

ruby atlas
#

Ah.

slender iron
#

I haven't seen the issue @tulip sleet

ruby atlas
#

Let me go read the issue.

#

Wow that's kinda ugly, way worse than the brief USB HID issues I feel when using JLink debugging (or crash CP) - 1-2 second HID device hang before the drive is ejected.

#

It's a bit worse on my desktop mac than my 2016 macbook pro.

#

my desktop mac isn't using official apple hardware.

timber mango
#

@tulip sleet how do you scroll the lower left window in gitk?
It's showing a DIFF.

The keyboard arrow keypresses do not scroll this window (unshifted, anyway).
Instead, they select the previous or next commit.

(The mouse scrollbar there does scroll the DIFF, but is difficult for me to operate.)

tulip sleet
#

it scrolls automatically as you scroll the lower right window, or select files in there. It's not that great: it's just all the file diffs concatenated together

#

oh, you mean if the diff is taller than the window?

timber mango
#

I use huge fonts so the diff is never going to fit inside the window -- I have to scroll it.

tulip sleet
#

i just move my mouse into the lower left subwindow and use the scroll wheel, and it is scrolling

timber mango
#

Okay got that. I can do an analogous thing with my trackpad. Thank you.

tulip sleet
#

or drag that subwindow's scroll bar

timber mango
#

Scroll bars require better vision to be useful. They are strongly visually-biased widgets. ;)

#

The Help has keybindings; This is Very Linuxy.
u is up and d is down.
The increment is 18 lines and doesn't seem to be configurable, but maybe it is.

#

It also binds Ctrl Minus and Ctrl Plus to font decrease/increase.
Seems to function somewhat like a $PAGER. Not too bad.
Definitely ahead of where I was, two hours ago.

frosty bison
#

I have a question about mpy-cross. Is the original micropython mpy-cross output compatible with circuitpython? Or do I have to use the circuitpython fork of it? There's a binary available for micropython, but not circuitpython from what I can find. And no instructions provided to build circuitpython on Windows 7 which would probably be a pain anyway.

solar whale
#

@frosty bison what version of Circuitpython are you using -- there is a different version of mpy-cross for 2.x from 3.x

frosty bison
#

@solar whale adafruit-circuitpython-trinket_m0-2.3.1.uf2 is what I'm running on my Trinket M0

timber mango
#

There's a windows .EXE there

frosty bison
#

Perfect, I think I've got it from there, thanks for the quick reply

solar whale
#

not sure if it is windows 10 or 7 or possibly both...

#

@slender iron @tulip sleet I don't see a CP3.0 mpy-cross with the 3.0 releases - am I just not seeing it?

frosty bison
slender iron
#

@solar whale its on older ones but I'm bad at copying it over

ruby atlas
#

should we be renaming mpy-cross for 3.x builds to mpy-cross-3.0 and 3.1 and so on?

#

I have run into a few cases where I needed more than one mpy-cross version.

wraith tiger
solar whale
#

so far - I have only found a windows version back with 3.0 alpha 6 -- I guess it has not been a problem - yet...

timber mango
#

This gitk visualization of the diff gives me a chance to almost be sober (hah) in how I approach this (I have sweeping changes to make in my code base, which I inherited and disagreed with the old method of representing the code in very looong files).

#

(insert a few words and joining concepts there, some'eres)

manic glacierBOT
raven canopy
slender iron
#

take a look in the SAMD51 datasheet under electrical characteristics

#

its got a list of input GCLK limits for peripherals

raven canopy
#

kk. thanks!

tulip sleet
#

@ruby atlas @solar whale any 3.0 mpy-cross will work. I need to gather them together and add them to the release.

ruby atlas
ruby lake
#

is there a preferred way to use an equate or define for a value without comitting it to a variable?

#

something like #define noteD 1 in C code

stuck elbow
#

you can do _variable = const(5), but it will only be available in the one file in which you put it

manic glacierBOT
tulip sleet
onyx hinge
#

#954 is sure a weird issue

stuck elbow
#

windows ๐Ÿคท

tulip sleet
#

@slender iron q re what's created on imports: I have a .py that's just a couple dozen FOO = const(123) sort of lines. The .mpy is only about 600 bytes. When imported either as import foo or from foo import *, about 3k bytes gets used up, which seems kinds of excessive to me. What's your intuition here? Is it the dict and the pointers in the dict? How sparse is the dict? Perhaps I should use your heap analysis script. I wonder if there's some way to shrink that down significantly.

#

hmm, if I import just a single name: from foo import FOO, it still uses up 3k bytes, so it's not just the global name dict

stuck elbow
#

the variable name has to start with _ to save memory

#

otherwise it's added into the dict anyways

#

because it has to be available from the outside

river quest
#
Adafruit Industries - Makers, hackers, artists, designers and engineers!

Hi! Makers, hackers, artists, engineers, community members! We are celebrating 1 YEAR, that is ONE YEAR, since we started the Adafruit Discord server! As of right now, there are: 6,649 members. Of โ€ฆ

manic glacierBOT
wraith tiger
#

@ruby atlas I had something like that, but I think mine was from Radio Shack.

slender iron
#

@tulip sleet It could be qstr pool related. probably good to get you running the heap script. it could be a long lived leak as well causing duplicates

#

in your example FOO still refers to its namespace so all of the other names are still in its dictionary

prime flower
tulip sleet
#

tnx to you and deshipu for that point. I am going to try one-name .py files as well, which seem to use up too much space. Will come up with an example.

wraith tiger
#

Cool. Am i internet famous yet? ๐Ÿ˜

slender iron
tulip sleet
#

@slender iron ok perhaps not as bad as I thought. It seems like the first import of any non-builtin .mpy uses up about 3k bytes of overhead, perhaps setting up initial dicts. After that it grows more slowly and in proportion to the .mpy file size. I think I was thrown off by a 4k buffer alloc sometimes happening due to the filesystem, which made it seem like each import was at least 3k. (I had semi-duplicated the file and imported it twice under different names).

slender iron
#

ya. I'm going to get my gaming rig setup to do more heap captures and render them

bronze geyser
#

I was wondering how hard would it be for me to add to an m0 Circuit Python: 1) go to sleep. Wake up when motion detected 2) go to sleep. Wake up at 4AM. to circuit python. These are the two features stopping me from using CircuitPython for my sensor projects. Any advice?

prime flower
#

@slender iron you got a quick plug for the Seattle 3h meetup on Amp Hour. Episode 397.2

bronze geyser
#

@prime flower I'm enjoying Chris's short interview of folks. Makes me feel like I'm camping along with them.

slender iron
#

@prime flower yay! I'm hoping I get the experience by meeting folks there

prime flower
#

ha, absolutely agree, but replace "camping" with sailing as he's doing the latest ones on a sloop

slender iron
#

@bronze geyser we don't support sleep yet ๐Ÿ˜•

prime flower
#

hrm I should start a NYC one, but we already have NYCResistor

#

there's BarSec but that's not hardware, that's infosec

bronze geyser
#

@tennewt could i figure out how to write a c module that gets into standby? Then i need to be able to attach an interrupt.?

tulip sleet
#

which could be used to completely power off and power on the board running CircuitPython

slender iron
#

@bronze geyser yeah adding a module makes sense. I want time.sleep to be smart too but it would be time based

bronze geyser
#

@tulip sleet Thank you. i will look into that.

tulip sleet
#

The enable-pin one can control the EN pin on a Feather, etc., which is basically an on/off switch that disables/enables the regulator.

bronze geyser
#

@slender iron so i wanna see how hard it is to write a module for circuit python. i realize i should just jump in...but in case you have any "getting started" advice?

slender iron
tulip sleet
#

best way is to look at an existing module and just copy its style

bronze geyser
#

@slender iron @tulip sleet Thank you.

manic glacierBOT
fading solstice
#

@raven canopy i still don't see a document in RTD for the l3gd20 library. Do i need to ask Scott to do somehting?

ruby lake
#

@tulip sleet thanks, I'll have a look

manic glacierBOT
#

@tannewt et al: what do you think about adding PWMOut.duty_cycle_fraction, which will allow a simpler way of setting a fractional duty cycle. it would be mplemented as int(fraction * 65535) plus range checking. So the end user doesn't need to remember 65535.

Similar functionality proposed in #85, but that was time-based rather than fraction. So maybe this has been sort of decided already.

marble hornet
#

hey, so I just got back and soldered some headers onto the board i made. and it doesn't show at all.

#

i tried reflashing the uf2 bootloader but am getting a 'can't halt cpu error'

stuck elbow
#

did you measure the voltages?

marble hornet
#

yes

#

it all checks out

#

i even replaced the reset resistor!

#

which was shorting

#

i am trying h, r, r0, rx etc

#

i have power cycled multiple times

manic glacierBOT
marble hornet
#

and it started working randomly

#

thanks for being willing to help though

manic glacierBOT
stuck elbow
#

probably bad solder somewhere

marble hornet
#

did 3.0 get released? 3.x?

stuck elbow
#

I think we are at candidate 1

marble hornet
#

i have local brach that i want to update the changes from it: git fetch https://github.com/adafruit/circuitpython.git?

slender iron
#

@fading solstice I'll set it up now

raven canopy
#

@marble hornet the "cannot halt" happens to me occasionally. usually takes a few unplug cycles, then it starts working again. gremlins are ornery...

marble hornet
#

hey, i think there is a problem with the current master. but it might just be me: i tried:Jonahs-MacBook-Pro:atmel-samd jonahy-m$ make BOARD=feather_m4_express Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity. make: *** No rule to make target `peripherals/samd/clocks.c', needed by `build-feather_m4_express/genhdr/qstr.i.last'. Stop..

#

probably me mis-using git

raven canopy
#

you need to do git submodule update --init --recursive after cloning or updating.

marble hornet
#

and that does?

stuck elbow
#

it updates the subrepos

raven canopy
#

the samd peripherals were moved out so they can be used by makecode in the future

marble hornet
#

okay

raven canopy
#

if you look on github, you'll see that folders like peripherals and asf4 are links to separate repos, within the repo. these are known as submodules in git.

marble hornet
#

i noticed it takes longer to compile now, just size?

raven canopy
#

i haven't noticed any real increase in compile time. were you using make clean each time before? compiling on an existing build folder (without 'clean') skips the QSTR creation part of the compile.

marble hornet
#

i made a separate board

#

so clean i think

raven canopy
#

yeah, the first build would be the same as clean. any builds after that without clean will go faster. but building fresh is highly encouraged when changing the firmware.

#

@slender iron @idle owl should we do another release for @fading solstice's L3GD20 library since the badge fix and RTD addition?

idle owl
#

@raven canopy Releases really only matter with code changes, things that would affect the library usage in the bundle. We can probably wait on making another release, and then include those changes in the next release following a code change.

raven canopy
#

๐Ÿ‘ i was thinking more along the lines of asking adabot to use the most recent tag in the bundle and trigger the RTD build. The RTD project is there, but still hasn't been built (returns "does not exist").

#

would updating the tag on the last release work?

idle owl
#

That I'm unsure of.

wraith tiger
#

Well, I've completed my uflash hacking (apart from any further changes ntoll might request).

fading solstice
#

@idle owl @raven canopy Adabot did run last night after my changes were merged. I think we need to make a release to see the RTD generated and available

manic glacierBOT
ruby atlas
#

I did some poking around with dotstars last night. it shouldn't be too hard to add dotstar features to pixelbuf without significant changes.

raven canopy
#

@slender iron nice! is the artifacting code or recording related?

slender iron
#

code

#

๐Ÿ˜ฆ

#

it just emphasizes its beta ๐Ÿ˜ƒ

raven canopy
#

this is a no-judgement zone. the code will get there... ๐Ÿ˜„

slender iron
#

Yup! It wasn't even playable until last night

#

turns out the game is much easier slowed down ๐Ÿ˜ƒ

raven canopy
#

like the slo-mo bomb on smash bros! ๐Ÿ˜†

idle owl
#

@slender iron That's great!

marble hornet
#

i found a mistake in the amg88xx code and have cloned and corrected the issue, but i cant google well enough to figure out how to set up my local as a sperate branch and use the branch to pull. could someone give me some help please

raven canopy
#

did you fork the repo?

marble hornet
#

no

#

does a branch not work?

raven canopy
#

start by doing that, then clone that repo locally.

marble hornet
#

forking...

#

cloning...

#

done

raven canopy
#

Step 1: In the adafruit clone, type git remote add tg_techie https://github.com/tg-techie/Adafruit_CircuitPython_AMG88XX.git (replace tg-techie references as necessary/desired).

marble hornet
#

remote add?

raven canopy
#

yep. it will make sense in a few. did you commit your changes yet?

marble hornet
#

yes

raven canopy
#

ok

marble hornet
#

done

raven canopy
#

Step 2: in the adafruit clone, type git push <tg_techie> <branch_name>. that will push your local changes to your fork

marble hornet
#

so i also need to clone the adafruit one?

raven canopy
#

i thought you did?

marble hornet
#

i cloned mine

raven canopy
#

"i found a mistake in the amg88xx code and have cloned and corrected the issue"

where are the changes you made?

in a local copy of adafruit_circuitpython_amg88xx (git clone http://github.com/adafruit/), or in a local copy of your fork (git clone http://github.com/tg-techie)?

marble hornet
#

i corrected line 45:

#

in my own fork

raven canopy
#

ok. so you already had forked it.

marble hornet
#

no, but i did when asked

#

either way

raven canopy
#

yep. moving on. ๐Ÿ˜„

marble hornet
#

ah, so now i have a fork it pull requests it automatically! thanks

raven canopy
#

๐Ÿ‘

#

git/github exist in a magical, mysterious land. at least, it usually seems like it. ๐Ÿ˜„

idle owl
#

Not for long! keeps working furiously on the guide

marble hornet
#

yah its like what chips and electronics were to me two years ago! ** preemptive hug report **

umbral dagger
#

Like 3d design & printing were to me 6 months ago.

ruby atlas
#

closer to 9 months ago for the 3d printing for me ๐Ÿ˜ƒ

#

git is something I migrated to like ... uh... (checks resume) 11-12 years ago

#

oh wow, so before github

#

neopixels still happy ๐Ÿ˜ƒ

plucky flint
#

@slender iron wow... that's wonderful to see... am I right in assuming there's something akin to the PyGameZero API going to be available..? #leekandpotatosoup ๐Ÿ˜‰

marble hornet
#

hey, my m4 based board stopped working . it can boot into metrom4boot but circuitpy doesn't show up

#

so i am using a different storage chip but it was already supported by circuit python. and it just stopped after being unplugged.

#

are there any cases or known things like this?

#

all the voltages check out

stuck elbow
#

tried with an earlier version?

umbral dagger
#

@ruby atlas I'm not sure when I started using git. Probably in the early days of rSpec, since we started by using Mercurial for it before switching to git. That would have been ~13 years ago I guess. My github user id is 2020. I think that's from before they opened to the public.

marble hornet
#

@stuck elbow , i will

#

try that

timber mango
#

.oO(The doctor tells me I have been using git every day, often for hours at a time, but I have no memory of it.)

#

tgtech try out gitk

marble hornet
#

how can you clone a previous commit or branch

timber mango
#

each commit has an sha256sum (or similar checksum).
They can be identified by citing enough of it to make it a unique citation.

marble hornet
#

what is this magic?

stuck elbow
#

they are also tagged

timber mango
#

what operating system are you using?

stuck elbow
#

so you can clone an older release tag

#

just type git checkout and press tab to see what you have there...

#

@timber mango isn't that a personal question? ;-)

timber mango
#

haha @stuck elbow indeed.

#

worse, it's a profiling question, as asked.

#

Still,it is a mistake not to tell the blind barber how tall you are.

marble hornet
#

๐Ÿ˜•

timber mango
#

No offence meant to the blind, the tall, the barber, and users of the words 'still' 'mistake' and especially, 'the'.

solar whale
#

or the word offense ๐Ÿ˜‰

timber mango
#

(it's an Irish fence)

solar whale
#

gitk is nice -- a bit overwhelming

timber mango
#

The keybindings are (ah..) key .. to its enjoyment. It's very linuxy.

#

vi keybindings j and k are useful. u and d are as well.

#

What I like about github is that it does syntax coloring inside the context of a diff, whereas that's beyond the scope of what gitk can render (it has to work with the tcl/tk libraries).

marble hornet
#

okay so i have an old version download locally but am getting an error! ahh. let me do some googling.

timber mango
#
 $ head -4 /usr/bin/gitk 
#!/bin/sh
# Tcl ignores the next line -*- tcl -*- \
exec wish "$0" -- "$@"

 $ wc -l /usr/bin/gitk
12385 /usr/bin/gitk
solar whale
#

@marble hornet depending on how far back you went, you may have to restore the submodules - git submodule update --init --recursive I do this as a matter of habit every time I clone.

timber mango
#
 $ cat -n /usr/bin/gitk |egrep 18|egrep bind|sed 3q|egrep -v ous
  2560      bindkey d "$ctext yview scroll 18 units"
  2561      bindkey u "$ctext yview scroll -18 units"
#

Shouldn't be difficult to customize gitk quite a bit.

solar whale
#

or break it ๐Ÿ˜‰

timber mango
#

Hehe. It doesn't have write privileges, afaik. I hope not

#

This is pretty amazing that someone wrote an app of this size in tcl.

marble hornet
#

it takes me minutes to compile, hbu?

timber mango
#

about 138 seconds for circuit python

solar whale
#

depends on the BOARD

timber mango
#

Fri 15 Jun 22:29:10 UTC 2018 Fri 15 Jun 22:26:52 UTC 2018

#

end and begin timestamps during a compile.

solar whale
#

but I just built Metro M4 express -- took about 138 sec ๐Ÿ˜‰

marble hornet
#

i'm like 4+ minutes into a pocket now video and it still isn't done (i started video after starting compile)

#

it didn't work

solar whale
#

Are you watching the video on the machine doing the compiling?

#

what failed?

marble hornet
#

no i am not

#

and the file system still isn;t apearing

solar whale
#

so the compile succeeded - can you get to REPL

marble hornet
#

it isn't registering in the list of devices

#

so cir-py usb error?

solar whale
#

well - I hate to suggest it, but sometimes USB gets confused on my host system after failed connections - Have you tried rebooting host?

marble hornet
#

๐Ÿคฆ 1st rule

#

c u soon

#

still vanished

raven canopy
#

dmesg is available on Mac, yes? since i don't use it, i always forget the *nix commands that are still around...

solar whale
#

yes -- you need to do sudo dmesg

marble hornet
#

it is on many unix like operating systems

#

wow thats a LOT of text

solar whale
#

but it give a lot of info! hard to find what you want

raven canopy
#

can't you filter it? or is that a grep practice? (i rarely used grep when i spent more time in linux)

stuck elbow
#

in practice you only look at the last few messages anyways

#

I bet in the end it turns out to be something like a broken cable ;-)

solar whale
#

it just taht macOS seems to write a lot more to it that linux

marble hornet
#

i though linux wasn't unix based

stuck elbow
#

it is

raven canopy
#

Minix, IIRC.

stuck elbow
#

no, minix is what you have in the intel management module on your cpu ;-)

raven canopy
#

oh yeah. so many "based on" lore, these days. ๐Ÿ˜„

stuck elbow
#

what we usually call linux is the linux kernel plus gnu tools, and "gnu" stands for "gnu is not unix"

raven canopy
#

for the record, I run an AMD...

stuck elbow
#

but the whole thing is very much based on the unix philosophy

#

at least it was, until systemd came

marble hornet
#

systemd ?

stuck elbow
#

the service that runs all other services on linux

raven canopy
#

it was not a well received addition, from what i've read.

stuck elbow
#

it's an ugly monolithic blob

#

very much against the unix philosophy of doing one thing and doing it well

raven canopy
#

definitely more akin to windows (service host)...

stuck elbow
#

and ios

solar whale
#

now you are just being mean ๐Ÿ˜‰

raven canopy
#

lol. it wasn't meant that way. i don't partake in the L vs W vs M game. I can respect each for what they do and achieve.

solar whale
#

I just added a chromebook to my collection -- so many ways to get confused ....

raven canopy
#

@marble hornet did dmesg give you any hints as to why it won't mount?

#

i thought about a Chromebook, but couldn't justify any use case.

#

that price point is nice though.

wraith tiger
#

@solar whale An upcoming (no word on when) update to Chrome OS will add Wayland and a virtual machine running Debian Stretch so that linux apps will run on a Chromebook. It may not be compatible with all Chromebooks, though.

solar whale
#

@wraith tiger nice! I am having fun exploring what is /is not supported -- too many apps - so little time ๐Ÿ˜‰

wraith tiger
#

Linux is a Unix "work-alike" based on the concepts of Unix, but not the code.

#

I've been playing a bit with an HP chromebook. It's nice that android apps are now supported, but it will beceom much more usefull when there is linux app support.

marble hornet
#

if the error happened after i unplugged it could the bootloader have been corrupted in the section that executes the uf2 but not the one that updates the firmware?

wraith tiger
#

It is possible to run linux natively on a chromebook, either by replacing Chrome OS or by adding dual boot.

#

Some chromebooks have upgradable storage, but they seem somewhat rare and are pricier.

#

Linus Torvalds was a Minix hacker before he started Linux, so that's where the Minix connection comes in.

marble hornet
#

it magically started working!!!!!!!!!!!!!!! WHAT!

solar whale
#

ruh- roh

marble hornet
#

ha-ha

#

all i did was plug in the jlink

#

What trickery is this? bit and byte peek-a-bOO?

raven canopy
#

have you burned the bootloader onto it? (can't remember if we covered that)

marble hornet
#

we did, with the help of @solar whale

raven canopy
#

k. so much for "easy answers". ๐Ÿ˜†

marble hornet
#

๐Ÿคฆ

sharp rain
#

So I made a python sprite class for animating neopixel strips from BMP files, someone told me Roy might be interested. https://forums.adafruit.com/viewtopic.php?f=60&t=137332&p=679948#p679948
If it's useful I can share to GitHub, but alas... as this is my first python code and haven't done anything with adafruit contrib I would need help on the devops part. Ping me if interested

marble hornet
#

not the sprite thing, the board thing

sharp rain
#

"Sounds like a cool idea! I'd suggest hopping into the Discord and the #circuitpython-dev channel. (https://adafru.it/discord) Roy there is doing NeoPixel optimizations and would likely want to collaborate on animation libraries."

marble hornet
#

do j-links do some kinda SUPER hard reset?

raven canopy
#

@marble hornet that I'm not sure of. there may be some sort of SWD command it is sending that gets it across some hurdle... ๐Ÿคท

raven canopy
#

so i think i figured out why the M4 is "less" accurate than the M0 for TC frequency capture. The EIC latency. For the M0, it is 3 clock periods (no filter, async). For the M4, it is 5 clock periods. Now...to figure out the math for correction (approxmation).

#

in my early math, i lose resolution in the upper ranges. ๐Ÿ˜ฆ

#

#stayinschoolkids

manic glacierBOT
#

Hi! I am working on an embedded project that would greatly benefit from using python for embedded sensors instead of C++ or Arduino. I have used the Micropython firmware on the ESP8266 platform and would love to use it on the SAMD21/Feather M0. My question is how one might build a port of circuitpython that removes all the extras such as filesystem mounting, REPL etc to create a minimal firmware image much better suited for devices in the field.

The goal would be to provide pre-compiled by...

marble hornet
#

i'm looking at the m4 metro schematic and do any of you know what the tcc and other text next to the headers are?

stuck elbow
#

tcc is the timer controller

#

it's a bit specific to the samd architecture, it lets you assign timers to pins

marble hornet
#

okay, alot of pins say D9:D6 what does that mean?

#

in pcc

stuck elbow
#

the datasheet says that pcc is the parallel capture controller, so logically, it must be a peripheral that captures signals on a whole range of pins in parallel

#

it says it can do up to 14 bits at once, which would match the D0-D13 range

marble hornet
#

thanks!

timber mango
#

That'll demo on any SAMD21 target Adafruit stocks, most likely.

#

(including crickit, haha)

#
/* ideas sourced from MartinL on forum.arduino.cc */
/*     [ http://forum.arduino.cc/index.php?topic=332275.17 ] */
manic glacierBOT
#

You are probably going to run out of RAM before flash becomes an issue. The best way to save RAM for program space is to use frozen modules. See https://learn.adafruit.com/building-circuitpython?view=all#adding-frozen-modules for how to freeze modules into the CircuitPython firmware.

In addition, consider using our M4 boards, including the Metro M4 Express, the Itsy Bitsy M4 Express, and arriving very soon, the Feather M4 Express. All have 256kB RAM (instead of 32kB on the M0), and 512kB f...

manic glacierBOT
#

Sorry for the delay in responding - please see my findings below;

I tried suggestion 1. erasing circuitpy, but got the same behavior when copying the 3.0.0-rc.0.uf2.

I then tried this again with a windows 7 laptop and a freshly downloaded 3.0.0-rc.0.uf2 file:
The windows 7 PC did not freeze, but after copying the file to METROBOOT the CIRCUITPY drive would not appear (tried re-setting the board etc.), so there is still a problem. I doubt its related to drivers as this was a differ...

manic glacierBOT
#

After you try on the Macbook, assuming it still has a problem, let's try updating the bootloader: you have a fairly old version. Drag this uf2 to METROBOOT, and wait for the flashing to finish and the red LED to start pulsing agin
https://github.com/adafruit/uf2-samdx1/releases/download/v2.0.0-adafruit.5/update-bootloader-metro_m0-v2.0.0-adafruit.5.uf2
Then you'll have to reload CircuitPython.

Is this the only CircuitPython-capable board you have, or do you have any others that seems to ...

indigo wedge
#

what would be the best way to create enums in CP?
if I do

class MyEnum:
    Val1 = const(1)

x = MyEnum.Val1

x is just equal 1 where I would like it to equal/print MyEnum.Val1

stuck elbow
#

just use strings

#

they are interned

indigo wedge
#

Hmm, sounds icky ๐Ÿ˜›

stuck elbow
#

why

indigo wedge
#

Dunno, just using strings for constants where a int would suffice

stuck elbow
#

it's converted to an int internally

indigo wedge
#

hmm, maybe I'm misunderstanding then, could you give me a pseudocode example?

stuck elbow
#

x = "MyEnum.Val1"

#

that's it

#

or you can use a more meaningful name

#

like "red"

indigo wedge
#

hmm, then no protection for misspelling when i try to compare?

stuck elbow
#

protection?

indigo wedge
#
>>> x == 1
True
>>> x == MyEnum.Val1
True
>>> x == MyEnum.Vat1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'MyEnum' has no attribute 'Vat1'
stuck elbow
#

Python is dynamically typed, you get no compile-time type checking

#

how is that "protection"?

#

your program still crashes

indigo wedge
#

yeah, if i used strings then x == "MyEnum.Vat1" would just return false causing a silent bug

stuck elbow
#

write tests then

#

or switch to a statically typed language

#

I've heard Rust is getting SAMD21 support

indigo wedge
#

heh, that's not that welcoming "oh, you don't quite like one feature, just switch languages" ๐Ÿ˜‰

stuck elbow
#

it's not like it's just one feature, it's the whole philosophy of dynamic languages

indigo wedge
#

Never used Rust, heard it's nice though

stuck elbow
#

it is

indigo wedge
#

I guess I was just a bit confused cause it seems doable from native code, for example:

>>> y = digitalio.Direction.OUTPUT
>>> y
digitalio.Direction.OUTPUT

So I was wondering if there was a way to do the same from pure python, but maybe not

stuck elbow
#

sure, you can define a five zillion classes

#

and define __repr__ for them

#

but it's wasteful, unnecessary and unpythonic

#

there was a PEP in recent versions of Python 3 that introduced an enum type

indigo wedge
#

Hmm, I guess you're right, implementing __str__ would allow me to achieve the print effect that I want but there's little gain from that

stuck elbow
#

I guess what you want is the ide autocomplete?

indigo wedge
#

Nah, I get that already with just a class with a const, this was more just to have nice prints while developing and debugging

marble hornet
#

i am trying to make a pogo based swd programmer and want to make the pads / holes as small as possible. the adafruit website says the the shaft of the pogo pin is 1mm in diameter. is there a rule of thumb on what diameter the drill size should be to insert the pogo pin?
https://www.adafruit.com/product/2429

#

???

stuck elbow
#

for bolts I usually leave 0.1mm on each side

#

you can also do pads and solder the pogo pins horizontally to them

#

helps to have some sort of rig to hold them straight while soldering then

marble hornet
#

thanks!

marble hornet
#

if i was selling a board w/ the uf2 bootloader would i be allowed to use the term "express"? has adafruit copyrighted it?

stuck elbow
#

as long as you don't use the name "adafruit", you can do anything, afair

rigid path
#

I have a problem in my circuit python code, I think a second set of eyes could spot the problem without much trouble. Should I post here of go to the Adafruit forum? I have a series of nested if statements that I believe are causing the issue.

solar whale
#

@rigid path itโ€™s fine to post it here. I wonโ€™t be able to look at it for an hour or so. Others may be available. Sundayโ€™s can be quiet.

rigid path
#

The code is, I think fairly well commented... In a nutshell, I have an M0 Express Feather, with an OLED and Ultimate GPS Feather Wings all loaded on a Feather Tripler. I use the OLED as a status indicator for the GPS unit, and as individual parts, everything works fine. My final goal in to have the OLED flash a couple of different messages as the GPS is getting a fix. Once a signal is acquired, change the display to a Connected message. Now if the user presses one of the 3 buttons on the OLED, they get a different set of GPS data. Maybe Lat/Long on button A, altitude/speed on button B and other misc data on button c.

My problem is I have several nested if statements and I think everything is going pear shaped around line 84, where I change the flashing message to let the user know a signal has been acquired. Though the GPS pickups a connection, the display stays with one of the connecting messages, and the buttons are not changing anything.

I know the GPS is connected as the LED on the unit slows from 1 flash per second to 1 every 15 seconds, or so.

solar whale
#

first of all - get rid of the "continue" statement in Lin 81 -- -I htink it causes the code to skip the rest of the code.

#

unless that is what you want it to do. I may have misread it.

#

@rigid path gps.has.fix it true, then you want it to do the stuff bleow line 81, correct. I think you wan to use "else:" instead of "continue" and indent! I waiting for my GPS to get a fix to test it.

rigid path
#

Yes, when it gets a fix, I want to do the rest of the code.

solar whale
#

@rigid path ok -- simple change -- her is a new version -- note yo have ot hold the button for a second in order for it to be detedcd.

#

@rigid path seems to work -- I'm sure you will have a few changes to make but it is working

rigid path
#

You mean the A, B and C buttons?

solar whale
#

yes - it only checks them once per second.

stuck elbow
#

use the gamepad module

rigid path
#

Got it. Wow, simple fix. Thanks.

solar whale
#

You're welcome - looks good --- I have to run!

#

@rigid path as @stuck elbow pointed out, there are many ways to handle buttons, If you need very quick response, there is a "gamepad" module the may help. They may not be necessary for your application. you just may want to think more about how you are testing for the buttons. You could test the buttons more quickly than you check for the gps.update. use 2 different counters.... experiment.

stuck elbow
#

it allows you to read the buttons less often, beacuse it buffers them

solar whale
#

looks great - I have not tried using it yet, but will now!

#

will it fit in memory on an M0 with OLED and GPS ?

stuck elbow
#

it's built-in

#

so no extra memory

#

(not sure if it's enabled in non-express boards, though)

solar whale
#

He is using an M0 express - should be fine.

#

@stuck elbow Wow - it is very nice - and easy to use. I guess I was not paying attention when it got added. I was thinking it was just for complex gaming stuff. I'll never read a button again!

stuck elbow
#

thanks :)

marble hornet
#

is there a way to 100% force halt a atsamd51j cpu?

indigo wedge
#

Hmm, so when using SPI.configure the speed is called baudrate but to get the speed of the bus one has to use SPI.frequency, seems like an inconsistency in the API, was this done on purpose?

marble hornet
#

b/c mine keeps on failing to burn the bootloader b/c the cpu can't be halted

manic glacierBOT
#

I've not got my hands on a macbook yet, but I did update the bootloader as per your instructions. Unfortunately I'm still experiencing the same behavior.
I've got a GEMMA M0, so tried the 3.0.0-rc.0.uf2 for that board and got the same problem with the keyboard and mouse freezing on the windows 10 PC. On the GEMMA I noticed the buit-in dotstar LED flashing blue about 8 or 9 times in succession - does this help?

#

In your first post, you had a main.py that blinked the red LED. I assume you don't have that running in most of these tests, but when you did, did the main.py run and blink the LED even when the host was frozen?

If you can watch the dotstar on the Gemma and record the pattern, that would be interesting. blue means that the initial boot sequence is running, but it shouldn't blink. You might see blue for about 2 seconds, and then you should see a pulsing green. This is the key for interpreti...

#

The sequence of the flashing dotstar LEDs on the GEMMA M0 is GREEN(x1), CYAN(x1), BLUE(x9).
main.py has the following code;

`# Gemma IO demo

Welcome to CircuitPython 2.0.0 :)

import board
import time
from digitalio import DigitalInOut, Direction, Pull
from analogio import AnalogIn, AnalogOut
from touchio import TouchIn
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
import adafruit_dotstar as dotstar

One pixel connected internally!

do...

marble hornet
#

should code that runs on an atsamd51j18 work on a j20

#

????

manic glacierBOT
proven laurel
#

If I want to run 4 led strips with the possibility of adding servos down the line is a Gemma the way to go? Or should I use 2 boards one for led strips and 1 for servos.

tulip sleet
#

@indigo wedge it is kind of inconsistent, but not sure we can change that now. Note that the input baudrate may not match the actual frequency because of clock division granularity. The input parameter should probably be called frequency too.

ruby atlas
#

Woohoo, 144 element dotstar strip aceleration ~4x with the test dotstar pixelbuf code.

tulip sleet
#

@proven laurel Gemma only has three data pins, and they are limited in what they can do. You could use a Feather or an Itsy Bitsy and have a lot more pins.

slender iron
#

@ruby atlas did you see @sharp rain 's earlier post? I recommended you two connect

#

@plucky flint I'm in the research phase in terms of API. if you could recommend games to port I could start there. From the first few glances I've had at pygamezero it feels too magical to me (WIDTH and HEIGHT specifically.) I've focusing on fantasy consoles atm. May port Celeste to Gameboy too and see what API comes out.

manic glacierBOT
slender iron
indigo wedge
#

Woo, thanks Scott ๐Ÿ˜ƒ

#

I have more changes already brewing ๐Ÿ˜‰ Yesterday I worked on getting SPIM3 working with nrfx on the nRF52840 because that one is the only one that can clock 32MHz, until I realized that I'm using engineering samples that don't have SPIM3 working, need to wait for new chips ๐Ÿ˜„

manic glacierBOT
#

I was actually thinking about this the other day, since polling and not interrupts are the CP way of working, it might be hard going to deep sleep, usually it's a external interrupt that wakes up the device, but in CP it looks like the device has to periodically wake up to see if anything happened and then decide if it should go back to sleep or act on the events.

manic glacierBOT
indigo wedge
manic glacierBOT
ruby atlas
#

@sharp rain Sounds very interesting!

manic glacierBOT
manic glacierBOT
ruby atlas
#

@sharp rain is your stuff in C (to extend CircuitPython), or a Python module?

manic glacierBOT
manic glacierBOT
slender iron
#

<@&356864093652516868> meeting in a few minutes!

cunning crypt
#

Oooh!

#

Forgot it was monday!

slender iron
#

๐Ÿ˜ƒ

stuck elbow
#

Mooooooondaaaaaay

#

I wish I could forget it's Monday

ruby lake
#

indeed lol

cunning crypt
#

More accurately, I forgot what Monday meant

stuck elbow
#

full inbox and nothing works

raven canopy
#

๐Ÿ‘‹

#

Yep yep

cunning crypt
#

Hug report: Everyone, as always. Now that things are moved around, I should be able to peek at actual specifics more often

meager fog
#

@indigo wedge hey those modules look familiar!

#

@ruby lake m4 feaths being made this week

timber mango
#

I'm running an Astatic 1104C desk mic today.
hug report: pt @river quest for weighing in on my comments about content discovery on Sunday.

ruby lake
#

@meager fog wheeee

wraith tiger
#

Group hug plus everyone who wrote the documentation, forum answers, etc that I consulted while working on uflash.

raven canopy
#

@jerryn, @Andon, @deshipu for the support they've engaged in on Discord and GitHub. I may have missed mentions for others; I blame "Monday brain". @arturo182 for the nRF cleanup; excited to see that port getting attention. Group hug beyond that!

wraith tiger
ruby lake
#

offhand q, is there a roadmap for getting ฮผpython's hardware timer stuff into cp?

meager fog
#

@ruby lake timers are so different form chip to chip, we sorta punted. do you need like precision timer access?

ruby lake
#

@meager fog I want one timer I can set to say 1ms ticks and call a function from it. time division mulitplex of voltages is 10000% easier with that ๐Ÿ˜‰

#

polling the timer is also acceptable

cunning crypt
#

Status Update: Things moved. Many things, including my PC. Plus side, I have a setup I can use for Show and Tell. I also have some EL Wire in the mail I will be doing fun projects. Pic is new computer desk setup.

wraith tiger
#

IS that the bridge of the Enterprise?

stuck elbow
#

you forgot your head

cunning crypt
#

Featuring Creepy Mannequin Head

wraith tiger
#

Er, bridge, rather

ruby atlas
#

@cunning crypt how many pixels?

cunning crypt
#

1920x1080x6 = 12,441,600

meager fog
#

@ruby lake oh we dont have any callback support at this time to start with :/

cunning crypt
#

Currently, the top/right monitor isn't connected, but the part to fix that should be delivered... soon.

ruby lake
#

@meager fog I have other ways to get it to work, will just an eight-channel SPI dac

tulip sleet
ruby lake
#

~just use

ruby atlas
#

@cunning crypt very cool. i have about 15MP on 3 displays - and still run out.

stuck elbow
twin mica
#

@stuck elbow looks awesome, nice work!

cunning crypt
#

@idle owl You needed a screen-ing process

timber mango
#

If you change the screen resolution to 1024x768 or smaller fonts get automatically bigger (at least in Linux)

stuck elbow
#

320x200 ftw

wraith tiger
#

I'd bet you could script screen grab post processing with GIMP.

timber mango
#

status report:
Did a lot of experimenting with git and github this week, and found a means to synchronize the branch to master (in terms of number of commits ahead or behind) on stackexchange.

https://stackoverflow.com/questions/34118404/what-i-can-do-to-resolve-1-commit-behind-master

Being able to sync allows me to experiment more freely without worrying so much about consequences.
@tulip sleet 's suggestion to try gitk was apropos.
gitk allows me to gain good visualization of the state of my local git repository, prior to any commit.

Looked at diode clamping protection of port pins (again) this week.
I'm in the process of distinguishing placebo from useful protection.

cunning crypt
#

@timber mango Can definitely understand you clearly. It does make you sound like you're on a HAM radio, but there's no issues in understanding.

wraith tiger
#

Gui tools are helpfull, too.

twin mica
#

โ€“CPX touchtone synth with MakeCode project video + learn guide
โ€“New CPX CAD model update on github https://github.com/adafruit/Adafruit_CAD_Parts
โ€“Released SVGs on GitHub for iron-on vinyl apparel https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/master/Circuit_Playground_Papercrafts/Vinyls

timber mango
ruby atlas
tidal kiln
#

@twin mica maybe model rocket engine ignitors? (to make fireworks go)

rigid path
#

Can the function of the reset button on an Ultimate GPS Feather Wing (or any wing) be reassigned? Instead of resetting, I want to have the setup write data off to an SD card when pressed. Playing with an M0 Express Feather and an Ultimate GPS and an Adalogger Feather Wings on a tripler.

idle owl
#

@ruby atlas Super exciting!

cunning crypt
#

@rigid path Typically, reset buttons are tied into hardware resets

wraith tiger
#

Looks fancy!

twin mica
#

@tidal kiln huh good idea, i think i saw some at hobby lobby

tulip sleet
idle owl
#

๐Ÿ˜„

wraith tiger
cunning crypt
#

@rigid path If you want to do some hardware hacking, you could make sure the reset pin is physically non-present, and then run a wire to an unused GPIO pin. Not sure which ones that is on the UGPS Wing, though.

timber mango
#

glossary: GUI graphical user interface 'gooey'

raven canopy
#

FrequencyIn Module: I abandoned using COUNT for the time being; MP_OBJ_NEW_SMALL_INT was giving me too much grief, post math. Working on accuracy, as I believe it is largely tied to the EIC latency. Currently catching up on all the math I never did/paid attention to. Hug report to Kahn Academy? ๐Ÿ˜„

Debating on picking up a nRF52840 Dev board. Who am I kidding; it's not a debate....

Little Leslie amp: Spent some time on this over the weekend. Salvaged a surround satellite speaker, which include a 1" tweeter, 3" mid-driver, and crossover. The Crickit's amp drove them very well. Started a SketchUp for the cabinet, and brainstorming on the rotating bits. Fighting feature creep is tough...

timber mango
#

roy: excellent audio

ruby atlas
#

@timber mango $10 usb audio adapter with a $200 gaming headset.

timber mango
#

That mic is excellent!

rigid path
#

@cunning crypt @tulip sleet @cunning crypt - Thank you for the info. I was just being curious, I think I will just wire in a button.

cunning crypt
#

That's honestly probably the easiest way

timber mango
#

If you stack the GPS feather on the MCU (to expose the antenna to the sky) that reset button can save your bacon when you need to flash the target board when it gets into a state where only the RESET button will wake it up.

#

NPX:TNG

idle owl
#

<@&356864093652516868> I'll be finishing the Code of Conduct this week. Please feel free to add any further feedback in the next couple of days. Thank you! https://github.com/adafruit/Adafruit_CircuitPython_Code_of_Conduct/pull/3

cunning crypt
#

I definitely like the idea of a single RGBLED library.

#

And "Soon" has arrived. Parts have been delivered, I'm dropping out of voice chat. Enjoy, everyone!

idle owl
#

Have fun @cunning crypt!

solar whale
#

@tulip sleet @slender iron did the ESP8266 fix also get merged into master - or just 3.x?

timber mango
#

branch!

ruby atlas
#

@idle owl oh cool, that uses adafruit_dotstar directly so it would benefit from pixelbuf automatically.

twin mica
#

later folks, nice chattin'

tulip sleet
#

@solar whale 3.x only but I will merge over to master

timber mango
#

Is this meeting listed for showtimes? ;)

solar whale
#

@tulip sleet thanks!

raven canopy
#

Thanks everyone!! Finish Monday strong! Naptime must be earned.

wraith tiger
#

๐Ÿ‘‹

raven canopy
#

Back to works for me. Later folks.

errant grail
#

Had to miss the meeting today. That load of decorative rocks just isn't moving itself out of the driveway fast enough.

cunning crypt
#

@errant grail You were busy with a rock concert?

errant grail
#

Hugs to the entire CPy team. Working on a CPy Circuit Playground Express learning guide but found that my verbose code couldn't move to 3.0.0 rc without a complete rewrite.

#

3.0.0rc took away about 4k of program space compared to 2.3.1

ruby lake
#

back to part 2 of my midi article

errant grail
#

My guess is that the CircuitPlayground library for 3.0.0 is somewhat bigger. I do like the sound file playback in 3.0.0 better!

wraith tiger
#

Rocking out the driveway?

indigo wedge
#

Hi, sorry I'm late, I'm working on porting the nRF to nrfx drivers and continuing to bring up my project. Also I just got 32MHz SPI working on nRF so that's nice ๐Ÿ˜„

errant grail
#

The rocks just don't roll themselves into the beds.

slender iron
#

@indigo wedge awesome! I'm excited for the nrf stuff

errant grail
#

Giving a talk this Thursday at our Makerspace. They want to see CircuitPython in action.

wraith tiger
tulip sleet
#

@errant grail I just gave a talk at the Boston Python goup. By far the best part was displaying REPL or editor side-by-side with an overhead camera showing the board(s).

#

@wraith tiger thanks I will fix that. I saw that but could not find the right link

wraith tiger
#

You're welome.

errant grail
#

@tulip sleet Yup. That's the plan. I have a variety of M0, M0 Express, and Metro M4 Express boards to demonstrate along with a wad of neopixels.

indigo wedge
meager fog
modest atlas
#

Dying for a m4 feather here

ruby lake
#

I need a couple ๐Ÿ˜‰

cunning crypt
#

@ruby lake Are you making a pillow?

ruby lake
#

crow feathers ๐Ÿ˜‰

cunning crypt
#

....Now we need some sort of device that lets several feathers talk to each other. And it needs to be called a pillow.

ruby lake
#

module playground v2, more analog I/Os, need the memory space of an m4

#

my key assigner code successfully ported to cp

#

usual method of setting keyed outputs is to have a timer event pull outputs from result list and stuff them into hardware (DAC, gate) slots. I will have to use direct outputs for now.

slender iron
indigo wedge
#

Doing just fullscreen fills, i get 22 FPS on the nRF52840 with 32MHz SPI ๐Ÿ˜„

stuck elbow
#

@indigo wedge with ili9341?

indigo wedge
#

yep, 320x240

#

I modified the WIP C driver to use a 256 byte buffer cause sending one pixel at a time was way slow

stuck elbow
#

that's decent, though at 32MHz you should have ~200 FPS

#

no, wait, divide that by 8

#

25

#

so close

#

does it have DMA on the SPI?

indigo wedge
#

it does but i'm not using it for now

stuck elbow
#

you would need two buffers for that, probably, to fill one while the other is being sent

#

though for just filling the screen with a single color, one pre-filled one would be enough

indigo wedge
#

IIRC nRF DMA has a way to specify linked buffers for SPI, so can have more than two being juggled

stuck elbow
#

if you could link it to itself, it could be super-fast :P

indigo wedge
#

With a larger buffer I get 24FPS

stuck elbow
#

that's probably as fast as it can go

indigo wedge
#

yeah, there will always be some overhead

#

I've spent 2h yesterday fighting with SPI to get 32MHz working until I realized I was using the ancient engineering samples where 32MHz mode was broken ๐Ÿ˜…

manic glacierBOT
solar whale
#

Yay! Raspberry Pi and Feather M0 Express are talking via Lora !! ๐Ÿ“ป

idle owl
#

Nice!!

manic glacierBOT
raven canopy
#

@tidal kiln (& @idle owl) HT16K33 PR review incoming. I've got a couple "nit picky" things. Nothing serious; documentation.

idle owl
#

Ooh almost missed a sneaky upstream!

ruby atlas
#

@timber mango btw just getting back to your comment about audio quality: https://www.massdrop.com/buy/massdrop-x-sennheiser-pc37x-gaming-headset and a Syba SM-CM-UAUD (Cmedia chipset).

#

The mic is at just the perfect distance, and it has a handy dandy volume knob on the headset.

stuck elbow
#

gaming...

manic glacierBOT
ruby atlas
#

I got it because it's basically a sennheiser 59x series with a mic on it.

manic glacierBOT
#

I'm guessing that it may very well be something you have installed on both your Windows machines that's getting confused. Perhaps go through everything that's installed and see what's third-party and common to both machines.

Another user had some monitoring software called "AIDA64" that caused trouble: https://forums.adafruit.com/viewtopic.php?f=60&t=135400

Also, as I mentioned, 3.0.0 newly supplies a gamepad HID device and a "consumer control" (media keys) device. It's possible you ha...

tulip sleet
tidal kiln
#

@idle owl @raven canopy thanks for review. made some updates. back to you.

wraith tiger
raven canopy
#

@tidal kiln @idle owl is there more stuff coming for the HT16K33 library? didn't want to push a release if there is...

tidal kiln
#

@raven canopy yep. i'm trying to chip away at the other issues as well. not sure what's best for when to draw the line on pushing a release though. probably best just to ask @slender iron

manic glacierBOT
indigo wedge
#

@tulip sleet do you mean the cdc from jlink or the bootloader?
I'm using Linux Mint and have no problems with the jlink one but have not tested the bootloader for the nrf port yet.

manic glacierBOT
bronze geyser
scarlet fjord
#

I'm getting this.... issue(?) when checking for errors in Mu - is there a limit to the number of characters i can have in a line??

stuck elbow
#

there is no limit, that is a stylistic warning

#

long lines are hard to read

scarlet fjord
#

ah, ok ๐Ÿ˜›

#

if cond = false is what im doing, why is it telling me i should be doing what im doing?

#

am i wrong, or is the warning?

#

Toggles[] is an array, if im understanding this right...

stuck elbow
#

"==" and "is"

#

"is" is an operator

#

but it's best to write if not Toggles[keyindex]: in this case

#

the == False is spurious

#

it's like writing if (((x == True) == True) == True) == True:

#

instead of just if x:

scarlet fjord
#

ah, fair ๐Ÿ˜› thanks

tulip sleet
#

@indigo wedge I mean the jjlink CDC: connect to the USB port on the short side of the board after CircuitPython is loaded. With screen, picocom, or minicom, I type and get no input echo: nothing happens. If I press reset I see part but not all of the startup prompts. See https://github.com/adafruit/Adafruit_nRF52840_Bootloader/issues/7#issuecomment-400048531. Not sure if this is fixed by newer SDK or it is a jlink software problem. I see this on Ubuntu 16.04 or 18.04 (Mint should be similar). As hathach mentions at the end, this will become a moot point.

indigo wedge
#

Hmm, that's odd, I connect to the jlink usb connector and use minicom without any problems.

#

But as mentioned, I don't use the adafruit bootloader just yet so unsure if that changes things

latent nimbus
#

Good day, I am new here. Just ordered some devices from Adafruit on last thursday and got it yesterday here in the Netherlands. So today I started a test with cirquitpython, and I think it is great. I made a test with a Metro Express M0, a si7021 sensor and a oled 128x64 display. In my program I first write a header and a footer to the display and then in a while true I refresh the data. So I must clean the area for the data, and did that with some for loops. Is that a good way? or is er a better way to controll the oled display: https://github.com/WimAlsemgeest/cirquitpython_M0_temp_hum_oled

tulip sleet
#

@indigo wedge that may indeed be the problem, but I don't know enough about what the bootloader is doing to understand why that would matter.

#

@latent nimbus There's an oled.fill() method. old.fill(1) will turn all the pixels on; old.fill(0) will turn all off.

dreamy orbit
#

hrm...might need some help and very new to programming....I just got a adafruit feather M0 express with the DC Motor + Stepper FeatherWing to control a nema 17 motor for a filament rewinder project. Thinking of using some switches for power, forward and reverse and potentiometer for speed.....how would I do this in circuitpython or would arduino be better?
or should i ask this under a different topic sub channel?

latent nimbus
#

@tulip sleet Yes I saw that, but I just wanted to clear a part of the display.

tulip sleet
scarlet fjord
#

yep thanks ๐Ÿ˜„
ive just been working on it while you caught up with everyone else ๐Ÿ˜

tulip sleet
#

@latent nimbus ah i see, sorry. We are going to improve the library, which is fairly weak now: we need to do some work on the underlying framebuf library. But your way is fine for now. Or you could draw the outlines once, and then write the proper number of text spaces inside your headers to clear the text and leave the lines alone

scarlet fjord
#

idk what i did differently, but when i went and changed all my variables to lower-case, it started working ๐Ÿ™ƒ
so im plugging in some more buttons to test it properly

tulip sleet
#

what editor did you say you're using?

scarlet fjord
#

im working in Notepad++, but im copy-pasting it all to Mu and saving it to the main.py file there because im difficult ๐Ÿ˜…

tulip sleet
scarlet fjord
#

oh cool, yeah the tutorial said to use Mu so i am, but im not 'working' in it ๐Ÿ˜›

#

also follow up on what you mentioned in #help-with-projects - how do i see results from print("")?

#

like, where does it print to

#

Mu has a Repl thing, but it doesnt show anything and idk what it is ๐Ÿ˜›

tulip sleet
#

@scarlet fjord what version of mu is it?

scarlet fjord
#

1.0.0.beta.15-adafruit_b142c3, according to the header bar in windows

tulip sleet
#

there is a newer version (now available at https://codewith.mu), but I believe that one should show the repl. It is the "Read Eval Print Loop", where you can type Python and see the results, and where print statements go.

#

if you click the REPL button, a smaller subwindow should open at the bottom. Leave it open and that's where the print statements will show stuff

scarlet fjord
#

oh ok, maybe i just havent seen any of the prints, but ive had that open this whole time ๐Ÿคท

tulip sleet
#

can you type ctrl-C in there and see ">>>"

scarlet fjord
#

oh my god is that why its been not working?
ive been copy-pasting

#

so ive ctrl-c'd a lot

stuck elbow
#

ctrl+d

scarlet fjord
#

that seems to duplicate the current line...

manic glacierBOT
tulip sleet
#

@scarlet fjord did you type ctrl-D on a line by itself?

#

in the REPL subwindow

scarlet fjord
#

eyyyy ok no i did not

#

i just downloaded the newest version and when i opened the 'serial' window (which replaced the 'REPL' button in the version i was using before) it prompted me to do ctrl-d and then i saw the error i wasnt seeing before!

#

there was this thing where, on one if the files somewhere, it showed a 'D13' being imported but not used

#

it didnt throw an error when checking in Mu, but the REPL showed an error for it about an array out of bounds and now it works ๐Ÿ˜„

tulip sleet
#

ok, great!

scarlet fjord
#

still havent truly tested it with more buttons, i only just now managed to pry some key caps off my old keyboard so im plugging them in now ๐Ÿ˜›

#

woohoo! it works ๐Ÿ˜„

#

thanks a bunch for your help ๐Ÿ˜„

stuck elbow
#

nice switches, are those gaterons?

scarlet fjord
#

nah, Cherry MX Red RGB ๐Ÿ˜

stuck elbow
#

ah, so Cherry now also makes transparent switches, nice

scarlet fjord
#

id like to get like... 1 or 2 of each different kind of switch... Cherry, Gateron, Kailh... and see what ones i like before i finish this, but at the moment i just have these ๐Ÿ˜ƒ

#

yeah, that keyboard in the background of that shot is all Cherry MX Red RGB
linear + RGB = ๐Ÿ‘Œ
though afaik Corsair owns the rights to all cherry rgb keys, which.... sucks, tbh, but it means were getting a lot more competition from other companies, so maybe cherry will up their game haha

stuck elbow
#

I absolutely love my Kailh PG1350

scarlet fjord
stuck elbow
#

one hint, it's traditional in Python to name variables with lowercase, "like_this", class name with camel case, "LikeThis", and constants with all caps, "LIKE_THIS"

#

it doesn't matter for your own code, but it does make it easier to read for others

scarlet fjord
#

noted ๐Ÿ‘

#

i dont come from a programming background so this is all very new to me ๐Ÿ˜€

stuck elbow
#

that's basically just nit-picking, so don't worry

scarlet fjord
#

haha ๐Ÿ˜›

#

so variables = snake_case
classes = CamelCase

#

idk what a class is, but im learning ๐Ÿ˜›

ruby lake
#

variableNamesAsLongAsYourForearm

scarlet fjord
#

Mu complains that 'pin D13 is imported but unused', so I, being me, added pin D13 to the buttonpins array, which of course would break it

stuck elbow
#

doesn't look like it is, I guess they just imported all the pins

#

personally I prefer to do import board and then do board.D13 instead of D13 and so on

scarlet fjord
#

i suppose thats a bit like the argument import time then time.sleep() vs. from time import sleep then sleep()? ๐Ÿ˜›

stuck elbow
#

yes

#

I think it keeps it more organized that way :)

scarlet fjord
#

i can see that.
me though, i like the idea of only importing what I'll use; so im not importing the entire time library just to do sleep, which seems wasteful. unless Python is smart enough to not import things its not going to use, which... wouldnt seem to be the case, if Mu complains about pin D13 ๐Ÿ˜‰

#

aw, dynobot doesnt like self-deprecation ๐Ÿ˜ข
how am i going to do my classic NZ humor ๐Ÿ˜ฎ
what i was trying to say is it would be nice if someone edited that tutorial to not import pin D13, cause that confused me when i did 'check' in Mu and saw an error about it and i fixed it the wrong way

sharp rain
#

@ruby atlas It's a python library that uses the neopixel_write. I'm seeing 1800 pixel / second draw rate on my feather express M0 and memory use is fairly minimal, basically the bytes for the BMP palette and pixels, so for my purposes no need to implement in C

#

@ruby atlas it's pretty much done except for more robust examples and documentation. I've used it both with 32 pixel featherwing neopixel matrix for doing simple animations, and on a 150 pixel 5m strip to do animation and chase sequences.

#

@ruby atlas with feather express and circuit python it detects any changes on the flash drive and auto-reloads so it's wonderful for prototyping - edit the BMP file to change the animation, save, and it instantly reloads and starts playing. Cool stuff.

ruby atlas
#

That should automatically benefit from the acceleration of pixelbuf. awesome. I'll give it a try tonight when I get home. Thanks so much for sharing that.

#

At least I believe so.

#

Oh, I missed that you use neopixel_write directly. Hmm. That means it doesn't do dotstars yet.

#

I definitely want to look closer ๐Ÿ˜ƒ

sharp rain
#

@ruby atlas it's a bit of a lie... I use the NeoPixel python library, but I bypass all the methods and blast the pixels into the internal buffer, then call the show() method that writes it out

#

@ruby atlas but basically, it's implemented by a method "fill bytes" that will fill any python bytearray with the RGB data in the format of the four channel options, so it's easily adaptable

stuck elbow
#

@scarlet fjord you are importing the entire library either way

manic glacierBOT
manic glacierBOT
ruby atlas
#

@sharp rain That makes sense. I'm eager to look at your code later today to see how we could make it compatible with pixelbuf (or extend pixelbuf) so it's portable across device types. Dotstar requires the start/brightness byte before every pixel (plus start 0x0s and end padding 0xFFs).

sharp rain
#

@ruby atlas fairly trivial to add - there's already support for a channel parameter which specifies the number of bytes to write for each RGB tuple, and how to map the bitmap RGB to which bytes, as well as detection for a W channel if all colors are the same.

#

@ruby atlas the code should be straightforward. there isn't really any magic. the animation speed comes from:
a. avoiding all the method calls to set the pixel RGB one by one and setting the buffer bytes directly inside the loop
b. avoiding the brightness adjustment calculation inside the loop by tweaking the bitmap brightness once at the start

#

@ruby atlas I was doing both of these in my first iteration to get it working. When I added these optimizations I saw a 10x factor speedup.

#

@ruby atlas Moreover, since it's a static array of RGB pixels, you can do things like compute an estimate of the total current required for an animation by adding up all the pixel values once, which it turns out is quite useful.

#

@ruby atlas And you can create animations in a graphic program rather than in code, which is great when partnering with creatives who aren't techie ๐Ÿ˜ƒ

#

@ruby atlas the downside is you can't easily do fully algorithmic animations, but... you've got access to both the pixel buffer and palette as bytearrays, and you can manipulate those. so for example, load an animation file, then tweak the palette to move thru a color wheel. lots of options

rigid path
#

Circuitpython on non-Express M0 Feathers... with the reduced storage on the non-Express M0 feathers is there a way to tell which library files I need to load? example: I am running a pair of M0 RFM69HCW Radio Feathers. In the sample code I am playing with, I have imports of board, busio, digitalio and adafruitrfm69 in my code. Is there a way I can determine which libraries I need to load to the Feather? Also is there a way to determine which files in the library folder I need to load?

stuck elbow
#

the documentation for those libraries should mention what the dependencies are

#

you can also look at their code and see what they import

rigid path
#

@stuck elbow - Thank you. Are these on read the docs?

stuck elbow
#

should be in the readme in the library's repo

rigid path
#

๐Ÿ‘

onyx hinge
#

@rigid path look at the list of modules in sys.modules after all imports are done. I think that works/exists in cp

manic glacierBOT
slender iron
#

@indigo wedge did you find the nrf micropython PR?

manic glacierBOT
rigid path
#

@onyx hinge - TY

manic glacierBOT
indigo wedge
#

@slender iron i didn't check but they don't have the common-hal modules so unsure if it will help much.

slender iron
#

yeah true

indigo wedge
#

Also don't want to get too influenced, then I won't know which ideas are mine and which are copied ;)

slender iron
#

its all MIT licensed ๐Ÿ˜ƒ

indigo wedge
#

Thanks for the merges, I have more on the way.

#

I'm on the phone now so can't read the pr properly

#

But will check it

slender iron
#

np, just be aware of it

#

no need to merge them in at all

#

thanks!

tulip sleet
#

@scarlet fjord I am changing the example for the Arcade button box so it just does import board. D13 warning will go away and people will be free to change the example without having to change the import list.

#

thanks for pointing out this annoyance

idle owl
#

@slender iron Would you take out the _read on this? Or is read not quite like get/set: python def _read_temp(self, register): temp = self._read_16(register) temp *= 0.02 temp -= 273.15 return temp

slender iron
#

I need more context

#

thats just some random function at this point ๐Ÿ˜ƒ

idle owl
slender iron
#

no pr or anything?

idle owl
#

Not yet, the repo doesn't exist yet

tulip sleet
#

@idle owl it's an internal routine, not a property in an official API. I think it's fine. It does an action of reading (like, it calls _read_16()

idle owl
#

That's what we're working on right now

#

Ok that's what we thought but wanted to make sure

slender iron
#

I'd suggest making a repo and having a pr for it

tulip sleet
#

I thought temp meant temporary, not temperature

idle owl
#

That's the plan in a few minutes

#

I was going over the code with Mikey first

slender iron
#

why not do it publicly?

idle owl
#

No reason other than it fell into place this way

slender iron
#

can you make repos?

idle owl
#

Yep doing it now

slender iron
#

k cool

idle owl
#

It should be called Adafruit_CircuitPython_MLX90614 right? Formatting-wise I mean

slender iron
#

yup

tulip sleet
#

@slender iron @idle owl adding a new library, should I use a webhook for RTD instead of a service? GitHub says services are deprecated. And for travis?

#

but a lot of libraries still use services

slender iron
#

yeah, webhook

idle owl
#

Yes to webhook.

slender iron
#

travis has some newer stuff (App I think) that we haven't switched to yet

tulip sleet
#

so keep using service for travis for now?

#

what's a good example library with the perfect preferred setup?

slender iron
#

I don't know what you mean by service

#

usually its just enabling on the travis side I think

tulip sleet
slender iron
#

it might do that automatically from travis

tulip sleet
#

ah, ok, so it showed up when enabled on travis, ok, will check that

#

on the RTD side, it will give me a webhook to paste?

idle owl
#

You get the webhook from GitHub, paste it into RTD

#

(I have all the notes!)

slender iron
#

RTD provides the url to put into github

#

under integrations

tulip sleet
#

should we go back and replaces the RTD services with webhooks, or just wait until they say it's going away, fix it?

#

like in the library above?

slender iron
#

I would just wait

tulip sleet
#

or if it ain't broke, don't fix ti

slender iron
#

right

tulip sleet
#

k, fine

#

tnx t and k, prob back with more q's later

slender iron
#

np, glad to get it setup

idle owl
#

np

manic glacierBOT
#

Indeed it's broken:

Adafruit CircuitPython 3.0.0-rc.0-25-gd7d132d5a on 2018-06-26; Adafruit Metro M4 Express with samd51j19
>>> import rtc, time
>>> clock=rtc.RTC()
>>> clock.datetime = time.struct_time((2018, 6, 25, 19, 59, 55, 0, 0, 0))
>>> print(clock.datetime)
struct_time(tm_year=2018, tm_mon=6, tm_mday=25, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=0, tm_yday=176, tm_isdst=-1)
>>>

The problem is in asf4, replicating samd21 fixes it:

diff --git a/samd51/hpl/rtc/h...
tulip sleet
idle owl
#

Merged.

tulip sleet
#

Tnx. I actually made the fix through the github web editor, since it was so tiny. Rarely do that.

idle owl
#

Same, but I've also done it for tiny things. It then messes up my local branch though so if it's anything I have locally, I'll usually still go through the process.

tulip sleet
#

@idle owl so how do I add the library as an RTD subproject? The only project I have in RTD is CircuitPython. I went to Admin->Subprojects, but there's just an empty dropdown for "Child", no place to add a URL.

#

should I import it as a regular project first?

idle owl
#

You import it first. On its own. It'll seem like you're importing it into your stuff but you're not

#

yeah

tulip sleet
#

ok, got it, I will proceed and whine if it doesn't work.

idle owl
#

๐Ÿ˜„ ok

tulip sleet
#

@idle owl, ok, now it's a subproject, but it's still listed as a top-level project too. ?

idle owl
#

Yeah it won't show up anywhere but there as a top level. It shows up correctly as a subproject under CP

#

I think anyway. Because that's what I've been doing.

tulip sleet
#

so you have a bunch of random library projects and also the CircuitPython project?

idle owl
#

Yes.

tulip sleet
#

๐Ÿคท

#

anyway, build is passing, so that's good.

idle owl
#

Excellent

marble hornet
tidal kiln
#

oops. i broke : display support for the 7 segment. this was previously done with some logic. but thinking of fixing it by now making it a property:

display.colon = True

thoughts?

#

for ref, it was previously done like this:

display.put(":")

and the only way to turn it off was to fill(0), which cleared the whole thing

manic glacierBOT
stuck elbow
#

@tidal kiln you can have 3 colons

#

iirc

tidal kiln
#

hmmm. lemme check. the one i have here only has one. but there may be variation in shop...

#

looks like only one. and the alphanumeric ones don't have any.

manic glacierBOT
#

I just built the feather nrf52832 board from master and tried to mount my SDCard as I have routinely on this board, but it failed with:

Adafruit CircuitPython 3.0.0-rc.0-27-g91427b0 on 2018-06-26; Bluefruit nRF52 Feather with NRF52832
>>> 
>>> 
>>> import sdmount_lib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "sdmount_lib.py", line 12, in <module>
OSError: [Errno 19] ENODEV
>>> 

Did something change? Or did something break?

#

Here is sdmount_lib.py

jerryneedell@Ubuntu-Macmini:~/projects/feather52$ cat sdmount_lib.py 
import adafruit_sdcard
import busio
import digitalio
import board
import storage
import sys
# Connect to the card and mount the filesystem.
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
cs = digitalio.DigitalInOut(board.D27)
sdcard = adafruit_sdcard.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
sys.path.append("/sd")
sys.path.append("/sd/lib")
tidal kiln
#

well, the 1.2" versions have 2 colons. and only one decimal point.

manic glacierBOT
tidal kiln
#

and it's not really a decimal. more like an AM/PM indicator.

manic glacierBOT
slender iron
tulip sleet
#

@slender iron @idle owl the code formatting in RTD varies from library to library. In the CircuitPython project and in the Crickit subproject, it looks like this

tidal kiln
#

@slender iron thanks. will check into that...

idle owl
#

I think we updated the theme on some of them and not others. I noticed that too.

slender iron
#

thanks!

tulip sleet
#

rats, I had another example, hold on

idle owl
#

My guess was theming. But is the second example from a docstring or is that a .md or .rst or whatnot file?

tulip sleet
#

The difference is that the first is using just theme.css, and the other is using sphinx_rtd_theme.css. It's different defns for <pre>. The first one is actually problematic: the lines are squashed together.

idle owl
#

Ok so it is theming.

tulip sleet
#

i looked at the conf.py's but they are virtually identical. one has napoleon, but I removed that and it didn't make a difference. I will force a rebuild on the second one and see if it changes appearance.

idle owl
#

Ok