#circuitpython-dev

1 messages Β· Page 124 of 1

slender iron
#

yeah, it thinks you are in a different git repo

#

what happens if you remove that file?

idle owl
#

the .DS_Store?

slender iron
#

ya

idle owl
#
HEAD detached at 39f28ed
nothing to commit, working tree clean
slender iron
#

what about from the circuitpython repo?

idle owl
#

Oi, the first one isn't there now. Let me try this in the other one.

slender iron
#

πŸ‘

idle owl
#

lol that's what it was. Oi. A bunch of .DS_Store files in different directories.

#

Thank you!

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 3\.0\.0\-alpha\.1
slender iron
#

no problem

idle owl
#

Hmm I just realised something. Do all PDM mics supported in CircuitPython require 16000 or only the CPX for sure?

slender iron
#

I think most do

idle owl
#

Or rather require 1MHz total

#

Ok

hollow tartan
#

okay. I've got it, by George. ```Adafruit CircuitPython 2.1.0 on 2017-10-17; Adafruit Feather M0 Express with samd21g18

slender iron
#

yay @hollow tartan !

idle owl
#

Great job @hollow tartan

hollow tartan
#

I could not have done it without you @idle owl and @slender iron πŸ˜‡

#

I am afraid it only gets harder from here on ....

idle owl
#

Or more fun πŸ˜ƒ

hollow tartan
#

yes, that is true. thank you. sometimes, I forget to look on the Sunny Side.

#

This drag and drop user interface is a Purely Miraculous Wonder . Congrats & Thanks to all who have made it a reality.

slender iron
idle owl
#

Oi I think it worked

meager fog
#

woot i got the itsybitsy m0 up and running

#

fancy new cpy board soon!

pastel panther
#

nice!

meager fog
#

MORE pins than Trinket but SMALLER than feather. comes with flash!

idle owl
#

Excellent!

pastel panther
#

Nice!

meager fog
#

very very very compact

pastel panther
#

Kinda pro-trinket++ ish?

meager fog
#

its kinda a pro-trinket killer

#

cause i gotta end pro trinket soon

#

bitbang usb is on its last little legs

pastel panther
#

for sure

meager fog
#

it did its job admirably

#

but we eventually were able to get very good pricing from atmel

#

so we could jump to the nicer chips, for a reasonable price!

pastel panther
#

I suppose being a loyal customer has it's benefits?

meager fog
#

yep! if you can show you'll sell 10K chips+ a year

pastel panther
#

Also, that layout is really very nice

meager fog
#

you can get good pricing

#

thx! its 8mil/8mil

#

power is 10mil or 12mil

pastel panther
#

After you mentioned those tiny flash chips I had to grab some for some future projects. Just finished a double sided breakout for the 2x3, 4x3 and 5x6

meager fog
#

arent they bonkers cute?

#

i didnt even know they made em so small!!!

#

Talking Heads is great electronics hacking muzik!!

pastel panther
#

Rezz is also good for that

#

Is that the 2x3mm version on the itsybitsy?

meager fog
#

yep USON 2x3

#

W25Q80 for now

#

but getting a 2MB chip on order soon

idle owl
#

so nice

pastel panther
#

I heard rumors you're considering a QSPI version of the m4?

meager fog
#

the M4 has hardware support for QSPI

#

we dont know how much it will speed it up but we have a prototype to try

#

but the QSPI pins do not support hardware SPI

#

which is...silly

#

so we're going to continue as is with hw spi

#

then try qspi

pastel panther
#

That's strange...

meager fog
#

atmel makes 'creative hardware decisions' sometimes

#

there's no true crossbar, so you have to pick and choose pins

pastel panther
#

Did you mean above that you can't have the same layout for QSPI and normal SPI? What's the impact of the QSPI pins not supporting hardware SPI?

#

I thought QSPI was just a faster SPI that you can execute code from

jovial steppe
#

Anyone out there running CP on a Metro M0 Express? First time, here. I've got the Blinky from the learning system running just fine, but I can't get to the REPL. I have a COM port in my Win10 device manager, but it doesn't ID as an Adafruit board -- just "USB Serial Device". It's the only USB thang that I've got plugged in. When I PuTTY to it (COM13@115200), the window opens but the connection doesn't happen (it says "Offline/inactive"). Doesn't respond to Enter or CTRL-C. I've even rescanned in Device Manager and the COM port situation stays the same.

pastel panther
#

When you plug it in do you get a CIRCUITPY drive?

#

nevermind, you said you got a blinky working

jovial steppe
#

Yup. Drag and drop of code and re-save from edit works, cheanges code and runs just fine. I have multiple LEDs.

#

I was going to induce and error and see the output in the REPL window, but no go.

pastel panther
#

The 'USB serial device' thing sounds about right

jovial steppe
#

Learning system doc says it should say which Adafruit board it is.

#

Not just generic "USB Serial Device"

pastel panther
#

I'm not on windows so I could be wrong

jovial steppe
#

I'm not Windozing because I love it πŸ˜ƒ

pastel panther
#

can you try removing the code.py and any othe source code and trying again?

jovial steppe
#

Try again starting from where?

pastel panther
#

remove the file(s), unplug and replug the USB

jovial steppe
#

I can switch from one LED blinking to another easily.

#

I'll do that.

pastel panther
#

Also remove the power supply if you have one as well

jovial steppe
#

I unplugged and re-enumerated to the same state. Can change program and blink different LED fine. No ExtraPuTTY love, again.

pastel panther
#

@idle owl Any ideas?

jovial steppe
#

If I unplug from USB, COM13 goes away and comes back after re-insert, so I'm definitely COM13.

pastel panther
#

If you double tap the reset do you get a METROBOOT drive?

jovial steppe
#

Ah, just ran TeraTerm instead and now I'm good.

#

It took me a while to remember what my other terminal emulator was called 😐

pastel panther
#

Excellent

jovial steppe
#

I can print("Hello") myself now, so I think I'm good.

#

Thanks for responding.

pastel panther
#

It's been years since I used a serial terminal on windows so I wasn't much help in that department

#

Sure thing, glad you got it working

jovial steppe
#

I think that if I were to double-reset I'd get CIRCUITPY as the MSD.

manic glacierBOT
pastel panther
#

If you double reset you should get a METROBOOT instead of the CIRCUITPY. It's how you update the verson of Circuit Python that your running

manic glacierBOT
#

My thought was that ISRs would free up some resources from polling, though honestly I don't know what resources those would be. Clock cycles? Maybe that's not an issue.

I suppose my thought was that CP should be able to do the normal MCU things that Arduino and others can and that people willing to pay the complexity cost would do so. Then again I don't know how much people would want use it or what the development opportunity cost would be.

#

Yeah, I don't want to assume our primary audience is people with existing Arduino and microcontroller experience. Instead, I want to approach it from a blank slate perspective and there isn't an easy to understand way of doing concurrency.

One thing mark shannon and I were kicking around was a way of doing an event loop where you can polling for a number of separate events simultaneously.

jovial steppe
#

Er, so like POSIX select()? I think that most users might find that less obvious.

slender iron
#

@jovial steppe yeah

jovial steppe
#

Understanding concurrency isn't difficult -- it's doing it right... 😐

pastel panther
#

now I don't know if I should respond in github or here

jovial steppe
#

Scratch actually makes it easy.

#

Is there a Github chat feature that's bridged to here?

slender iron
#

issue comments show up here

jovial steppe
#

Ah, to it echoes the logs here. That makes sense, but it sounded like you two were talking live there.

#

Just logging thinking out loud? Interesting.

pastel panther
#

I think my main point was that we don't assume that our audience isn't experienced

jovial steppe
#

Seems like for CP, that is what you probably want to be assuming. I thought that that's what sets CP apart from MP.

pastel panther
#

I'm fine with biasing towards beginners but having hidden complexity for the more advanced users seems reasonable

slender iron
#

I'm fine with inheriting stuff from micropython, its just untested.

#

its possible it does work

jovial steppe
#

I used an Arduino library a few months ago that turned asynch events and made them callbacks -- I think. The work was done by the runtime outside of loop(), in main(). I had to think about how the API I was given actually worked, and I think that's what I decided. There may be some other way to hide the complexity. Like what React tries to do.

slender iron
#

and if it doesn't then its gotta get prioritized with all of the other things we want to do

pastel panther
#

Of course

slender iron
#

@jovial steppe thats why I want to approach it from the "why we need it" rather than "we need x feature"

jovial steppe
#

I'm new to MP/CP, but interrupts are untrodden territory?

pastel panther
#

Thats fair

slender iron
#

micropython has them @jovial steppe

jovial steppe
#

But they're new/fresh/relatively-unused ?

#

er, untested

slender iron
#

they are untested in circuitpython's ports

jovial steppe
#

got it

slender iron
#

so if folks wanted to fix it up, I'd be open to it πŸ˜ƒ

#

the other tricky bit is doing it in a CPython compatible way

pastel panther
#

I'll think about it when I can get a dang pwm pin working. I'm feeling rather dim at the moment

jovial steppe
#

I always assumed that CP was a layer on top of MP, but it sounds like it comes in through the side or is next to it down to the HW in some places. Brand new to me.

slender iron
#

I can help with that @pastel panther

raven canopy
#

haven't even start CP yet, but would it be based on mult-processing (join, etc)?

jovial steppe
#

Sometimes you just need to sleep on it @pastel panther

pastel panther
#

Perhaps. I was thinking I need to read more code but maybe you're right

jovial steppe
#

I need to figure out these CP vs MP diffs fast because I need to decide which to start with for students that we're porting from Arduino/C to *Python.

slender iron
#

@jovial steppe there are enough differences between ports that its uncertain

#

@jovial steppe what hardware?

#

@pastel panther post your code somewhere and I can take a peek

jovial steppe
#

I'm looking at MM0E because I need R3 shields.

slender iron
#

then its circuitpython only. micropython doesn't support samd21 micros

jovial steppe
#

I'm porting a class, not code. We've been using Arduino for 7 years.

#

@slender iron , that's great to know!

slender iron
#

πŸ˜ƒ

pastel panther
#

@slender iron will do

slender iron
#

porting a class is awesome!

jovial steppe
#

I ported the class from Atmel Studio 4 to Arduino 7 years ago. Time for a refresh.

#

ATmega32, IIRC.

