#circuitpython-dev

1 messages ยท Page 113 of 1

idle owl
#

@tidal kiln I want to know how a dictionary would work with this function

tidal kiln
#

would need to see more of the code.

#

is what's in the current repo pretty much it? and then what you showed earlier?

tulip sleet
#

@idle owl @tidal kiln what would you folks think of returning actual board.A2 (the Pin object) rather than "A2" or "2"? Maybe too confusing?

idle owl
#

Yes, exactly. The express.py I'm working from at the moment is stripped down so I can edit it live and not get memory issues, but otherwise it's what 's in the repo

#

@tulip sleet I think it would be confusing yes

#

@tulip sleet I want to add iteration but maintain the code being what's labeled on the board

tidal kiln
#

@tulip sleet since you mention it. i'm curious - what actually is board.A2? (in terms of python type)

tulip sleet
#

@tidal kiln it's an instance of the Pin class. They're created in advance and available as constants from board.

#
>>> board.A2
board.A2
>>> type(board.A2)
<class 'Pin'>
idle owl
#

I didn't even know that was an option. That's great

tidal kiln
#
>>> import board
>>> board.A2
board.D0
#

?

tulip sleet
#

board.A2 and board.D0 are the same pin on CPX. The CPX numbering is kind of all weird to preserve compatibility with CP classic. (EDIT: good example, but wrong board)

tidal kiln
#

oops. sorry for lack of context. that was on a Trinket.

tulip sleet
#

Trinket is also preserving numbering with original Trinket.

tidal kiln
#

hold on. let me get more in sync...

tidal kiln
#

ok. got that. i should familiarize myself with that class. assume it's in the api doc?

tidal kiln
#

hmmm. so it just is what is. no methods or properties.

tulip sleet
#

Unfortunately they don't print all that interestingly, like with the pin name. Also the chip pin number is used a lot, so you see stuff like Pin PA12 in use, which doesn't tell you much.

idle owl
#

Scott told me to use gc mem free or something to that effect. I can't find anything on how to do it. gc doesn't have a "mem free" that I'm finding in the docs, but I'm obviously missing something. I think he told me 3 or so commands to type into the REPL, but I didn't get all, of them. How do I check the free memory from the REPL?

solar whale
#

Import gc then gc.mem_free()

idle owl
#

nice!

#

Thank you!

tulip sleet
#

also micropython.mem_info()

tidal kiln
#
if board.A1 in cpx.touched:
    print("pad A1 touched!")
#

so, it'd be like that?

tulip sleet
#

yeah, that's what I was thinking of. Maybe not great for the cpx library, but good for people who actually refer to board.xxx

idle owl
#

Agreed

formal plover
#

Awesome, great job @tulip sleet!

tidal kiln
#

yeah, and i think the cpx library should lean more towards a more user friendly interface

tulip sleet
#

it would be nice if Pin had some property that was the board label string. Not sure what we would need to do to make it work across multiple boards, but should be possible.

tidal kiln
#

^^ yeah

#

that's why i was looking at the api

tulip sleet
#

Sounds like it should be a GitHub issue (it might be one already)

drowsy geyser
#

@tulip sleet labeled like how? We already have things that are descriptive, like board.SCL....

floral dagger
#

@idle owl this?import gc gc.collect() print(gc.mem_free())

tulip sleet
#

@tidal kiln @idle owl so anyway, I was kinda interrupting you about the dictionary stuff

idle owl
#

@floral dagger import gc gc.mem_free()

floral dagger
#

lol nm I see it was answered

tulip sleet
#

@drowsy geyser but if you have some anon Pin object, you can't find out what its original name is.

tidal kiln
#

no worries. glad you mentioned it. relates to something i was thinking about some days ago.

idle owl
#

@tulip sleet No it's fine! I'm learning more and better to have more ideas

drowsy geyser
#

Oh oh oh, I'm being dumb. Yes, you're right!

tidal kiln
idle owl
#

@tulip sleet I have working code now, but @tidal kiln was suggesting another way to do that I had considered while working on it but it wouldn't have worked with my original idea.

tulip sleet
#

@drowsy geyser no dumb!

#

@idle owl I did look at your code. I wish DigitalInOut had a .pin property so you could just get the pin back. But it doesn't.

idle owl
#

@tulip sleet Ah yeah

tulip sleet
#

@tidal kiln so i assume you were thinking of creating a dict to map the DigitalInOut objects to pin names or numbers.

tidal kiln
#

maybe. something like that.

#

first, curious which of the usage syntax's you think looks best (int vs. string)?

tulip sleet
#

Since on most boards pin names don't match numbers all the time (e.g. your trinket example), a name is probably better. E.g. A1 is D10 on CPX, I think (or similar).

tidal kiln
#

my thinking is that A1 is printed right on the board, so the string based syntax might be more user friendly

tulip sleet
#

yes

tidal kiln
#

the umpteen different levels of pin abstraction are of little interest

idle owl
#

Side note, I'm also considering calling it cpx.touch - it would be more in line with the other touch code. That's irrelevant to what we're doing now though.

tidal kiln
#

worth thinking about though

#

and i'm not so good at that myself. i always go round in circles. touched no wait touch no wait are_touched no wait.....

tulip sleet
#

'A2' in cpx.touch ? Actually I kind of like touched since it indicates state. What's another API that's just touch?

idle owl
#

It's not just touch, they're touch_A1

#

etc

#

I think they both work "if you touch A1, it prints" "if A1 has been touched, print"

tulip sleet
#

touch_all?

tidal kiln
#
if cpx.touch_A1:
    print('Touched 1!')
#

(currently in express)

tulip sleet
#

.touch_A1 returns a boolean, but touch returns a tuple of pin names

idle owl
#

But only one at a time, I think

tulip sleet
#

so it doesn't seem so parallel to me

idle owl
#

fair enough

tidal kiln
#
if 'A1' in cpx.touched:
    print('Touched 1!')
#

proposed new additional (old ones stay)

tulip sleet
#

cpx.touch could return (False, True, False, False, ...) for all the pins, but that's actually not so great

tidal kiln
#

no. think of usage.

tulip sleet
#

