#circuitpython-dev

1 messages ยท Page 196 of 1

idle owl
#

๐Ÿ˜Š

pastel panther
#

Kattniiiiiiiiiiiiii

turbid radish
#

Lurking

#

๐Ÿ‘ ATMakers!

#

@errant grail Ladyada will probably do final moderation on your guide tonight, it looks great!

errant grail
#

@turbid radish Thanks! And thank you for your changes and updates!

wraith tiger
#

Group hug and kudos to the teams developing the web-based editors for the Micro:bit for the new WebUSB support.

pastel panther
#

(I have hugs)

#

hug reports:
To Kattni and Scott for going the extra mile for making the CP community especially welcoming and encouraging me to remain involved in any way I can. Also to CGrover for spending extra time helping me with some audio electronics questions

idle owl
#

@pastel panther Thanks for sticking with us ๐Ÿ˜ƒ

pastel panther
#

๐Ÿ˜ƒ

raven canopy
#

@tannewt for the PR review. And a group hug!

errant grail
#

Very cool @slender iron . Like the display = console terminal concept.

turbid radish
#

at noon Sunday is my talk in the Digikey area

inland tusk
#

@slender iron I am going to Makerfaire on Saturday

raven canopy
#

Sorry.. a dayjob boss called. ๐Ÿ’ต

slender iron
#

k, I gave you the role @inland tusk

errant grail
turbid radish
#

It will be out soon

#

nest day or so

#

next

#

His guide is awesome & VERY helpful

#

Boxing is a very useful skill

stuck elbow
#

ocarina!

inland tusk
#

mine woill be a twelve hole tenor ocarina. That iis what I learned to play.

stuck elbow
#

@inland tusk nice, I was thinking about doing a 6-hole one, using the touch for buttons, because then I can react to lighter/stronger touch

inland tusk
#

Adafruit has a 12 pad touch board which I will try to use for the finger board.

turbid radish
#

Current activities - MakerFaire Sundat talk at noon Sunday in Zone 3 Digikey., Updates to the Intro to Crickit and Make It Move guides to including CircuitPython & MakeCode, incorporates new products.

tidal kiln
#

@idle owl sure. let's do it before you take off for NYC.

inland tusk
#

Someone mentioned that they were working on the circuitpython Library for it.

idle owl
#

@tidal kiln Excellent, that will work perfectly.

turbid radish
#

my update is above

inland tusk
#

All garbaled

wraith tiger
#

I'll just type. I need to replace this headset.

neat folio
#

interference from the Vogon construction fleet sounds like....

raven canopy
#

Earbuds... ๐Ÿ˜„

turbid radish
#

lol

#

Thanks Scott

pastel panther
#

updates:
Assembled and tested the first version of my battery powered CP board (pictured) that runs off a AA using a boost converter. I found plenty of things to fix but the concept is pretty promising. These are for running dotstars molded into the toys my wife sculpts and casts.