#

Pre-ATmega168.

#

So I guess that means that there's no MP port to the Arduino Zero. So that's not even a Plan B.

#

I want to settle on hardware that's also possible to run Arduino/C on because we'll have students in transition from a prerequesite course that will have seen only that.

slender iron
#

circuitpython runs on it but metro m0 express is better

jovial steppe
#

I have the option of putting the SPI flash chip on the edu. shield that we use for the intro course.

#

But the pricing on the MM0E is obviously much better.

#

And we dont' need the DBG hardware.

#

Only 1% of students will probably ever switch to Atmel Studio at any point.

#

They're not EEs.

slender iron
#

and the metro has the swd header in case you need it

jovial steppe
#

It would almost have to, no? Are there no brick scenarios if you don't have it?

#

I've never seen anyone brick their Unos.

#

So, bricking is only theoretical to me, in my experience.

#

So, I don't want to distract you from what you're doing. I've got plenty of CP/MP to learn...

slender iron
#

ideally the bootloader will always save you

#

its setup to be protected by default

jovial steppe
#

But it's kinda locked on the 328, no? But apparently it can still happen, so the rumor goes.

#

I thought that that was in the fuse bits.

slender iron
#

I have not idea. I've never developed on the 328

jovial steppe
#

Git back to git. You got stuph to do.

slender iron
#

I'm just doing two things at once πŸ˜ƒ

jovial steppe
#

Not as well as you think. Read the studies :-).

raven canopy
#

haha. i was about to make a switch-tasking remark!

jovial steppe
#

Censor ate my last comment. So, no comment.

slender iron
#

I never said I was doing it well πŸ˜ƒ

raven canopy
#

that bot is mean sometimes.

jovial steppe
#

I don't want to be the one to blame for it. Get back to it. See ya.

slender iron
#

no biggie, its late here and my other task is installing ubuntu

jovial steppe
#

I've got a hot sauna calling my name. Well, it's not hot quite yet.

slender iron
#

that sounds nice!

hollow tartan
#

RE: Arduino Board Manager Q: Does it matter which gets installed first: Adafruit SAMD or Arduino SAMD?

hollow tartan
#

CIRC01.py wants neopixel.mpy; but dragging it in the folder. apparantly I need to create a subfolder to contain the libraries and one for my apps.py. Is ampy needed for that?

stuck elbow
#

not sure what you are actually doing

#

is that an esp8266? what "folder" are you dragging it into?

#

more details please, what error you are getting?

manic glacierBOT
solar whale
#

@hollow tartan typically library files like neopixel.mpy are put in /lib I usually keep my code in the top level directory. easier to get to via ampy. to put neopixel.mpy in /lib ampy -p <yourport> mkdir lib ampy -p <yourport> put neopixel.mpy /lib/neopixel.mpy that said, circuitpython or micropython will search a standard path to satisfy an import and it starts with the current directory so is should also work if neopixel.mpy is at the top level. It is just cleaner to keep all the library files in /lib espesially if you have a lot of them. To see the ssearch path ``` import sys
sys.path

#
>>> sys.path
['', '/lib', '/', '.frozen']
>>> 
#

@hollow tartan for example - here is how I have files on my esp8266 ```jerryneedell@Ubuntu-Macmini:~$ ampy -p /dev/ttyUSB0 ls
boot.py
lib
simpletest.py
cptof_m0.py
jerryneedell@Ubuntu-Macmini:~$ ampy -p /dev/ttyUSB0 ls /lib
adafruit_bus_device
adafruit_register
adafruit_ssd1306

#

simpletest.py and cptof_m0.py are my test scripts adafruit_xxx are libraries from the adafruit "bundle"

#

cptof_m0.py was a SAMD script, but I wanted to run it on the esp8266 (worked fine) πŸ˜‰

umbral dagger
#

FWIW: Simon Monk’s Micro:bit/MicroPython book launched today.

tidal kiln
#

@idle owl and anyone else looking for pdf

hollow tartan
#

@solar whale wonderful info. thanks. working with feather express M0. any changes to above?

solar whale
#

don't need to use ampy πŸ˜‰ you can just use your file manager or drag/drop

#

@hollow tartan are you using CP 2.1 or 3.0?

manic glacierBOT
#

Sounds good!

On Fri, Nov 17, 2017 at 9:24 AM Carter Nelson notifications@github.com
wrote:

The scan would be top level. Once that's done, you'd have the known
addresses for what's on the bus and could then create specific devices
using those addresses.

All that would be needed for a transaction is access to the digital pin.

β€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/adafruit/circuitpytho...

fading solstice
#

@slender iron πŸ–– if you have a spare moment or two to give create release rights to me and kattni πŸ”

slender iron
#

yeah, I'll do that now

fading solstice
#

thank-you!

slender iron
#

I've been working on code to auto-release a bundle but it'll still require manual driver releases

stuck elbow
#

ItsyBitsy!

slender iron
#

@fading solstice you should have gotten an email invite

fading solstice
#

i did

#

i joined

slender iron
#

πŸ‘

#

gonna go plug into my computer so I can quickly add the team to all of the repos

#

@fading solstice what repos do you need soon? I'm gonna write a script to validate repo set up

slender iron
#

kk

#

@fading solstice Ok, you should have permission now.

fading solstice
#

tnx

timber lion
#

just curious @fading solstice what are the new tagged releases for? for most of those libs i just created new releases a few days ago so might not need anything extra

fading solstice
#

This is to release the change I made changing read_into to readinto. and to release busdevice removing read_into method. we will only release libraries that need to be released, ie., if you have already released my changes, we will not release that library again

timber lion
#

oh cool gotcha! yeah you might need to check the date of when the release was made

#

but i was looking as i went and mentioned it in the release notes

#

called out if it changed and required an updated bus device

#

so that might help too

fading solstice
#

great thanks

opaque patrol
#

Playing around with the rgb display libraries and the metro m0, are the SCK/MOSI/MISO pins on the right hand side top to bottom in that order?

glacial bronze
#

It looks like the hardware SPI is on the 2x3 pin header on the bottom

#

And just there, unlike Arduino

opaque patrol
#

Yeah, I know, I am assuming top == SCK, middle == MOSI and bottom == MISO

glacial bronze
#

Hm, the guide doesn't say

#

But try tapping it out with a multimeter. If power and ground are the same as an arduino icsp header, the SPI is probably the same too

#

Ah, it's on the schematic

opaque patrol
#

got it thanks

tidal kiln
#

@opaque patrol same answer

manic glacierBOT
#

Where do you think these top level functions, like scan, should live?

Documenting some usages:

Case 1

>>> import board, busio
>>> import adafruit_ds18x20
>>> ow = busio.OneWire(board.D2)
>>> ds18 = ds18x20.DS18X20(ow)
>>> ds18.temperature
23.7

This would require the DS18X20 class to scan the bus and pick one (the first?) to use.

Case 2:

>>> import board, busio
>>> import adafruit_ds18x20
>>> ow = busio.OneWire(board.D2)
>>> ds18 = ds18x20.DS1...
fading solstice
#

@idle owl

#

this was easier than i imagined. so i am going to do them all. thanks for your offer. maybe i will have you review my releases.

fading solstice
#

@slender iron I have created new releases for libraries that needed to be. note that tony had already release some of our changes.

slender iron
#

fyi, I'm restarting travis builds to test the new rosie setup

#

thanks @fading solstice !

fading solstice
#

i was wondering if there was something more i had to do for the "frozen" .py such as lis3dh.py

slender iron
#

@tulip sleet would know

fading solstice
#

ok

slender iron
#

I'm headed to the gym for an hour. I'll be back later

fading solstice
#

have funπŸ˜ƒ

slender iron
#

thanks!

idle owl
#

@fading solstice Nice! Let me know if you want reviews.

fading solstice
#

yep

tulip sleet
#

@fading solstice The frozen modules in CPX are git submodules, so they need to be updated with the new versions when you're ready. It's pretty much just a matter of doing a git pull in each of the circuitpython/frozen/ directories, and then committing those changes and making a pull request against circuitpython.

#

I can do that if you want.

idle owl
#

@tulip sleet Yesterday I setup a branch with git push --set-upstream kattni branch-name and Scott said it should remember upstream... So I just do a git push kattni branch-name this time and it should push to my fork?

tulip sleet
#

yes, though I thought that was a bit complicated. hold on a sec

idle owl
#

Ok

tulip sleet
#

can you show me the output of git remote -v?

idle owl
#
adafruit    https://github.com/adafruit/circuitpython (push)
kattni    https://github.com/kattni/circuitpython (fetch)
kattni    https://github.com/kattni/circuitpython (push)```
#

I had just checked that πŸ˜„

#

Not that I expected it to help me any, but it seemed like a logical next step.

#

I ask because I need to make another push with the same branch with a requested change.

tulip sleet
#

I usually don't specify the branch name explicitly, and I usually have my private repo set to "origin". So then a simple "git push" with no arguments pushes the current branch to origin, which is dhalbert/circuitpython.

idle owl
#

hmm. All of my origins are kattni. So when I only clone my own repo, it's git push kattni branch-name.

tulip sleet
#

since you have no "origin", you have to specify one of the remotes. git push defaults to git push origin, but you don't have one named origin.

idle owl
#

But yesterday I forked circuitpython and Scott said if I already had the source, I didn't need to clone it again. I thought I'd try it but I keep thinking if I don't do it exactly right I'll mess up master somehow.

tulip sleet
#

i would have just cloned again πŸ˜€

idle owl
#

I almost did.

#

I'll just do --set-upstream again just in case.

tulip sleet
#

My workflow is that I clone my private repos and have them be "origin". If I clone an adafruit repo directly, I keep that in a separate directory called adafruit/. I could keep them all together but sometimes I want to compare what I'm working on with what's in the adafruit repo, so it's nice to have multiple repos. I also have two copies of dhalbert/circuitpython: one is usually on master or a branch of master, and one is on 2.x or a branch. So it's easier to switch back and forth between working on 2.x and master without going through machinations.

#

you're mostly worried about branches. if you try to push and there's no corresponding branch on the remote repo, git will complain and tell you to do --set-upstream.

idle owl
#

Ok.

#

I have a 2x one like you said.

#

And I have a separate one for Scott's repo.

#