it can be more than one at a time, right? cpx.touched -> ('A1, 'A3')

tidal kiln
#

yes

#

it returns a tuple

#

could be zero in length

idle owl
#

Ah

tidal kiln
#

could be NUMBER_OF_TOUCH_PADS in length

#

however many are currently touched

floral dagger
#

so, returning a reference to the pads touched rather than a set of true/false responses for each pad?

tidal kiln
#

correct. i think the only question is what exactly the reference should be.

manic glacierBOT
tulip sleet
#

@idle owl come to any conclusion?

idle owl
#

Not exactly. Both options make sense. We can stick with touched.

#

I'd say wait for Scott's opinion but most of the time he tells me to decide ๐Ÿ˜ƒ

floral dagger
#

is there an equivelant function for other parts of the board?

tidal kiln
#

use klingon then!

idle owl
#

On it!

#

@floral dagger How so?

tidal kiln
#

digital in pins?

tulip sleet
#

he is good at having people move forward into new territory๐Ÿ˜€

floral dagger
#

Is there a function to return what neopixels are lighted for example? If so, should they be consistent?

idle owl
#

@floral dagger I would call it pixels.lit or something, but no there's not eqivalent functions for other parts of the board. All of the tone stuff has "tone" in it, so it's kept uniform when there are multiples...

floral dagger
#

ah, ok...thanks @idle owl

tidal kiln
#
if 'D1' in cpx.low_pins:
    print("D1 is LOW!")
idle owl
#

We've not yet written up two different ways to do similar things for any of the other APIs

#

Haven't needed to

#

This is the difference between each invidivual pin, or returning info from a tuple of all of them

#

It's not a difference in state of the pins between this and the other part of the API

tulip sleet
#

The touch stuff is input. The pixel values are known to the programmer. If we were attaching buttons to a bunch of pins something like cpx.low_pins might be helpful, but there isn't a central place where the DigitalInOut pins that are set to input are known.

#

unlike the touch stuff

floral dagger
#

Say pixel.lit returns a list of variables that references the pixels in a certain way, it would seem intuitive froma user standpoint that "touch" or any other equivelant should behave similarly.

#

But if that's not there, then it doesn't matter anyway ๐Ÿ˜ƒ

idle owl
#

Heh, yeah. This is the first time we've done something like this, other than there being multiple versions of *_tone

floral dagger
#

You all know way more than I do, so I'm probably not much help. Just trying to learn

idle owl
#

@floral dagger I am still pretty new to all of this. Seriously. I'm learning so much as I go as well. You're a very welcome part of this conversation!

#

Anyway, debating design doesn't require huge amounts of knowledge. In the end, design is a matter of how it looks to a user. Having different perspectives on this is always good.

drowsy geyser
#

@tulip sleet is a wizard. Where do we send alms? ๐Ÿ˜ƒ [CP for the M4 is now compiling after he showed me how to update the gcc toolchain!]

tidal kiln
tulip sleet
#

@drowsy geyser Don't worry - Adafruit sends me alms already.

drowsy geyser
#

Me too! After all, I have an M4 to work on!

tulip sleet
#

I am fading. I'll say goodnight!

drowsy geyser
#

G'night!

idle owl
#

@tulip sleet Good night! Thanks for all your input!

#

@tidal kiln I guess the most important thing here is, does this do what you wanted? I mean, your code examples work, but that's not necessarily the same thing.

tidal kiln
#

you're giving me too much sway. i think the idea of a tuple return is useful. but details are a point of design and discussion.

#

didn't mean for you to think both had to be implemented.

idle owl
#

I learned a ton from figuring all that out. Totally worth it.

#

Anyway Dan asked for the same thing when I was writing the original API but we decided it might be an edge case. So you asked wasn't new, but it meant we were wrong.

#

Which is good!

#

I'm just making sure that the functionality you were looking for is there. Design can be sorted, but that part I want to make sure is solid.

tidal kiln
#

so, looking in the PEP20 zen refamadoodle:
"There should be one-- and preferably only one --obvious way to do it."

idle owl
#

lol

tidal kiln
#

so even more sorry you did both

idle owl
#

I'm serious that it was worth it. Promise.

tidal kiln
#

what do you think about the string version?

idle owl
#

I like it returning what's labeled on the board. That part I'm steadfast with, have been this entire time because in teaching a friend how to use this board, trying to explain everything starting with 0 and so on was a new concept to them, so having it be already on the board is super useful.

tidal kiln
#

i agree

idle owl
#

Whether it's touch or touched isn't really a big deal. I'll probably ask a few other people which makes more sense on it's face and give that consideration to figuring that out.

tidal kiln
#

thats sounds like a very good idea

idle owl
#

I don't understand tuples well enough to know if the core functionality of the function does what you (and Dan) were looking for. That's why I asked. Going based on your random code suggestions, I nailed it, but I don't know how to test it beyond those examples, so I have no way to extrapolate the potential use cases.

tidal kiln
#

are you still confused about tuple vs. list?

idle owl
#

Nope, that part makes sense

#

It's just not understanding what another example might look like. Or what I might use it for in general.

tidal kiln
#

tuples?

idle owl
#

The entire function I mean, not a tuple specifically

#

What another example of code that works with this function might look like

tidal kiln
#

oh

idle owl
#

I need to be more clear here lol

tidal kiln
#

other than the ones in the issue?

idle owl
#

Yep

#

I have no idea how to use the function I made beyond changing the numbers in what you posted in the issue.

#

Why would I use it?

#

What is another example of it?

#

That's what I mean

#

Or did your issue cover all the potential code that works with it

tidal kiln
#

not at all

idle owl
#

I have this right now while True: if 'A1' in cpx.touched(): print("touched A1") for pad in cpx.touched(): print("pad {0} touched!".format(pad))

tidal kiln
#

it's general purpose

idle owl
#

I wouldn't know what else to try

#

I know it prints for A1 twice, I was just making sure they both worked ๐Ÿ˜ƒ

tidal kiln
#

not a really good example, but imagine what the last two lines would look like using the current api

idle owl
#

7 elif statements.

#

It's in my guide ๐Ÿ˜ƒ

#

Right?

#

That's what you're referring to?

tidal kiln
#

yep.

#

so in that case, just makes life simpler

idle owl
#

Ah ok yeah

tidal kiln
#

for the if one, imagine if the A1 were something more variable

idle owl
#

How would that work? I tried a few things but it just stopped working completely

umbral dagger
#

My 2 cents on pin instances vs strings... You loose any richer information by going to strings. I always look twice when I see strings being used to represent things. When you have a string, that's all you have.

tidal kiln
#
MAKE_ROCKET_GO_PIN = board.A1
# 
# thousands of lines of code
# 
if MAKE_ROCKET_GO_PIN in cpx.touched:
    make_rocket_go()
idle owl
#

@umbral dagger It's meant to be simple.

umbral dagger
#

Another 2 cents... in a constrained environment, sometimes simpler (and smaller) is better.

idle owl
#

Also valid ๐Ÿ˜ƒ

#

@tidal kiln ahhh

tidal kiln
#

then you decide you want A2 instead

idle owl
#

And you're not searching thousands of lines of code....

umbral dagger
#

@idle owl And it's not as if Python is going to do a lot of type checking, so you don't get that benefit by having somethign more specific.

idle owl
#

@umbral dagger Exactly. And all the CircuitPython stuff will still work. This is meant to be a simpler class that allows you to learn how to program and work your way to the core stuff.

umbral dagger
#

That's where I think the M4 will be a game changer... the expanded RAM space.

idle owl
#

Also exactly

umbral dagger
#

@idle owl Ya.. I only have partial context on this.

idle owl
#

@tidal kiln Alright, that makes more sense.

tidal kiln
#

not only searching the lines of code, but with the current api you'd have to change the actual function call, cpx.touched_A1 to cpx.touched_A2

idle owl
#

Ok yeah

#

So it has a lot of functionality but it keeps everything simpler.

floral dagger
#

@tidal kiln I was thinking of a sort of "combination" lock where you had to touch all the correct pads at the same time.

tidal kiln
#

that's a good one too. having a tuple to work with would make that simpler.

idle owl
#

otherwise it's if cpx.touched_A1 and cpx.touched_A2 and etc.

#

How does it look with the tuple code

tidal kiln
#

and if you change the combo?

#

with a tuple, you use in, but to check for multiple, there's some pythony trick

#

hmm, but that's a list

#

should work for tuple too

idle owl
#

Ah

tidal kiln
#
>>> COMBO = (1,2,3)
>>> all(x in (1,2,3,4,5,6,7) for x in COMBO)
True
>>> all(x in (3,4,5,6,7) for x in COMBO)
False
>>>
#

yep

idle owl
#

nice!

tidal kiln
#
COMBO = ('A1', 'A2', 'A5')
if all(pad in cpx.touched for pad in COMBO):
    print("UNLOCKED!")
else:
    phone.dial(911)
idle owl
#

lol

#

That's great!

tidal kiln
#

good example @floral dagger !

umbral dagger
#

@idle owl Very nice

idle owl
#

@tidal kiln Needed (): if all(pad in cpx.touched() for pad in COMBO): But now it works! I remembered from earlier that I had forgotten () and it gave me a bound_method not iterable error. Can't believe I remembered that enough to figure it out immediately.

tidal kiln
#

did you @ property it?

idle owl
#

I didn't figure it out myself the first time, lol. I had help. But I remembered!

#

I did not

#

and now that you mention it, I remember that it resolves needing the ()

#

Or the () showing up on Sphinx docs, lol

tidal kiln
#

easy to crack though. just touch all pads.

idle owl
#

I feel like if someone malicious has access to your CPX, them cracking the code to print unlocked is the least of your worries.

slender iron
#

lets talk about this touched business tomorrow during our voice chat! its an awesome discussion

idle owl
#

Will do ๐Ÿ˜ƒ

tidal kiln
#

glad we answered your question about using a dictionary!

idle owl
#

Now I have to come up with something else to learn dictionaries!

#

@tidal kiln Thank you so much for all your time. I really appreciate it!

glacial bronze
#

It might be that dictionaries might be a good way to define pins (with another layer of abstraction). You could make a given MCU's pindefs more easily portable to other boards with the same MCU by having a dictionary of pin numbers to MCU pins

tidal kiln
#

that was my original thingking

#

but may not be needed here

idle owl
#

And now it's time for me to call it. Thank you @floral dagger and @umbral dagger for your input!

tidal kiln
#

try writing a program that prints different things with different touched pins

#

and store those responses in a dictionary

umbral dagger
#

@idle owl Any time

tidal kiln
#

or to map a set of neopixels to light to a touch pad

floral dagger
#

yw @idle owl Gn. It always fascinates me to watch all this stuff come together.

#

I've been working with the MQTT stuff over the weekend. It works pretty well on CP connecting to Adafruit IO. It's an interesting protocol. Have any of you worked with it in CP yet?

umbral dagger
#

@floral dagger Not in CP yet. In C, Go, and Scheme, though.

tidal kiln
#
# a dictionary of tones
tones = {
  'A1' : 262,
  'A2' : 294,
  'A3' : 330,
  'A4' : 349,
  'A5' : 392,
  'A6' : 440,
  'A7' : 494,
}

# get all currently touched pads
touched = cpx.touched
# if there are some
if len(touched) > 0:
    # play the tone associated with the first one
    cpx.start_tone(tones[touched[0]])
umbral dagger
#

@floral dagger Actually twice in Scheme, where I build integrations with the underlying Go and C libraries.

#

@floral dagger It's a nice protocol. Simple, yet functional.

floral dagger
#

nice @umbral dagger I was surprised how little info there is for a beginner, but once you start piecing it together it does come together nicely.

umbral dagger
floral dagger
#

@umbral dagger IThanks! I'll have a look at that. It's funny, I have like three or four sites I was going through. One has a great graph of the bit order for connections, one explains what it does. It's all very fragmented between all the different software that implements it

umbral dagger
#

@floral dagger Oh.. and they have a fairly clean looking python implementation

umbral dagger
#

@floral dagger I'm using the paho C implementation as the basis of my current ChickenScheme support

floral dagger
#

Yeah, the micropython one is fairly complete.....but they've not implemented non blocking connections

#

it has the function, but just calls the one forblocking inside of it, which is odd

#

oh cool @umbral dagger

umbral dagger
#

Ah sweet! My first CP PR!

#

@slender iron So... did you swap out the flash on a Feather to test the PR? ๐Ÿ˜‰

#

Happy hacking, west coast folks. bedtime here for me. M4 arrives tomorrow.. I am excite!

slender iron
#

@umbral dagger nope, it won't be "officially" supported. Good night!

#

Hi everyone and <@&356864093652516868>, our weekly is on for tomorrow (Monday) at 11am PT / 2pm ET in this text channel and the CircuitPython voice channel. It'll be the usual Hug Reports, State of CircuitPython, Status Updates and Odds and Ends as usual. See you there!

#

@hollow tartan the first step is getting your own ESP8266 build going

hollow tartan
#

I have a github acct

slender iron
#

what os are you on?

hollow tartan
#

win 7

slender iron
#

kk, vagrant is a good approach then. I believe @solar whale has ESP8266 builds going that way as well

hollow tartan
#

Oh Kay ๐Ÿ˜ƒ

slender iron
#

once you can load your own build, you can confirm that the code doesn't work like it should (see the bug) and then fix it ๐Ÿ˜ƒ

hollow tartan
#

yea right eh eh ๐Ÿ˜‰

#

I will try my best.

slender iron
#

lots of folks here to help ๐Ÿ˜ƒ

hollow tartan
#

Alright, I have my marching orders. Thank you, sir.

slender iron
#

no problem!

manic glacierBOT
pastel panther
#

just got my led matrix working with my m0 on the repl; wew!

manic glacierBOT
solar whale
#

@slender iron I can now successfuly build a .uf2 version of CP master and load it to the metro_m4 via your new bootloader. I wish I could explain what is different, but I may have just been loading the wrong file before. In any case - it seems to be working fine now. At least this time. I tried reloading the firmware.uf2 file you provided and have mixed results with it as I did last night. Sometimes it hangs in REPL then eventually unmounts CIRCUITPY. My latest debug build is: Adafruit CircuitPython 3.0.0-alpha.0-29-g1c97b7f4d on 2017-10-23; Metro M4 Express with samd51j19 -- current master.

solar whale
#

@slender iron one more update on using the UF2 bootlaoder- I can only get the new UF2 bootlder to be regognized on my MACOS system. My linux system and my Raspberry Pi do not mount the METROM4BOOT file system when I doubletap. They will sometimes mount the CIRCUITPY system but sometimes won't mount it unless I reboot them. It will mount CIRCUITPY after a reboot of the linux box. It all works fine on the MACOS box....the linux box and raspberry pi still report lots of errors ```Oct 23 06:01:27 Ubuntu-Macmini kernel: [ 322.125651] sd 7:0:0:1: [sdd] Unit Not Ready
Oct 23 06:01:27 Ubuntu-Macmini kernel: [ 322.125654] sd 7:0:0:1: [sdd] Sense Key : Illegal Request [current]
Oct 23 06:01:27 Ubuntu-Macmini kernel: [ 322.125655] sd 7:0:0:1: [sdd] Add. Sense: Invalid command operation code

manic glacierBOT
formal plover
#

@slender iron since my work from home day got moved, I won't be able to participate in today's meeting. Womp womp ๐Ÿ˜ฟ

solar whale
#

@slender iron I should be able to attend the meeting today.

tulip sleet
#

@solar whale I had an extended episode over the weekend in which no M0 boards (Including CPy 2.x) would appear as ...BOOT on my Ubuntu 16.04 Linux box. I rebooted with an older kernel to no avail. I then powered down completely and things were better. I don't like not understanding why this is happening.

umbral dagger
#

@tulip sleet UBS ports can get locked out sometimes (especially if too much current gets drawn, but Iโ€™ve seen it happen for reasons that arenโ€™t clear). Check if the port works with something else. Often a reboot seems to be required to reset things.

#

My M4 will be well travelled by the time it gets here.

tulip sleet
#

@umbral dagger The port was still working: I could mount CIRCUITPY manually, but the automount was not working. However, it may have been in some kind of bad state. When I looked at dmesg, it seemed to be complaining about the filesystem. However, no USB drive (not just M0 boards) would work at all. I have a number of USB sticks that didn't show up. So I was looking for any recent Linux changes that might have affected this.

#

those M4 travels are indeed ridiculous: "I need to get to Canada tomorrow. Well, sir, we can route you through Iowa and then Montana and then back to Toronto. How's that."

umbral dagger
#

@tulip sleet ugh. USB can get weird. I imagine the file system stuff adds another layer of potential weirdness.

#

I can understand odd routing to take advantage of space in planes for overall faster delivery, but the loops ...

formal plover
#

My M4 is in Phil's inbox. Lol

#

Haven't had the heart to tell him he overlooked my email yet.

#

I haven't had a lot of time to test anyways.

tidal kiln
#

@formal plover can mention today

formal plover
#

@tidal kiln yeah, I might just DM Scott what I would say in today's weekly. I won't be able to participate today unfortunately.

tidal kiln
#

ok. and then you can also mention the M4.

umbral dagger
#

M4 is finally on the truck and out for delivery!

solar whale
#

@tulip sleet do you see any messages like the ones I posted in via dmesg?

tulip sleet
#

@solar whale I am seeing those. I am also seeing this odd behavior: connect CPy 2.x Gemma or Trinket. REPL works fine. Connect up 3.0 CPX. Use REPL a little. Unplug it. Now no board (including 2.x Gemma and Trinket) work with repl. I get "screen is terminating" messages. However, it does appear to work with "sudo screen". If I look at the protections on /dev/ttyACM0, they are wrong. Then it flips back, at random, after unplugging and replugging, but only sometimes:

crw------- 1 root root 166, 0 Oct 23 11:27 /dev/ttyACM0
halbert@salmonx:~$ ls -l /dev/ttyACM0
crw-rw---- 1 root adm 166, 0 Oct 23 11:28 /dev/ttyACM0
#

It's as if unplugging the 3.0 CPX leaves the linux kernel or drivers in a bad state.

#

this wrong protection is also coincident with CIRCUITPY and ...BOOT drives not showing up.

tidal kiln
#

i've seen something that may be related. sometimes the drives get mounted as read only. (on linux)

tulip sleet
#

sometimes they are read-only if the driver thinks they are damaged (same old delayed-write problem); but could also be protecttion?? There are recently created systemd-udevd processors in ps. I have looked at recent changes in systemd, but haven't found anything suspicious.

#

it's like the udev rules aren't working all the time

tidal kiln
#

yep

tulip sleet
#

I do have the Adafruit-supplied udev rules to allow non-root access to ttyACM0

tidal kiln
#

same here

tulip sleet
#

@tidal kiln you mean same permission problem?

tidal kiln
#

same udev rules

#

if you mean the one that's linked in a lot of guides

tulip sleet
#

yep, they have worked fine up to now. Either something changed in how they are treated or something bad is happening sometimes when device is plugged in (or previous device is unplugged)

tidal kiln
#

yeah, it seems related to plugging/unplugging

solar whale
#

I have had them mount seemingly read only when I try to drag/drop but I can cd to the directory in a terminal window and write to it.

tidal kiln
#

when it's happened on one machine, i've simply moved to another (also linux, also has udev rules) and it all works fine

#

@solar whale what're you on?

#

because now that you mention it, same for me

solar whale
#

Linux Ubuntu 16.04 also raspberry pi stretch.

tidal kiln
#

same here, ubuntu

solar whale
#

Works on macOS

tulip sleet
#

and same here, updated as of a few minutes ago with latest packages

tidal kiln
#

there's some kind of gnome virtual file system layer in the mess

#

gvfs

tulip sleet
#

yeah it takes care of automatically mounting. But I don't see why it would have to do with the /dev/ttyACM0 permissions.

tidal kiln
#

could explain why it's interfering at the gui, but not at the cli

#

but yeah, doesn't explain your ls of /dev/ttyACM0

tulip sleet
#

When the filesystems don't show up, I see nothing in /media/halbert. But I can sometimes mount the filesystem by hand with sudo mount. However I also get complaints that it's damaged and won't mount. Fixed by reboot.

#

well, not sure about the reboot. it may be inconsistent

stuck elbow
#

@tulip sleet I get a similar permission problem with the usb drive

tidal kiln
#

also - i haven't done anything with 3.0 yet, so don't think there's any relation to that

stuck elbow
#

I just assumed it's ubuntu being stupid and broken

tidal kiln
#

i think it's that

stuck elbow
#

I have that with 2.x

tulip sleet
#

did any of your have the unable to connect to repl problems with 2.x recently (past few days)?

stuck elbow
#

but not with the serial device, only the /media/* directories

#

no

tidal kiln
#

yeah, me neither, at least not that i've noticed

tulip sleet
#

i think these may be separate problems

tidal kiln
#

i think so also

#

the auto mount to /media and the drag/drop are gui things

#

the permissions on /dev/ttyACM0 are something else

tulip sleet
#

or, the usb driver problems are affecting downstream things like the automount. not sure if ttyACM0 permissions are downstream or not. I have to read how it all works.

#

it's time for me to be methodical in testing

#

there's always a reason; it's not cosmic rays

tidal kiln
#

good luck. please report back.

split ocean
#

Hi all, do we have a preferred way to do random? I want something like 'random(1, 10)' for a value.

tidal kiln
#

that's the random module, which then has what you're probably looking for

#

can you describe the use case more?

solar whale
#

@tulip sleet no repl issues on 2.1 for me.

#

Many on 3.0

split ocean
#

@tidal kiln I'm doing some tone generation and want to have some randomness so it doesn't sound like a pattern.

tulip sleet
#

@solar whale when you can't connect, let me know if the permissions are wrong

solar whale
#

Ok will be home in a while

split ocean
#

something like: 'cpx.start_tone(288 + (i * (random(1, 10))))' where i is me looping through ten times.

tidal kiln
#

looks like maybe you want random.randint(1,10)

stuck elbow
#

@split ocean if you use the pentatonic scale only, it will sound good even if completely random

tidal kiln
#

you want to send start_tone() a value that ranges from 288 up to some random offset?

split ocean
#

thanks @tidal kiln that did the trick

#

yes, it's based there at 288 and then each iteration "wobbles" around a bit by that random value

#

I'm not saying it's aliens. But, it's aliens.

tidal kiln
#

can maybe replace whole thing with random.randint(288, 288+WHATEVER)

stuck elbow
#

aah, for alien stuff definitely you don't want pentatonic ๐Ÿ˜ƒ

tulip sleet
#

the aliens in star wars were playing jazz

#

in the bar

tidal kiln
#

to answer your original question - i don't think there's one 'preferred' way, other than just using what's available in the random module

#

and if you want truly random, you'll need to seed it

#

random.random() is the basic functionality, but don't overlook the other useful ones like random.choice()

#

and when using randint or randrange be careful about the inclusiveness of the range

split ocean
#

thanks much!

#

i don't need true randomness, just organic variance : )

#

i like the looks of random.choice() thanks, that could be fun to feed it only the notes I want for some other music-ish projects.

tidal kiln
#

yep

#

instead of generating a random index value and using that to retrieve the item out of the sequence

umbral dagger
#

The M4 arrived. Now to resist the temptaton and try to get some work done. You know.. for the people who pay my bills ๐Ÿ˜ƒ OK, so it's generally also fun.

solar whale
#

@tulip sleet Are you looking for permission issues with 2.1 connections or 3.0? THe only 2.1 issue I have seen is sometimes not automounting CIRCUITPY an then it appearing to be Read-only. With 3.1 it does not even create ttyACM0 some of the times.

tulip sleet
#

@solar whale I mean the root-only permissions on ttyACM0, not filesystem permissions. I haven't seen filesystem permission issues except with write-delay problems. What I do see is the filesystems not even mounting. And yeah, with /dev/ttyACM0, sometimes it's not even there.

floral dagger
#

@split ocean If you just want to sort of "warble" a tone around the central tone, you could probably do something like ((random.random()*.05)*tonevalue) + tonevalue It's similar to what I am using on a candle project to sort of randomize the blue LED by 0-5%of its base value

manic glacierBOT
slender iron
#

@tidal kiln @solar whale @tulip sleet USB problems in 3.0 wouldn't surprise me at all. I don't think the ASF4 Chapter 9 USB stack is very well tested.

split ocean
#

thanks @floral dagger I'll try that out

tulip sleet
#

@slender iron yeah, and it seems to be getting the Linux USB stack into a bad state in some way

slender iron
#

yeah, that doesn't surprise me. I have a linux box I can test with after I finish the UF2 stuff

solar whale
#

MacOS seems to be far more tolerant of it.

tulip sleet
#

if you can duplicate it, that would be great. You can look back for the issues, or I can give you a recipe: (unplug 3.0 board after REPLing, then try any other board)

#

Linux stack should be more robust than that

solar whale
#

It is almost alway OK immediately after reboot of the linux box, but it deteriorates quickly.....

#

I was concerned that it was relaled to use of Jlink, but I think the JLink USB connection is just caugt up in whatever is getting hosed.

drowsy geyser
#

@slender iron I just ordered a box to install Linux, so I should be able to help test/debug in about a week.

#

@solar whale Can you force the condition with other USB devices? (Sorry, I'm at work so missed the conversation.)

tulip sleet
#

@solar whale I haven't been using jlink at all during these problems -- it's not even plugged in.

drowsy geyser
#

Well there's the answer. Thanks, @tulip sleet

solar whale
#

I have not had issues with any other USB devices.

tulip sleet
#

@drowsy geyser it happens after using 3.0 boards. Then many things don't work, such as plugging in regular USB sticks: their filesystems don't show up. But only the 3.0 boards seem to provoke the problem.

#

off for a few mins

drowsy geyser
#

Oh, that's fascinating. Not good, but fascinating.

#

I'll see what I can do once I get my Linux system built.

solar whale
#

I think @slender iron is going to regret enabling so many early testers ๐Ÿ˜‰

#

@tulip sleet I alos had issues with a metro_M0 3.0 build. Have you seen that as well. I can try that again if needed.

tulip sleet
#

I am seeing these issues on CPX 3.0 build. Havenโ€™t even started on M4 yet.

solar whale
#

just loade 3.0 on M0 - USB drive did not auto mount and ttyACM0 looks OK and I can connect, but no response from REPL an dit exits after a few minutes

#

CIRCUITPY is not accessible.

slender iron
#

@solar whale nah, I'm ok having bugs found early

solar whale
#

Moved USB cable to MACOS and it mounts CIRCUITPY and REPL works fine

slender iron
#

@solar whale I have a bad habit of using infinite loops in error cases. You may be hitting one of them

solar whale
#

@slender iron what part of the code it this likely occuring in?

slender iron
#

not sure. I use the while loops because I can get a backtrace with a debugger

solar whale
#

I was just curious wher it may be useful to look at the code - where is most of the USB stuff you are working on?

#

BTW on M0 the REPL does not print out garbled strings like it does on the M4. import board then dir(board) looks normal on M0, but gets garbled on M4.

slender iron
#

ah! in atmel-samd/usb.c and atmel-asmd/usb_mass_storage.c

solar whale
#

thanks.

slender iron
#

no problem!

manic glacierBOT
#

@willingc I don't intend on automatically running autopep8. I was thinking it'd be used by someone to fix the backlog of existing files we have. That way when Travis style checking is green when enabled.

Thanks for the links to those tools! Add love to be able to add checks for when certain Python funcitonality is used as well. For example, I'd love to keep bit manipulation (| and &) out of examples and only in driver code.

solar whale
#

now have a new wierd case - CP 2.0 on M0 all good on MacOS but on Ubuntu - CIRCUITPY is empty? REPL works OK. - went back to MacOS and CIRCUITPY has all its files in place!

#

and os.listdir() on the UBuntu system shows all the files, but they are not visible on CIRCUITPY

#

ah - even weirder - ls /media/jerryneedell/CIRCUITPY shows all the files do the drive is mounte OK - just the GUI file manger is confused.

tidal kiln
#

so just the gui layer?

solar whale
#

closed an reopend file manger and it is now showing the files!!!

idle owl
#

Special.

solar whale
#

That is actuall "exited" file manger and close all windows then restarted

#

I never liked GUI's

drowsy geyser
#

@solar whale Just out of curiosity, which version of Ubuntu are you running? I'm going to be building a 17 system....

solar whale
#

16.04

tidal kiln
#

same here. tend to just go with latest LTS

drowsy geyser
#

Thank you!

idle owl
#

Same

solar whale
#

@tulip sleet FYI - I have always had USB erors generated by my backup drive - from what I read they are supposed to be "harmless" but now I wonder - see https://askubuntu.com/questions/832394/what-does-this-error-mean for some background

#

They are not the same erros we see with 3.0, but I wonder if there is a common tread.

umbral dagger
#

@drowsy geyser Iโ€™m running Ubuntu 17.something

drowsy geyser
#

@umbral dagger Thanks! Is there a significant improvement of 16.04?

river quest
#

here ya go folks, use it any where ya want!

idle owl
#

@river quest Thank you so much!

umbral dagger
#

@drowsy geyser Not really sure.. It had come out just before I built my system and had support for all the bits and pieces. Itโ€™s been working fine ... about 6 months now.

#

HukuzatuaNa#8314 Iโ€™ll dig into the M4 later today

solar whale
#

@umbral dagger Just got some flash chips - looking forward to supersizing an M0_express

drowsy geyser
#

Cool. I'll keep using my Windows 10 system for the M4 until I get the Ubuntu system built.

umbral dagger
#

@solar whale Nice. You got the one I used?

pastel panther
#

pro tip: if you find yourself on a borked terminal after disconnecting from your CP-thing, type 'stty sane' to maybe, probably get your terminal back into a decent state.

solar whale
#

yes - hope so anyway

umbral dagger
solar whale
#

S25FL064LABMFI010 P/N

tulip sleet
#

@drowsy geyser I am using 16.04 but am using the cinnamon (mint) UI, which I started using recently after getting tired of Unity (which is going away anyway). The regular Gnome UI, which is also an alternative, is too low-function for me. PPA for cinnamon is https://launchpad.net/~embrosyn/+archive/ubuntu/cinnamon

umbral dagger
#

@solar whale Thatโ€™s the one. Just build with BOARD=...supersized

solar whale
#

Just need to steady my soldering hand - they are small!

drowsy geyser
#

Thanks, @tulip sleet , I'm not familiar with cinnamon, so I'll give it a try. I'm not emotionally attached to any particular window manager. ๐Ÿ˜ƒ

tulip sleet
umbral dagger
#

@solar whale The extra flash is neat, but RAM is still limiting.

#

@solar whale After the Trinket hack I did, the flash chip pins seem huge.

solar whale
#

I was tempted to try the trinket, but those looked way to small for me to attempt with the tools I have at hand.

umbral dagger
#

@solar whale Do you have am SMT tip for your iron?

solar whale
#

no - just some smallish "screwdriver tips"

slender iron
#

We're in the CircuitPython voice channel for whoever wants to join

#

about to get started

pastel panther
#

Lurking @ werk

#

kk

#

sure thing

tidal kiln
#

mic check

#

?

#

come back to me

tulip sleet
#

me neither

tidal kiln
#

ill try a recoonect

idle owl
#

Kurt: โ€œHugs to all the CircuitPython helpers and the community. Extra hug to the M4 testers + Scott and Dan for their guidance on those working on that.โ€

pastel panther
#

Hug report: Echoing @solar whale and @idle owl, thanks to the @meager fog, @river quest, and @slender iron for making M4 christmas in October a thing. Iโ€™m sure weโ€™re all excited to get CP doing backflips on the sweet new hardware. I for one welcome our new M4 overlords.

Also thanks to everyone in the CP discord; the level of teamwork and discussion has been on point.

tidal kiln
#

@fast wharf just got it in mail ๐Ÿ˜€

fast wharf
#

@tidal kiln yay!

marble talon
#

Out of curiosity, are the upcoming M4 boards expected to be around the same price as the M0s? Will they largely replace the M0s or be a more upscale option at a slightly higher pricepoint?

slender iron
#

@marble talon not sure. @meager fog makes those decisions

marble talon
#

I thought maybe she'd happen along later and pipe up. ๐Ÿ˜ƒ

slender iron
hollow tartan
#

๐Ÿ˜‡

stuck elbow
#

did I miss the meeting?

slender iron
#

@stuck elbow its in the voice chat

#

still going ๐Ÿ˜ƒ

stuck elbow
#

oh, great

idle owl
#

Kurt: โ€œAs for my updates, I don't have any other than continuing to flash 2.1 on some of my boards that are still on 2.0.. Been watching the CircuitPython channel to stay in the loop. Lastly been floating around helping here on discord as much as I can.โ€

umbral dagger
#

@solar whale That should work fine for this chip. If you end up bridging pins, just dap with solder wick to pull of the excess.

pastel panther
#

Iโ€™m going to do a rev two of the MetroWing once I get some feedback from @slender iron, making some nice art and maybe a few more dev-friendly widgets. If anyone can think of any useful features to add, or any other boards that would be useful for CP developers (or users?), let me know.

hollow tartan
#

franken feather?

pastel panther
#

Sure thing, with the previso that it's currently untested

#

one more thing:

#

Otherwise Iโ€™m going to see about getting the different branches built on the M4 and M0 where appropriate and read a bit through the code to get more familiar with it. If my attention would be best directed towards a particular branch or part thereof, please let me know. My hope is to help with testing and eventually development as well.

stuck elbow
idle owl
#
    print('Touched 1!')```
```if 'A1' in cpx.touch:
    print('Touched 1!')```
stuck elbow
#

if cpx.touch & cpx.A1_TOUCHED:

timber lion
#

if cpx.touched.A1:

#

then do whatever

stuck elbow
slender iron
#

cpx.touch_A1

idle owl
#

Another example: while True: COMBO = ('A1', 'A2', 'A5') if all(pad in cpx.touched for pad in COMBO): print("UNLOCKED!")

slender iron
tulip sleet
#

touch = [touchio.TouchIn(pin) for pin in (board.A2, board.A3, board.A4)]

#

touch[2].value

tidal kiln
#
    def touched(self):
        self._touch = tuple(touchio.TouchIn(p) for p in self._pin)
        return ['A{}'.format(i+1) for (i, v) in enumerate(self._touch) if v.value]
idle owl
#

self._pin = (board.A1, board.A2, board.A3, board.A4, board.A5, board.A6, board.A7)

timber lion
#

i have to run, have a 12pm

tidal kiln
#

๐Ÿ‘‹

timber lion
#

but i agree.. less strings the better. explicit names are awesome ๐Ÿ˜ƒ

stuck elbow
#

aren't strings interned in circuitpython?

pastel panther
#

The idea of having the advanced button stuff in a separate library makes sense but the doco for it should probably be linked to from the "normal" CPX button doco. Maybe that was obvious but easy to find doco = win

slender iron
#

yeah totally!

stuck elbow
#

my favorite amount of code to be written to solve a problem: no code

#

pyflakes \o/

tulip sleet
#

mu, in the long run

stuck elbow
#

we could have an automated style check configured on github?

tulip sleet
slender iron
umbral dagger
#

Link to the latest bootloader to flash onto my M4?

pastel panther
#

Does the j-link edu have any benefits over the edu-mini other than supported processors?

hollow tartan
#

ttfn

pastel panther
#

chatter chatter

#

Chrome can support multiple users which is nice

#

I have different users for work and personal stuff, as does my wife and my spam-dump

fading solstice
#

sorry, i think i am a little behind, i just got an metro m4 board today. i have the newest bossac release and i have built the M4 board using what's in github. do i still need to use bossac.exe? Do i send the .uf2 file or the .bin file?

stuck elbow
#

I think for bossa you use the bin file

umbral dagger
#

@fading solstice I'm at the same spot

slender iron
stuck elbow
#

actually SR-71 was designed in a similar system to SCRUM

tulip sleet
#

@stuck elbow i will check that out!

idle owl
slender iron
#

@umbral dagger and @fading solstice did you get the bootloader going?

idle owl
fading solstice
#

@slender iron i looked at the uf2-samd github and could not figure out what to do next.

slender iron
#

the board comes with the bossa so you can just use the latest bossa to load bins

umbral dagger
#

I flashed the uf2 loader, got the boot fdrive, put CP on it, got the CIRCUITPYTHON drive....

#

Now nothing... the "L" led is slowly pulsing

#

I have ttyACM0 but can't screen to it, and no USB drive is showing up

#

Well, if I single-tap reset just the power LED is lit. IF I double tap, pulsing red L.

solar whale
#

try rebooting your linux box - somtimes helps - what you are seeing is not unusual

slender iron
fading solstice
#

@mortal wing @umbral dagger i was able to copy the my build of M4 onto the metro m4 board. i did a power reset and the board appeared as a mounted drive. I was able to connect to it using putty on COM3. I entered the REPL.1+2

pastel panther
#

@idle owl, @slender iron Any infor on which j-link to get? Does the jlink-edu have any benefits over the jlink-edu mini other than number of supported processors?

mortal wing
#

@fading solstice Sorry but I have no experience with circuit python

idle owl
#

@pastel panther I misread that. Sorry! I don't know the differences

fading solstice
#

i think i miessed the proper cable. the one in the box does NOT fit the metro or the jlink

idle owl
#

@pastel panther We all got the edu mini. But get the smaller cable that is suggested on the product page. All of us who just got the M4 anyway... Scott has the standard j-link

pastel panther
#

I figured I would just buy the edu-mini unless the non-mini had like chrome wheels or something

#

I am a sucker for shiny things

tidal kiln
#

2x5 @ 0.05" on both ends

fading solstice
#

@tidal kiln thanks

tidal kiln
#

why the 2x10 @ 0.05" ???? ๐Ÿคท

pastel panther
#

because it's teeny tiny and board space is $$?

#

I think i just have a thing for small boards

tidal kiln
#

but the j-link mini only has a 2x5 header, why provide it with 2x10 cable....???

pastel panther
#

oh right, that's kinda silly

#

I think it's more standard for non-tiny things

idle owl
#

@tidal kiln I'd say maybe most things have the 2x10, or don't have the shield around the connector, but the cables are keyed so they're expecting the shields. Who knows. Just to baffle us perhaps.

split ocean
#

@tulip sleet and @idle owl (and anyone else who may know) do you think there will be a release of 'express' soon? Or already happened? I'm trying to link to the best possilbe place in my guide for people to get it.

solar whale
#

@slender iron just tried new bootloader - It works for CP - now to try arduino

umbral dagger
#

@tidal kiln I believe the 2x10 connector has more capability: swd + trace I think

idle owl
#

@split ocean The newest version is in the bundle, or available from the releases on the actual page.

umbral dagger
#

My SAME54Xplained board has both connectors

split ocean
#

perfect!

idle owl
#

@split ocean Right now the standalone version with play_file isn't posted as a .mpy, but the current version is in the CP bundle.

solar whale
#

@slender iron woohoo! it works for arduino as well!

split ocean
#

in the unpacked zip that is

idle owl
#

/lib/adafruit_circuitplayground/express.mpy ?

split ocean
#

oh, now I see it

idle owl
#

That's why all the example code has from adafruit_circuitplayground.express import cpx because of that folder structure.

split ocean
#

makes total sense now, thanks

idle owl
#

No problem!

split ocean
#

i don't have the name in my head as circuitplayground_circuitpython ;)

#

or the inverse, actually

#

OK, so I'll test it w fresh install and that release version of the bundle. If that all checks out for me, that's what I will recommend in the guide for setup. Nice to have it all in the one bundle!

idle owl
#

Yeah!

#

Dan got that fixed up for us!

stuck elbow
#

would be really nice to have tab-completion for imports ๐Ÿ˜ƒ

#

but that's non-trivial

tulip sleet
#

@stuck elbow I have thought the same thing...

idle owl
#

I do but I have so many other files open with the same thing in it... I had to type it at some point though.

umbral dagger
stuck elbow
#

congratulations!

idle owl
#

@split ocean Don't forget to either update your code or put somewhere in your guide to copy express to CIRCUITPY/ ... I think you have it as from express import cpx. If you've already changed it, ignore me! ๐Ÿ˜ƒ

umbral dagger
#

@solar whale reboot fixed it

#

And I have an empty CIRCUITPY drive

solar whale
#

Yup - that is normall - you can put stuff in it!

#

blink D13

tidal kiln
#

rebooting to fix linux ๐Ÿ˜ฅ

solar whale
#

sad but true - get used to it for the time being.....

split ocean
#

thanks @idle owl right, I want this in my code from 'adafruit_circuitplayground.express import cpx'

idle owl
#

@split ocean Yep

split ocean
#

from adafruit_circuitplayground.express import cpx oh, is this the proper code markdown backtick?

#

yes it is. now I'm talking to myself

idle owl
#

@split ocean Single backtick is inline, triple backtick creates a code block codeblock

solar whale
#

@umbral dagger waht seems to happen is taht it will hose up the linux USB when you disconnect it and try to reconnect.

split ocean
#

that's very kewl

umbral dagger
#

And I have the led blinking in CP ๐Ÿ˜ƒ Sliiy level of excitement.

solar whale
#

Woohoo!

idle owl
#

My blinky on the M4 broke with the new flash.

#

I haven't gotten around to fixing it.

umbral dagger
#

@idle owl This is uf2 bootloader & CP built locally

#

with up-to-date checkouts

idle owl
#

@umbral dagger I have the uf2 bootloader, but I haven't built locally, I used an updated build from Scott from yesterday

#

And then run make something and that's it?

solar whale
#

yes

umbral dagger
#

init the submodules before making

idle owl
#

Biggest repo I've ever cloned. Nice.

umbral dagger
#

git submodule update --init --recursive

#

in the circuitpython dir

#

the into atmel-samd

solar whale
#
make BOARD=metro_m4_express DEBUG=1```  after doing thw git update
idle owl
#

The git submod thing is in /circuitpython/ yes?

umbral dagger
#

yes

idle owl
#

Running

umbral dagger
#

then make BOARD=metro_m4_express

#

or make DEBUG=1 BOARD=metro_m4_express

#

depending it you want to debug

solar whale
#

yes - run the make in atmel_samd

umbral dagger
#

oops.. yes

idle owl
#

On Mac. Same syntax?

umbral dagger
#

should be

solar whale
#

yes

idle owl
#

Excellent

umbral dagger
#

Mac is unix inside

idle owl
#

Yep

#

I ask anyways. Rather get this right the first time.

umbral dagger
#

FWIW I'm running the debug build

idle owl
#

I get to see more in Ozone apparently, so I'm down

solar whale
#

@idle owl - have you installed the arrn gcc toolset?

idle owl
#

um... yes. I think I needed it to get the jlink to work?

#

How can I check for sure. I remember doing it but we did a lot this weekend

solar whale
#

ah - yes - should be all set

idle owl
#

ok

#

Building!

#

I've never done this before

umbral dagger
#

COOL!

solar whale
#

woohoo!

umbral dagger
#

OK... good... I'm going to go back to learning Haskell for a bit before my kid comes over for dinner.

solar whale
#

@umbral dagger good luck!

umbral dagger
#

I'm going to leave blink running

idle owl
#

I did until it broke

#

So satisfying

solar whale
#

@idle owl the build will be in build_metro_m4_express/firmware.uf2 if all goes well

idle owl
#

It's taking a while. I assume that's normal.

solar whale
#

yup

idle owl
#

Oh hmm.

#

Error.

solar whale
#

forgot to make mpy-cross!

idle owl
#

but I have a .bin and a .elf so....

#

Here's the entire output:

#
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
Generating build-metro_m4_express/genhdr/mpversion.h
GEN build-metro_m4_express/genhdr/qstr.i.last
QSTR updated
GEN build-metro_m4_express/genhdr/qstrdefs.generated.h

39252 bytes free in flash out of 245760 bytes ( 240.0 kb ).
58336 bytes free in ram for stack out of 196608 bytes ( 192.0 kb ).

Create build-metro_m4_express/firmware.bin
Create build-metro_m4_express/firmware.uf2
python2 ../tools/uf2/utils/uf2conv.py -b 0x4000 -c -o build-metro_m4_express/firmware.uf2 build-metro_m4_express/firmware.bin
make: python2: No such file or directory
make: *** [build-metro_m4_express/firmware.uf2] Error 1```
#

But like I said the firmware.bin and .elf are in the build_metro_m4_express folder...

solar whale
#

looks like you need install python2

#

for uf2tool

tidal kiln
#

mmmmm crepe

idle owl
#

Odd. It's installed by default.

#

It's an old Macbook Air.... so... robocrepe...

#
Python 2.7.10```
solar whale
#

but if you type python2 does it run

idle owl
#

I have 3.x.x installed over it, but that's there by default.

#

Nothing

#

Says command not found

solar whale
#

that the problem

idle owl
#

Blergh

tidal kiln
#

what about just python?

idle owl
#

Do I just install it again? I doubt symlinking it or whatever will work. @tidal kiln It gives me the 2.7.10 version

#

Or is there a way to make and force it to use python

tidal kiln
#

it's just sym links for me

idle owl
#

instead of python2

solar whale
#

a symlink may well work

idle owl
#

oh

#

I thought it wouldn't.

tidal kiln
#

/usr/bin/python2 -> python2.7

#

/usr/bin/python -> python2.7

solar whale
#

I installe python via homebrew and got all the variants, but you can try the symlink.

idle owl
#

What's the actual syntax for it? I have a few but I've never come up with them myself.

tidal kiln
#

for ln?

idle owl
#

Wait hold on

umbral dagger
#

you have ppython version 2.... but do you have the command python2

#

ah.. ya.. like @tidal kiln said

idle owl
#

Apparently I need to do something specific with my Python3 install and it attaches legacy to Python2. Looking into this.

tidal kiln
#

/usr/bin/python3 -> python3.5

#

to complete the set

umbral dagger
#

That python2/3 duality is so annoying

idle owl
#

ahh ok

tidal kiln
#

ln -s TARGET LINK_NAME

umbral dagger
#

I remember "upgrading" to Python3.. "what's this Python2 stuff.. I don't need that anymore..." oops

idle owl
#

@tidal kiln ahh yeah ok

solar whale
#

you'll need sudo in /usr/bin

tidal kiln
#

yep

umbral dagger
#

@idle owl Welcome to the wonderful world of UN*X sysadmining

idle owl
#

@umbral dagger Thanks! ๐Ÿ˜‰

tidal kiln
#

also, i'm on ubuntu, don't know if mac uses a different folder layout

idle owl
#

@tidal kiln Not really different, no

tidal kiln
#

i.e. is it /usr/bin/?

idle owl
#

yes

umbral dagger
#

@tidal kiln Much the same. /Users instead of /home

idle owl
#

I checked.

umbral dagger
#

@tidal kiln the rest is the same (other than maybe some of the more esoteric stuff)

idle owl
#

The make boardname clean command will erase the broken half-build right? Is that what that's doing?

solar whale
#

yes - usually a good idea

idle owl
#

Ok thanks

solar whale
#

In this case it would not matter since only he uf2 step is missing, but a good habit.

idle owl
#

I'll get the python2 thing sorted and then start fresh. Already ran clean.

solar whale
#

@idle owl I have to go for awhile - good luck!

idle owl
#

@solar whale Thank you! Have a good one!

manic glacierBOT
stuck elbow
#

@umbral dagger just wait for the circuitpython 1/2/3 triplality ๐Ÿ˜‰

manic glacierBOT
idle owl
#

Ok python2 resolved, and a few things updated.

#

Do I need to do the init thing again before building or is that a once type thing

umbral dagger
#

@stuck elbow At least only one will be on a board at any given time. But I hope we can avoid that.

idle owl
#

Building.

#

Ooh I think it worked

tulip sleet
#

@slender iron trying to convert Beagle output to pcapng using your script. No errors, but file comes out empty. Should I export the .tdc in a special way? I am using the latest (last commit 10 days ago) from your python-pcapng repo.

One thing I noticed right away while recording is that the 3.0 board is much, much chattier when idle than the 2.1 board.

idle owl
#

Has the uf2 bootloader been updated since yesterday?

split ocean
#

@idle owl @meager fog just so you know, everything works great on UFO calling the cpx commands with clean install of CP 2.1 and the latest bundle.

idle owl
#

@split ocean That's great!

split ocean
#

I'm not doing play_file at the moment, just play_tone btw

idle owl
#

Ah ok. Does it still fit your goal?

split ocean
#

yes, it's great, just what I need!

idle owl
#

Excellent!

#

I tried flashing the M4 and it didn't show up at all on the first try, but the second try, it mounted as CIRCUITPY! And I got my blinky back!

#

I made a debug build, time to try to connect the jlink again and see if I get the middle pane in Ozone.

#

I think it's still not halting. I still get a DAP error every time, whatever that is. And I have no idea how to even read any of this yet. But it's connected and I see the code. So cool!

#

And blinky still works on the other side of Ozone which it did not yesterday, so improvement!

#

Can't get to the REPL out of the serial connection though. This also happened yesterday. Reflashing my build didn't fix it.

stuck elbow
#

anything in dmesg?

tulip sleet
#

@solar whale I am having some success recovering from hosed USB by ps -ef |grep udev, find the base lib/systemd/systemd-udevd and then sudo kill -9 it. -9 may or may not be necessary. That brings back ability to use screen, but the 3.0 boards may still not respond.

#

Unplug the board while you are doing the above.

idle owl
#

How do I check dmesg

stuck elbow
#

"systectl restart udev" might work too

#

@idle owl type "dmesg" in a terminal

idle owl
#

thank you

stuck elbow
#

"systemctl"

#

you will see everything your computer did since it was switched on, look at the end ๐Ÿ˜ƒ

#

for usb-related errors

idle owl
#

I can get the serial connection started, but I can't get into the REPL. It won't accept keyboard interruption or input. I don't see any usb stuf fin dmesg

tulip sleet
#

@stuck elbow thanks - I was doing sudo udevadm control --reload-rules, which was just hanging (which suggests udev was in bad shape).

#

haven't gotten used to systemd yet

slender iron
#

@tulip sleet yeah, export from beagle as csv

manic glacierBOT
tulip sleet
#

@slender iron did that, but the resulting .pcapng was only 52 bytes long. Did you change any settings in the dialog box when exporting?

slender iron
#

yeah, I unchecked them all

#

ah, the visible records checkbox would break it

tulip sleet
#

goti it - tnx

slender iron
#

@tidal kiln what do you want my eyes on?

manic glacierBOT
tulip sleet
#

@slender iron looking at the 3.0 USB traces, they're chock full of SCSI USB mass storage traffic when they should be largely idle. Also many ENDPOINT HALT requests. Not sure who's doing what: whether the Linux drivers are confused or the board is not answering properly.

slender iron
#

I bet the board isn't answering properly

idle owl
#

@slender iron Is there a newer version of the uf2 bootloader since the one we flashed yesterday? Or is that still the same

slender iron
#

yeah, dean fixed the arduino side

idle owl
#

But nothing changed on the CP side?

slender iron
#

I don't actually have a build

idle owl
#

ok

slender iron
#

nope

#

just got my arduino math wrong ๐Ÿ˜ƒ

idle owl
#

I remember you mumbling about that ๐Ÿ˜ƒ

#

I'm trying to figure out why I can't get to the REPL.

slender iron
#

๐Ÿ˜ƒ

manic glacierBOT
slender iron
#

opinions wanted on how to back up programs

manic glacierBOT
tulip sleet
#

@idle owl I could not get to the repl on a USB3 port on Linux. It works on USB2. If you have a USB2 hub you could interpose it if you have no USB2 ports on your Mac.

#

screen would connect, but I couldn't type or see output, and couldn't exit.

idle owl
#

We have one somewhere. I tried flashing yesterday's firmware but that does weirder stuff. I need to rebuild my local build. I cleared it with the intention of trying again.

#

If it fails again, I'll try the USB2. Thanks!

tulip sleet
#

This is not on an M4. This is just on a CPX. I have decided not to try wrestling with the M4 bootloader quite yet. But I believe this might be a USB problem, so using USB2 might be applicable to both.

idle owl
#

Ok every time, the first time I flash, it doesn't work. It appears to do nothing. If I put it into the bootloader again, drop the same firmware.uf2 on it, mounts as CIRCUITPY. This has happened every time I've flashed it, done some things with it for a while, and then tried to flash it again at a later time.

#

Serial connection works, still not taking input to get to the REPL. Going to try to find a USB2 hub.

#

Print statement in blinky code.py is working in the serial connection.

timber mango
#

itshappening.gif

slender iron
#

๐Ÿ˜„

idle owl
#

Yay!

slender iron
#

time for me to climb

timber mango
#

l8r!

fading solstice
#

has anyone mentioned the flaky REPL interface on M4?

idle owl
#

Yep. I'm dealing with some REPL issues right now.

fading solstice
#

is it report then?

#

is it reported then?

idle owl
#

Oh that I'm not sure of. I usually assume for a while that it's something I'm doing. I replicated it finally a few minutes ago, but I haven't filed an issue.

fading solstice
#

ok

#

dir(math)
[name'U, e'U, pi'U, sqrt'U, pow'U, exp'U, log'U, cos'U, sin'U, tan'U, acos'U, asin'U, atan'U, atan2'U, ceil'U, copysign'U, fabs'U, floor'U, fmod'U, frexp'U, ldexp'U, modf'U, isfinite'U, isinf'U, isnan'U, trunc'U, radians'U, degrees'']

idle owl
#

I can't even get to the REPL right now, but when I could I did dir(board) I got a lot of weird characters.

fading solstice
#

dir(math)Ab=math.cos(1) happens when I type a up arrow key twice

#

should get one or the other command, not both

idle owl
#

I haven't heard this issue yet.

fading solstice
#

i am on windows 10

idle owl
#

I haven't done any testing on Windows with the M4 yet. Or with any of these boards for a while.

#

I'll be back in a bit, need to do dinner.

drowsy geyser
#

@fading solstice I'm on Windows 10 too. I'm going to flash my M4 with CP built from source last night when I get home tonight, so if you're seeing something strange and need someone to replicate it, just let me know.

formal plover
#

@timber mango us Michiganders love CircuitPython!

fading solstice
#

@drowsy geyser try import math then dir(math). then type b=math.cos(1). that should work fine. now type up-arrow twice. i.e., up-arrow up-arrow. The command line should show dir(math), but instead show more stuff.

drowsy geyser
#

Ok, will do! Heading back that way now. ๐Ÿ˜ƒ

idle owl
#

USB2 did not resolve the REPL issue. I still can't get to it.

manic glacierBOT
tulip sleet
#

@solar whale systemd-udevd was using ~100% of CPU after using a 3.0 board. I restarted it with sudo systemctl restart systemd-udevd

#

I awoke the system from sleep after a couple of hours of non-use.

solar whale
#

@tulip sleet thanks. sounds like you have been making progress.

tulip sleet
#

@solar whale stopping for now but will take a look at MSC details tomw. Looks like some kind of ineffective communication between host and device is generating a lot of useless traffic.

nocturne wren
#

@meager fog I love, love, love the CircuitPython Educator's Box. It makes me so happy. We played your CS4ALL video for 80 high school and college women during an all day hackathon on Saturday for two humanitarian causes. Folks loved the eyeballs. ๐Ÿ˜„

solar whale
#

@tulip sleet great work - Goodnight!

#

@tulip sleet wow sudo systemctl restart systemd-udevd caused an immediate mount of METROM4BOOT - It had not been able to do that . Very nice!

#

@idle owl Are you using a Mac - I have had few REPL issues with mine on MacOS. BTW I think I have a reliable workaround for the "unable to halt" problem wiht J-Link. What I found works is to disconnect the USB (power via 9V) then manullly enter bootloader and then try Jlink. After it connects, I can plug the USB back in and get to UF2 drive or REPL.

idle owl
#

Hmm. I am using a Mac yes

solar whale
#

still no REPL

idle owl
#

Yeah

#

I don't have a 9V power adapter

solar whale
#

ah - have you tried it with the J-Link disconnected.

idle owl
#

Yeah I usually disconnect it before doing anything. I haven't had it connected since I checked earlier to see if I could see the code in Ozone

#

I assume it'll interfere ๐Ÿ˜ƒ

slender iron
#

@fading solstice dan is looking at the USB issues now. we know its flaky

solar whale
#

Dan is onto something - the restart of systemd-udevd really helps!

#

@idle owl how do you connect to REPL - screen /dev/tty.usbmodemxxxxx 115200 ?

idle owl
#

Exactly

#

Is it because I made a debug build?

solar whale
#

I just plugged mine into my MAC and it took a few tries for connection to work. but it eventaully did.

#

I am using DEBG build

idle owl
#

It connects just fine, but it doesn't accept ctrl C to get into the REPL or any other input to interrupt the serial connection. If I add a print statement to code.py, it prints just fine

#

If I save code.py from an editor, it does a softreboot even

solar whale
#

odd - I have not seen that. I dont run anyhtin by default, no main.py or code.py

idle owl
#

Let me try removing it

#

Hey, REPL.

solar whale
#

hmmm - maybe it is just ready for baby steps....

idle owl
#

lol. Along with fdsafdsafdsa that I typed earlier trying to see if anything would work....

#

Like it stored all the ctrl C I did....

solar whale
#

see - I never liked code.py ๐Ÿ˜‰

idle owl
#

๐Ÿ˜ƒ

solar whale
#

I store my blinky as led.py and just import it when I want to see it blink

idle owl
#

hmm.

solar whale
#

control-C ends it and Iget control back.

idle owl
#

I copied it back and imported it and it ran. Did ctrl+D to get it back to the serial connection, and then I was still able to get back to the REPL.

#

Going to try disconnecting it now and seeing if I reconnect if it works

solar whale
idle owl
#

I swear it worked yesterday

#

Yep failed again with code.py, worked once I renamed it

solar whale
#

yesterday was a long time ago ๐Ÿ˜‰

idle owl
#

๐Ÿ˜„

solar whale
#

Congratualtion on your first build and getting J-link going!

idle owl
#

Thanks! It still gives me the halt errors, but it's a start!

solar whale
#

the halt errors are common - you saw my post - let me know if that works for you.

idle owl
#

I copied the suggestion out so I have it, I think I'll try it tomorrow

solar whale
#

but you need the 9V supply

idle owl
#

Yeah if I can find one here heh

#

otherwise I need to wait to try it

solar whale
#

all in good time - you are making great progess - so much of this has to be experinced rather than demonstrated.

#

For example. the Jlink is an incredible tool and it will take a lot of poking and proding to get used to it either in Ozone or GDB but there is no way to learn besides doing it.

idle owl
#

Yeah for sure

solar whale
#

The metro_m0 says the supply should be 7-9 V so I guess a 5V supply os not enough. too bad. they are more common. I was glad I had a 9V available.

idle owl
#

I have a friend who does this type of thing daily, I told him he's on for teaching me, but he lives a ways away and it'll be a while before I see him. So I'm on my own for a while ๐Ÿ˜ƒ

solar whale
#

Nice to have friends to help.

#

Time to quit here - Goodnight and good work today!

idle owl
#

You too! Have a good one!

umbral dagger
#

Hi 'all. Blink was still running solid. Screen was still connected. CTRL-C got me the REPL prompt and it worked fine.

idle owl
#

Nice!

umbral dagger
#

using up/down-arrow appends to the existing cmd line rather than replacing it

#

The output from dir(...) gets garbled seemingly semi-randomly

#
[__namm__'), colleec'', ddsabble), eenale'), 'senablee'), mem_frree), mem_aaloc'']
>>> dir(gc)
[__name___', ccolect'', dissbbe'), enable'), iisnnbled'', mem_ffre'), mem__aloc'']
>>> dir(gc)
[___amee_'', colllcc'), ddssale'), enabll'', iieeablld'), mmmm_ree'), 'emm_lloc'']
>>> dir(gc)
['_naaee_'), coolecc'', diisbbl'), ennale'', 'ienaabed'', mme_ffre'', meemalllcc']
>>> dir(gc)
[___ame___), collectt), disabll'), enablee), 'ienaabeed), 'em_free'), mem_alloc'']
>>> dir(gc)
[__nnmm__'), colllett', dissale'), ennble'), iseeabled'), mem_ffee'), mme_alllcc']
>>> dir(gc)
['_nnaee_'), 'olleec'', dissbbl'), ennabe'), iseeablee'), mee_free'), meem_lllcc']
>>> dir(gc)
['_name__'', 'clllct'), ddiablee', eenbbl'), 'sseabble'', memm_reee', 'emm_aloo'']
>>> dir(gc)
['_naam___', cclllet'), diisalle', eeaabe'', iiseablld'), 'eemfrree), 'emm_lloc'']
>>> dir(gc)
['_naame_'), colleet'), 'iiable'), enabll'), iienaalld'), 'eemffee'), 'ee_alloo'']
>>> dir(gc)
[___ame___), ccolect'), 'isable'), 'nabll'), 'iennabed'), mmmmffre'', mmemalllc'']
>>> dir(gc)
[__name__'), cooleett), disaabl'', eenall'), 'ienaalled), 'me_ffree', mme__llooc']
cunning crypt
#

@umbral dagger Reading that makes me think your M4 is just drunk.

idle owl
#

It might be.

#

I get the same thing though with dir(board) repeatedly.

solar whale
#

@umbral dagger I have seen both issues

idle owl
#

Less obvious because there's a lot of 2 letter pins in dir(board) so there's only so many random combinations of 2.

umbral dagger
#

output of REPL results seems fine

#

But there seems to be an issue with the readline equivalent. I.e. manipulating the command line

solar whale
#

Not clear if it is on input or output - if output it may be one issue. If input it is two....

umbral dagger
#

@solar whale True

#

But entering code is ok...

solar whale
#

yes - so Iam hopeful it is all related to output of strings.

umbral dagger
#
...     print(x)
... 
0
1
2
3
4
5
6
7
8
9
#

Backspacing and correcting worked

#

left/right-arrow appears to be ok

solar whale
#

Just don;t look at the screen ๐Ÿ˜‰

umbral dagger
#

but left-arrow "too far" and type and it messes up... appending copies.

solar whale
#

I thought about entering an issue, but I'm not even sure where - Thought it best to give it some time....

#

Now it is really time for bed - Good night all.

umbral dagger
#

'night

#

I'm wondering if it might be my terminal emulation.

#

hmm.. screen claims VT100 compatibility which is what CP looks to be assuming/requiring

idle owl
#

@river quest They look great!

river quest
#

it's like a mirror of all the cool stuff we are doing, so thank you everyone here!

formal plover
#

And thank you @river quest!!!

#

Might just have to make the large banner my Twitter banner.

umbral dagger
#

@formal plover Ohh.. good idea.

formal plover
#

Thanks @umbral dagger! Mine is up

umbral dagger
#

So... screening in doesn't work anymore... and I can't get the BOOT drive (doubletap reset) But CIRCUITPY shows up fine on reset. I can edit main.py on the board.

#

It isn't auto-reloading, but reset will pick up the changed code

manic glacierBOT
umbral dagger
#

@formal plover So's mine. I did my facebook as well

#

Enyone that knows me will be shocked that I'm a Python fan now!

#

Though to be fair, I'm a circuitpython fan

pastel panther
#

Howdy folks! I'm finally done with post-work things and can play around with my new toys!

drowsy geyser
#

I thinik @idle owl infected me. My REPL isn't working now....

idle owl
#

@drowsy geyser I renamed code.py to anything other than main.py, and the REPL worked.

drowsy geyser
#

@pastel panther What new toys do you have?

pastel panther
#

a oled featherwing, metro m0 and metro m4

drowsy geyser
#

Nice! UPS just dropped off another Adafruit box for me. I need to see what's in it. ๐Ÿ˜ƒ

pastel panther
#

doing a 2.x build on the metro (cause I've already done one successfully on my feather), then 3.0 on the m0, then with any luck 3.0/master on the m4

#

I'm about to pull the trigger on a j-link as well

drowsy geyser
#

If you get the JLink join the crowd figuring out how it works. We're making progress!

pastel panther
#

nice

#

Did anyone buy the non-mini edu? I'm thinking of spending the extra bucks to get a bit more speed and processor support

idle owl
#

Dan and Scott have them because of the commercial use case. I think the rest of us got the mini.

drowsy geyser
#

@pastel panther I'm thinking of getting the non-Edu JLink so I get a full license for the debugger.

#

@idle owl Bingo. That did it.

#

Thanks!

idle owl
#

You're welcome!

#

I'm out. Goodnight!

drowsy geyser
#

G'night @idle owl

pastel panther
#

night!

drowsy geyser
#

@fading solstice Double up-arrow bug confirmed. I'm running: Adafruit CircuitPython 3.0.0-alpha.0-26-g536bcb4 on 2017-10-20; Metro M4 Express

pastel panther
#

What's the repro?

#

dear lord, I forgot how much I missed dir() since I left python land for ruby land

drowsy geyser
#

import math, dir(math), b=math.cos(1), then double up arrow. It should display "dir(math)" but instead displays "b=math.cos(1)<gibberish>dir(math)"

pastel panther
#

oh, the history is borked

#

?

drowsy geyser
#

Seems to be.

#

Or the routine that displays the history....

pastel panther
#

sure. I'll take a look after I get 3.0 on the m0

drowsy geyser
#

Ok. No rush. @fading solstice had asked me earlier to replicate it, so that's what I did. ๐Ÿ˜ƒ

pastel panther
#

I'm itching to get the m4 going but I'm trying to be smart and take it step by step rather than jumping to a new branch and board at once

drowsy geyser
#

@pastel panther I got 3.0 to compile last night. Trying to work up the nerve to flash it to my M4. ๐Ÿ˜ƒ

pastel panther
#

there it goes, I had to get the 3.0 submodules

#

just doooeeeet

#

wait, didn't you say you repro'd the bug on a m4 with 3.0? Was that not your build?

#

@drowsy geyser if so, just save the current uf2, right?

drowsy geyser
#

@pastel panther No that was the "latest commit" build as of Saturday evening. I just flashed it with my build from source as of last night.

pastel panther
#

ah

#

just flashed my m0 with 3.0 and /dev/tty.usbmodem1411 seems to be ... gone?

drowsy geyser
#

@fading solstice Also replicated the bug on my build from last night's sources.

#

@pastel panther MacOS?

pastel panther
#

ya

drowsy geyser
#

See if /dev/tty.usbmodem1412 is there. ๐Ÿ˜ƒ

#

I noticed on my Mac that it would often renumber the tty.

pastel panther
#

no dice

drowsy geyser
#

Ruh roh.

#

Reset the board?

pastel panther
#

tried that, no luck

#

I'll try 2.1 again. It will go into bootloader mode so I got that going for me which is nice

drowsy geyser
#

Drat. My Mac is dead or I'd try to replicate for you.

pastel panther
#

yup, that worked, tty.usbmodem1411 shows up after putting 2.1 back on

drowsy geyser
#

That's ... unusual.

pastel panther
#

i would say so!

#

ya, same thing after a fresh build

#

wierd

drowsy geyser
#

That is really strange. I guess I've been lucky with my Windows 10 environment so far.

pastel panther
#

you got 3.0 on a m0 with no issue?

#

(metro, that is)

#

I'll try my feather

drowsy geyser
#

No, I put it on the M4.

pastel panther
#

If the feather works, I'll try the m4

drowsy geyser
#

Ok...

pastel panther
#

same thing on the feather m0

drowsy geyser
#

Huh. Now you have me wanting to build an image for the Feather M0 to see if I can replicate the USB problem under Windows....

#

Maybe @slender iron can try, since he has a Mac, too.

pastel panther
#

I mean, it can't hurt to try if you have a board lying around. No rush though

#

yea, I'll ask Scott tomorrow. Might also poke at the code to see if I can find an idea of what the issue might be

#

Did you have to do anything special to get 3.0 on the m4? I though I heard of people saying that they had to use bossac

#

speak of the devil! Hey @slender iron do you know of any trouble loading 3.0 on m0 boards from a mac? On the feather and metro both, my tty.usbmodem1411 disappears after flashing

slender iron
#

@pastel panther I've only tried loading 3.0 on the m0 via jlink

pastel panther
#

@slender iron Ok, I'll poke it with a stick until it gives up it's secrets

slender iron
#

dan is looking at the usb stuff more tomorrow too

#

I definitely saw the incorrect output on the m4

pastel panther
#

do you thing it's a general thing and not a m4 specifc issue?

slender iron
#

it seemed m4 specific to me but I'm not exactly sure

#

most of the usb stack is shared

pastel panther
#

where would I look to poke around at that?

slender iron
#

atmel-samd/usb*

#

and the stuff it references in asf4

pastel panther
#

ok, thanks

glacial bronze
#

I'm looking at the Circuit Playground Arduino IDE examples with an eye toward reproducing them in CircuitPython, and I'm stumped. One of the audio example sets is a speak-and-spell sort of thing that calls a function CircuitPlayground.say() or somesuch. But when I look in the .h and .cpp files, there's no implementation of .say. Just a bare reference in the header. Anyone got a clue offhand?

pastel panther
#

Can you point me to the code/example in question?

dry carbon
#

Hello all โค

glacial bronze
#

er, I just yanked them out of the Arduino IDE and CP library folder, one sec

#

File --> Examples --> Adafruit Circuit Playground --> Speech, then etc. Talk_US_Male

#

the matching .cpp doesn't include the string "say"

#

oh flip, never mind. The code I'm looking for is in talkie.cpp. But I'm not sure where that's included into the sketch

pastel panther
#

yea, I don't immediately see a refernce to talkie. The sketch compiles though?

glacial bronze
#

Yep. I haven't tested it on the board, though

#

Let me actually install the SAMD board version and see what that looks like

#

Now it doesn't compile

#

 #include "sam.h"

                 ^

compilation terminated.

exit status 1
Error compiling for board Adafruit Circuit Playground Express.
#

That does not seem related

pastel panther
#

probably not

#

You might want to double check you have the latest samd libraries

glacial bronze
#

I literally just pulled them fresh. I guess I can try restarting the IDE

#

Nope, same error

pastel panther
#

I'm assuming you can't compile blink.ino either?

glacial bronze
#

That would be right

pastel panther
#

You might try turning on verbose compile output if you haven't already

#

I would try and find samd.h in your path and verify that it's referencing that dir during compile

glacial bronze
#

There is no samd.h in the Arduino packages\AdaFruit folder

pastel panther
#

I came to the same conclusion. Sorry, I don't think I'll be much further help

glacial bronze
#

no sam.h either

#

very odd

pastel panther
#

./libraries/asf4/samd21/include/sam.h
./libraries/asf4/samd21/samd21a/include/sam.h
./libraries/asf4/samd51/include/sam.h

#

that's in Documents/Arduino on a mac, not sure where the windows equivalant would be

glacial bronze
#

It looks like it's an Arduino file that goes missing sometimes. Maybe part of the problem here is that my ArduinoData folder is real old and the IDE has been updated over and over without actually wiping that folder clean

pastel panther
#

when all else fails, nuke it from orbit and re-install