I have another CP board on the way for the Hackaday Square Inch thing (https://hackaday.io/contest/160135-the-return-of-the-square-inch-project) and hopefully Iโ€™ll be sending out yet another M4 board that Scott suggested that is possibly my most dense board so far.

As an aside, Iโ€™m not happy with the micro USB socket Iโ€™ve been using (https://www.digikey.com/product-detail/en/amphenol-fci/10118193-0001LF/609-4616-1-ND/2785380) so if someone has one they really like for strength and insert/remove force, please let me know.

Also so that someone can call me on it later, Iโ€™ll say here that Iโ€™m planning on writing a guide/article on how to mashup adafruit or other open source boards into custom designs.

Create the most novel, useful board you can in just one square inch.

errant grail
#

@pastel panther: that's an amazing board design!

wraith tiger
#

I did some beta testing on the microbit web editors. It's great that they exist for situations where you don't have something better to use, but there are definitely better options.

idle owl
#

@pastel panther Noted and will be called. ๐Ÿ˜‰

pastel panther
#

๐Ÿ˜ƒ

raven canopy
#

FrequencyIn: Started working OSCULP32K/GCLK source for DPLL1. Since non-sync enabling of a GCLK generator is only available in samd/samd51/clocks.c, and I wanted to make DPLL1 available to any future use anyway, I've started to move all of that out of FrequencyIn over to clocks.c. But, that is a fair amount of engineery thought process that I didn't anticipate. Definitely open to thoughts and suggestions.

VEML6070 now matches VEML6075 usage to max possible extent.

Non-CPish: spent the weekend setting up the laptop with dual boot Ubuntu Bionic. Hope to get to a point to help out with dev/user support on that platform. And, well, because penguin. ๐Ÿง

idle owl
#

@pastel panther If you're not already in the Learn system, ping me when you're ready. Or immediately. ๐Ÿ˜ƒ

stuck elbow
#

weeds: an easier way to enable/disable C modules per board

pastel panther
#

@idle owl I'll ping you for feedback when I have a first draft?

idle owl
#

@pastel panther That also works

inland tusk
#

In the weeds NPR 12 pad touch

idle owl
#

@pastel panther You're also welcome to work on it in the Learn system if you'd like.

pastel panther
#

@idle owl Sure?

#

I'm turning into a ๐ŸŽƒ so I have to run but thanks everyone for a year of CP weekly and for making the community and code awesome.

๐Ÿ‘‹

raven canopy
#

We talked about it in my PR, well for sub-module. I was going to just #ifdef in shared-bindings, but don't like that...

tidal kiln
tough flax
#

Hi all - I have a work training in minutes, but wanted to stop by and say thanks for all your help

neat folio
#

Happy Anniversary (sp?)

inland tusk
#

@tough flax Great hear you.

raven canopy
#

Thanks everyone!!

errant grail
#

Thanks!

solar whale
#

@indigo wedge I spent a lot of time lookng at the ble_scan, and have to admit, I have no idea how to "fix" it for SD=s140 - It looks like the AI has Pchanged again from when you fixed it last time so I could not just "do what you did" . If you have any time, can you point me in the right direction.. Or let me know if I shoudl just forget about it until youre BLU update is done . That is a good option as well.

slender iron
errant grail
#

'bye all! Back to the studio...

slender iron
tulip sleet
inland tusk
#

Discord has a sllider for input in the setting. and also for output.

#

See you on Saturday

charred lake
#

Darn, I missed the meeting ๐Ÿ˜ฆ

tough flax
#

FYI, I've used the Yeti and their Raspberry and I prefer the raspberry

slender iron
#

@charred lake oops! I'm excited to hear about your projects!

idle owl
#

@tough flax Interesting. I saw that one too.

charred lake
#

@slender iron Thank you! My girls and I are excited as well; I'll post an update of our Spooky House project soon! They are having so much fun ๐Ÿ˜„

tough flax
#

The Raspberry works on iOS as well but I never have bothered. It's got a gain knob and is very portable

#

Hey folks, I saw a note where @tulip sleet was asked when he would merge in the 3.x code... does that mean that I should start new work on a the 3.x branch? I didn't realize 3.x was not in Master yet

lethal abyss
#

@stuck elbow if I can provide some help, do ask. also, if something can happen with both PyConUk and PyConFr which happens close in time...

slender iron
#

@tough flax master is where you should work. 3.x just has a few fixes that master doesn't but soon will

#

@idle owl you out of the newsletter?

idle owl
#

@slender iron Oh bugger. I got distracted.

#

We can add them for next weeks. I wouldn't worry about it.

slender iron
#

you can do it now ๐Ÿ˜ƒ

idle owl
#

Oh ok

#

I will do that

slender iron
#

I'm not really in

#

will peruse for micropython stuff

idle owl
#

Ok on it

#

@slender iron Done!

slender iron
#

thanks!

raven canopy
#

@stuck elbow from today's in-the-weeds, here is the issue that i think Scott was referring to: https://github.com/adafruit/circuitpython/issues/335
I am going to need to implement something along these lines for pulseio.FrequencyIn, because it gets really tight on non-express SAMD boards. I'm going to put my thoughts into that issue...

manic glacierBOT
#

@deshipu brought this up in today's weekly meeting. Being on my phone and text only, I was a little late in getting some thoughts into the discussion.

I am going to need to implement a way to disable/enable the pulseio.FrequencyIn sub-module, since it leaves very little memory/flash left (or doesn't fit) on non-express SAMD boards.

My initial thought was to try and just #ifdef it in/out of shared-bindings with a #define HAS_FREQ_IN in mpconfigboard.h. I'm not even sure if that w...

slender iron
raven canopy
#

totally sorry i was non-responsive during hugs. a boss totally sprung a "call me" IM on me. ๐Ÿ˜„

idle owl
#

For what it's worth, my mic was unmuted, and I muted it to say that you had posted it to the notes and I read it off, and then unmuted my mic. Not realising this until Scott said he'd read it from the notes.

raven canopy
#

First day back + monday. nuff said. ๐Ÿ˜‰

idle owl
#

I'll go with that, yes.

tidal kiln
raven canopy
#

@tidal kiln which firmware did you test with?

tidal kiln
#

@raven canopy Adafruit CircuitPython 3.0.1 on 2018-08-21; Adafruit CircuitPlayground Express with samd21g18

raven canopy
#

k. just wanted to narrow down sleuthing... so it wasn't a breaking change with 3.0.2. ๐Ÿ™Œ

tidal kiln
#

thanks for pointing that out. added info to issue thread.

raven canopy
#

hmm...seems to have some weirdness in the 540 to 690 range... give this a spin:

>>> for i in range(50):
...     tone = 300 + (i * 10)
...     print("Tone:", tone)
...     cpx.play_tone(tone, 0.5)
...
tidal kiln
#

yep. the forum poster did a similar test.

raven canopy
#

yeah...totally misread the range(450, 650) as in (450, 650). ๐Ÿ˜‰

#

just tested on a fresh-from-factory CPX, with 2.2.0. tones shift accordingly... maybe RawSample is the culprit? ๐Ÿคท

tough flax
#

I happened to be in this code and thought I'd look... forgive me if I'm stepping on toes...

#

But I think the issue might be in the sine generator?

#

When I extracted this method, it didn't work as expected

#

def _sine_sample(length):

        shift = 2 ** 15
        for i in range(length):
            yield int(tone_volume * math.sin(2*math.pi*(i / length)) + shift)
#

'i' is an integer, so it does integer division and gets zero

#

Adding a float() cast makes it work? yield int(tone_volume * math.sin(2math.pi(float(i) / length)) + shift)

#

Sorry, discord is using double splats as bold

raven canopy
#

i get this in REPL:

>>> for i in range(length):
...     tone_volume * math.sin(2 * math.pi*(i / length)) + shift
...
32768.0
52027.9
63931.3
63931.3
52028.0
32768.0
13508.1
1604.76
1604.72
13508.0
tough flax
#

Scratch that, while Python on linux says (i/length) = 0, CircuitPython does the conversion(I guess0

#

Yep - just tested it

#

sorry for the misdirection

raven canopy
#

it was totally worth a look! had my brain convinced... ๐Ÿ˜„

tough flax
#

python 2.7 on Ubuntu (win10) does not convert them to floats

raven canopy
#

hows this for a head scratcher?

>>> math.pi(0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'float' object is not callable
>>> 2 * math.pi(0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'float' object is not callable
>>> 0 / length
0.0
>>> math.pi(0 / length)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'float' object is not callable
>>> math.pi(0.0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'float' object is not callable
>>>
tough flax
#

why would you pass 0 to a constant?

raven canopy
#

lol. i must need coffee...

tough flax
#

did you mean sin()?

raven canopy
#

i repeatedly missed the *

tough flax
#

Gotcha. Similar line in AudioOut.c where lots of integers are divided...

static void set_timer_frequency(Tc* timer, uint32_t frequency) {
    uint32_t system_clock = 48000000;
    uint32_t new_top;
    uint8_t new_divisor;
    for (new_divisor = 0; new_divisor < 8; new_divisor++) {
        new_top = (system_clock / prescaler[new_divisor] / frequency) - 1;
        if (new_top < (1u << 16)) {
            break;
        }
    }
tidal kiln
#

@tough flax just seeing your comments. d'oh! thought maybe you were on to something.

tough flax
#

yeah, sorry. I was looking at set_timer_frequency() and was wondering if the rounding down of the integers might be letting the new_top be higher than the prescaler can go? Not sure how this code works

tough flax
#

I should probably back off - I just saw something that I thought was it and didn't know that CP (or maybe Python 3.x?) had changed integer->float promotion

tidal kiln
#

thats a python 2 v 3 thing

raven canopy
#

i just ran some of the calcs in set_timer_frequency by hand. they seem to check out. i could of course hook up a jlink'd board...

tough flax
#

Gotta head home - following this issue (curious how it turns out)

manic glacierBOT
meager fog
#

@gentle bronze hi im around for another 2 or 3 hours if you need help with UART

gentle bronze
#

@ladyada ah thanks, I will ping you if needed. But uart is simple enough, no worries. Just need to know where to put thing :)

meager fog
#

ok no problem! yeah we did not have it before, but it is not a hard device i think, compared to i2c or spi. not as many options

#

hardest part is probably the timeouts

velvet oasis
#

Good morning! Two quick questions: 1) How do I reset the rotaryio? I want it only to count from 0 to 9

#

position = encoder.position

if position > 9:
    position = 9
if position < 0:
    position = 0
#

is there something like encoder.reset()?

#

Question 2) I see a picture of the M4 with an SD card slot. Where can I get one?

#

Thanks!

manic glacierBOT
timber mango
#
position = position & 0x0F
position = position & 0x07

(in pseudo-code)

If you can tolerate an exact power of two, that's an easy way to reset a counter.

upbeat plover
#

can you do text on TFT displays?

cunning crypt
#

@velvet oasis Where do you see this picture of an M4 with a SD slot?

solar whale
timber mango
#
import rotaryio
import time
from board import *

enc = rotaryio.IncrementalEncoder(D1, D2)
last_position = None
while True:
    position = enc.position
    if last_position == None or position != last_position:
        print(position)
    last_position = position

is the example listed in readthedocs

#

So you're going to do something to enc.position as there's no source code support for resetting it other than assigning it a new value.

#

(it does look like there is write-support for enc.position; it does not seem to be read-only)

solar whale
#

@upbeat plover What hardware are you using? Boardaand TFT? I have some examples that work on a feather_m0_express with the 2.4 inch tft

upbeat plover
#

tft joypad wing

#

or hallowing

#

i got both those

solar whale
#

Sorry - I have not gotten the joypad wing working yet and I don't have a Hallowing. Theya re a different chipset than the displays I have used so my examples will not be useful. Hoepfully others can help -- I know @slender iron has been doing a lot of work to add display control especially for the hallowing.

upbeat plover
#

will it work with 3.0.2 cp?

#

i was able to use the RGB lib, to draw squares and change background colors and stuff

solar whale
#

Good luck ! It works wit the ILI9431 TFTS, but I have no idea if it will work wit the ones you have.

upbeat plover
#

thanks ill give it a go

solar whale
#

FWIW - here is the exampel I use -- may help you get started ```
import time
import busio
import digitalio
from board import *

from adafruit_rgb_display import color565
import adafruit_rgb_display.ili9341 as ili9341
import bitmapfont

Configuratoin for CS and DC pins (these are FeatherWing defaults on ESP8266):

CS_PIN = D9
DC_PIN = D10

Config for display baudrate (default is 32mhz, about as fast as the ESP supports):

BAUDRATE = 1000000
MAXROW = 240
MAXCOL= 320

Setup SPI bus using hardware SPI:

spi = busio.SPI(clock=SCK, MOSI=MOSI, MISO=MISO)

Create the ILI9341 display:

display = ili9341.ILI9341(spi, cs=digitalio.DigitalInOut(CS_PIN),dc=digitalio.DigitalInOut(DC_PIN), baudrate=BAUDRATE)

display.fill(0)

with bitmapfont.BitmapFont(240,320,display.pixel) as bf:
try:
column=0
row=0
while(True):
bf.text('tft',row,column,color565(255,0,255))
row=row+10
if(row>=MAXROW):
row=0
display.fill(0)
column=column+20
if(column>=MAXCOL):
column=0
time.sleep(5)
except:
pass
finally:
pass

upbeat plover
#

awesome

solar whale
#

your mileage may vary ๐Ÿ˜‰

#

that demo just writes tft then moves down a row and over a few colums and keeps writing tft -- control-C to exit

gentle bronze
tulip sleet
#

@gentle bronze I think so, and this is for the '832 uart which is dedicated to talking to the USB-serial chip, right?

gentle bronze
#

yeah, it is

tulip sleet
#

think I might report the error in a different way. I'm confused as to why this works at all in the current build

gentle bronze
#

doing the busio, I think we could remove the jlink cdc option for nrf52840

#

assert with no debug build do nothing

tulip sleet
#

aha, i see, let me look for a better way to hang or report an error

gentle bronze
#

if ( NRFX_SUCCESS != err ) {
mp_raise_msg_varg(&mp_type_AssertionError, translate("error = %08lX "), err);
}

#

I current used this for busio uart, let's me know if there is a better way

indigo wedge
#

oh, that's wrong

tulip sleet
#

but serial_init() is called really early, before the CircuitPython VM is really set up

indigo wedge
#

but I think it won't assert on NRFX_SUCCESS so that's why it worked

gentle bronze
#

ah, I see the problem ๐Ÿ˜ƒ

tulip sleet
#

i would say don't even bother to check the return value

indigo wedge
#

that's not good practice

tulip sleet
#

does NRFX_ASSERT hang in a loop if DEBUG is enabled?

indigo wedge
#

i think it does a MP assert which does a exception

gentle bronze
#
#define NRFX_ASSERT(expr) ((expr) ? (void)0 : __assert_func(__FILE__, __LINE__, __FUNCTION__, #expr))
#else
#define NRFX_ASSERT(expr)
#endif ```
#
void MP_WEAK __assert_func(const char *file, int line, const char *func, const char *expr) {
    mp_printf(&mp_plat_print, "Assertion '%s' failed, at file %s:%d\n", expr, file, line);
    __fatal_error("Assertion failed");
}
#endif```
indigo wedge
#

ah, so it hardfaults

#

except hardfault handler does nothing on the nrf port

tulip sleet
#

in atmel we hang in a loop, so that you can do a stack trace in the debugger

indigo wedge
#
void NORETURN __fatal_error(const char *msg) {
    HardFault_Handler();
    while (true) {}
}
#

right

tulip sleet
#

is that from atmel or nrf port?

indigo wedge
#

it's from root main.c

tulip sleet
#

ok, that's good, so do that. @gentle bronze in general follow the practice of whatever the atmel port does

#

if you think the atmel practice is bad, fine to file an issue, but let's make it consistent for now

#

serial_init() is called in main.c after boot.py is run

indigo wedge
#

that seems odd, so boot.py won't print on serial?

gentle bronze
#

yeah, I will change the NRF_ASSERT() so that we can use it easier. we don't really need to check the value before calling assert

tulip sleet
#

@indigo wedge no, because you might want to set up serial in an usual way, disable USB serial

// By default our internal flash is readonly to local python code and
    // writable over USB. Set it here so that boot.py can change it.
    filesystem_writable_by_python(false);

    run_boot_py(safe_mode);

    // Start serial and HID after giving boot.py a chance to tweak behavior.
    serial_init();
#

etc. boot.py might do all kinds of config things of disabling, enabling, redirecting, etc.

indigo wedge
#

i see

tulip sleet
#

e.g redirect serial to tx/rx pins, etc. (not that we have that now)

idle owl
#

@tidal kiln Ping me when you're around.

tidal kiln
#

@idle owl i'm here but doing forum stuff

idle owl
#

Did the LSM9DS0 PR get tested?

tidal kiln
idle owl
#

Yes

tidal kiln
#

no. i don't have the hw.

idle owl
#

Ok

#

I probably do somewhere. I'll hold off on reviewing

#

@tidal kiln And the guides have been updated from this issue?

#

Forgot to paste. Oops.

tidal kiln
#

they have not

#

we could probably just ping dave and let him update his

idle owl
#

Why did that issue get closed then?

#

Oh because the actual issue was fixed.

tidal kiln
#

that. i guess.

#

guide updates are essentially different issues

#

the pr fixed the code issue, so close.

#

that's my thinking at least. i was just using the issue thread as a place to put reminders for updating the guides, and what guides, etc.

idle owl
#

@umbral dagger We made a change to the function names in LSM9DS0 to match the design guidelines. See: https://github.com/adafruit/Adafruit_CircuitPython_LSM9DS0/issues/4 . You will need to update your guide to match: https://learn.adafruit.com/adding-an-accelerometer-to-you-cricket-featherwing/code - Please let me know when you've completed it.

Provide accelerometer information for your Feather-based robotics project.

#

@tidal kiln You're correct. I was combining things in my head. I'll make another issue.

tidal kiln
#

just for guide update? wondering if github is best place for doing that?

umbral dagger
#

@idle owl on it

#

@idle owl I'm failing to see the problem. The constructor and accelerometer use jives with the lsm9ds0 driver in github.

idle owl
#

@tidal kiln I think it is. It's a good place to track any related things to the lib.

tidal kiln
#

@umbral dagger updates haven't been released yet. so it's not in bundle version.

idle owl
#

@umbral dagger It's acceleration in the lib...

umbral dagger
#

ok. I was going from what was linked from the bundle.

idle owl
#

Ah ok. You had me confused as well ๐Ÿ˜ƒ

umbral dagger
#

I see it now.

tidal kiln
#
accelerometer -> acceleration
magnetometer -> magnetic
gyroscope -> gyro
umbral dagger
#

PR submitted

idle owl
#

Done! Thanks!

umbral dagger
#

np

prime flower
idle owl
#

@prime flower In the middle of something at the moment.

#

@tidal kiln Do you have an LIS3DH not attached to a CPX? And a few minutes to check something for me...

tidal kiln
#

@idle owl probably. let me see if i can dig it up...

#

@idle owl bingo! got hands on a PID2809

idle owl
#

Beautiful.

#

Wire it up to something with INT connected to D9 (Feather is what I have, not sure everything has a D9) using I2C

#

Then try this. Double-tap it and see whether it responds like it should in the serial console.

tidal kiln
#

which feather? i'll try and match

idle owl
#

M0

#

Oi, running 3.0.0. If yours is different, I'll upgrade to 3.0.2

tidal kiln
#

can match that also. let me know.

idle owl
#

ok do 3.0.0

#

For me it's missing a double-tap every so often, but it's not returning multiple Trues on any of them. Missing them every so often is kind of expected I suppose.

#

The issue was that it was returning multiple Trues before.

tidal kiln
#

seems to be working ok?

Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit Feather M0 Express with samd21g18
>>> import lis3dh_test
Tapped!
Tapped!
Tapped!
Tapped!
Tapped!
idle owl
#

Ok

tidal kiln
#

yah, kind of misses, but i think that's expected

idle owl
#

Then I guess we resolved the issue with the int pin but never bothered to test the update.

#

Good enough, thank you

tidal kiln
#

not getting multiple Tapped! from one event
not getting Tapped! from a single tap

idle owl
#

Oh.

tidal kiln
#

so, yah, guess it works?

idle owl
#

hmm.

#

Oh I see. I thought you meant you changed the code. Yes, it appears to work

tidal kiln
#

yep. was just trying other possible failure modes.

#

other than it missing sometimes, i'm not seeing anything odd

idle owl
#

I tested single-tap too. But I upped the threshold, which I remember we had to do

#

seems to work

#

Lower threshold it seems to detect the bounceback and return multiple True

tidal kiln
#

hmmm. isn't there some kind of time window parameter also....

idle owl
#

Yeah there's a whole thing for it.

#

But this is the simpletest so meh

tidal kiln
#

meh

idle owl
#

@tidal kiln Can you test SPI as well? Seems to be working for me.

tidal kiln
#

but i'd have to hook up another cable

idle owl
#

Yah... no worries. I think we fixed it. I'll close the issue.

tidal kiln
#

jk. hold....

idle owl
#

Holding.

tidal kiln
#

oh. AND CS. two cables!

idle owl
#

The nerve of me!

tidal kiln
#

should i switch to D6 for int like the code, or keep using D9?

idle owl
#

swap it

tidal kiln
#

two cat paw thumbs up!

Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit Feather M0 Express with samd21g18
>>> import lis3dh_test_spi
Tapped!
Tapped!
Tapped!
Tapped!
Tapped!
idle owl
#

woah cat thumbs! Way better than human thumbs.

manic glacierBOT
idle owl
#

Thank you @tidal kiln !

#

@tidal kiln Do you want to chat about lib work?

tidal kiln
#

maybe in a hour? want to get through some forum stuff.

idle owl
#

No problem. Sounds good.

tidal kiln
#

want me to ping you?

idle owl
#

Sure.

manic glacierBOT
slender iron
idle owl
#

Sure.

slender iron
#

thanks!

idle owl
#

In theory anyway....

manic glacierBOT
#

From https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/issues/40

@caternuson says:

Agree, I think it's going to be something lower level than CPX. I can recreate with this:

import array
import math
import time

import board
import digitalio
import audioio

speaker_enable = digitalio.DigitalInOut(board.SPEAKER_ENABLE)

# Generator thing
def sine_sample(length):
    tone_volume = (2 ** 15) - 1
    shift = 2 **...
tidal kiln
#

@slender iron i can't recreate issue. there are several posters and several linked codes, etc. i think i tried them...

idle owl
#
code.py output:
Traceback (most recent call last):
  File "code.py", line 4, in <module>
  File "adafruit_crickit.py", line 56, in <module>
MemoryError: memory allocation failed, allocating %u bytes```
tidal kiln
#

the robot code:

Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit CircuitPlayground Express with Crickit libraries with samd21g18
>>> import robot_test.py

the code that virtualbrooklyn posted:

Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit CircuitPlayground Express with Crickit libraries with samd21g18
>>> import cpx_crkt_ir_test

the code that acknak posted:

Adafruit CircuitPython 3.0.0 on 2018-07-09; Adafruit CircuitPlayground Express with Crickit libraries with samd21g18
>>> import cpx_crkt_ir_test2
slender iron
#

@tidal kiln I've been helping the person at the end

tidal kiln
#

hmmm. maybe it's with how i'm testing?

slender iron
#

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

idle owl
#

I grabbed the demo code from the guide that the last person linked.

#

And I get that.

#

Presumably as soon as a signal is received because it doesn't fail until the controller-code-CPX is in IR range.

tidal kiln
idle owl
#

No nm, it fails regardless.

#

Yes.

#

Two CPXs, running 3.0.2, most recent lib bundle as well.

tidal kiln
#

that's what i put in robot_test.py

idle owl
#

Debug is on so I can see things printed out since I don't have a robot to control.

#

Let me kill debug.

#

Same thing.

tidal kiln
#

let me put it in code.py and see if that matters....

idle owl
#
code.py output:
Traceback (most recent call last):
  File "code.py", line 4, in <module>
  File "adafruit_crickit.py", line 56, in <module>
MemoryError: memory allocation failed, allocating 84 bytes```I got a number this time.
#

Deleted PyCharm's little folder, and I get failed 84 bytes every time now.

tidal kiln
#

and i still get nothing:

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
#

i'm not generating any IR signals though

idle owl
#

Failing here: from adafruit_motor.servo import Servo, ContinuousServo

tidal kiln
#

with debug on:

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Failed to decode: ('10 pulses minimum',)
Failed to decode: ('10 pulses minimum',)
Failed to decode: ('10 pulses minimum',)
#

so i take it it's running

idle owl
#

I'm not getting that. Apparently yes.

tidal kiln
#

let me try with 3.0.2

idle owl
#

Ok

tidal kiln
#
Adafruit CircuitPython 3.0.2 on 2018-09-14; Adafruit CircuitPlayground Express with Crickit libraries with samd21g18
>>> 

and then...

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Failed to decode: ('10 pulses minimum',)
Failed to decode: ('10 pulses minimum',)
#

so i dunno

idle owl
#

hmm.

tidal kiln
#

@idle owl wanna talk libs now?

idle owl
#

Yeah sure

sharp rain
#

So, I've successfully used the circuit python AVR programmer library that @meager fog wrote (i guess?) to program my attiny85. Super cool, and easy.

#

My question now is - has someone designed a feather wing PCB for this, essentially so I can have a low budget: https://www.sparkfun.com/products/11801

#

I mean, I have it all hand soldered on a massive breadboard, but... sure would be nice if it was a tidy little thing with a DIP socket...

#

I have all the essential parts sitting around, just not the wing PCB design for the 6 traces...

tulip sleet
#

@sharp rain we have sold this for many years: https://www.adafruit.com/product/46. But the CPy AVR programmer is just wires and a socket, as far as I see: no extra microcontroller needed (as is included with the USBTinyISP or the SparkFun thingie). So you just need to wire a socket to the appropriate pins. You could just use a Featherwing Proto for that: https://www.adafruit.com/product/2884

sharp rain
#

@tulip sleet oh sweet. also thanks for the pointer on the cpy avr lib, so easy ๐Ÿ˜„

manic glacierBOT
manic glacierBOT
slender iron
#

anyone around to review ๐Ÿ‘† ?

tough flax
#

I can pull that, build and test on the CPX that failed last night? Would that be helpful?

slender iron
#

sure!

#

thats a review

tough flax
#

I pulled the UF2 and got these errors

Traceback (most recent call last):
  File "main.py", line 20, in <module>
  File "adafruit_circuitplayground/express.py", line 594, in play_tone
  File "adafruit_circuitplayground/express.py", line 620, in start_tone
  File "adafruit_circuitplayground/express.py", line 574, in _generate_sample
TypeError: extra positional arguments given

Do I need to pull changes to the libraries?

#

@slender iron - shouldn't those changes have been frozen in?

slender iron
#

where did you pull the uf2 from?

#

sounds like a version mismatch

tough flax
#

built it from your branch

slender iron
#

did you make sure submodules are up to date? what does git status show?

tough flax
#

cloned your repostitory, then checked out the branch from that PR

slender iron
#

hrm

tough flax
#
bill@MSI:~/tannewt/circuitpython$ git status
On branch wrong_playback_frequency
Your branch is up to date with 'origin/wrong_playback_frequency'.

nothing to commit, working tree clean
#

`git submodule update --init --recursive

slender iron
#

what is on your circuitpy drive?

tough flax
#

Nothing much - no libs, just what I needed to run that example last night

slender iron
#

hrm, what version were you using last night?

tough flax
#

3.0 from Git

#

I'll reinstall the libraries?

slender iron
#

it should be like 3.0

tough flax
#

let me put back the old UF2 and make sure it furns

slender iron
#

ah, it could be the version number

tough flax
#

yep, the old UFT works.

slender iron
#

I'm not sure what you'll get with that build

#

it may not have the tag on it

tough flax
#

UF2 that is...

#

Ok, how do I get this build then?

#

Want to share the UF2? Is that adequate?

slender iron
#

what does git describe --tags give you?

tough flax
#

v1.9.3-2273-g655f22391

slender iron
#

mine is 3.0.2-1-g655f22391

#

you must not have all the tags

raven canopy
#

yeah...thats the micropython tag, no?

slender iron
#

k try pulling from my repo again

#

I just pushed tags to it

tough flax
#

rebuilding

#

clean needed?

slender iron
#

maybe

#

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

tough flax
#

ok... hold on

#

This will take a few

slender iron
#

did the git describe change?

tough flax
#

I got the tags

slender iron
#

kk

tough flax
#

I saw it get the tags

slender iron
#

k

tough flax
#

I was thinking about your sound bug (while this builds)

#

I think the issue was when it chose the 1x prescaler

slender iron
#

heh, thats what its fixing

tough flax
#

Given that we know the audio will be between 20-20K, can't we just choose a prescaler?

#

Good!

#

I'm not nuts

slender iron
#

its not the prescaler, the TC is correct

#

its the DAC that couldn't keep up

tough flax
#

But it could keep up when it was using the 2x?

slender iron
#

the datasheet has a misleading clock limit in it that we followed in 3.x but not 2.x

tough flax
#

Sounds are not jumping around (yay) - I can't tell if they're accurate - you want me to play 440 and hit my piano?

slender iron
#

I was measuring with a saleae

tough flax
#

No failures and it definitely is not jumping around

slender iron
#

its pretty close and varies a bit with the internal clock calibration

tough flax
#

Yay you!

slender iron
#

๐Ÿ‘

tough flax
#

Is everything running faster? Or just the DAC?

slender iron
#

it was trickier than I expected

#

just the dac

tough flax
#

cool

#

BTW, are you an emacs user?

#

or vim?

slender iron
#

nah, atom

tough flax
#

atom... will it use etags/ctags?

slender iron
#

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

tough flax
#

I was thinking about making a video every once in a while about "ancient incantations" like 'ctags/etags'

slender iron
#

๐Ÿ˜ƒ

tough flax
#

I've been using Emacs & etags for 25+years... and it saves my butt when I need to figure out a new code base

#

basically it gives you an early version of intellicode

#

Alt-. jumps to the function call

#

'tag-query-replace' will replace a string in every file in the entire source tree

slender iron
#

ya, I'm bad about using that

tough flax
#

It's like magic

#

vim users will tell you VI does the same (it does), but that's not the point of sharing this - it's for the young folks who can't work effectively when they are editing text on Linux

slender iron
#

@raven canopy are you waiting for me on the frequency stuff?

raven canopy
#

not necessarily. i know there are pressing matters (hallowing, etc)

slender iron
#

i'm looking at in now

raven canopy
#

๐Ÿ‘

slender iron
raven canopy
#

how so?

slender iron
#

MC interrupt isn't used

raven canopy
#

according to the DS and what i've seen, any capture regardless of the EVACT will set the MCx intflag...

slender iron
#

but trigger a count on an event isn't a capture

raven canopy
#

hmm...that makes sense. and is probably where i'm going wrong on using COUNT. So disable the TCEI and CAPTEN?

slender iron
#

reference clock setup looks right to me

#

just the capten I think

raven canopy
#

k. i can give that a shot after dinner.

slender iron
#

and ignore MC0 in the interrupt handler and just read the count

#

sorry it took so long for me to look. have a good dinner!

raven canopy
#

yep. and...i apologize; that code is dirty with all the old stuff still in it.

#

no worries. like i said, i understand priorities. ๐Ÿ˜„

slender iron
#

np, no sense in cleaning it if you are experimenting

raven canopy
#

do you want all that DPLL1 stuff moved over to peripherals? well, better question, do you want to be able to turn DPLL1 on/off elsewhere?

slender iron
#

not yet, lets wait until we do low power stuff

raven canopy
#

k. that just limits M4 use to boards with a crystal, since we can't setup the gclk generator without syncing.

manic glacierBOT
raven canopy
#

which, i don't think there are crystalless M4 yet anyway...

slender iron
#

we don't use the crystal yet anyways afaik

raven canopy
slender iron
#

why not use the 32k clock for the reference's GCLK? not sure why you need the dpll

#

thanks for the review comment @tough flax !

raven canopy
#

i tried. it locks up waiting for the sync...

slender iron
#

ah, hrm

raven canopy
slender iron
#

how close does it get if the FREQM uses the open loop dpll?

raven canopy
#

which is why i was going to move it. ๐Ÿ˜„

#

with FREQM, the lower values were comparable to M0. but, in the higher range it was farther off than without it.

slender iron
#

without the dpll?

#

how far off? good enough to start with?

raven canopy
#

yeah (to without dpll). which i think is a result of having the FREQM check the frequency during get_item instead of the interrupt.

slender iron
#

hrm seems like it should be the same reading from the FREQM

raven canopy
#

datasheet said something like 46 - 49 MHz. so, at a higher frequency capture, the clock shifts between the time the capture is recorded and get_item is called, and manifests larger swings. the math just isn't as smooth when dealing with 48000000 / 135 vs 48000000 / 134. at least, that's my theory...

slender iron
#

how does the reading change after its recorded?

raven canopy
slender iron
#

I think you are getting too fancy with that

#

ignore the fact that the dfll isn't perfect

raven canopy
#

haha. i rarely get accused of fancy. ๐Ÿ˜Š

slender iron
#

๐Ÿ˜ƒ assume it's 48mhz and measure the external signal against it

#

later we could add a way to provide a reference clock signal

raven canopy
#

that's how it was done originally. and jepler noted the inaccuracy and swing (i saw it too).

slender iron
#

its not important for most cases like the light sensor

#

get it going first with the basics and then allow jepler to provide a reference clock

raven canopy
#

k. i think the addition of the controller clock is very value added. allows a much higher range. thanks for that suggestion.

slender iron
#

totally, its interesting but not important for first pass

raven canopy
#

kitchen timer finally went off... ๐Ÿฝ

slender iron
#

byeee!

manic glacierBOT
#

@tannewt (or whoever), I think I'd like to go ahead and add a module for this. It's trivial - just one method that checks whether there is input available on the console. In theory, it should be temporary as the updated async IO code would replace it. However, I think there are some use cases (including two of mine now) where this one feature is blocking other solutions.

So, the question is where this code should live. My first thought was under ports/atmel-samd... but then I saw that ...

manic glacierBOT
tidal kiln
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Will there be a way to get a UART interface "on top of" the console? That is, will we be able to use these IO methods to talk to the USB Serial port (ala input() / print())?

If so, I'd like to offer to help test/debug this effort (point me at the right person please). If not, I think I'll add the "usb_bytes_available" module that Scott requested instead of the input() timeout.

Bill

pastel panther
#

anyone use the CP dotstar library?

#

I can't seem to assign colors as anything other than a tuple of ints. I was under the impression you should be able to use a tuple of floats as well

tough flax
#

Iโ€™ve only ever set them to 0-255 ints. Of course you can scale and cast your floats if needed

pastel panther
#

I think there is a bug on line 160 of the library; it seems to be assuming that the value passed to set the color is a tuple

tough flax
#

It is a tuple. (Red, Green, Blue)

pastel panther
#

not always, I don't think

tough flax
#

0-255 each

pastel panther
#
        value can be one of three things:
                a (r,g,b) list/tuple
                a (r,g,b, brightness) list/tuple
                a single, longer int that contains RGB values, like 0xFFFFFF
            brightness, if specified should be a float 0-1
tough flax
#

Humph. Ok. Iโ€™ve written my own hex code to tuple function

pastel panther
#

I think I see the bug/fix; I'll take a look after I get some quality time with these foster kittens ๐Ÿ˜ป

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
idle owl
#

@tidal kiln Hmph.

tidal kiln
#

@idle owl memory allocation thing?

idle owl
#

Yes

tidal kiln
#

hmph indeed

idle owl
#

My first instinct is to blame the Crickit lib, but it's worked for most of this all along, so...... (To be fair, my first instinct is always to blame the CPX lib too, and it's essentially the same thing.)

tidal kiln
#

also - i can't repeat the issue

idle owl
#

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

tidal kiln
#

and that's two cases doing the same thing

idle owl
#

I managed to get it to fail, remember?

tidal kiln
#

how about that second one?

idle owl
#

Haven't tested it. I have a Thing to do first.

manic glacierBOT
#

Ok, no worries.

On Wed, Sep 19, 2018 at 4:03 AM Nick Moore notifications@github.com wrote:

Hiya Scott, not yet but I'm working on rearranging the micropython-style
code as it currently is into the circuitpython shared-modules style.
I'll get some work done on this tomorrow ...
-----N

โ€”
You are receiving this because your review was requested.

Reply to this email directly, view it on GitHub
https://github.com/adafruit/circuitpython/pull/1164#issuecomment-422758434,
...

idle owl
#

@prime flower Did you do the PyPi setup on HCSR04?

prime flower
#

@idle owl Yeah

idle owl
#

@prime flower In setup.py, you didn't change packages=['adafruit_hcsr04'] to py_modules=. packages is only valid when the driver files are multiple files found in a directory. When it's a single .py file in the root directory, you need to change it to py_modules. The last step before creating a PR for the PyPi setup, is to run python3 setup.py sdist to test. It failed when I ran it. If you're going to complete the PyPi setup in the future, please be sure to test it by running that before creating the PR. Travis will pass on the PR because it isn't attempting to deploy it to PyPi yet. On release, it would have failed if I hadn't tested it first. You can also run python3 setup.py install to verify further.

prime flower
#

so it should have been py_modules=[adafruit_hcsr04]

idle owl
#

Correct.

#

I've already taken care of updating it. I wanted to make sure you knew.

prime flower
#

and then run a verification to test install

idle owl
#

Yes

prime flower
#

ok, will do, marked it in my notes for single-files

#

Thanks for letting me know

pastel panther
idle owl
#

You're welcome.

#

@pastel panther It's ... okay. It covers the basic concept but it doesn't really explain how to make something truly CircuitPython. I think it's all we have though. I would say use it, but bear in mind that what you port needs to be CircuitPythonified, not simply ported.

pastel panther
#

Do you have a good before/after example of an arduino'd vs CPy'd driver?

idle owl
#

@slender iron For adding CircuitPythonLibrarians to a repo, the team needs write access, right?

slender iron
#

ya

idle owl
#

@pastel panther Hmm. Good question. I feel like probably but I don't know of one off the top of my head. Seems like something we should have though. @slender iron Any ideas for this one?

#

Example of a well-ported-from-Arduino CircuitPython-lib

slender iron
#

not any one thing

idle owl
#

ok yeah same

slender iron
#

the design guide has some tips

raven canopy
#

I used the Trellis and VEML6070 Arduino libraries to port over...

pastel panther
#

thanks @raven canopy

tidal kiln
idle owl
#

@slender iron Trying to run adabot. I'm missing something. I feel like I'm supposed to run something before I run adabot, and I can't remember what.

#

Says Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/kattni/repos/adabot/adabot/circuitpython_libraries.py", line 26, in <module> import requests ModuleNotFoundError: No module named 'requests'

slender iron
#

enable venv?

pastel panther
#

I'll go over the design guide and give it a first pass

raven canopy
#

@pastel panther look at the PR reviews on Trellis. Scott had some good CircuitPythonic points on that.

pastel panther
#

@raven canopy Ah yes, of course! Good idea

idle owl
#

@slender iron Oi, yes. Thanks. Isn't there some other thing too though? Now it's failing KeyError: 'login' which I think was some other command to run.

slender iron
idle owl
#

yessss

manic glacierBOT
idle owl
#

I kept thinking "environment variable" but that wasn't right.... ๐Ÿ˜„

#

Thank you ๐Ÿ˜Š

tidal kiln
#

@pastel panther the biggest TLDR is probably the use of @property instead of getter/setter funcs.

raven canopy
#

@idle owl @tidal kiln Longshot on the CPX Crickit problem: compare bootloaders?

tidal kiln
#

@raven canopy hmmm. ok will ask for the info.

#

FWIW, this is me:

UF2 Bootloader v1.21.0 SFHR
Model: Feather M0
Board-ID: SAMD21G18A-Feather-v0
idle owl
#

Forgot where to find that

raven canopy
#

Bootloader mode, info.txt (I think).

#

Or...info_out?

idle owl
#
Model: CPlay Express
Board-ID: SAMD21G18A-CPlay-v0```
#

INFO_UF2

#

close enough ๐Ÿ˜„

raven canopy
#

Yeah..like I said. ๐Ÿ˜†

tidal kiln
#

yours is one louder

manic glacierBOT
#

Yes, it would be a second COM or tty port, and distinguishing them is probably going to be a problem. In Windows 10 it would just be another "USB Serial Device", unless we had the user install drivers, but we've been trying to get away from that given that Windows 10 has innate usbser.sys support. On Windows 7 we would need to add the USB PID to our current driver list, so it would be identifiable in Device Manager. Linux would be another /dev/ttyACM<n>.

tulip sleet
tidal kiln
#

@tulip sleet think that could matter for that issue?

solar whale
#

@tulip sleet have you tried current master on a feather_nrf52832 yet? it seesm to have bricked mine...

#

ah - nevermind -- it was an SD mismathc -- the nrf Bootlader loads SOFTDEV 6..1.0 -- the CP build uses 2.0.1

#

it works if they are consistent.. set both to 2.0.1 ---

tulip sleet
#

@tidal kiln I don't actually think so

solar whale
#

hmm - there is no SD-s132 SOFtDEV - 6.1.0 -- it gets very confusing

tidal kiln
#

is confusing the theme of the day?

#

for the thread where they are using a feather:

UF2 Bootloader v1.18.0 SFHR
Model: Feather M0
Board-ID: SAMD21G18A-Feather-v0
tulip sleet
#

@tidal kiln i'm reading the forums posts now

tidal kiln
#

awesome. thanks.

tulip sleet
#

@tidal kiln how about importing crickit as the very first thing? Also, neopixel is frozen in, but the frozen version won't be used if it's in lib/ or elsewhere on the path. If crickit is imported first, it will change sys.path to have .frozen first. And/or just remove or rename the neopixel lib on the filesystem

manic glacierBOT
tidal kiln
#

@tulip sleet that seems to have worked for the feather one

#
Press any key to enter the REPL. Use CTRL-D to reload.
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Ranger ON
manic glacierBOT
tulip sleet
#

@tidal kiln my guess is that JP had no lib/ directory

manic glacierBOT
#

Here's what Windows (PowerShell) can see easily about a Serial Port... perhaps we can control something in here:

__GENUS                     : 2
__CLASS                     : Win32_SerialPort
__SUPERCLASS                : CIM_SerialController
__DYNASTY                   : CIM_ManagedSystemElement
__RELPATH                   : Win32_SerialPort.DeviceID="COM30"
__PROPERTY_COUNT            : 47
__DERIVATION                : {CIM_SerialController, CIM_Controller, CIM_LogicalDevice,...
idle owl
#
code.py output:
Traceback (most recent call last):
  File "code.py", line 1, in <module>
  File "adafruit_crickit.py", line 57, in <module>
  File "adafruit_motor/motor.py", line 90, in DCMotor
MemoryError: memory allocation failed, allocating %u bytes```
#

Even with Crickit first.

#

From the other issue, not the new one

#

I haven't tested the new one

#

Simply plugged in the CPXs from yesterday

tidal kiln
#

hmmm. yah. all the imports are built ins. let me try that too...

#

@tulip sleet bingo! put crickit import back to last, deleted lib folder, and it works.

#

switching to CPX....

idle owl
#

Oh wait.

#

I don't have the Crickit build on this.

tulip sleet
#

This washing machine is running really close to full -- any more clothes and it overflows

idle owl
#

That seriously sounds like a code phrase.

#

Like it needs a code response: "There are no more clothes to add, everything is clean."

tulip sleet
#

The oak trees in the ravine have twelve squirrels. Pass it on.

idle owl
#

@tidal kiln Now I get this with the Crickit build Auto-reload is on. Simply save files over USB to run them or enter REPL to disable. code.py output: Traceback (most recent call last): File "code.py", line 4, in <module> File "adafruit_crickit.py", line 373, in <module> RuntimeError: SDA or SCL needs a pull upI suppose I need to have it on a Crickit?

tidal kiln
#

yep

idle owl
#

blergh. ok ok. Travis is being a jerk anyway. I'll go find my Crickit.

tidal kiln
#

hmmm. i still can't get the CPX one to show the issue...

Adafruit CircuitPython 3.0.2 on 2018-09-14; Adafruit CircuitPlayground Express with Crickit libraries with samd21g18
>>> 
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Failed to decode: ('10 pulses minimum',)
solar whale
#

@tulip sleet @gentle bronze @indigo wedge before I file an issue - I thought I'd just ask here -- What is the recommended SOFTDEVICE for the feather_nrf52832 Board.? The nrfBootloader builds an s132 - 6.1.0 Softdevice and loads it t by default with make sd but the CP build defauls to s132-2.0.1 and there is no file for s132-6.1.0. Just curious what is recommended and should they be made consistent?

tulip sleet
#

@solar whale as of c135c7f they all should be 6.1.0. Where is 52832 2.0.1 set? We should fix that, I believe

idle owl
#

Now it's doing this: Auto-reload is on. Simply save files over USB to run them or enter REPL to disable. code.py output: Traceback (most recent call last): File "code.py", line 58, in <module> File "adafruit_irremote.py", line 217, in read_pulses MemoryError: memory allocation failed, allocating 512 bytes

tulip sleet
#

I see - the .ld file is 2.0.1. Probably need to wait for @gentle bronze to wake up and comment. The newer versions are bigger and there may be a space issue.

solar whale
scenic jetty
#

anyone want to help contribute to the micropython based esp32 badge for open hardware summit?

solar whale
#

there is only an s140-6.1.0

scenic jetty
#

it'll be fun I swear

stuck elbow
#

what kind of contributions are you thinking about, if the badge is ready?

scenic jetty
#

we have 300 badges that are been shipped to boston today I think

#

I have a proto and one of the latest on my desk

solar whale
#

@tulip sleet I'm happy to wait for @gentle bronze to look into it -- I had been using sd132 and 5.0.0 on the nrf52832. When I built the latest master - something got confused and the board is not at all happy when the SD does not match! - for now, I went back to 2.0.1 and it is all working. I know its undergoing rapid change and just wanted to know how best to proceed.

gentle bronze
#

@solar whale @tulip sleet 2.0.1 is the offical version for S132. Last time when we discussed whether we should drop the v2 support and migrate to v5/v6 for nrf52832. @indigo wedge want it as part of his new ble API, so I just leave the S132 as it is. Didn't touch it since then

#

the bootlaoder s132 v6 in the bootloader repo is meant for using with Arduino repo

#

it is dual purpose, you can either flash arduino or cpy

tulip sleet
#

can we make the SD be part of the CircuitPython image, or does it have to be flashed separately (or is it already part of it and I am worrying about nothing)?

solar whale
#

@gentle bronze ah -- that makes sense -- @tulip sleet you can load the SD from the CP repo now

#

nevermind -- I misunderstood your question

#

I'll just stay with 2.0.1 until someone says to upgrade -- thanks. -- just rememebr to flash the SD from the CP repo and not the Bootloader repo.

gentle bronze
#

@tulip sleet it is possible, just need to make sure setting/config memory is right. if thing go wrong it could easily brick the feather board.

scenic jetty
gentle bronze
#

I have an issue to allow update sd using uf2 in bootloader repo

#

actually, I think update SD via uf2 make more sense than making it as part of CP

tulip sleet
#

but ideally if SD is included then if/when it's updated it will be part of the CPy uf2 so people don't have to download two things and make sure they are in sync.

#

did we wake you up ๐Ÿ˜ƒ

#

time is 0223 in vietnam

gentle bronze
#

no, I am doing uart io, the nrfx uart behaves in a way I didn't understand, weird, uart is supposed to be easy

#

๐Ÿ˜ฆ

solar whale
#

too many discord alerts !!

gentle bronze
#

if SD could be update via uf2

#

then include it as part of the CP or not, is your choice

#

your can bundle both cpy and sd within a single uf2

#

I think

tulip sleet
#

i thought SD was just another thing that is flashed, but if uf2 depends on it... Or maybe it's an issue of doing an update over BLE

gentle bronze
#

uf2 only need usb, only OTA require the SD

#

though, bootloader only needs a bit of tweak

#

what I mean is you can upgrade SD using msc uf2 file

#

and a uf2 file can be composed of CPY and SD

#

currently bootloader doesnt allow to write to SD region.

tulip sleet
#

@gentle bronze thanks for explanation

scenic jetty
#

@stuck elbow just pulling together disparate pieces and making a final image

solar whale
#

@gentle bronze yes, thanks -- I hope you get some sleep soon!

gentle bronze
#

@tulip sleet can you file an issue on bootloader repo, list what you want to achieve there. It is possible, just take time to make sure it is done right

tulip sleet
#

i'll talk with scott about this too, to make sure I understand all the issues. will be seeing him tomorrow

gentle bronze
#

thse may be related

stuck elbow
#

@scenic jetty what pieces in particular?

#

@scenic jetty I assume it's not CP?

scenic jetty
#

@stuck elbow nah just vanilla micropython with some hacks

#

@stuck elbow guess it would be hard to help without the hardware

gentle bronze
#

@tulip sleet in short, pre-built bootlaoder come with a version of SD. cpy make can choose to combine SD + CPY in to a single firmware.uf2 to flash

stuck elbow
#

@scenic jetty an esp32 board is easy to get

gentle bronze
#

while Arduino will only flash the application.

#

don't worry if you have to flash SD over and over, the bootloader will just skip the flash page that already hs the same contains.

scenic jetty
#

@stuck elbow well the webserver side could but done with an esp32 board

gentle bronze
#

so you are actually don't flash anything within the SD.

scenic jetty
#

@stuck elbow drew wants to be able to provision/update the board via a webserver

stuck elbow
#

why not the existing OTA update for micropython?

tulip sleet
#

@gentle bronze can arduino work with multiple versions of the SD, or is it tied to one?

stuck elbow
#

how much time you have? the ota update feature took half a year to develop, iirc

gentle bronze
#

@tulip sleet it has a drop down menu for use to pick, they must upgrade bootloader+SD to work. From v2 to v5 the whole SD API is not compatible

#

the size is the first simple thing, the API parameter are all different

#

worst, even the SVC number, the one that nordic used to execute SD function is changed as well

tulip sleet
#

but can you choose V2 vs V5 vs V6 in Arduino, that is, choose the one you want to match your code requirements? Or is the BSP tied to a particular version?

gentle bronze
#

yeah

#

user can choose now using the IDE, it will pick the different ld file

#

and run a different set of API and thus software flow as well.

tulip sleet
#

sounds good

gentle bronze
#

but in the next major version of arduino BSP, user will need to flash the latest bootloader to run with latest bsp

#

I won't be able to maintain both software flow

#

we keep both v2 and v5 option back since that was the first time we allow user to upgrade bootloader + SD

#

which can easily brick and lead to support headache. Arduino user normally don't own jlink to recover

scenic jetty
#

@stuck elbow send me some info about the OTA feature and I will take a look

tulip sleet
#

i can understand not being able to continue supporting the old ones

scenic jetty
#

@stuck elbow I have until Monday

#

@stuck elbow the conference is next week

stuck elbow
#

@scenic jetty ouch

scenic jetty
#

@stuck elbow yeah I have been very busy and no one else seems to have ran with the software

stuck elbow
#

as most of micropython, the ota update stuff is very poorly documented

gentle bronze
#

Arduino user is screaming since I am hiding the whole time :))

stuck elbow
#

I never used it myself, but it was one of the kickstarter goals

#

no idea how that applies to esp32

solar whale
#

@gentle bronze Thank you for taking the time to clear things up.

gentle bronze
#

@solar whale np, I should make it clearer for you at first ๐Ÿ˜„

solar whale
#

@tulip sleet let me know if there is anything I can do to help -- I have been building/testing master with the 3.x merges on various boards. othere then the confuison with the nrf52832, no problems yet. metro m4, gemma_m0, itsybitsy_m0, nrf52840 dongle and now feather_52832 all OK

solar whale
#

note to self - and anyone who cares -- when going from Arduino to CP on an esp8266 -- erase the chip first!

tulip sleet
#

my alias: alias esp8266-upload='esp8266-erase; esptool.py --baud 460800 write_flash 0'

stuck elbow
#

I'd use && instead of ;

upbeat plover
#

@solar whale helped me get text to display on hallowing but its upside down? how can i fix it? is there a way to change the pixel update order? was think it might flip it if it wrote the opposite direction

tulip sleet
#

@idle owl I don't know if this is your travis issue, but sphinx 1.8.0 was released, and it breaks travis. We had to put a version restriction into the circuitpython .travis.yml files. But I thought the libraries did not run sphinx themselves?

idle owl
#

@tulip sleet I don't think that's the problem here.

#

It's making it through all of that part

raven canopy
#

in case anyone is wondering, the toolchain works on Bionic. and good lord, building in VM is soooo much slower. ๐Ÿ˜„

royal ridge
#

OK, this is quite possibly an "I'm being blind and not seeing it" question, but what's the current "gold standard" for drawing text on a tft featherwing? I was using https://github.com/adafruit/micropython-adafruit-bitmap-font but it's giving me the incompatible .mpy failure and I'm not seeing where else to go at the moment.

lunar crown
#

What is the best tutorial or readable example of how to write and compile C language modules for execution as importable modules under Circuit Python?

tulip sleet
#

@lunar crown there is a lot of boilerplate to add C language modules. See circuitpython/shared-bindings for the common code, and then in each port (e.g. ports/atmel-samd), see common-hal. If the C code can be shared across ports, see examples of that in circuitpython/shared-module/

royal ridge
#

OK, so, found the problem. bitmapfont is not good for 3.X, but works with 2.X.

sand blade
#

Hi folks. If this is the wrong forum let me know. I have a Circuit Playgroud Express Developer Edition. Is that compatible with the current circuit python code for the CPE?

pastel panther
#

@sand blade Yup, it sure is

#

Depending on when you got it, you'll probably want to update the version of circuit python on it to the latest release

sand blade
#

I did.

#

but the example main.py does not run

#

the example blink works but if I put the main.py into code.py... nothing.

tidal kiln
#

do you have both files?

sand blade
#

<running upstairs to get the board>

#

yes, both are there @tidal kiln

lunar crown
#

@tulip sleet Thanks. I'll start reading.

tidal kiln
sand blade
#

If I understand correctly it will try to run code.py code.txt main.py and main.txt in that order

raven canopy
#

@lunar crown like Dan said, definitely study shared-bindings and the common-hal. but, for a "condensed" version of the process, there are a couple PRs open adding modules/sub-modules. #839 and #1144.

tidal kiln
#

It may be a copy error when copied the code. Can you paste contents of code.py here.

pastel panther
#

@sand blade I would make sure you have a copy of the blinky code off the device, delete both files, and then copy it as main.py

sand blade
#

should I just be able to delete files?

#

i am getting read only file system error

pastel panther
#

try removing the usb cable and then replacing it, then trying again

sand blade
#

@pastel panther that let me delete it

#

but it does not look like main.py is running.

pastel panther
#

Once you connect, CTRL+D will restart the code and display any errors

#

@sand blade Also just to check, paste the main.py here within some back ticks like so
```

code here

```

sand blade
#

and there is nothing in the REPL I could not get the blink sketch to print anything out.

tidal kiln
#

Youre seeing the REPL prompt?

sand blade
#

I did not see that prompt. In mu-editor when I press the serial button it brings up REPL, right?

#

ok. it is balking at from adafruit_circuitplayground.express import cpx

#

incompatible .mpy file

pastel panther
sand blade
#

3.0 version i presume

#

and just copy them to the lib directory

#

yes. As I have now read that page๐Ÿ˜ƒ

#

@pastel panther @tidal kiln thank you for your help!

tidal kiln
#

did you get it working?

sand blade
#

Just for my understanding, if you update to a new minor version of circuit python you are not changing any of the /lib files

#

yes

#

@tidal kiln yes. it is working now.

tidal kiln
#

circuitpython and the non-builtin libs are two separate things

sand blade
#

got it!

tidal kiln
#

so yes, if you update the firmware, the libs, like the ones in the /lib folder, do not change

#

which ones are included depends on the hardware

sand blade
#

gamepad is only for the gamepad...

tidal kiln
#

gamepad SAMD Express, nRF

sand blade
#

I see there is a table

#

cool

#

by processor

tidal kiln
#

yep

#

but also express vs. non-express, which refers to the external SPI flash some boards have

sand blade
#

ok good to know

#

OK. now on to figuring out what is wrong with my python install on my other computer ๐Ÿ˜ƒ

#

thanks again!

tidal kiln
#

np. good luck!

sand blade
#

mu-editor is incompatible with python <=3.5.2 apparently

charred lake
#

What makes you say that?

plucky flint
#

@sand blade Mu should work with 3.5. How are you installing it..?

sand blade
#

@charred lake @plucky flint I used pip3 install mu-editor and when I installed python3.6 and linked my python3 to python3.6 mu-editor no longer threw the error about the undefined symbol. I forget what the bug report # is but there was a thread on the wiki about it.

plucky flint
#

Yup.. that's a bug in PyQt5. We're waiting for them to fix it and then Mu will work.

solar whale
tidal kiln
#

crazy - was just reading that!

#

@solar whale looks fine. i think they're just confused about bootloader vs. firmware.

solar whale
#

ah -- do they ship with CP now as well?

tidal kiln
#

oh - because it's the somewhat olderish "basic proto" board?

solar whale
#

right, they used to ship with the arduino bootloader and you have to use bossac to load CP or load the uf2 bootloader manually.

#

I have not bought one i a long time...

tidal kiln
#

me neither. the one i did get was like you said.

#

hmmmm. good point.

#

and i don't know - would have to ask

#

let's just see what they say, either way it'll work with arduino

#

"they" = the forum poster

solar whale
#

yup - if they are shipping with UF2 and CP - I can see how it might confuse someone using arduino. Not a problem, but a "feature" ๐Ÿ˜‰

tidal kiln
#

there's only a .bin version of the CP firmware for the m0_basic in current releases

#

i'd think if it was shipping with UF2 bootloader, dan/scott would be building a release for it as well

solar whale
#

agreed -- checking build script

#

the build script genrates the uf2s

#

ah -- that is for master 4.0 -- not 3.x

timber mango
#

The linker script (foo.ld) will show if it's skipping over the bootloader or not.

solar whale
#

@timber mango its just a question of whether the .uf2 is being build as well. I think the Makefile always builds it for SAMD -- just a question of whether it is copied to the release at this time.

timber mango
#

Well, it'd be inconsistent to not offer .UF2 if there was any expectation of use of the target, as shipped, for CircuitPython.

solar whale
#

agreed -- if the m0 basics are now shipping with CP installed, then the .uf2 should be in the release as well.

timber mango
#

OTOH when someone asks it's probably not hard to whip one together for them. ;)

#

I don't know how to overwrite a bootloader (I do in principle I suppose).

#

I just don't remember things well enough now. Everything I get from Adafruit Just Works. /sheepish grin

solar whale
#

you can load the bootlaod using the bossac tool.

timber mango
#

I thought there was some unlocking required to protect the bootloader from novices. ;)

solar whale
#

looking at my notes -- been awhile...

#

It looks like the process has changed since I did it last -- best to check with @tulip sleet - two questions -- is the M0 basic now shipped with UF2 and CP, and, if so, for an older version what is the correct way upgrade to the UF2 bootloader?

timber mango
#

when they had that foo-foo-rau about arduino.cc vs arduino.not-cc I think there was a recipe to update your bootloader to the friendly one.

solar whale
#

for the sadmd21 I "think" the bootlaoder does it all.. the samd51 was an issue early on, but I think it is all hidden away now.

#

all I know is i got the uf2 bootlaoder on an adalooger- basic m0 somehow...

timber mango
#

looks like dan gave us an .ino option

#
// Bootloader update sketch. Paste into Arduino IDE and upload
// to the device to update bootloader. It will blink a few times
// and then start pulsing.
// Your OS will then detect a USB mass storage device.
#include <stdint.h>
const uint8_t bootloader[8192] __attribute__ ((aligned (4))) = {0xd8, 0x2d, 0x00, 0x20, 0x89, 0x02, 0x00, 0x00, 0x85, 0x02, 0x00, 0x00, 0x87, 0x02, 0x00, 0x00,
.
.
solar whale
#

yes -- that was what I meant by - something changed -- sounds great!

timber mango
#

That's where I got that .ino from

#

So if you already have a good .UF2 he provides an upgrade path using it. But if you don't, you aren't left out in the cold -- there's the .ino which would have been the earlier platform (Arduino IDE).

#

They both use PA24 PA25 for USB - Feather M0 Basic and Feather M0 Express. Bootloader should be Express-agnostic here. ;)

tulip sleet
#

@tidal kiln @solar whale as far as I know we are not shipping non-Express boards with a UF2 bootloader. I haven't built any that identify themselves in INFO_UF2.TXT as being for Feather M0 Basic, etc. The other question is whether the poster actually has Feather M0 Basic or Express.

tidal kiln
#

@tulip sleet thanks!

solar whale
#

@tulip sleet thanks -- thats interesting. BTW -- if I wanted to go to a uf2 bootloader on an basic m0 -- do I just load the .ino sketch via arduino now? I thought I loaded a .bin via bossac in the past, but it was a long time ago and my notes are bit vague.

tulip sleet
#

@tidal kiln @solar whale querying limor as we speak

tidal kiln
#

double thanks

tulip sleet
#

@tidal kiln @solar whale ok, in fact about four months ago, the Feather M0 tester code was updated to ship with a UF2 bootloader and CircuitPython ! (still version 2.3)

#

maybe Metro M0 as well.

solar whale
#

ah-ha!

manic glacierBOT
solar whale
#

so may be time to add the .uf2s to the releases

tidal kiln
#

"Feather M0" -> what flavor(s) though?

#

basic proto, adalogger, etc?

tulip sleet
#

definitely Basic

nova stag
#

Can I use Huzzah esp8266 breakout with circuit python boards

#

??

solar whale
#

@nova stag not sure what you mean. You can load CircuitPython onto a huzzah breakout board.

nova stag
#

I meant if I got a circuit python board and an esp8266 breakout could I connect the circuit python board to the internet and use adafruit IO

pastel panther
solar whale
#

What I have done is connect via UART (TX/RX). On the ESP8266 it just acts like you are typing into the REPL -- then I have a program on the ESP8266 that sends input to AIO. Crude, but it works.

manic glacierBOT
#

You don't need extra hw to test since only the write() work now. The bug prevent me to do subsequent receiving since it failed at the begining.

here is the code
https://github.com/hathach/circuitpython/blob/nrf52_uart_io/ports/nrf/common-hal/busio/UART.c#L75
board.UART() will call the first nrfx_uart_rx() which will trigger error 4 (frame error) ---> nrfx will cancel transfer internally.

Just run u.read() : this will printf the previous error and call nrfx_uart_rx() again.
Then call...

tulip sleet
#

@indigo wedge The template nrfx_config.h files have a couple #defines for workarounds for Rev1/Rev2 nRF52832 and '840 errata. But they are not turned on, and they're not in our own nrfx_config.h. I'm adding them, but is there some reason not to?

// Turn on nrfx supported workarounds for errata in Rev1/Rev2 of nRF52832
#define NRFX_SPIS_NRF52_ANOMALY_109_WORKAROUND_ENABLED 1
// Turn on nrfx supported workarounds for errata in Rev1 of nRF52840
#define NRFX_SPIM3_NRF52840_ANOMALY_198_WORKAROUND_ENABLED 1
#

They look pretty serious: nRF52832 can have corrupted DMA transfers, and '840 can send bad data on SPIM3.

gentle bronze
#

welcome to nrf prph errata ๐Ÿ˜„

tulip sleet
#

I saw a reference elsewhere that they might be enabled in the SDK (but maybe not in nrfx).

#

@gentle bronze yeah, these are painful, especially the PDK USB bugs. SAMD51 has DFLL and DPLL bugs which make it not possible to lock it to the crystal oscillator

gentle bronze
#

there is also i2c bug with nrf51 back then I remembered :D. Nordic doesn't use well tested prph IPs, which is why it is cheap ๐Ÿ˜„

manic glacierBOT
#

TWIM0 and TWIM1 are the same peripherals as SPIM0 and SPIM1. The IRQ handlers for these peripherals are set up at compile time, using some #define logic. and renaming. So out of the box TWIM0/SPIM0 and TWIM1/SPIM1 cannot be shared between common-hal/busio/I2C.c and SPI.c.

We could write an interrupt handler that checks whether it's being used for SPI or I2C, nrfx uses weak references for the interrupt handlers, so it's possible to override them without modifying nrf. But for now two...

manic glacierBOT
feral aspen
#

shouldn't the github bot be showing these updates in the github-feeds channel ?

tidal kiln
#

I dont think that one shows issue comments

tulip sleet
#

@feral aspen we post adafruit/circuitpython issues, comments and merges here, since they are directly relevant

manic glacierBOT
#

I'm rethinking UARTE vs UART: Advantage of UARTE is that there are two instances on '840, so we can have more than one UART channel. I understand the issue of of EasyDMA not working from flash, though we can copy to RAM.

Also UART is deprecated, though I don't understand how significant that is. If there were a 58x0 after the 5840, maybe they'd drop UART?

manic glacierBOT
#

Fixes #1163.

  • Allows allocation of TWIM0 and TWIM1 on nRF52832.
  • Allows allocation of SPIM2 on nRF52832.
  • Allows allocation of SPIM3 on nRF52840. SPIM3 is allocated first because it's higher speed (32 MHz).
  • We could conceivably allocate SPIM0 and SPIM1, but we have to fix the IRQ handlers, which are defined at compiled time, depending on whether SPIM0 or TWIM0 (or SPIM1 or TWIM1) i use.. So I didn't because two SPIs is probably enough. See https://github.com/adafruit/circuitpython/...
manic glacierBOT
#

OK so I'm continuing to make progress on moving these across to a "shared-bindings" type of layout for CircuitPython. The good news is that this will bring networking to other CircuitPython ports as well, really anything which supports SPI should support the W5500 and if its got enough memory then LWIP too.

Progress is at another branch:
https://github.com/nickzoic/micropython/tree/circuitpython/nickzoic/703-wiznet-5500-samd-shared-bindings

manic glacierBOT
manic glacierBOT
#

DMA can be a bit faster even when we poll because it runs even when the cpu
is handling an interrupt.

On Fri, Sep 21, 2018 at 7:13 AM hathach notifications@github.com wrote:

No problems, I will make the switch. the flow is similar to what I am
doing anyway. IRQ vs DMA only has diff that cpu must move the data
manually. But I think I will test what I have first before switching. I
will also update the serial.c as well. currently serial.c use polling
method, so there should be no ...

manic glacierBOT
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 4\.0\.0\-alpha\.1
manic glacierBOT
reef plume
#

Hi Guys, this there a way to get the adafruit STMPE610 working with raspberry pi zero?

idle owl
#

@reef plume It's been setup in PyPi, you can pip3 install the driver. However we haven't tested it yet or verified it.

reef plume
idle owl
#

Yeah should be

manic glacierBOT
#

Ok great!

On Fri, Sep 21, 2018 at 6:03 PM hathach notifications@github.com wrote:

@tannewt https://github.com/tannewt yeah, I am moving it to uarte now.

โ€”
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/adafruit/circuitpython/issues/1039#issuecomment-423623498,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADNqUL0aV9z9JozlgoucG6T0-u5eUl8ks5udSntgaJpZM4VS-Px
.

manic glacierBOT
#

I have a 16 neopixel ring and I found that if I connect it to the nrf52840 Dongle on Pin P0_31 or P1_15 it works fine, but on Pin P0_02 it does not. No error is thrown, bit the neopixels just don't light up.

From the data sheet P0_02 is also AIN0. Could that be relevant?
I am using VDD to power the ring.
I also tried a 7 neopixel "jewel" with the same result.
Is there something "special" about P0_02?

I tried the same test on feather nrf52840 DK PCA10056 with the neopixel ring connec...

solar whale
#

@reef plume are you trying to use the I2C or SPI interface to the STMPE610 on the RPi?

solar whale
#

@reef plume I just tried the I2C interface in an RPi and it works -- will try SPI next

#

@reef plume SPI works as well

pastel panther
#

is the Feather nRF52840 unreleased?

solar whale
#

@pastel panther I have not seen one yet -- not sure if there are prototypes out there

pastel panther
#

I have a feather nRF52 Pro; is that the latest?

solar whale
#

That is an nrf52832

pastel panther
#

right

solar whale
#

the PCA10056 Dev Kit and nrf52840 Dongle from nordic are the only 52840s I have.

pastel panther
#

Are they the stand ins for testing a 52840 adafruit board or just generally planned to be supported? I'm just looking to help testing and I'm totally out of the loop

solar whale
#

the notes say only the PCA10056 has been tested ... but some works has been done with teh Dongle baord.

#

I don't know if they will be supported down the line. I would not expect the DK to continue but it would be nice to support the Dongle.

#

The DK is kind of a beast -- fun to play with, but not something to build a project with.

pastel panther
#

yea, it looks.... substantial

solar whale
#

nice - with the built-in JLink!

pastel panther
#

That's nice!

solar whale
#

@idle owl FYI- I ran a quick test of the STMPE610 on a Raspberry Pi (3b+) via Blinka and it worked with both the SPI and I2C interfaces - yay! Blinka is a great tool!

pastel panther
#

Blinka is a tool now?

solar whale
#

Not sure what to call it. Magic ๐Ÿ˜‰

tidal kiln
slender iron
#

@pastel panther @solar whale nrf52840 feather is in the works, we have some draft designs but I haven't gotten a prototype myself yet

idle owl
#

@solar whale Thank you!!

charred lake
#

So I'm at a loss: How can I go about installing the Adafruit's NeoPixel library on Raspberry Pi? I know how to do it on an Adafruit board, such as the Playground Express, you just put the mpy file inside of the lib folder in the "CIRCUITPY" drive... But how would I go about doing that on a Raspberry Pi? I already installed and use CircuitPython on Raspberry Pi... I'm just not too sure on how to insall the NeoPixel library itself.

#

I've tried searching forums, Adafruit's learning pages, etc... Can't find any information on that.

solar whale
#

@charred lake you install the library via pip3 pip3 install adafruit-circuitpython-neopixel. Also if I recall correctly, you will need to access the neopixels as root, that is, run your program to use the neopixels as sudo.

charred lake
#

@solar whale Okay perfect, yeah I figured it may be with pip3, but I had no idea what the name of the package was... Thank you for the help; yeah I'm a seasoned Linux user and dev, but new to Python and CircuitPython ๐Ÿ˜ƒ

#

Mostly used Perl, now moving to Python.

#

Thanks again!

#

Is there a way to see the package names such as "adafruit-circuitpython-neopixel" using pip3? Or is there a list somewhere? I was trying "pip3 install neopixel", and different names and got nothing. I couldn't find any information on that either.

solar whale
#

pip3 search circuitpython

charred lake
#

You are the BEST!

#

thank you very much

solar whale
#

You're welcome. Good luck!

charred lake
#

Thanks again!

fluid helm
manic glacierBOT
lime trellis
#

Hi i'm struggling to get circuitpython running on a "factory fresh" SAMD21 - can anyone help?

pastel panther
#

@lime trellis Do you have a bare chip or a dev board of some sort?

lime trellis
#

@pastel panther I have custom boards I've spun, but I'm just trying to flash an old feather M0 before I try my boards

#

tried using BOSSA, which hung as soon as I tried to write. Then I tried to erase and flash a new bootloader with Atmel studio 7 (which usually always gets me out of a bind)- but that fails as well

pastel panther
#

Do you have a jlink?

lime trellis
#

yep

pastel panther
#

You'll want to build the uf2-samd bootloader and use your jlink to load it

#

I believe it's bossa compatible as well

lime trellis
#

I tried flashing "adafruit-circuitpython-feather_m0_basic-3.0.1.bin" with no luck

pastel panther
#

Trying to find a url; I've been working from a checkout for the lat while

#

Where is the bin from ?

lime trellis
#

latest adafruit build

#

and no worries- thanks for the help!!

pastel panther
#

did you figure it out? I'm happy to help more; I've got CP on a number of my own custom boards

lime trellis
#

nope still no luck

#

the feather m0 USB is now connecting/disconnecting repeatedly (guess that means it sees it? haha)

pastel panther
#

what happens when you double tap the reset button?

lime trellis
#

nothing- doesn't seem to want to go into bootloader mode

pastel panther
#

Here's what I've done; I made a checkout of this repo:
https://github.com/adafruit/uf2-samdx1
and copied the trinket m0 board directory and updated the board_config.h to match the pinout for where I had my dotstar.

Then built it and flashed the .bin using my jlink and JLinkExe's loadbin

lime trellis
#

I should be able to flash the feather m0 with stock adafruit bootloader... right?

pastel panther
#

I don't know what 'the stock adafruit bootloader' means

lime trellis
#

let me dig up the exact link

pastel panther
#

I'm not positive, but I don't think those are bootloaders

lime trellis
#

I see... haha!

#

hmm.. well I can't even talk to this feather m0 via jlink. didn't know it was possible to brick these!

pastel panther
#

It should be recoverable; Sometimes you need to remove/replace the jlink

#

I would suggest using JLinkExe

lime trellis
#

trying now

#

That's just J-Link "commander" right?

pastel panther
#

I think so

#

you should know pretty quickly if it can talk to the chip

lime trellis
#

getting "InitTarget(): PCode returned with error code -1"

pastel panther
#

Does the board have power?

lime trellis
#

yep for sure has power

#

I'll go solder up the SWD pins on another feather and try your bootloader.bin on that

pastel panther
#

did you give removing and replacing the jlink a try? maybe seems stupid but it's worked for me in the past

lime trellis
#

yeah tried that a couple times now- also tried restarting atmel (also seems to help sometimes)

pastel panther
#

fwiw it's meant for a feather m0 express because it's expecting there to be a neopixel on PA06 but that shouldn't matter; you should at least be able to get it into bootloader mode

#

maybe try closing atmel?

#

in case they're fighting over the jlink

lime trellis
#

yeah I figured it should at least take the bootloader

#

but thanks again for the help @pastel panther! I'll report back with how it goes ๐Ÿ˜ƒ

pastel panther
#

๐Ÿ‘

#

You'll get it working sooner than later; I got my bare chip working with almost no experience; it's not rocket surgery

lime trellis
#

๐Ÿ‘ yep I'll get it!

reef plume
#

@solar whale im trying the i2c interface on the RPI

indigo wedge
#

woah, 4.0 alpha already?

#

time to finish my ble rewrite, aaa

manic glacierBOT
slender iron
#

@lime trellis stock bins won't work without a bootloader since they aren't located at location 0

#

make sure you have a bootloader or make your own build that assumes there isn't one

#

I have had to recover a couple boards with an arduino zero's atmel ice which does some reset magick that jlink doesn't. if you turn off the swd pins in code things can get tricky. our circuitpython bins shouldn't do that though

manic glacierBOT
#

does circuit python have the dict part of classes incorporated? I could not get it to work

I am making some a classes for python and I wanted to make my class where the user can add their own variable to it, this is done with the add method (using kwargs for many at a time). then try to update self.dict with the new keywords from kwargs but the serial output says my object does not have that attribute.

if not is there any way so when someone adds a new variable to the obje...

manic glacierBOT
real mauve
#

does anyone know which file to flash the Feather M0 Bluefruit LE with? i cant find a specific bluefruit on on the github page

solar whale
#

@real mauve use the feather m0 basic. There is no support for BLE with the M0.

real mauve
#

ok, thanks

manic glacierBOT
teal bear
#

did CircuitPython add time.sleep to micropython?

#

that might not be clear.

#

i'm trying to see why CircuitPython has it and some version of Micro doesn't

charred lake
#

@teal bear I don't think pass has anything to do with the time module.