But I thought, hey new Git thing, give it a try. I imagine there must be blocks in place to keep me from breaking CircuitPython, but in the back of my mind, the potential is there.

tulip sleet
#

me too. Scott likes to name the upstreams explicitly by their name, though the canonical way is to just call it "upstream". But if you name it explicitly, you're more sure where it is. Just five minutes ago I renamed mine from "upstream" to "adafruit".

idle owl
#

I call them upstream as well so far. Ah nice

tulip sleet
#

git remote rename upstream adafruit

idle owl
#

It looks like it worked.

tulip sleet
#

k!

idle owl
#

I included set upstream, but on seeing the output Branch pdmin-freq-doc-update set up to track remote branch pdmin-freq-doc-update from kattni. I don't think I needed it. Good to know.

manic glacierBOT
fading solstice
#

@tulip sleet I have release several libraries and built the bundle using update-submodules.sh and python3 build-bundels.py. Seemed to produce mpy files from source with my changes. The two frozen .mpy's changed by me are LIS3DH and BusDevice. Note that other libraries are dependent on these frozen .mpy's and will get errors without the changes to the frozen guys. Also note that next offical release of CircuitPython will require a release of the bundle as well. For people building their own CP will want a new bundle.

#

i would happy to have a voice conversation is needed.

tulip sleet
#

@fading solstice so you ran the update script in the Bundle repo, so you can make a PR for Adafruit_CircuitPython_Bundle from that. Did you create a new tag? (The build script prompts you to.) The CPX builtin frozen modules are only used if lib/ doesn't have copies, so it's not critical to have everyone update them immediately

#

gotta go for a little while - someone came to the house I need to talk to

manic glacierBOT
#

For anyone who is using the test code in this issue, be aware that we identified a necessary change. The frequency must be at least 16000 to work with the mic. Overall frequency must be at least 1MHz, and it is determined by multiplying oversample and frequency. The default for oversample is 64. It is possible this issue will be resolved in the future, but as it is, this change may fix issues you're having with the mic appearing not to be functional.

manic glacierBOT
#

A number of the Circuit Playground Express boards have an onboard mic that, based on software reesearch, takes longer to initialise than others. (I specify software research to clarify that I did not determine this with a logic analyser or other hardware-specific testing.) This results in failure when trying to run code that uses a small buffer to record as there is no data being returned. This can be resolved by sampling a small slice at the end of a larger buffer, however, this causes massi...

slender iron
#

@idle owl after you set upstream you should be able to do git push after

umbral dagger
#

Is there a document that goes through settign up to debug CP onboard with jlink & gdb? I have the generic SAMD/jlink/gdb doc.

idle owl
#

@slender iron Good to know. I thought I had to specify the renamed origin and branch name every time. Although I don't think I've been setting upstream per-branch previous to this. I haven't used the same local repo for two different forks before either though.

slender iron
#

@umbral dagger just my learn guide which I think you have

umbral dagger
tidal kiln
slender iron
#

yup πŸ˜ƒ

umbral dagger
#

@tidal kiln psych

idle owl
#

@umbral dagger I think @drowsy geyser has a OneNote document they wrote up on some of the steps we did, but I don't know if it included gdb or if it's the same OS.

manic glacierBOT
#

The status NeoPixel flashes an error code when no main.py is present on the board. It flashes blue for ~0.5s, yellow for ~0.5s, and then it quickly flashes some more yellow potentially followed by cyan. It is similar to the type of sequence that usually indicates the line on which an error is located in main.py.

This happens regardless of how main.py is removed. I performed an erase and clean flash of the current 3.0 build. I also loaded, ran and deleted a main.py from the drive w...

idle owl
#

@slender iron I didn't put milestones or tags on either of the issues I just posted. I wasn't sure which ones to add. Should I tag them with what I think makes sense and you can change it if it's wrong? Or should I let you tag them?

slender iron
#

Please do a best guess @idle owl

idle owl
#

Np, thank you

slender iron
#

I like to have milestones on everything

#

most stuff should go on 3.0 and not the beta

idle owl
#

Oh. I put the m4 flashing issue on beta. Should I put it on 3.0 instead?

#

Flashing LED issue I mean. Not flashing the board.

slender iron
#

doesn't really matter

idle owl
#

Ok

hollow tartan
#

RE: CP on FeatherX M0 I used windows to create a /lib folder and put neopixel.mpy, main.py, and neopixel.py ( a CP script identical to main.py). main.py was also placed into the root dir. Upon reboot: no special display on the neopixel on board and ALL my new files and folders are gone. UF2 Bootloader v1.23.0 SFHR Model: Feather M0 Board-ID: SAMD21G18A-Feather-v0

stuck elbow
#

did you unmount the drive?

#

I think windows calls it "safely remove"

hollow tartan
#

//// no unmount //// when and how do I do that? I am only tapping the board's reset once or twice as needed.

stuck elbow
#

the board will actually reset automatically once it sees the new files

slender iron
#

if you reset before safely removing its possible windows hasn't actually written the file changes yet

stuck elbow
#

so you don't have to do that

#

just copy the files on it and let it handle them

slender iron
#

I'll be back in a bit. gonna rake leaves before the sun goes down

tidal kiln
#

yay 4pm sunsets!

hollow tartan
#

[ NOTE: The following is not true. Read postscript below. ] Ok! so I am experiencing the wicked Windows 'file commit delay' that was mentioned here previously. I did skip the part of the learn guide about exercising the board with the Arduino IDE.

#

Of what use is the empty boot_out.txt file that appears on the file system of the FxM0 when it is in a different mode? @Dan Halbet helped me to correctly understand my error. He said: drag it (CircuitPython.bin) into FEATHERBOOT. You'll see a flickering LED as it loads, and then leave it alone and CIRCUITPY should appear and FEATHERBOOT device/folder will be replaced with a CIRCUITPY device/folder. FEATHERBOOT is a fake drive - it just takes .uf2 files to load into flash - it's not a real filesystem [POSTSCRIPT] The TRUTH is I was creating a /lib subdirectory and adding files to a fake drive; that is why they disappeared upon reset.

#

Bad news: I did the eject and the files vanished again.

tulip sleet
#

@hollow tartan did you right click on the CIRCUITPY drive and click Eject? Or click the USB drive icon in the lower right of the taskbar (may be hidden behind the up-caret).

#

What version of CPy is this?

hollow tartan
#

UF2 Bootloader v1.23.0 SFHR
Model: Feather M0
Board-ID: SAMD21G18A-Feather-v0

tulip sleet
#

the boot_out.txt file is what boot.py and main.py print if you are not connected via serial?

#

I mean 2.1.0 or 3.0 of CPy

hollow tartan
#

2.1

tulip sleet
#

got it, so did you do the eject before pressing reset or removing the USB plug?

hollow tartan
#

wait a sec.

tulip sleet
#

you don't need to press reset most of the time

hollow tartan
#

I am not sure 2.1 is loaded at all.

#

what would be the evidence of it?

tulip sleet
#

if you press reset once, you should see a CIRCUITPY drive in an Explorer Window.

#

If you just see CPLAYBOOT or nothing then it's not loaded

hollow tartan
#

no , I see featherboot drive ! I need to put adafruit-circuitpython-feather_m0_express-2.1.0 WHERE in it's file system?

tulip sleet
#

drag it into FEATHERBOOT. You'll see a flickering LED as it loads, and then leave it alone and CIRCUITPY should appear

#

FEATHERBOOT will disappear

#

FEATHERBOOT is a fake drive - it just takes .uf2 files to load into flash - it's not a real filesystem

#

do you have teraterm or putty to talk to the REPL when you're done? I like Teraterm better.

hollow tartan
#

ok, I have featherboot with the boot_out.txt and the NP is pulsing green.

tulip sleet
#

drag the adafruit-circuitpython-feather_m0_express-2.1.0.uf2 into featherboot

hollow tartan
#

sorry, I have the circuitpy folder....

tulip sleet
#

that's great, now you have circuitpython loaded

hollow tartan
#

yes, I use TT

tulip sleet
#

yes, or main.txt or code.txt (the latter for people who don't understand file extensions)

hollow tartan
#

although, I do have a question about it.

#

I need multiple choices when I enter it depending on if esp8266 or Fxm0 is connected.

tulip sleet
#

you mean if they are both connected? When I do New Connnection..., it just seems to the list the COM ports that are actually available.

hollow tartan
#

one at a time, actually, yeah, I can go to the menu and switch the COM port to what is offered. but it seems ineligant to me.

tulip sleet
#

you mean the dropdown in the New Connection... box? Yes, I do the same. Maybe there's an easier way with profiles or something, but I haven't bothered to read the documentation yet

#

or maybe you can make some shortcut icons that supply command-line arguments

hollow tartan
#

yeah, I will work on that. thanks for helping me up the learning curve. I don't understand why I seem to have such trouble with Lady Ada's tutorial. Either I am dense and slow to understand OR she is putting the info out a little too concentrated.

tulip sleet
#

I haven't reviewed it in detail. If you think there are confusing parts definitely give us feedback. There is a feedback mechanism in the Learn Guides but the feedback is not very visible. You could drop something here as well.

hollow tartan
#

OMG. I just dropped the CIRC00 from C:\AdaFruit_Archive\Metro Experimenter Guide\METROX-Examples-and-Project-Sketches-master\circuitpython having renamed CIRC00 to main.py . IT JUST UP AND RAN. LOVELY!!!!

#

I have and will use the feedback mecha.

umbral dagger
#

I have gdb & jlink up & running, digging deep into the CP runtime.

idle owl
#

@umbral dagger Excellent

little elbow
#

Have any of you heard of Codebender?

#

(coding a site)

idle owl
#

Nope. What are you looking for?

little elbow
#

noi, I was just wondering

idle owl
#

Ah

little elbow
#

It is a great coding website with thousands of examples and libraries

idle owl
#

Oh nice! Always handy to have that sort of resource

little elbow
#

yeah

#

\sadly they ran out of money and You have to pay

#

But you should try it out, you get the first month free

tulip sleet
#

it's specifically for arduino

little elbow
#

yeah

#

serial moniter and everything

#

I cant use arduino IDE though, I have a chromebook not a pc

#

I had it on my rpi, but that lost its os

idle owl
#

I've not worked with Arduino.

little elbow
#

I fixed it but everything is gone

#

yeah

#

I have 3

#

One I use to turn my lights on and off with a wireless remote

idle owl
#

Nice!

little elbow
#

An done of my others I use to turn my OTHER lights on and off by clapping

idle owl
#

I have a tabletop lightbox photo studio running off of a Raspberry PI ZeroW. I ssh into it and run a program to control the lights.

tulip sleet
little elbow
#

huh

#

ok

#

Os there any arduino coding apps for a chrome extension

#

???

#

I( want to code on my chromebook

#

but most apps download as a zip and they dont work

#

I want a decent coding app for chrome extensions

tulip sleet
little elbow
#

oh ok

#

Any free ones?

#

I wish there were more free ones

tulip sleet
little elbow
#

ok

#

I wil see

tulip sleet
#

you're in the circuitpython channel, where we talk about CircuitPython, which runs on arduino-style boards. You can write bare-metal arduino-style programs, and all you need is a text editor. So it works fine with a chromebook. If you can get a chrome extension that talks to a usb serial port, then you can also type at the board and get serial output back

hollow tartan
#

@tulip sleet Based on my recent cognitive malfunction, my suggestion is to make little bread crum/signpost files/readme files for new users in BOTH the FEATHERBOOT and CIRCUITPY directories. I would have enjoyed reading something along the lines of "Welcome, Dear Maker! You have arrived at the FeatherBoot Marker. You are now ready to proceed with installing the latest UF2 Bootloader (or you may want to upgrade the one already present). After that you may proceed with installing a recent version of AdaFruit's Circuit Python into this directory. We are pleased that you have chosen to join us on this Adventure.

tulip sleet
#

@hollow tartan that's an interesting idea. I'm not sure we have the room in the ...BOOT directories for a lot of text. However, did you see the INDEX.HTM in FEATHERBOOT? it links to the product page. How about if we just had a small .htm file with links to intro material? We could provide it in both ...BOOT and CIRCUITPY. Maybe call it README.HTM instead of INDEX.HTM

Btw, if you see FEATHERBOOT, the UF2 bootloader is already installed.

hollow tartan
#

the more Maker Markers the better! πŸ˜ƒ

pastel panther
#

hey @tulip sleet can I ask you a TCC/PWM question?

tulip sleet
#

I probably don't know the answer!

#

haven't looked at that stuff at all in any detail yet

pastel panther
#

well I can try? I'm trying to adjust the duty cycle of a pwm by changing the CC register like so:

TCC0->CC[3].bit.CC = 10;
while (TCC0->SYNCBUSY.bit.CC0 == 1) {}

The same code works to set the initial duty cycle but calling it again with a different value for CC doesn't seem to do anything

tulip sleet
#

a number of peripheral settings are "enable-protected": you can't change them while the peripheral is enabled. you have to disable, write the register, and re-enable. That may or may not be true of this setting. I'll look

#

'21 or '51?

pastel panther
#

21

tulip sleet
#

it just looks like it needs to be synchronized, but I don't think it's enable-protected. In the code above, are you setting CC3 and then waiting on CC0?

hollow tartan
#

Okay, I will compromise. blinka How about pointing appropriately to one of many local harddrive .html resource files that provide the Maker Markers which include the link to offical Adafruit html page. if the local does not exist then go direct to adafru.it. I think you get the idea.

pastel panther
#

@tulip sleet It does kinda look like that...

#

But the first set/sync seems to work just fine

tulip sleet
#

thought I don't see why that wouldn't work at all, it would just happen late, since you're just busy-waiting until it happens

pastel panther
#

Bah,I'll figure it out later. Gotta run to a bday party

#

thanks @tulip sleet

#

πŸ‘‹

tulip sleet
#

@pastel panther last thought for later... do you enable the TCC before setting the CC or after? see page 656 for the gory details of what to do when

#

@hollow tartan where would the hard drive files be? we don't know about the host computer.

hollow tartan
#

I was thinking of a "C:\Adasupport" directory. But it could be done by a slightly more sophisicated HTML file at adafru.it if you pass a token. right?

tulip sleet
#

@slender iron are you trying something besides the rpi for Rosie? I was thinking of suggesting some used Dell USFF boxes or an Intel NUC.

slender iron
#

@tulip sleet I got an intel nuc

tulip sleet
#

@slender iron sounds great; is it i3 or greater or one of the low-end processors

slender iron
#

i3

tulip sleet
#

should be a little more stable! πŸ‘

#

@hollow tartan we can just have a landing page for a circuitpython intro. Right now METROBOOT contains

<!doctype html>
<html><body><script>
location.replace("http://adafru.it/3505");
</script></body></html>
slender iron
#

yup! its faster too

tulip sleet
#

WAY FASTER

slender iron
#

πŸ˜ƒ still trying to get it green though

hollow tartan
#

@tulip sleet you could location.replace("http://adafru.it/MakerMarkers/FeatherX/001");

tulip sleet
#

you mean go to sleep or get very slow when not needed?

#

@hollow tartan exactly; I like "MakerMarkers"; is that your own invented alliteration?

hollow tartan
#

it tis

tulip sleet
#

@slender iron you could have the nuc sleep most of the time, but turn on wake-on-lan or similar. have an esp8266 or the rpi wait for work notifications, and then wake up the nuc. not sure how rosie polls or gets notified there's work to do

slender iron
#

@tulip sleet it gets a webhook from travis

tulip sleet
#

so you have an incoming http request that goes through your home router?

slender iron
#

yeah

#

via ngrok

#

I'm gonna have a nightly cron on it too

tulip sleet
slender iron
#

not a high priority for me

tulip sleet
#

i thought that's what you meant by green

slender iron
#

haha, nope. as in the test is passing

tulip sleet
#

the second way to get them to reload works: sudo udevadm control...

slender iron
#

why do I need it?

#

I added my user to dialout

tulip sleet
#

you're trying to solve Permission denied: '/dev/ttyACM5'? etc?

slender iron
#

nah, scroll to the bottom

#

(its all the runs on the same commit)

#

the set_remove.py test timing out

#

works ok in screen

tulip sleet
#

is it testing 2.1 or 3.0? maybe too much output at once for the usb buffer?

#

remove those print(len(s)) lines; they don't seem useful, unless the output is being compared

slender iron
#

3.0

#

usb output should block when full I think

#

the output does end up being compared to python output

#

rosie doesn't actually do it yet though

#

and it works fine when manually run

tulip sleet
#

is that the very last test or is it in the middle?

#
11
12
11
ATE1 E0ATE1 E0
#

is weird

slender iron
#

yeah, super weird

#

I may need to take the beagle to it

tulip sleet
#

see if a 2.1 build works

#

seems very likely it will

slender iron
#

k, I reran a 2.x on travis

tulip sleet
#

and it changed; I refreshed and now there's an 8 before the ATE1

slender iron
#

I ran it again @tulip sleet

tulip sleet
#

right, it's not consistently the same weird

slender iron
#

its close but not exact

tulip sleet
#

is the output ofthe three boards interleaved?

slender iron
#

and all of the other tests seem ok

tulip sleet
#

they seem mixed up

slender iron
#

the test output shouldn't be but the messages are

tulip sleet
#

k - hard to tell exactly what's going on

slender iron
#

yeah, there is room for improvement

#

travis 2.x is so slow πŸ˜›

#

2.x did have the weirdness on two boards

#

a couple others did have resource busy errors

#

*did not

#

I always forget the negation

tulip sleet
#

that's weird; the nuc prob has USB3 ports; are you connecting the boards directly to the nuc or through the usb2 hub?

slender iron
#

its through a hub from the store

tulip sleet
#

same hub as rosie 1.0?

slender iron
#

yeah

tulip sleet
#

bleah - another theory shot

slender iron
#

I did replace some of the usb cables with short ones

tulip sleet
#

i bought a bunch of those from the AF store for rosie east but haven't tried them

slender iron
#

they are like 4 inch cables off amazon

idle owl
#

Rosie east, I love it πŸ˜„

slender iron
#

I'm gonna take a break and play with the cats before dinner

tulip sleet
#

actually I thought it should be rosie boston, in case there's a rosie nyc

#

rosie soho

slender iron
#

I'll need to take a beagle to it I think

tulip sleet
#

gn - late for me; you could try longer cables, though that seems faintly ridiculous. or maybe split traffic between a couple of hubs. i wonder if that particular test is the one with the most output

slender iron
#

yeah, I bet its a usb thing

#

usb is all crced so I doubt its corruption

tulip sleet
#

but the hub is just seeing too much traffic? seems unlikely given the bit rate, but...

slender iron
#

probably a race in the usb code

#

maybe, I do have it do four boards at a time

#

thats not new though

#

and 2.x was ok

#

it had other issues

tulip sleet
#

i know, but maybe the rpi was slower enough

slender iron
#

yeah perhaps

#

the rosie code is definitely running faster

tulip sleet
#

ok take it easy - i found the hpl dmac code and it looks general purpose so I think I can put it in shared_dma.c. I didn't update the atstart files - I just made a new project that had the code I wanted

slender iron
#

great!

tulip sleet
#

but i should update the atstarts so I can get it again. i forget again where the json came from?

slender iron
#

is there code in the custom project thats not loaded by the other one?

tulip sleet
#

yeah - i just made a quick one with one sercom that uses the spi dma driver; the regular one is just spi sync (default driver)

#

unless I didn't look in the right place

slender iron
#

the json I got from the network request made when you generate the code

#

thats possible

#

using the browser dev tools

tulip sleet
#

did you choose different drivers in the atstarts? it defaults to the sync drivers and omits the unneeded code. F12

#

got it

slender iron
#

I didn't, you can hack the json and it'll generate a new atstart for you

tulip sleet
#

the atstart is actually pretty clean looking - i might modify that. or i can just reload it and add another sercom with the right driver

#

and save it

slender iron
#

sounds good

tulip sleet
#

k - good night again - it's too late!

slender iron
#

good night!

idle owl
#

Have a good one, guys!

slender iron
#

you too @idle owl

tulip sleet
#

tnx!

manic glacierBOT
#

Case 2 and 3. The coder will have to know the address somehow. Its pretty
easy for them to do a scan and select the first address if thats what they
want.

On Fri, Nov 17, 2017 at 11:29 AM Carter Nelson notifications@github.com
wrote:

Where do you think these top level functions, like scan, should live?

Documenting some usages:
Case 1

import board, busio>>> import adafruit_ds18x20>>> ow = busio.OneWire(board.D2)>>> ds18 = ds18x20.DS18X20(ow)>>> ds18.temperature23.7

This...

hollow tartan
#

@ Dan Halbert blinka Bug or Feature? RE: CP 2.1 on FeatherX M0 , Win7Pro Doing pretty good here, but, while dropping files to run for NP and LED (inf. looper). Had NO-JOY getting back to REPL via TeraTerm. Deleted the main.py from FxM0. reset. Was not able to connect to COM8. Cannot open COM8. Not Found. I had to reboot the desktop to reset whatever was hosed up in the USB port. So, Please do share any relevant insights, Dan. Thanks a Bunch.

hollow tartan
#

No trouble with MetroExpressM0 on this point. On the Feather Express M0, Windows 7 seems to have a problem with the USB Port used by CIRCUITPY after running a .py via Drag&Drop (Copy&Paste is what I actually used). Even after going to FEATHERBOOT and refreshing the CP 2.1; it is a problem until the Win Desktop is rebooted.

#

I can try this out on my win 10 home laptop latter when I wake up.

manic glacierBOT
umbral dagger
#

FWIW I have a Sino:bit on the way. It uses the same Nordic MCU as the Micro:bit so it won’t run CP, but should run uP. It has some neat features: 12x12 led array, and an I2C connector, among others. No clip/banana/edge connections but does have 2x? headers. I haven’t looked that closely at the schematic yet. A little harder to connect to in some ways, but easier in others.

umbral dagger
#

Correction, it does have banana/clip connections.

tulip sleet
#

@hollow tartan there are several possible causes of that. You might unplug all the boards and try the Device Cleanup Tool here: http://www.uwe-sieber.de/misc_tools_e.html. Delete all the assignments related to Adafruit boards (and whatever else you want to delete), and then plug in again. Also there were some issues about the USB id for a couple of boards and they might not match up with the driver. If it happens again, look in Device Manager and report what's listed in the "Ports" section when the board is plugged in.

Windows 10 will be much easier. You don't need to install any drivers: the proper serial drivers are included in Windows.

stuck elbow
#

@umbral dagger it's supposed to be pretty much the same as the german caliope

#

except for the larger display

umbral dagger
#

@stuck elbow Yes. Which is a riff on the Micro:bit.

#

@stuck elbow I'm imagining one with a 12x12 dotstar array πŸ˜ƒ

stuck elbow
#

I recently got an sh1306 oled display to work with microbit over i2c

#

since in recent micropython you can do i2c on any pins, you can connect to the 3 that are exposed

umbral dagger
#

Cool

stuck elbow
#

it's even fast enough for animations

#

one could make a gameboy shield for the microbit

umbral dagger
#

I haven't done much with my micro:bits yet beyond experimenting in MakeCode.

stuck elbow
#

I had one before they were launched -- as the "microbit world tour" -- and made some robots with it

umbral dagger
#

Nice

stuck elbow
#

I even fried one

#

this one

umbral dagger
#

Haha.. the little blinky micro:faces at the top of the world tour page.. and the dead ones

stuck elbow
#

yeah, the dead ones were added when I killed mine

#

it was kinda a big thing, because we only had 4 total at the time for all the testing

#

and two were being used for developing micropython

#

but I think the final version had something added to it to prevent killing it this particular way

hollow tartan
#

@stuck elbow I don't know that the micro:bit is "fast enough" after watching the line following car demo. But I guess it could have been that the width of the black line and the spacing on the sensor array were badly matched. https://www.youtube.com/watch?v=SGhpBDQU5uA

As above ; microbit powered 'robot' with linesensors, lightsensors , neopixels, buzzer. (more testing to follow) Made by @4tronix_uk (apologies for poor soun...

β–Ά Play video
stuck elbow
#

@hollow tartan fast enough for what? it's an order of magnitude faster than arduino

hollow tartan
#

@stuck elbow What I said was that the line following car demo could have been a magnatude better. It was clunky in a very mild "hilly" part of the track and jumped the rails on a hairpin curve. I just wished it had made a better showing for the Arm Cortex hardware and micropython. https://www.youtube.com/watch?v=SGhpBDQU5uA

As above ; microbit powered 'robot' with linesensors, lightsensors , neopixels, buzzer. (more testing to follow) Made by @4tronix_uk (apologies for poor soun...

β–Ά Play video
stuck elbow
#

building line followers is a bit of an art in itself, there is a lot you can do with the right positioning of sensors and tuning of the PID controller

hollow tartan
#

agreed

stuck elbow
#

it doesn't have to be just raw computation speed

#

I mean, there are line followers that don't even have a microcontroller on board.

hollow tartan
#

am aware of analog solutions to line following. πŸ˜ƒ

hollow tartan
#

@tulip sleet πŸ‘πŸΌ Pure Genius. Both You and the Author of Device Cleanup Tool http://www.uwe-sieber.de/misc_tools_e.html . It worked beautifully. Now the Ctrl-C in the TeraTerm works to interrupt the inf-looper blink also. It's all really good now. Wanna know what I did to corrupt the driver? I plugged the FxM0 in first and the first two out of five steps failed. So I went and got the AdaFruit drivers pack and ran it. Created a small blooper in part of the FeatherX driver; should have run the install of AdaFruit Drivers first! It was very easy to use the Device Cleanup Tool. I only removed the two Feather drivers.

hollow tartan
#

@tulip sleet Wow, it is slow a trudge here. New horizons for me, old hat for you. the TeraTerm is displaying USBS at each key stroke. Does this hold any meaning for you? USBSUSBSUSBS

tulip sleet
#

@hollow tartan that means you're talking to the UF2 BOOTLOADER, probably. Is CIRCUITPY showing?

hollow tartan
#

@tulip sleet would you say that there is not indication that the FeatherExpress is defective? Is it safe to try to use on Win 10?

#

yeah, the NP was white. I thought I was ready to REPL.

tulip sleet
#

no, it's not defective. you'll have an eaiser time on windows 10: no drivers to install. CircuitPython is running if CIRCUITPY is showing. If FEATHERBOOT is showing, you're talking to the bootloader

hollow tartan
#

at the moment, I am replacing the main.py with various demo.py programs by dropping/replacing in the root folder. What is another method?

tulip sleet
#

you mean you copy them as main.py? After you do that, Eject or do Safe Removal, to make sure the file is completely written. Also consider using the Mu editor, which takes care to make sure the file is completely written: https://blog.adafruit.com/2017/11/13/mu-editor-beta-works-with-raspberry_pi-microbit_edu-adafruit-boards-by-ntoll/

mu-editor 1.0.0b12 : Python Package Index. Ok folks, this super-beta, you can check it out now. Feedback welcome. This is an outstanding beta and great work by Nicholas H. Tollervey – (GitHub…

hollow tartan
#

yes, I do a 'save as' main.py from Geany, confirm that I want to replace the one there and it usually starts running immediately.

jovial wind
#

@stuck elbow do you mean the ssd1306?

tulip sleet
#

@hollow tartan that should be fine, most of the time. occasionally the whole file will not write completely the first time, and you may see a syntax error or other error in the repl

hollow tartan
#

@tulip sleet I really want to trust you on that, but, this idea that Windows 7 fails to fully transmit a file to an external device on the USB is just a little hard to swallow. Is it something that M$ uses to force product creators to pay fee$ for to be certified and kept in the loop so they know how to patch their drivers when the next phase of USB driver poison pill is released?

tulip sleet
#

@hollow tartan goodnight for now!

hollow tartan
#

Yes, thank you, sir.

stuck elbow
#

@jovial wind sh1106, sorry

slender iron
#

Hi everyone, including <@&356864093652516868>, we're on for our weekly circuitpython meeting tomorrow (Monday) at 11am PT / 2pm ET here on Discord!

cunning crypt
#

I'll be in the middle of my work day

slender iron
#

yeah, I know its inconvenient for some folks

cunning crypt
#

Is what it is

#

Maybe one day I'll be able to make electronics for a living and not work in retail (ugh)

slender iron
#

we can also explore doing it other times

manic glacierBOT
umbral dagger
#

I spent Saturday working on my CP debugger ideas, mostly poking around in GDB. I think I'm close to having the local context working (so in the debug repl you can get/set local vars from where you call breakpoint)

manic glacierBOT
#

Interesting - o few observations:
after a power cycle
I am seeing a flashing green pattern when no main.py is present.
Solid green when main.py is present.

however if I have a main.py then remove main.py it goes into a very colorful fast flashing sequence when it reboots or after pressing RESET.

It goes back to flashing green if do do a power cycle.

On at lease one occasion it go int a state when it came up white (as in REPL) but screen was not connected. It went back to flashin...

slender iron
#

@umbral dagger thats awesome! have you looked into cpython's debugging?

idle owl
slender iron
#

yup, that looks a little weird

idle owl
#

Do you want to get it or should I put in another PR? I wasn't sure if building Sphinx worked the same with with the entire CP repo as it did with the CPX API, so I hadn't run it.

slender iron
#

You should take a look. πŸ˜ƒ It should be the same process with sphinx

idle owl
#

Ok will do πŸ˜ƒ

slender iron
#

bugs like that don't bother me. we move fast and break things πŸ˜ƒ

idle owl
#

That's a perfectly valid sum-up.

slender iron
#

πŸ˜ƒ

idle owl
#

"Programming: We move fast and break things." :the more you know star:

slender iron
#

my CIRCUITPY drive on my trinket is causing a funny error on latest mac osx

idle owl
#

On it.

slender iron
#

thanks!

idle owl
#

Blergh I'm getting a no module named dotstar error.

slender iron
#

did you grab the library?

idle owl
#

Is import adafruit_dotstar as dotstar the right formatting?

opaque patrol
#

I am testing that code, but I think the problem is he is passing an array to the pixel instead of a tuple (or does it not matter)?

slender iron
#

it shouldn't matter

idle owl
#

Yeah I grabbed adafruit_dotstar.mpy

slender iron
#

@idle owl yeah, I think so

tidal kiln
#

try just import adafruit_dotstar from REPL

solar whale
#

the test code works fo me with the Trinket in "normal" USB write mode

slender iron
#

@fading solstice nope, I thought time.sleep was close to accurate

idle owl
#

Ok.. hmm. It works in the REPL.

opaque patrol
#

works fine for me

#

I also added a while loop and code to alternate red, green, blue (doesn't seem to matter whether you pass a tuple or array to the pixel, both work)

slender iron
#

@opaque patrol are you testing with the remount in boot.py? controlling it based on a pin may be more useful

opaque patrol
#

yes, I added boot.py and added the remount

solar whale
#

@slender iron it works in both cases for me as well.

opaque patrol
#

and unplugged, then plugged back in

solar whale
#

I toggle i based on D4

idle owl
#

I can't even get it to work in the first place πŸ˜„ I copied and pasted it as-is into the REPL and it works.

umbral dagger
#

@slender iron I haven't looked into CPython. Since uPython is a from scratch implementation, I didn't think it relevant. I'll have a peak.

opaque patrol
#

pylint (using VS Code) is complaining that APA102_SCK and APA102_MOSI are undefined

tidal kiln
#

@idle owl not following. works in repl, but not if saved as file?

slender iron
#

@umbral dagger I was just thinking about the debugger API

idle owl
#

@tidal kiln Correct. The file is failing with "no module named dotstar" but if I paste the entire file into the REPL, it works.

tidal kiln
#

@opaque patrol guess the linter doesn't like the import *?

opaque patrol
#

do you have adafruit_dotstar.mpy in the lib folder?

idle owl
#

I do, yes.

#

I believe it would fail in the REPL as well if I did not.

tidal kiln
#

how are you pasting file into repl?

idle owl
#

I did it line by line once, then just copied the entire file and pasted it all at once. Both ways worked. On MacOS, using command+c/v

solar whale
#

@idle owl - did you name your test file dotstar.py?

opaque patrol
#

Ah, I am using CP 2.0.0

umbral dagger
#

@slender iron Ah. I'll look, but mine will be minimal. My goal is to minimize impact to performance and both code and data foorprint.

idle owl
#

@solar whale My test file? It's code.py if that's what you're asking....

#

@opaque patrol Ooh, good catch. Update it and try it again, see if you get different results with the remount

solar whale
#

OK - just a wild guess - sory _ am not running it from code.py -- I run it from a dotstar_test.py

opaque patrol
#

sorry, I only got it last Thursday along with a metro m0 and haven't had a chance to play with it much

idle owl
#

Ah, and importing the entire file into the REPL @solar whale ?

solar whale
#

I was concerned taht if it was called dotstar.py it would caus a problem

tidal kiln
#

@solar whale good guess though, that would cause it

solar whale
#

yes - import dotstar_test

idle owl
#

@opaque patrol Don't be sorry! That's what it's shipping with, it's good to have a test with that too so we can more easily identify people's issues later.

#

Then if someone updates and had this work before the update, we might remember to mention that it's the update.

solar whale
#

I am running it on 2.1.0-14 - built a few days ago.

opaque patrol
#

when I try to drag n drop the uf2 file, I don't have enought room, is it safe to delete the lib folder first?

idle owl
#

Yeah you can remove the lib folder

tidal kiln
idle owl
#

You might want to make sure you're using the newest libraries anyway

#

Now it works.

tidal kiln
#

@opaque patrol but are you doing the uf2 drag/drop in bootloader mode?

opaque patrol
#

Ok, deleted all the files and it still shows I am 1.5 kb short (need 59kb, 57.5 available), I am using the adafruit-circuitpython-trinket_m0-2.1.0.uf2

idle owl
#

All I did was go to the REPL, type "import code.py", and it worked, then I hit ctrl+D to reload the serial connection, and now it works.

#

Also it works with the remount added to boot.py

#

I'm able to edit code.py to change the color of the dotstar after resetting.

#

To verify: I was to create a new file called boot.py and add that line of code into it, correct? storage.remount("/", False)

solar whale
#

you will also need to import storage

#

you should not be able to edit code.py if it is set to False

idle owl
#

Ok now I can't edit code.py, but it's still changed the dotstar color after restarting the board and importing storage

#

Oh it just shifted to pulsing green.

#

Reconnect to serial, and it changes to the color in code.py again.

tidal kiln
#

pulsing green after 60 seconds?

idle owl
#

Oh good call. Yeah probably exactly that.

#

I forgot that's how it was written.

solar whale
idle owl
#

Ok so long story short, I don't think any of us have replicated that issue.

solar whale
#

correct - just found our own ... πŸ˜‰

opaque patrol
#

Works fine using 2.1.0, you want me to try the latest build?

idle owl
#

If you need an excuse to build CP, go for it, but I wouldn't worry about it. We've now had separate tests from 2.0.0 to current build with all the same results.

opaque patrol
#

okay, now the silly question why would we need to set storage in boot.py?

idle owl
#

To give CircuitPython write capabilities

opaque patrol
#

okay, I didn't realize we didn't have that. I hadn't tested anything that writes yet.

tulip sleet
#

I think maybe the forum poster did not actually rewrite the file after doing the remount, and may be testing an older version. Because once you put the remount in boot.py, you're stuck until you remove boot.py using os.remove() in the REPL, or similar.

#

you can't edit any files once that's in boot.py

idle owl
#

@opaque patrol I haven't either. I don't entirely understand it, but apparently both USB and CP can't have write at the same time. So if you want CP to write, you have to revoke USB write.

solar whale
#

@slender iron for what it's worth, I just ran a test on my Trinket M0 with some test code using an I2C sensor that changes dotstart continuously - it works under both storage.mount settings

idle owl
#

And here's where I ask how to remove files from the REPL.

#

Something involving os?

solar whale
#

try ```
import os
os.remove("filename")

idle owl
#

Ooh I was on the right track. Nice.

opaque patrol
#

i had looked at the storage class earlier today, I thought you would use it with sd cards or something.

solar whale
#

@idle owl that worked for me

idle owl
#

@solar whale Worked for me as well, thank you.

opaque patrol
#

what is OSError: 30?

#

So I can add files via USB, but os.remove ("filename") throws and exception with OSError: 30. I assume that is correct behavior

tulip sleet
#

@opaque patrol that's correct because only either the USB or the internal Python code can do writes to the filesystem, not both. If you did the .remount mentioned in the forum posting, then you've switched write access from USB to Python.

solar whale
#

I posted a note to the forum regarding the dotstar question - seeking more info on the tests run.

tulip sleet
#

there's no locking on the filesystem to allow this, and it's very difficult because the USB access is at the block level, not at a semantic filesystem level.

slender iron
#

@solar whale perfect thank you

opaque patrol
#

Is there anywhere that explains this better? The 'readthedocs' just has the function defs

#

So if I understand it correctly, You cannot remove (or add) files from repl, only from code and only if you remount and set read-only to false in boot.py

tulip sleet
#

@opaque patrol right

timber lion
#

if you mount the FS read-only you can actually read and write from REPL using standard python open and read, write etc. functions

#

er sorry if you mount the USB access to the FS read only that is

#

i.e. if you run storage.mount('/', False)

#

it's handy to for example
import os
os.remove('boot.py')
to remove the boot.py that made the board read only from USB

opaque patrol
#

I just getting ready to ask how to undo that without reflashing the board

tulip sleet
idle owl
#

I have to step away, brb

slender iron
#

kk, thanks @idle owl

#

let me know when you are back @idle owl and we can hear your report

idle owl
#

I'm back but I think I'll have to step away once more in a bit.

slender iron
#

kk

tulip sleet
pastel panther
#

but I’m happy to work on some simple CP code, Drivers, documentation, bean counting,etc. I should probably just look at outstanding issues.

Also I’m waiting for mkii of the metrowing from OSHpark

#

will do, thx

hollow tartan
#

? IS BEAN COUNTING

tidal kiln
#

mic stoped working? had to reconnect...

tulip sleet
#

path on my linux box: /home/halbert/.local/bin/mu

tidal kiln
#

for me it's /usr/local/bin/mu

errant grail
#

Thanks!

idle owl
#

@errant grail We're so glad you joined us!

slender iron
#

OneWireDevice(bus.scan()[0])

tulip sleet
#

ok, arduino lib is based on this (or is this)

tidal kiln
#

@tulip sleet yep. saw that. as you can see, provides a select and skip and a search, etc.

tulip sleet
#

@tidal kiln - yeah maybe good model

pastel panther
#

#toastthatboard

#

#orfryitup

#

I'm going to have to be doing the same thing soon. Is this documented somewhere?

slender iron
pastel panther
#

I mean the flashing bootloader to bare chip process

tidal kiln
#

SWD and SWC

pastel panther
#

They can be a pain in the ... bottom and really easy to bend.

#

Pads can be nice as you can hot glue some wires to a clothes pin for a simple test/programming clip

#

#ghettotek

#

banana for scale

#

#leekenvy

slender iron
pastel panther
#

I made a breakout for those chips if anyone is interested

slender iron
#

#leeks

pastel panther
#

(untested)

#

It's got a battery JST pad underneath

#

Right? or the trinkets did

marble talon
#

@cosmic fractal I have a feeling that's gonna be my new favorite board...

#

@slender iron, that is!

slender iron
#

@pastel panther no jst spot

#

πŸ˜ƒ @marble talon

#

an xray of @stuck elbow's blinka

sick creek
#

@slender iron dotstar to the blinka eye

opaque patrol
#

Is it possible to set a I2C device as a slave device in CP?

slender iron
solar whale
#

I have to go for awhile - have a great week.

tulip sleet
#

bye @solar whale

slender iron
#

you too @solar whale !

pastel panther
#

ta ta

idle owl
#

@solar whale Later, thanks!

slender iron
pastel panther
#

yay lunchtime

sick creek
#

blinka to you @solar whale when you are away

slender iron
idle owl
#

Is gc.mem_free() the same as "available RAM"? Someone's asking a question about wanting to see available RAM, ustack isn't working, and the only thing I know is gc but I'm now wondering if that even does what they want.

tulip sleet
#

@idle owl gc.mem_free() reports available heap space is RAM. Part of RAM is allocated to the stack, so that isn't included. On M0 boards, 20k is allocated to heap and 12k to stack. Of the 20k, 4k is allocated to an SPI RAM buffer if you read anything from the SPI flash chip.

idle owl
#

@tulip sleet Most of that makes sense to me. I'm thinking maybe I don't know what's going onto or being read from the SPI flash chip. So if you start with a fresh board, and do gc.mem_free() and then compare it to that number as you write your project, you'll know how much RAM your project is using?

tulip sleet
#

you'll know how much heap ram you're using. But always do gc.collect();gc.mem_free() so you make sure you're not counting garbage. The garbage collector runs irregularly, and so you may appear to have less than you really have if you don't collect first.

#

i rarely see anyone run out of stack. That would happen if they were writing a highly recursive program or had some kind of recursive loop

idle owl
#

So what are we running out of with the memory allocation errors then?

tulip sleet
#

we are running out of heap. The heap could be Python objects or it could just be temporary storage that used by the compiler when it reads in the .py file and converts it to byte codes. Or it could be the resulting bytecodes. If get memory allocation erros while importing .mpy's, then you know your program is just too big to fit. If you get memory allocation errors when importing .py's, then maybe you should try using .mpy's. And if you get memory allocation errors after all the imports are done, then your Python data structures are getting too large.

idle owl
#

Ahh ok

#

(Also, should I just link you to the forum post I'm talking about? I can answer but I'll be using the info you gave me. So if you wanted to answer instead, you can. I'm fine with either way.)

#

So that's why gc.mem_free reports the memory we're going to run out of because it's reporting heap space remaining.

tulip sleet
#

just got a phone call - will get back to you

idle owl
#

Ok np

slender iron
#

#leeks

solar whale
#

@timber lion @slender iron I did manage to get mu working on my Ubuntu Linux by creating a virtual environment and following the instruction on ntoll's site. It looks like I need to do some cleanup on my deafult python3 setup. It worked fine via pip3 install on my Mac. Thanks for the help. I have not gotten the REPL to appear for my Circuit python board in mu yet, but it works fine with a microbit. Still poking at it.

#

@slender iron FYI - My Mac is not happy with my Trinket M0 - It works OK with the Metro M0 but not the Trinket.

#

@timber lion update - mu REPL works OK under linux talking to my Metro M0 -- having issues with the Trinket M0. On the Mac, Metro M0 works fine. Mac does not recognize the Tinket M0 ... progress is not always forward πŸ˜‰

tulip sleet
#

@solar whale @timber lion how about gemma m0? and do you mean 2.1? just trying to narrow it down to Express vs non-Express, maybe

solar whale
#

@tulip sleet cp 2.1 I’ll try the Gemma next opportunity.

manic glacierBOT
#

I built a 3.x version of circuitpython and found that on my metro M4 the time.sleep() funciton returns way to fast. About 9 times too fast! The following code turns the LED on for 1 second and turn it off for 1 second. I tried the same thing on a metro M0 and the LED stays on for 9 seconds, then off for 9 seconds. So Metro M4 is returning way too fast and Metro M0 is working as expected.

while True:
 	led.value = 1
 	time.sleep(9.0)
 	led.value = 0
	time.sleep(9.0)
hollow tartan
#

LEEKS are delicious.

solar atlas
#

Hi guys. I'm having problems with installing the drivers for my Adafruit stuff again, I'm installing on a different machine. The not all of the drivers (like the ones needed for the MO devices) shown on instruction page to choose from to install. Only four out of the six shown on the instructions page are displayed after the download I purposely re-downloaded the newest posted driver install, which I believe is 2.0.0.0 . However when I installed it, the same problem happened as before with my other machine, both are Windows 10 machines, first was a PC, this is a laptop, downloaded through Firefox, (if that makes a difference). Is there something wrong with the download? is there something wrong with BOTH of my machines to cause the same problem to occur?

slender iron
#

@solar atlas For circuitpython on Windows 10 you shouldn't need drivers. They are for Windows 7

solar atlas
#

See that's what is getting me. If the drivers are installed & working correctly shouldn't the CIRCUITPY folder, or drive name be on here? But instead what is showing is CPLAYBOOT (when it's bootloader mode & nothing when it's in normal mode. Sorry, the CPX.

tawny creek
#

Just got the last trinket M0 at the local shop. So tinyyy!!

idle owl
#

@tawny creek Congrats!

slender iron
#

@solar atlas I'm not a windows expert ( @tulip sleet knows more) but I think the drivers can actually break the CIRCUITPY drive when they aren't needed

tawny creek
#

Still waiting for an m4 but this shall satiate my GaS

idle owl
#

@tawny creek I had to trim the headers down once I soldered them on because the PCB is so thin they were sticking out quite a bit.

tawny creek
#

I want to make my build fully doable with cp as an example

#

Ooh what’d you make yours do @idle owl

tulip sleet
#

@midnight falcon You don't need any M0 device drivers for Windows 10. If you bought a CPX, it doesn't come with Circuit Python installed. You need to download the appropriate UF2 and copy it to CPLAYBOOT. The Gemma and Trinket M0 do come with CPy already installed.

idle owl
#

@tawny creek Blink lights mostly, and I've tested code for others. I've been primarily focused on the Circuit Playground Express, so my other boards haven't gotten as much love.

tulip sleet
idle owl
#

@tawny creek What is it you're building?

tulip sleet
#

@midnight falcon the CPX comes with a demo makecode program that is very blinky

tawny creek
#

It’d be cool to see a feather with all the sensors of a cp x

idle owl
#

It'd look like a giant breadboard with a bunch of breakouts as it is πŸ˜„

tawny creek
#

@idle owl building a portable Pi. The cp boards act as io since the display I’m using takes up all the gpios

idle owl
#

@tawny creek Oh yeah! I wasn't sure what you were doing, but I did see the images you uploaded. That's really neat!

tawny creek
#

Thanks! I really like the workflow of circuit python. I could edit the button mapping of my code on the fly without compiling etc over the network

#

Really great as right now I’m using arduino with my feather so I have to disassemble the build to update code

idle owl
#

That will definitely be a nice improvement

tawny creek
#

@idle owl when the m4 comes out it can all be in one neat package

idle owl
#

Yeah! The M4 is going to make a lot of projects easier, and some doable in the first place.

solar atlas
#

Ahh, ok @tulip sleet That's what is confusing me, I was thinking that it came with CP already on i.t I was trying to show my daughter how "EASY" you can just change the code, only I obviously cldn't get it pull up the code let alone change anything. The bit of the drivers being bad, how do I uninstall them then? Cause I did install them.

tulip sleet
#

well, the driver package won't let you install the m0 drivers on Windows 10, so you probably just installed the other drivdrs, like the FTDI, etc. drivers. Probably not going to interfere. You can go to Settings->Apps and uninstall anything Adafruit, but it doesn't matter.

solar atlas
#

Wow, you guys put out 2.1.0 already? Lol, didn't you just put 2.0 out like last week??

tulip sleet
#

no, that was weeks ago

slender iron
#

#timeflys

#

flies?

tulip sleet
#

time flies like an arrow

#

fruit flies like a banana

idle owl
#

Timeflys made me think multiples of a fly that can move through space-time.

slender iron
#

lol

#

brb, gotta restart. my internet is being weird

solar atlas
#

Lol, my daughter & I both like that time flys comment. πŸ˜ƒ Ah, ok, That must be why the difference that I was seeing. You guys' good work protecting me from my own ignorance.

idle owl
#

@solar atlas It's all about learning!

solar atlas
#

Very true. πŸ˜ƒ @idle owl Very true!

#

Ok, going to go try this again. Wish me luck.

idle owl
#

@solar atlas Good luck! But I don't think you'll need it.

hollow tartan
#

@idle owl have you used a tft lcd shield on Metro express M0?

idle owl
#

@hollow tartan I have not. It is my understanding that it'll fit all Arduino shields, and I think as long as you can identify the pinouts, you should be able to translate it to CircuitPython. There might not be drivers for CP yet though if it is something that requires drivers. I don't know Arduino hardware well enough to know off hand.

solar atlas
#

OK?? I'm confused, why did the whole drive change name & I can't even view the other files on there anymore? Or did that U2F file just completely own & rewrite the drive deleting the other stuff?

slender iron
#

@solar atlas the CPLAYBOOT is a fake drive

idle owl
#

@solar atlas It's into the bootloader if it's CPLAYBOOT. It happens if you press reset twice. Press it once more time to get back to CIRCUITPY.

solar atlas
#

O is that kind of like the virtual drive that a boot disk used to create when dianosing problems on Win XP machines?

idle owl
#

It's how you update CircuitPython or if it gets corrupted, it's how you reflash CircuitPython to get back to where you were.

#

So if you were still on 2.0.0, you could download the 2.1.0 file, which is a .uf2 file, press reset twice, and then simply drag the .uf2 file to CPLAYBOOT. It resets on its own at that point and then returns to CIRCUITPY.

#

There are a few other things to be done with it, but that's the main thing.

solar atlas
#

ok, is there supposed to be any sample code CIRCUITPY drive or in boot_out file?

idle owl
#

Nope, you start fresh with the Circuit Playground Express once you install CircuitPython on it.

solar atlas
#

ok. 😦 is there any sample code that I can put on and then play with from there?

idle owl
#

Oh yes! So much. Hold on.

#

Sorry, my internet is being so slow!

solar atlas
#

no worries, I get the same issue. Well actually it's more of ridiculously slow machines.

idle owl
#

I think that might be more accurate to be honest. I'm really thinking of upgrading. This is a laptop from 2011.

solar atlas
#

Ya I cld see that beeing a good time to up grade. The sad thing is the one machine I have a is actually an old server, from the XP Win 2000 days, but I don't have a clue how to really utilize.

idle owl
#

It really depends on where you are in learning/writing CircuitPython (or Python). If you (or your daughter!) are just beginning, I would suggest the second one. There's another guide as well that I'm having trouble pulling up that's a UFO by John Park that also uses the API.

#

But I'm getting an internal server error, so I'm not sure what's going on there.

#

@solar atlas Anyway I hope those links help! Should be a good place to get started for sure.

solar atlas
#

it most certainly does!! Thanks again @idle owl πŸ˜ƒ

idle owl
#

Just name whatever file you want to run as code.py and it'll get started!

#

@solar atlas You're welcome! And we're always here for more questions, so never hesitate!

solar atlas
#

My daughter & I were just talking about making her a Playground Drum Machine shirt. I told her EVERY kid in her school would be coming up to her wanting to smack her. lol

tidal kiln
#

OverflowError: long int not supported in this build

#

i can see working with 64bit values is going to be fun πŸ˜₯

slender iron
#

@tidal kiln thats why I suggested making a class for it. use a bytearray internally

tidal kiln
#

yep

#

my first pass was just the simple and obvious

idle owl
#

@solar atlas Did you find the drum machine example in the Intro Guide?

solar atlas
#

Lol, yup

#

I copied the code for the Playground light sensor example & saved as a code.py but nothing happened?

tidal kiln
#

@idle owl i'm getting 500 for ufo guide also, not sure whats up, sent email about it

idle owl
#

@tidal kiln Ok thank you for checking.

cunning crypt
#

@solar atlas What program did you use? Notepad will, by default, append ".txt" to any file it saves.

idle owl
#

@solar atlas Oh! Right. What @cunning crypt said. Windows hides the file extension. So sometimes you'll end up with a .py.py or .py.txt.

#

Also, sometimes it needs to reset once when the file is first copied on the board. You can try a single press of the reset button.

solar atlas
#

I did bopt the drum machine & the light sensor, na thy both showed as code.py. ok forgot that Win does that. Yup just that the problem, it saved it as code.py.txt

idle owl
#

Nice!

solar atlas
#

I'm redoing it using Atom now.

slender iron
#

we have code in master that will actually run code.py.txt πŸ˜ƒ

idle owl
#

Oh did we update that?

#

I knew that was in the works.

solar atlas
#

I'm guessing not cause it didn't work.

idle owl
#

If it's in master, it's not in 2.1.0.

slender iron
#

it'll be in 3.0

solar atlas
#

ok, how do I get this to work then? cuz Atom is saving it the same way.

slender iron
#

atom shouldn't save with the extension but I'm not a windows user to know for sure

cunning crypt
#

IF you're just re-saving the file, it'll keep the extension

opaque patrol
#

Have you tried to create the file using Atom directly on the Circuit Playground Express and then paste the code into it?

solar atlas
#

I got it to save correct but it still didn't work.

opaque patrol
#

Are you able to connect to the REPL?

solar atlas
#

I saved it to the CPX, as code.py, & I confirmed that it is a py file, but still no luck. Help?? lol

#

O & also reset it once.

opaque patrol
#

I would suggest connecting to the serial port and checking for error messages

solar atlas
#

What's a REPL @opaque patrol ? I only have the USB code that the CPX came with. I don't have any serial port cables.

cunning crypt
#

@solar atlas You reset it once, right? You didn't end up in the bootloader, did you?

solar atlas
#

Nope only did it once. also later tried turning the power off with the slider switch but that didn't seam to make any diffence no matter which position it was in.

cunning crypt
#

Slide switch for the CPX isn't a power switch

#

Just to double check things... Can you copy the contents of the file over to something like pastebin or hastebin?

solar atlas
#

Never heard of either of those @cunning crypt

cunning crypt
#

Copy/paste the contents into there, hit the save button, and then copy/paste the URL here

solar atlas
opaque patrol
#

Sorry, I had to run out for a few minutes....You can connect through the USB cable on Windows using Putty

cunning crypt
#

@solar atlas You've copied the .wav files to the device as well, correct?

solar atlas
#

Ya I forogt them, but I corrected it n put them on but still luck.

opaque patrol
#

Skip the windows drivers section and look at how to determine your serial port and Install Serial Port software, there is a link to Putty on the page

solar atlas
#

What is Putty? @opaque patrol

pastel panther
#

Putty is a terminal application that can do serial and ssh connections as well as other things

opaque patrol
#

Its a free windows implementation of SSH and Telnet, it allows you to open a serial connection and access the REPL (read-evaluate-print-loop). That should give you a useful error messsage

pastel panther
#

It's a way to connect to a remote thing, like a server or a microcontroller, and talk to it

solar whale
#

@tulip sleet @timber lion update on trinket/gemma m0 mu mac tests. The gemma m0 is recognized by my MAc and the next time I tried the Trinket M0 it was also recognized. Mu on the Mac does not seem to be able to find either for opening REPL but I am also having similar issues on the linux box with REPL under Mu. Lots of variables to explore. For what it is worth, if I plug in a Micro:bit it the REPL within Mu works fine.

opaque patrol
#

@solar whale Has anyone gotten MU to recognize devices on Windows?

tulip sleet
solar whale
#

@opaque patrol sorry - no windows experience here.

opaque patrol
#

@solar whale It worked beautifully on my raspberry pi, but the screen is only 7"

#

@tulip sleet A lot of options, any recommendations or should I go with the default?

#

For Tera Term

tulip sleet
#

when installing? I just used the defaults. Or when running? You just need to set the com port. The defaults are good, I believe.

opaque patrol
#

I like that it reconnects automatically

idle owl
#

@solar atlas Did you get things sorted out?

solar atlas
#

nope, I'm even more clueless then before.

#

@idle owl after switching to a code that doesn't require any additional files & then swithing to a different CPX, I still have absolutely nada

idle owl
#

@solar atlas Ok. Did you load the library bundle?

#

It's a folder you copy to the CPX containing the library files. I just realised I totally forgot to mention it...

tawny creek
#

im curious, not necessarily going to attempt to anytime soon.. but say I wanted to customize the trinket m0 's pcb design and get it fabricated, what would i need to do to load circuitpython in it?

all in the pursuit of space saving..

solar atlas
#

On the second CPX, I copied the UF2 file & then copied the PG light sensor code & made the code.py file. It's showing that it's on the CPX but the CPX is doing absolutely bubcus

idle owl
#

Ok, yeah. Download that zip file, unzip it, copy the lib folder inside it to the CPX

#

All CircuitPython files have import something at the beginning. Those imports are calling the information in the library files, which are stored in the lib folder.

solar atlas
#

What lib folder?

idle owl
#

Download the zip file from the link I posted.

#

A lot of the libraries are built into the Circuit Playground Express though.

#

Can you copy and paste the code here? If you put 3 backticks on both sides of it, the thing in the upper left corner of your keyboard, on the same key as the tilde, it will make it a codeblock

glacial bronze
solar atlas
#

I'm trying to @idle owl but Firefox on my laptop keeps taking a dump.

#

I'm having to use another computer just so I can send this.

idle owl
#

Ooh, ok. Not great.

#

I'm realising though that most of the libraries you'd need for the example code are built in so I'm not even sure this will resolve it.

#

I kind of want to walk you through starting completely fresh, but that also involves downloading things and I would hate to have you spend forever trying to get though those steps and not have it work.

solar atlas
#

Ya really. I'm going to have to recreate everything on here instead.

idle owl
#

What example are you using for your code?

solar atlas
#

Hay if can FINALLY get these things to work I'm game. The light sensor one form the example code list

idle owl
#

Ok let me paste this onto a CPX and test to see what I get. Give me a minute.

#

Yes yes yes!!!

#

Ok.

#

It needs a library! That's the issue.

solar atlas
#

ok, sry had to help my neighbor.

#

just sec let me just shoot my laptop. brb

idle owl
#

It's missing simpleio.

solar atlas
#

seriously??? out of all the ones to pic I picd the one with an error?

idle owl
#

No, I mean it needs the library. The code doesn't have an error.

#

The two examples you chose both required libraries that you didn't have loaded. Most of the examples under "CircuitPython" use built in libraries.

#

I want you to make a folder on your CIRCUITPY drive called "lib", on the Circuit Playground Express

solar atlas
#

gottcha.

idle owl
#

This is not the normal way to do this, but I want to get you going as quickly as possible.

solar atlas
#

k done

idle owl
#

And you put the simpleio.mpy in the folder?

solar atlas
#

and waa Laaaa.... it works

idle owl
#

Yay!!

#

I had to shine a bright light on the CPX to really light up. It likes a lot of light.

solar atlas
#

does the drum one require the same file?

idle owl
#

Let me look πŸ˜ƒ

tawny creek
#

@glacial bronze hm! doesnt seem as complex as i thought it would be

glacial bronze
#

It looks like it's just development of CircuitPython itself and debugging thereof that needs a J-Link

idle owl
#

@solar atlas No, I downloaded the file from the drum example, and copied all the drum samples to my CPX and it worked without any library files.

solar atlas
#

hmm, ok let me try doing it wit this pc

idle owl
#

Hmm, I think that link will work anyway

#

I clicked on the "Download Playground_808.py" link at the top of the codeblock in the example.

solar atlas
#

do I copy the _macosx file too?

idle owl
#

I don't know what file you're referring to

glacial bronze
#

_macosx is a hidden folder full of metadata for Mac PCs

#

just ignore it

#

same way a Linux or Mac system looking at a Windows drive will see thumbs.db files all over the place

#

and Windows machines will see .profile and etc. hidden Linux things

idle owl
#

Macs get overloaded with .DS_Store and a couple other not-so-well-hidden files as well

solar atlas
#

its one of the files in with the drumsamples.zip file

idle owl
#

Ah, no just copy the .wav files

solar atlas
#

YAAA IT WORKS!!! lol.

idle owl
#

YAY!!

pastel panther
#

Whooo!

#

Congrats!

solar atlas
#

how loud can that lil speaker kick out?

glacial bronze
#

Surprisingly

solar atlas
#

mmm celebratory bacon philly chesse steak pizza taste even better now. πŸ˜„

idle owl
#

That's great!!

solar atlas
#

How do pump up the jam?

#

My daughter is going to be extatic in the morning.

#

Thank u sooo many times over!!!

pastel panther
#

Your positive reaction is why we help out

idle owl
#

@solar atlas I'm so happy for you! You're so very welcome!

solar atlas
#

Lol, o my possitive reaction is nothing compared to what My daughter Mia is going to be expressing in the morning.

pastel panther
#

Circuit Python: Making hackers one CPX at a time since... a while now

idle owl
#

@solar atlas Well I'm excited for Mia!

solar atlas
#

lmao @pastel panther well its making two in this household!

idle owl
#

@solar atlas Were you guys on Show and Tell this past week?

solar atlas
#

yup yup

idle owl
#

Ahhh!!!!!!

solar atlas
#

she also won the ask an engeneer prize too.

idle owl
#

That's amazing! She's going from snap circuits to CPX!

#

Yeah! I remember her calling!