#circuitpython-dev

1 messages · Page 156 of 1

idle owl
#

Due to the fact that I wasn't even aware we had collections in the form of ucollections, I've never gotten to use it. The one time someone was going to show me how we ran into collections not working.

solar whale
#

it clearly returns one -- that is a change from earlier version:

idle owl
#

So... I know it's a thing. But that's the extent of what I have.

solar whale
#
>>> result=lis3dh.acceleration
>>> result
acceleration(x=-0.038314, y=0.0, z=0.766281)
idle owl
#

Oh...... so it does it. It's not something you have to do.

solar whale
#

used to just return the tuple - no name

idle owl
#

Right.

solar whale
#

but exisiting code works fine.

idle owl
#

I didn't think we wanted to get rid of that option entirely. But eh. Scott said the code looks good. If it doesn't break anything, then it's probably good to go.

#

Thanks for testing it 😃

solar whale
#
>>> x,y,z=lis3dh.acceleration
>>> x
-0.038314
>>> y
0.0
>>> z
0.766281
>>> 
idle owl
#

Excellent

#

I'll approve it and get it merged then.

solar whale
#

OK with me - thanks

#

Will it also get merged into CPX build?

idle owl
#

Oh hmm. Good question. It'll need to eventually.

solar whale
#

not sure how it gets used - I did not follow look at the reason for the change. I should go back and look at it 😉

#

no issue and not much in the PR so I'm guessing it was a minor change.

#

ah found a refference to an issue (#12)

idle owl
#

I thought I remembered there being one

solar whale
#

it allows you to do this ```

result=lis3dh.acceleration
result
acceleration(x=-0.0957851, y=0.0287355, z=9.77966)
result.x
-0.0957851
result.y
0.0287355
result.z
9.77966

reef seal
#

Hi guys,

I'm trying to read IR sensor data on a CircuitPlayground Express board. according to this doc: https://learn.adafruit.com/adafruit-circuit-playground-express/pinouts I should be able to use A10 and D39 to read the ir input. However i always get these errors:

NameError: name 'A10' is not defined or NameError: name 'D39' is not defined.

My code looks like this:

from analogio import AnalogIn
d39 = DigitalInOut(D39)
a10 = AnalogIn(A10)```

I can access other pins such as `A8` with no problem.  Any thoughts?
ruby lake
#

do you have import board in there?

reef seal
#

ok I found the solution, in REPL I typed

>>> import board
>>> help(board)```

and I saw 

```board.IR_PROXIMITY``` and ```board.REMOTEIN``` which seems to be what I'm looking for.  Not sure why it doesn't match whats in that document.
ruby lake
#

looks like they gave names to the pins beyond the arduino-style Ax, Dx

#

you can probably still use board.D39 etc

raven canopy
#

D39 is not defined in the pins assignment. REMOTEIN and IR_RX are assigned to PA12 (aka D39). I think IR_PROXIMITY will use both the IR_TX and IR_RX; it is mapped to its own port on the MCU.

#

@idle owl do we have an example or learn guide in the works for using the IR_PROXIMITY on the CPX? don't see anything on Learn or in the repos... (see above discussion)

manic glacierBOT
manic glacierBOT
manic glacierBOT
opal elk
#

re the namedtuple stuff, you can continue to use numbered things too

#
>>> a[0]
>>> a.x```
manic glacierBOT
manic glacierBOT
#

I believe RTD would render the .md unless we explicitly ignore it.

On Mon, Mar 19, 2018 at 8:46 AM sommersoft notifications@github.com wrote:

I agree on both accounts. A README would be useful in the FeatherWing
examples folder, but a .py might get confusing. Would RTD render a .md
(lazy/at work; haven't looked it up myself)? If not, we could setup a
toctree for the examples with an examples.rst, or sub-tree it in the
index.rst.


You are receiving this because you were me...

timber mango
#

No pinned message?

slender iron
#

@timber mango I forgot!

#

<@&356864093652516868> Weekly meeting will be here on Discord in an hour! See you soon!

timber mango
#

I forgot if I remembered or not. ;) I thought I saw it last night, but could not find it just now. ;)

slender iron
#

thanks for the reminder

timber mango
#

You're welcome. I generally arrive home right about now, so unless I forget it's a Monday (and dawdle on the way home, perhaps to stop in for shopping or a visit with a friendly shop keeper) .. I just have to remember that this exists. The pinned note does help.

solar whale
#

@idle owl I was playing more with lis3dh examples on CPX and I am not able to get the tap.py to work. It runs, but never detects taps. Is this a know problem or should I open an issue. I tried on 2.x and 3.0 - previous and current driver.

timber mango
#

jerryn I have an oscilloscope now. 25 MHz digital w/LCD display and it's not bad at all.

cunning crypt
#

Oh, cool. I'm actually here today.

timber mango
#

@cunning crypt I say that to myself every day I wake up alive. ;)

solar whale
#

nice! It will be a great addition to your bench. Mine has come in very handy!

cunning crypt
#

And here I thought you'd just put on the BeeGees

timber mango
#

(haha andon) jerry: now i see the value in multi-channel. Even for SPI I'd like to watch all three lines (or four, when MISO is used).

umbral dagger
#

@shut karma Nice addition. I'm making due with a Bitscope Micro for now. Kates up a lot less room 😃 and does the job since my workbench & desk are next to each other.

timber mango
#

I got the oscope for 100 bux at the Ham flea market in Southington, yesterday. I like buying there because there's a reputation economy among hams -- they can't afford to routinely sell junk. This one's in very good shape.

solar whale
#

sounds like a great find. It's been a long time since I went to a hamfest. Quite an event!

timber mango
#

That one has more reviews and is one letter grade newer than mine (mine is the 'S' and the reviewed is a 'T' suffix to the model number -- same front panel fwict).

#

My point is that they can be had at far under retail, if you wait for the opportunity to arise. ;) Last year I acquried a 'LabVolt' unit that has several modules organized into 4 half-racks of equipment.

Function generators, two completely different meters (the top one is simplified; both measure current and voltage; the bottom one does full VOM functions). And a variable AC and DC supply.

It was designed for student use, so you have to move the bananna plug from one jack to another to measure Ohms (to avoid an 'oops' event).

#

Although 3.3v was rare when the LabVolt was made, they're very good at orienting the thing down to 2.0 VDC and up to 20 VDC (in two ranges).

#

The two LabVolt meters are my only analog d'arsonval movement meters. I have to have those to function. ;)

#

I also picked up a Dell Optiplex 790 with a Core i5 and 2 GB, 250 GB, like a 19" VGA widescreen display, keyboard, mouse and speakers -- $60. He asked $80, then lowered the price to 60 during the conversation.
I paid him 80 and explained it was worth more than 80. This guy just about licked it clean, days before the flea market. One of those people who take q-tips and clean the corners of their beloved equipment.
They were both excellent vendors, doing this as a hobby.

solar whale
#

The monitor is worth that - I have a VGA monitor with a VGA to HDMI adaptor I use for getting Raspberry Pi's up and going.

#

The rest - well not sure what you have in mind, but not much will run in 2G these days -- sad...

timber mango
#

It's a beautiful LCD and heavy as a boat anchor, and kinda thin. Probably the last of the heavier VGA LCD displays.

#

Well I will steal the 4GB out of a same-era system I never use. This one scores double my present laptop on cpubenchmarks.net

solar whale
#

That'll help.

#

could be a nice CP development system.

timber mango
#
 $ cat /proc/cpuinfo  | egrep i3 | sed 1q
model name      : Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz

Been running this laptop (only) last three years. ;)

#

BTW upgrading Debian from i386 to amd64 is a nightmare. I gave up and will begin doing a proper install today on the 'new' unit.

#

At some point it wanted to change out systemd/init stuff and that was the end of that. HAVE to chroot jail to have a chance to succeed (I did it once; maybe twice, before).

#

And that's my daily not-quite-on-topic wall of text. And I'm back quiet. ;)

manic glacierBOT
prime flower
#

gonna have my mic off for the helpers meething, got sick and my throat is wicked sore 😦

slender iron
#

eesh, feel better @prime flower !

prime flower
#

thanks, it's been 8 months since I've been sick so it was bound to happen eventually

idle owl
#

@raven canopy We do not have an IR prox example afaik

solar whale
#

@prime flower feel better - no chicken soup emoji 😦

idle owl
#

@solar whale Open an issue, it's not something I was aware of.

slender iron
#

<@&356864093652516868> Meeting in two minutes!

raven canopy
#

Yes. You do. To all of it....

prime flower
#

you need a snowglobe kit

cunning crypt
#

@slender iron I do that. Far too often.

stuck elbow
#

I can't unmute

quick oyster
#

I do not hear anyone talking, but I see evidence that they are so I’m investigating

cunning crypt
#

"NEat! I'll do this some day"

idle owl
#

Reload @quick oyster

#

We all had the same issue earlier

#

Can't hear you if you're talking @quick oyster

timber mango
#

"It's all electrons."

idle owl
#

Electron. It's a platform.

timber mango
#

@idle owl oops!

idle owl
#

😃

tidal kiln
#

fly on the wall mode for me this week. no mic. no updates. group hug.

timber mango
#

That new microbit dragon thing is getting attractive.

slender iron
#

any luck @quick oyster ?

quick oyster
#

Nope. Let me know when it’s my turn and I’ll report from here

timber mango
#

My weekly report got long so I'll post it as a file instead of in-channel.

#

Tracebacks (vs gforth). vector graphics oscope netpbm. 74HC595 (shift register driving 7-segment LED array) in CircuitPython quickest route this week over Arduino (SPI ready in CircuitPython due to prior work by me). Status LED CircuitPython proving useful.

hollow ingot
#

Is there an audio/video/hangout? Notice some comments about audio, but I'm only signed in to discord text chat.

idle owl
#

@hollow ingot Yep!

#

Join the CircuitPython voice chat on the left

#

It's audio. To join, click on it.

#

@hollow ingot Scott is going through the State of CircuitPython at the moment.

cunning crypt
#

Hug Report: Group Hug. Still busy with other things, so havent' paid much attention, but I'm sure you are all doing awesome stuff.

prime flower
#

hug report for @slender iron for being on one of my favorite podcasts (the amp hour). I listened to it on my flight and it made time fly.

cunning crypt
#

I've been train-ing for it, @slender iron

idle owl
#

Carter said group hug earlier.

tidal kiln
#

fly on the wall mode for me this week. no mic. no updates. group hug.

errant grail
#

Group hug for all the work on 2.2.4! (Seamless conversion of existing projects.)

stuck elbow
#

Congrats on Alpha 3

timber mango
#

Hug report to Tony DiCola for the initial work on documenting the building of CircuitPython from source:
https://learn.adafruit.com/micropython-for-samd21/build-firmware
(Initially this was Micropython for Adafruit product line, more than a year ago)
The present Vagrantfile is verified correct by me. ;) There's enough info in the Vagrantfile to build everything, if you look. ;)
Was able to build the 3.0.0. Alpha-2 from those instructions, this week!

quick oyster
#

Hug from me, then. A Vagrantfile is just what I need!

raven canopy
#

Group hug this week. And @twin mica for ATizing last week's project.

timber mango
#

Team up with @split ocean with the AT-AT ;)

cunning crypt
#

The AT-enabled AT-AT

hollow ingot
cunning crypt
#

Just don't lose it. Then you have to ask, "Where's the AT AT-AT at?"

timber mango
#

SVD

cunning crypt
#

Status update: Nothing CP-related. Main project is continuing to re-chip the DigiBadges for a convention at the end of the month, but I've also taken up writing a standard python program to generate random tectonic plates. It's absolutely not something I need to make, but... Well, I'm going to do it anyway.

idle owl
#

Literal tectonic plates.

prime flower
#

nothing cp related, spinning back up from vacation

idle owl
#

Things that move on the planet and cause earthquakes.

tulip sleet
#

🌍 generation

cunning crypt
#

Plate tectonics (from the Late Latin tectonicus, from the Greek: τεκτονικός "pertaining to building") is a scientific theory describing the large-scale motion of seven large plates and the movements of a larger number of smaller plates ...

idle owl
#

I think we broke Scott.

cunning crypt
#

Nope, no joke (yet)

#

Not something that's on my plate

hollow ingot
#

Next is SPI

idle owl
#

We blink lights! We're all playing with kid's toys

cunning crypt
#

@errant grail Don't worry. The convention I'm selling stuff at is a My Little Pony convention. There's nothing wrong with "Kid" stuff.

#

Although some people look at you funny when you're just horsing around.

drowsy geyser
#

I was going to say "I play with rockets" but definitely not kids toys, since they're taller than me, go up over a mile, and can break the sound barrier....

cunning crypt
#

@drowsy geyser They're the toys kids wish they could play with.

drowsy geyser
#

LOL. As Elon says, "because who doesn't love rockets?"

errant grail
#

I decided that I will always play with kid's toys.

stuck elbow
#

nothing CP-related

errant grail
#

... decided that long, long ago

cunning crypt
#

@drowsy geyser So you're not as fishy as we thought?

drowsy geyser
#

LOL! I'm used to it. But, I don't have trouble with my user name being taken when registering on a new site!

quick oyster
#

Man, I do

raven canopy
#

@solar whale put the pHAT in the Community Bundle?

tulip sleet
#

i think no dotstar, just IR led

solar whale
#

@raven canopy good idea!

drowsy geyser
#

Big "yay" for @idle owl 's hard work!

timber mango
#

Late hug report: @tulip sleet for pointing out the presence of 74HC595 Shift Register in the AF LCD backpack.
Status report (brief): Tracebacks (vs gforth). vector graphics oscope netpbm. 74HC595 (shift register driving 7-segment LED array) in CircuitPython quickest route this week over Arduino (SPI ready in CircuitPython due to prior work by me). Status LED CircuitPython proving useful.
See scrollback for a more detailed (haha) report.

tulip sleet
#

I take it back, ladyada said in a github comment: "basically a trinket or gemma with only dotstar LED + IR Receiver"

#

re pirkey

stuck elbow
#

Python was based on LISP, and Forth probably too

quick oyster
#

I’ve got to run, so I’m gonna paste my status here: I’m currently working on two things in the pursuit of asyncio: selectors and deque. Not much progress yet since I’ve had a busy week here at work, but I’m still on-track for delivery of asyncio before PyCon; no impassible road-blocks yet. I’ve got all the hardware I need and I’m gonna start running things on the CPX. My goal remains asyncio to allow rainbows and IR to coexist.

slender iron
#

thanks @quick oyster perfect timing

quick oyster
#

😃

raven canopy
#

STATUS: Got debug working over the weekend on the "128char max paste in REPL". Still working my way to grabbing fully useful data with atmel studio & GDB, but the picture is a getting clearer. And to retract my statement from last week: docs are never done. :D

twin mica
raven canopy
#

Joke...

timber mango
prime flower
#

@quick oyster I'm excited for asyncio 😄

tidal kiln
#

@twin mica nice. i know that's been asked about several times. thanks.

hollow ingot
#

Yay to asyncio! Addicted following use of this on micropython

timber mango
#

stringcar-transported maple syup site-inspection (automated)

prime flower
#

that was really interesting (especially calc'ing distance)

drowsy geyser
#

Azure rocks!

tidal kiln
#

rain shadow!

timber mango
#

vive la rein ;)

drowsy geyser
#

@errant grail When I need to test my rover I'll bring it out your way...

errant grail
#

@drowsy geyser We have sandy, arid space just waiting. You may have to compete with some ATVs and dirt bikes, though.

timber mango
#

@pastel panther is the SPI mapping pinmeister -- helped me out with the SERCOM system.

drowsy geyser
#

We can test this pretty easily with a LiPo battery....

timber mango
#

Use a LiPo battery with a USB fitting as with cell phone chargers.

#

I do that when I need electrical isolation from the laptop to avoid ground loops when testing with a powered oscilloscope &c so that there's only one thing (the oscope) connected to 120VAC power at a time.

#

bit rate vs large periods of 'silence'

#

You can.

#

Definitely.

#

Bitbanging reveals itself plainly in the code you ran. EDIT: except for fallback to bitbang! (special case)

#

Conversely, hardware SPI wil fail if your SERCOM cannot support hardware SPI.

#

In both cases, other nonessential code can side-track program flow enough to provide measurable delays.

#

The wheel code runs slow altogether. I'm still confused as to why.

#

(wheel is a function found in RGB LED demo code -- even in Arduino -- it basically maps 0-255 to a 'color' on an RGB LED)

#

the 'display' or 'show' code is usually a bottleneck in most of these libraries.

#

Yeah there's a fallback to bitbang for dotstar in CP -- forgot about that.

#

keyboard repeat was a BIOS setting in IBM PC world. That was a 5V two-wire protocol and a dedicated chip.
Later keyboard tech implementation probably emulates this.

stuck elbow
#

yeah, key repeat is a operating system thing

prime flower
#

the os rate-limits the keyboard i think

stuck elbow
#

the keyboard only sends a keydown and keyup event

raven canopy
#

Momentary button, debounce, loop...

timber mango
#

Linux is much faster keyboard repeat at the Virtual Console than in X.org

cunning crypt
#

Alright, I'm out everyone. Lunch, have to call the State of California about the seller's permit, and then I have another 84 microcontrollers to pull off boards.

prime flower
#

enjoy lunch, andon!

stuck elbow
#

When will we get CircuitPython source ported to Rust?

#

Awesome!

#

timber mango
#

Newsletter - tannewt - 19:04 UTC

#

*cough* Wiki

prime flower
#

new boards/compatible products from adafruit too, maybe

#

community projects as well, in the links, right?

slender iron
drowsy geyser
#

Oooh, time for a DSKY in CircuitPython (aka "the Apollo Guidance Computer")

prime flower
#

I've been using jekyll, it's neat and im looking fwd to this

timber mango
#

Have to see it first. ;)

prime flower
#

@drowsy geyser i watched apollo 13 the other night, good timing 😃

drowsy geyser
#

@prime flower Great movie!

stuck elbow
#

yeah, I saw there is the new working group

#

they also work on AVR

drowsy geyser
#

Thanks, everyone!

twin mica
#

good work everyone, cheers!

raven canopy
#

Thanks everybody. Keep churning out your awesomeness!!!

timber mango
#

fin 19:09 UTC

errant grail
#

Thanks!

stuck elbow
#

thanks!

prime flower
#

thanks!

#

@twin mica if you did want to do a repeat, maybe you could add a 555 timer circuit to a button on the side of the switch? or do it in software?

slender iron
solar whale
#

👍

raven canopy
#

I had a thought after sat night. Would having HW_APA102 on the non-express boards make a difference with DotStar strips?

idle owl
#

ItsyBitsy has a DotStar @raven canopy

raven canopy
#

Ahhhh. Scratch that then...

errant grail
timber mango
#

DotStar seems slightly less mysterious to me** but I haven't written code specific for it just yett. ;)


** vs NeoPixel

stuck elbow
#

neopixels are whiny

#

they need their timings to be just right

#

maybe you will find it useful for designing new projects

timber mango
#

Maybe I'll look into hacking vim keybindings (basic set) into Mu editor if it doesn't have them already. Or at least dream about that. ;)

drowsy geyser
#

There's always "just use vim" 😃

timber mango
#

I'm thinking IDE's like Arduino probably leverage the deep heritage of tracebacks to point to errors in the code. I'm assuming Mu might have that. Don't know how to point tracebacks to code loaded in Vim. ;)

#

Maybe python'ers have solved this already.

errant grail
#

DC Motor Driver: Still thinking about creating an issue for incorporating an acceleration/deceleration rate limiter into the driver. At this point, I'll just offer it as a project example instead.

twin mica
#

@prime flower yeah at some point we'll need that, maybe like a USB game pad where the key presses on-release would be beneficial

#

wait... err, not on-release but "on press"

humble mural
#

Hello everyone just got back from a 4-day field trip with my FBLA club. Tons of fun! Can this board be programmed using CP? Adafruit Feather HUZZAH with ESP-F V1.1 WiFi

idle owl
#

@tulip sleet Ok, pylint doesn't care about those redundant parens. PEP8 does, but running pylint doesn't compain apparently.

tulip sleet
#

@idle owl great!

timber mango
solar whale
#

@compact solstice - sorry - I deleted my post since upon further digging - I am confused about the board you referenced.

#

there are twi different parts but both link to the esp8266 guides! https://www.adafruit.com/product/2821 https://www.adafruit.com/product/3404

timber mango
#
 $ egrep USB0 esptool.py ; /bin/pwd
    DEFAULT_PORT = "/dev/ttyUSB0"
/usr/local/lib/python2.7/dist-packages
#

That'd be the cp2104 -- it likes /dev/ttyUSB0.

#

.UF2 is a completely different idea. Doesn't apply here.

solar whale
#

@timber mango yes ESP8266 comes up as /dev/ttyUSB0

humble mural
#

@solar whale Thank you very much. It is in stock now and I truly don’t remember when I ordered (or set back in stock notifications). When I knew absolutely nothing I selected any project that I thought my students may like. As I learned more, I became more selective only focusing on items that can be used for CP projects (I’ll make an exception for a MicroPython project). I look for to follow that post. Thanks again.

timber mango
#

With the ESP you're basically using a serial UART on the ESP end of things. With SAMD21 you got some fancy innards that supply a USB port to the host pc using the ACM stuff. Totally different ideas (almost).

#

I use the same CP2104 chip to do my 8051 development (it has a serial bootloader programmed into the 8051).

solar whale
#

@timber mango sorry were you commenting on the post I deleted ? I was just trying to point out that eh ESP8266 did not support the USB drive (CIRCUITPY)

humble mural
#

@timber mango and @solar whale in what machine (o/s) are you executing those commands. I tried flashing ESP32 and ESP8266 with Cp and MP this weekend using Linux in VBox and I would get /dev/pts/8 for example

idle owl
#

@tulip sleet The updated rainbow code is lightning fast on NeoPixel as well. 😃 Strip of 120 in what seems to be about 30 seconds.

solar whale
#

@compact solstice - they are for native Linux - I'm not sure how it will map with VBox.

humble mural
#

@solar whale let get this right Ubuntu will behave differently in vBox than if installed as a stand alone?

timber mango
#

peter vbox isn't hardware is it?

solar whale
#

@humble mural Ihave not tried that - whwn I use VBOX - I copy the file out to the host system then do the uploads via the host system, not the Ubuntu vbox.

humble mural
#

No sir

timber mango
#

There's some remapping stuff inside the VM for virtualbox/vagrant used to build circuitpython from source code. That stuff should allow talking to the USB system (to some extent) if I understand things correctly.

#

Yeah it's easier to copy code built inside a virtual machine (VM) to a special directory that the outside (host) machine can see as well, and use that outside machine as the talker when it comes to writing to a (real) USB port.

solar whale
#

@compact solstice - I never trusted mapping the USB port into the VM . So my VM could not directly access the USB port.

humble mural
#

@timber mango I may have a hard time learning the configurations for a VBox Machine running Linux to flash/program dev boards. So would it be better to take one of my older laptop and make it a dedicated Linux box or use my MacMini?

solar whale
#

@humble mural I converted an olld mac mini to ubuntu just for this purpose and it is working very well.

humble mural
#

@solar whale now I don’t feel so bad, I tried all weekend long and couldn’t do it

#

@solar whale curious why you went that route. I would have kept a Mac a Mac

timber mango
#

I ran Linux on PowerPC in 2003. ;) On an iMac G4.

solar whale
#

The old MAc Mini was very slow and does not support the latest versions of MacOS well - I had retired it, but it runs Linux very well and has a new life. I also use my newer Mac Mini with MACOS but do most of my work on the Linux mac mini since I find the linux tools are much easier to work with,

timber mango
#

I would put an Ubuntu 14 LTS or maybe (maybe) 16 LTS on a laptop and see what happens. But -- I have put Linux on just about everything I could find that'd accept it (at least a hundred times, maybe more).
I almost never have to burn bootable media, though I hardly count running 'dd' against a USB thumb drive, to do it. ;)

#

Linux is generally infinitely backwards compatible on i386 and amd64 hardware -- you do not have to find an older distributed version to work with older hardware (up to a point).
TinyCore is ideal for small machines with a modest amount of RAM.
If you're under 4 GB of RAM it may be less attractive to use it for programming. Even 2GB is pushing it.
Whereas TinyCore is fine in 500 MB RAM (though not as nice) and suitable for nettop duties (light web browsing without addon cruft -- wikipedia surfing and the like).

solar whale
#

I have to step away for awhile - good luck @humble mural

humble mural
#

@solar whale later and thanks

timber mango
#

When 4 MB of RAM took up 4 slots on the motherboard, I was running Linux in text-mode only -- for two years. ;)
And was still compiling the Linux Kernel that way, just fine (about 25 minutes for a build).

humble mural
#

@timber mango so TinyCore Linux is an acceptable distribution to do this type of work?

timber mango
#

No it isn't. It is a .. a very social .. movement away from monolithic OMG this is too big .. Linux. ;)

#

TinyCore is oriented to machines that choke to death on full modern Linux installs.

#

Since TinyCore uses a modern kernel, I always have it on every hard drive I own, as a 'rescue' system to run fsck. and so forth. (fsck is file system check)

#

TinyCore is pretty much Knoppix which is Debian. Debian now has Debian Live for the same market. TinyCore used to be called ______ (censored word) small linux.

humble mural
#

@timber mango I’m just going to come out and ask what Linux distro can I put on this machine that won’t drown it and allow me to work dev boards.

timber mango
#

Afaik that's Ubuntu -- Ubuntu was designed to be friendly.

#

You could put a flying carpet software on that system. You got 4GB and a Core i5 chip.

#

I wouldn't hesitate to put Ubuntu on that. If it runs too slow, there's simple ways to get around the problem.

humble mural
#

Straight of the shelf 16.4 LTS or is there a ‘lighter” version, let me check site

timber mango
#

Basically just add an .xsession file with one word in it 'fluxbox' after installing fluxbox. ;) that alone speeds up Ubuntu dramatically.

#

Might run fast enough for you as-is, using follow-your-nose installation methods.
Let's take this to project help as it's not really circuitpython related. ;)

humble mural
#

I am not worried about it being a rocket, more interested in it working with these boards. I love seeing the YouTube videos but nothing seems to work and if I start in Win10, I see that the learning guide is in IOS, I learned this weekend that Ubuntu on Vbox doesn’t work. So let’s try turning a laptop in Linux and using that

#

I have to learn that .xsession trick. I have to search that and learn about that. That is fascinating

timber mango
humble mural
#

Go it

raven canopy
#

@humble mural to program the ESP8266 from the VM, you need to setup the passthrough for the USB in VirtualBox. Or, I think I successfully ran esptool from windows (using the shared drive, like jerryn spoke about earlier; but that was when building local firmware). I can show you how to setup the passthrough in VBox.

tulip sleet
#

@compact solstice personally, I have found it much easier to set up a dual boot machine than mess with virtualbox, vagrant, etc. if you only have a laptop you have to split the single hdd. If you have a desktop just throw another drive in the box. The latter is much easier to deal with because Windows won't overwrite the grub bootloader.

raven canopy
#

@tulip sleet Agreed on dual-boot. VMs are nice...but the mix-n-match with Windows and <anything else> has serious limitations.

drowsy geyser
#

That and VirtualBox on my Windows 10 Creator's Build machine blue screens it. Every. Time.

raven canopy
#

I may end up in a dual boot. was going to re-use my latest upgrade leftovers for separate linux box. but, my new desk is significantly smaller and i'm running out of space as it is.

#

@drowsy geyser really? my vanilla Win10 has never had a blip...

drowsy geyser
#

Both my laptop and desktop (work) systems are very ... intollerant ... of VirtualBox.

#

It's ok. I just built an Ubuntu system and use that....

tulip sleet
#

i had a terrible time getting vbox and vagrant to work on windows - much easier just to set up a vm manually or a dual-boot. had to do with uefi and networking - ugh

#

i find vmware player more straightforward (though doesn't work with vagrant). But i am too used to installing ubuntu to bother with vagrant

manic glacierBOT
#

Meant to put this up last night before the meeting today, but ran out of time.

  • After looking at 2.x a little deeper, the only BIG difference I can see is that usb_rx_notify blocks out while it pulls the data from both endpoint buffers (128 bytes) and puts it in the local buffer. I may be wrong, but reconciling the difference between ASF3 and ASF4 conventions isn't easy for the untrained such as myself.

  • 3.x read_complete is the equivalent [my perception] and only blocks out for e...

slender iron
#

anyone have an image editor handy? I want an image with blink over the amp hour logo

idle owl
#

Yah, how exactly?

slender iron
#

for the newsletter

idle owl
#

No I mean where do you want Blinka

slender iron
#

maybe the left looking at the logo?

#

with a wider black background so its not super tall

tidal kiln
#

so side by side? not over the top?

raven canopy
#

that reminds me. i need to re-dl GIMP...

slender iron
#

depends on the sizing

#

¯_(ツ)_/¯

idle owl
#

Something like this?

#

@slender iron ^^ screenshot.

slender iron
#

nice! that'll work

idle owl
#

Ok two shakes.

slender iron
#

thank you!

#

will post a draft shortly

tidal kiln
idle owl
#

jpg file ^^

tidal kiln
#

either item can be scaled if you want smaller/larger

#

i like the little bit of overlay in kattni's though

slender iron
#

I was thinking amp hour would be centered like @idle owl has

tidal kiln
#

yah. it gets my vote too.

idle owl
#

😃

tidal kiln
#

i like how right facing blinka has tail in front. left facing has tail in back.

humble mural
#

@tulip sleet @raven canopy funny I have moving away from dual booting the more I learned about VBox, but I see the challenges with using my main Machine is dual boot with Linux Mint. I am going to see if the laptop has enough hard drive space

tulip sleet
#

@compact solstice your Linux Mint machine would be fine for development. Just

sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt update
sudo apt install gcc-arm-embedded python build-essential

and install git too if not already installed. That might be all you need.

humble mural
#

@tulip sleet I need to do this on a laptop because I need to use it both at home and at work

tulip sleet
#

@compact solstice got it. If you have an external drive that could also work easily, esp if you have a USB3 port

raven canopy
#

@humble mural are you building local firmware, or just flashing the released firmware?

humble mural
#

@raven canopy I’m just starting off. I am following Tony D’s guides search through YT flashing ESP32 and ESP8266 with CP or MP with the goal of programming them in CP or MP later

raven canopy
#

you won't need VBox on windows for that guide. just python2.

#

although, if you do want to use your VM.. I can still walk you through setting up the passthrough.

humble mural
#

@raven canopy I’ll try them all again using Linux. As we speak I’m installing Ubuntu on an old laptop I had. I spent the weekend going through that guide using VBox, I expect a better outcome now

#

I tried it with Python 2 and 3

#

If using a windows machine do you do the work on command prompt or Powershell, I tried both

raven canopy
#

like i said earlier, i vaguely remember flashing on windows. used powershell to run esptool; not python shell.

#

in powershell: navigated to the python2 packages folder, then ran .\esptool blah blah. like i said. vague memories.

#

i didn't have a syspath setup to python2, which is why i nav'd to the packages folder.

humble mural
#

@raven canopy thanks a million. I just to play with it until I know it like second nature. Can’t teach it until I master and I need a method that I can easily replicate. I saw a method using a RPi3. I pickup 15 from Adafruit this year, it that solution works, I may go that route.

raven canopy
#

understand totally. and rpi is definitely an option. lastly, no worries! if i can help someone help kids...i'm all in. 😄 📚

humble mural
#

Thanks

humble mural
#

@tulip sleet @timber mango thanks for the Linux tutorial everything worked as stated

idle owl
#

Looks great, @slender iron!

slender iron
#

thanks @idle owl !

raven canopy
#

I concur, @slender iron! (that Blinka enhanced logo aint too shabby either, @idle owl!)

slender iron
raven canopy
#

@slender iron any tricks on getting optimized -O0 to fit on the chip? I was 406 bytes over when I tried, and -O1 isn't any better than -Os from a debug value-checking standpoint.

slender iron
#

nah, I usually do -Os but make sure -flto is disabled

raven canopy
#

i didn't touch any of those flags....too much scaryness. 😄

manic glacierBOT
#

The following error occurs when building with gcc 5.4.1 (debian stretch):

common-hal/busio/UART.c:104:83: error: 'sercom_index' may be used uninitialized in this function [-Werror=maybe-uninitialized]
sercom_insts[rx->sercom[j].index]->USART.CTRLA.bit.ENABLE == 0) ||

It may be related to the addition of rx-only UARTs; gcc is unable
to infer the intended relationship between have_tx and sercom_index
being set (I am still not entirely confident of it myself)

manic glacierBOT
#

@jepler We build with gcc 7.3.1 from https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads (7-2017-q4-major) or https://launchpad.net/~team-gcc-arm-embedded/+archive/ubuntu/ppa (if using Ubuntu). I'd recommend that you download that toolchain and put it in user space or use Ubuntu.

We need the -Wno-error=lto-type-mismatch to fix an issue when building frozen modules with gcc 7.3.1. This issue comes up when doing the BOARD=circuit_playground_express. You can see the iss...

humble mural
#

@raven canopy I'm setting this Ubuntu box for board work. I am installing esptool. will "pip install esptool" install it in Python 2, do I need to force it using "pip3 install esptool" or does it matter??

manic glacierBOT
raven canopy
#

@humble mural my linux game is not what it used to be, so you may want to get someone else's answer. having said that, I think pip vs pip2/3 will depend on what you have setup. Also, fairly certain that esptool is python2 dependent, so pip2? let me check a couple things real quick...

humble mural
#

the git hub page says "pip install esptool", only problem is that over the past 72 hours, I have read and seen so much, I'm a bit confused.

raven canopy
#

from the PyPI page: Since version 1.3, esptool supports both Python 2.7 and Python 3.4 or newer.

#

so looks like you can use either... Tony's guide has a few miles on it, which is what my knowledge base comes from mostly. 😄

idle owl
#

You're not forcing it using pip3 install esptool, that's what your pip is called if you install Python3 unless you do aliases and such

raven canopy
#

aliases...that was the term i was searching my noggin for.

#

thanks @idle owl

humble mural
#

Thanks @idle owl and @raven canopy

idle owl
#

yah, np. sometimes I know a thing. Fighting with pip is one of those things.

humble mural
#

It's a fresh install haven't had a time for any aliases yet.

raven canopy
#

yeah. for all of python's "ease of use"...it gets confusing quick in certain parts.

humble mural
#

I would have to imagine the the Github page for the tool is the best source (no sarcasm).

raven canopy
#

one can hope. 😄

manic glacierBOT
#

Thanks, I see that failure on travis-ci now. Oddly, I don't replicate the mp_qstr_const_pool problem here, with make -C ports/atmel-samd/ BOARD=circuitplayground_express.

Do you think there's any point in revising this pull request? If not, please feel free to close it up.

Do you think there's any point in opening a documentation pull request? I do not find these toolchain requirements listed in the docs, even after grepping for the URLs you cited above. (some of the other `ports...

humble mural
#

had to install pip

raven canopy
#

pip install pip...wait. 😛

humble mural
manic glacierBOT
idle owl
#

This is fine in #circuitpython-dev, @humble mural. 😃 CircuitPython and Python related discussion, it works

humble mural
#

ok

manic glacierBOT
#

I agree we should list the toolchain requirements. That is an oversight: thanks for pointing that out. A PR to document that would be great, if you are willing, or we can just do it in a future PR of ours.

I submitted a gcc bug report for the bogus LTO mismatch warning. It is now fixed in gcc, but will not show up for a while: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81440.

You may also run into other issues with the older gcc, such as code size. Right now we have a few kbytes free ...

humble mural
#

After a weekend in Orlando at a high school conference with over 5k kids, I'm beat. but I have to get at least a flash_id on a Feather Huzzah32

raven canopy
#

i'm out for a few... good luck @humble mural!

humble mural
#

Thanks, in case I crash all you have a great evening. Peace

idle owl
#

have a good one @raven canopy

timber mango
#

pip required sudo to install the esptool.py thingy this afternoon. Runs fine without sudo until the very end, where it does not have write permissions into the /usr tree or somesuch.

#

Debian (amd64) did not seem to be able to compile CircuitPython 3.0.0 alpha-2 without the virtualbox/vagrant environment a few days ago, so I redid everything the way Tony describes. My suspicion is that it'd have worked in Ubuntu, or perhaps in Debian 9.x (I run Debian 8.x).

#

One of the scripts run maintains /etc/apt/sources.list and Debian did not know that command.

#

Also I had to solve a keyring problem whereby $ sudo apt-get update fails, after adding the extra repo.
This command failed in Debian:

 $ sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa

I did the add manually (used vim to edit /etc/apt/sources.list or the .d/sources.list file (I forget what's there).

#

That's when the keyring problem arises with apt-get update

manic glacierBOT
timber mango
#

Much simpler for me to abort and do the proper virtualbox/vagrant thing. That succeeds just fine. ;)

manic glacierBOT
tulip sleet
#

@idle owl @compact solstice @raven canopy I use pip3 install --user ... when I need to install something using pip. This does not require sudo and puts stuff in your home directory tree, so it doesn't mangle up your installation.

idle owl
#

smart.

raven canopy
#

smart indeed.

tulip sleet
raven canopy
#

trying to finalize the bday adafruit cart...why does the saleae have to cost so much? 😄 looking at their website though, there is the 'enthusiast' discount... 🤔

#

oh, and finally breaking down and getting a CPX....

tulip sleet
#

do you want the Logic 8 or Logic Pro 8?

raven canopy
#

yeah, i was browsing the old Logic 8 and 4, and couldn't understand the price difference. funny thing: all of the old models show as "out of stock" on the list page; product pages show "discontinued"

tulip sleet
#

the second link is a little old, but not sure if/how the situation has changed. The saleae has been very helpful for me, but every few weeks, not daily. I have a 100MHz scope too, and the Saleae was a lot more useful (easy timing measurements, triggering, etc.). But the Saleae can give some misleading waveforms because of the granularity of the sampling - at higher speeds I saw what looked like jitter and timing differences that weren't really present.

raven canopy
#

that second link may be a little old, but man that's a well written article! thanks @tulip sleet. I was also peeking at the BitScopes . A little more "value", but not as polished and the software probably isn't anywhere near Saleae quality. Then i have to factor in my use cases...which will be slim. maybe a post bday decision. 😄

timber mango
#

You could celebrate it with Bdale Garbee!

manic glacierBOT
timber mango
#

@tulip sleet

Adafruit CircuitPython 3.0.0-alpha.3-4-g4e3748d on 2018-03-20; Adafruit Trinket M0 with samd21e18
>>> 

Built on a new Debian 8.10 installation without a VM environment.
Path is $HOME/dev/bin which is the top level 'bin' directory from the developer.arm.com download you pointed to.
Vagrantfile from the Guide followed otherwise, where possible, to get all prerequisites installed (using apt-get).
Never saw a single error -- so I don't know if all that was necessary.

I did have to add myself to the dialout group, and logout from a running X.org session (no restart of GDM was needed) to access /dev/ttyACM0 -- barebones Debian just installed today. ;)

#
 $ mkdir unpack.d
 $ cd unpack.d

 $ bzcat ../gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 | tar -xvf - 

 # ~/dev does not pre-exist here:

 $ mv gcc-arm-none-eabi-7-2017-q4-major ~/dev

 $ rvim -n ~/.profile

 # logout after editing ~/.profile to modify the $PATH to prepend ~/dev/bin to it.

 $ echo $PATH
/home/nis/dev/bin:/home/nis/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
timber mango
#

e.g.

 $ cat -n  ~/.profile | sed 22q | tail -4
    19    # set PATH so it includes user's private bin if it exists
    20    if [ -d "$HOME/bin" ] ; then
    21        PATH="$HOME/dev/bin:$HOME/bin:$PATH"
    22    fi

pre-existing test [ -d "$HOME/bin" ] retained from the distributed version of the file, somewhat against logic.

solar whale
#

@timber mango the gcc-arm-none-eabi toolset can also just be installed to to /usr/bin by the package installer. It's a matter of choice. I find that simpler since it is already in my PATH.

stuck elbow
#

ordered some ATSAMD51J20AAU

#

I will do science to them

manic glacierBOT
long trail
#

While looking at LadyAda's new guide on a CP TV Be Gone I saw she used pwm to achieve a 38khz pulse train. So I tried to see what pwm (which I think is using a hardware timer inside the M0 chip) could do. I was able to generate upto 6mhz square waves from any pin I tried on a Trinket M0 and a Feather Express M0 using :

#

pwm = pulseio.PWMOut(board.A3, frequency=1000000, duty_cycle=2 ** 15, variable_frequency=True) (from above) The square waves look quite good upto about 2mhz and the jitter is very low! New projects are now possible!

tulip sleet
#

@timber mango congrats - I also used the vagrant to see which prereqs I needed, but I was able to trim it back quite a bit because of what Ubuntu had preinstalled.

slender iron
#

@long trail awesome! It does use a TC or TCC depending on the pin

stuck elbow
#

nice

errant grail
#

@slender iron I'm liking the Adafruit MicroPython newsletter. Nicely done! blinka

tulip sleet
#

@slender iron asf4 hid_generic driver does generic reports BUT IT CAN ONLY HAVE ONE INSTANCE 😠

#

i think I will spin my own with their low-level routines

#

mouse driver does its own reports, and the API is "make an X movement" or "make a Y movement", but not both at the same time. It splits them into separate reports. gah. who dealt this mess?

slender iron
#

@tulip sleet bummer! thats why I like letting the python code construct the report

#

thanks @errant grail !

tulip sleet
#

yeah, exactly. the lower-level api is fine - i'll just use that. ... also supposed to snow 8-12 inches tomorrow after noon . your friend who moved to Boston must wonder what's going on

slender iron
#

@tulip sleet haha, I think hes back here this week but will be moving soon

manic glacierBOT
manic glacierBOT
timber mango
#

@solar whale The tarball offered for the eabi toolchain was a set of compiled binaries and libs -- was not in .deb format. I had to guess what to do with it - could not find any instructions.

#

Also: there are two other sets of this toolchain on my older system; one from Arduino and one from apt-get/dselect origin. The successful run occured on the new system I bought on Sunday and afaik it only has the downloaded tarball toolchain. /so_confused

solar whale
#

@timber mango What you did should work fine. I alwasy have to search for the instructions to ad it to apt. I'll post a link when I find it - or @tulip sleet may have it at his fingertips. The nice thing about using apt is that is is easy to update.

#

The Arduino toolset is (or at least was) way behind and will not work.

tulip sleet
#

@solar whale @timber mango is using Debian, not Ubuntu, so using the ppa with the latest toolchain with apt will no work. The ppa is Ubuntu-only.

#

If I can't use apt for some reason, I just unpack the tarball in my ~/bin directory and prepend gcc-arm-none-eabi-6-2017-q2-update/bin to my $PATH

#

I think I stopped using raw Debian around 2008 or earlier

solar whale
#

Ah sorry @timber mango -- thanks for clarifying @tulip sleet I was a CentOS user but when I started working with MIcro and Circuit Python I went to Ubuntu just beacause it was the path (no pun intended) of least resitance.. Reistance is futile 😉

tulip sleet
#

@solar whale I used CentOS for a while because it matched the servers we were using where I was working. But the desktop GUI always seemed like an afterthought. I got a netbook with Ubuntu and was really pleased and started using it at home (had been using unstable Debian for years at home before that).

solar whale
#

I was dragged, kicking and screaming, to Ubuntu for a NASA project - but once I started using it, I actually liked it.

stuck elbow
#

sometimes it's really annoying when they say "we've packaged it for Linux" and all you see is a ppa

solar whale
#

@stuck elbow Agreed!

#

We used CentOS at work because some of the HW design tool (Xylinx) were only supported byt RedHat Enterprise or CentOS. That and some of the folks were just Ubuntu-phobic...

stuck elbow
#

on the other hand, it used to be the same thing with RPMs a while back

solar whale
#

sure was!

#

I gave up last time I tried to build CP on a Rasbperry Pi - I've got a 3 B+ arriving today - may be worth trying again..

stuck elbow
#

why would you do that?

#

your desktop is much faster

solar whale
#

Just for the experince 😉

stuck elbow
#

fair enough

timber mango
#

If anyone is ever foolish enough to attempt the (one-way!) journey to the (2nd, heh) nearest star (Alpha Centauri, or whatever the current favorite is) .. they're going to need reliable computation, and often quite a bit of ad hockery.
After all, they're all going to die, and they're not going down without a fight.
This is where RPi + CircuitPython comes in. ;)

#

Alternative (and I'm offtopic in this) better choices (in no particular order): Antarctica, bottom of the sea, the Moon, and low-Earth (or near-Earth) orbits. Notice Mars is not on the list of hostile, but possibly sane places to send people to visit, in person. / And I'm back quiet.

stuck elbow
#

don't forget about the hollow earth and the underside of flat earth

slender iron
manic glacierBOT
#

I don't think we handle connect, disconnect and then reconnect well. (ASF4 USB code doesn't reset correctly as far as I know.) This is an artifact of it.

I haven't dug all the way back to the ASF level on this yet. But, in cdc_enabled, the first check is if variable mp_cdc_enabled == true and returns true. Only if mp_cdc_enabled == false does it actually call back to the ASF level to test the conne...

raven canopy
#

excellent answer on that forum post @cunning crypt!

cunning crypt
#

Thanks!

#

CircuitPython is great and all, but they'd have to do a lot of compromising with what they want to do

raven canopy
#

i mostly agree, because of the wifi/nRF aspects. the PWM & RTC are totally doable, as long as they're not wanting Ludicrous Speed time updates from the MCU. (EDIT: there, they're, their...its simple)

cunning crypt
#

Yeah. PWM and RTC are doable.

slender iron
#

Thanks @cunning crypt !

idle owl
#

@cunning crypt Yeah looks great! Thanks!

cunning crypt
#

I try to be useful sometimes.

timber mango
#

@stuck elbow rofl underside of flat Earth!

tulip sleet
#

if you get to the underside then you will fall ... somewhere (or nowhere, I guess)

#

did you know that in flat-earth theory, the oceans don't fall off the edges because they're held back by ice ?!?

timber mango
#

At least they posited a cause. That's encouraging!

tulip sleet
#

"it's turtles all the way down"

timber mango
#

RIP, SWH!

#

dropbear and rsync (from TinyCore sessions on two machines here, tonight) are doing a fine job transferring 54 GB across a CAT-5 crossover cable (no hub between the NICs). Don't need to enable ssh in the usual operating system; instead, dual-booted both into TinyCore (which is rather capable and very easy to install on any existing Linux box).

#

dropbear stands in as a replacement (and tiny) ssh server -- also provides a matching client.

tulip sleet
#

didn't know about tinycore - i'll keep that in mind for something

timber mango
timber mango
idle owl
#

Anyone else run into 2.2.4 not working on CPX?

#

I flashed it, the serial console stopped printing anything, and then it wouldn't mount at all, showed up as unreadable. So I went through the flash eraser, back to 2.2.3, everything worked. Update to 2.2.4, won't mount. I tried downloading a new copy of 2.2.4, I tried 3 different CPXs, tried rebooting my computer.

prime flower
#

@idle owl I have a CPX next to me, want me to test?

idle owl
#

it took a few tries to get it back, if you're ok with potentially borking it, go for it. It could also be me

prime flower
#

OoF, that's a CP not a CPX. I left mine in a lab today, sorry 😦

idle owl
#

ah

#

That's alright. Thanks though

prime flower
#

oh - lol. this is the one that was toasted a bit too much

idle owl
#

oops 😃

prime flower
#

I'm not sure if it works, don't remember when I got it but I gave it a home

tidal kiln
#

@idle owl just put 2.2.4 on a CPX. seems to be running fine. anything specific to try?

idle owl
#

Not really.... I thought it worked fine for me a bunch of times before which is what really confused me.

#

I don't know. Must be something on my end.

tidal kiln
#

still misbehaving though?

idle owl
#

I haven't tried it again. But I managed to repro it on 3 CPXs before concluding it wasn't coincidence.

#

I had a weird bootloader with WebUSB enabled on one... who knew on the other, so I blamed weird stuff before I opened a brand new one, updated it to 2.2.4 and broke it outright.

#

Well "broke"

tidal kiln
#

what machine / os you working on?

idle owl
#

OSX High Sierra

#

MacBook Pro

tidal kiln
#

tried a different machine?

idle owl
#

No, I didn't. I was in the middle of something else

tidal kiln
#

getting it to repeat on 3 CPX's means something. next easiest variable to try is a different machine.

idle owl
#

Ok I'll give it a try. I don't get why this would happen suddenly. I'm in the middle of fighting with Git at the moment.

manic glacierBOT
idle owl
#

That went badly. I had to reclone. I'm done for the night.

raven canopy
#

been there. git battles...rough.

#

will be there again, soon i'm sure. i've got like 3 or 4 clones on this system. 😄

errant grail
manic glacierBOT
weary hinge
#

Hi i'm searching for example code for my neopixel strip 30 led for a fading or crossfading effect ? I tried the Neopixel Uberguide demo, works great! thx!

somber rock
#

Trying to get started building an automated LED controller (outputting PWM to independent LED drivers using a PCA9685), using the Raspberry Pi Zero W. I like the idea of having it connect via Wifi to a web based app. I want to be able to have each channel simulate multiple sunrises and sunsets each day. Can somebody point me in the right direction? I currently have one on Arduino Uno, but it is maxed on memory and outdated.

cunning crypt
#

@somber rock Hello there!

somber rock
#

Hello Andon, thanks for taking the time to respond!

cunning crypt
#

Tannewt actually mentioned your post, I just happened to be the on that answered.

#

Have you used Linux in any capacity before?

somber rock
#

I did about 15 years ago for a few months, so consider my answer no.

cunning crypt
#

Things have changed a bit since then!

somber rock
#

Well, I have time and money, so I'm ready to roll.

cunning crypt
#

Both are good things to have when you have hobbies like this.

#

I am not particularly a Raspberry Pi expert - I believe the person that fits that bill would be @drowsy geyser

somber rock
#

I am a pro level hobbyist then..

cunning crypt
#

But I can run you through some of the basic bits and bobs.

#

How well do you know Python?

somber rock
#

That sounds great. I started studying it about a month ago.

cunning crypt
#

I'm trying to find a good "Starting Raspberry Pi" tutorial

#

It's been a while since I've used one

somber rock
#

That's a really good reference.

cunning crypt
#

Adafruit is really good with their guides

somber rock
#

I agree, been a customer since 2006.

#

I can't believe how cheap the Pi zero's are. I can't buy the components on the board as cheap as they sell it for.

cunning crypt
somber rock
#

Pi Zero W I mean

cunning crypt
#

Zero W and Zero are dirt cheap.

#

It's amazing.

#

Heck, the Zero Ws were $5 at MicroCenter for a while.

somber rock
#

Dang. I guess if you make them a million at a time they get cheap.

cunning crypt
#

Yep. Even 100-250 at a time gets significantly cheaper.

somber rock
#

On a side note - off the record, If I eventually develop something that works well, could I sell this embedded in a product legally (with software open source of course), or is that not ok?

cunning crypt
#

Maybe?

#

I'm not 100% sure what you mean.

#

You can re-sell the Raspberry Pi - companies do it in a lot of kits and the like

somber rock
#

Just wondering down the road, if I can use this to make a marketable/profitable product.

cunning crypt
#

Getting a hold of sufficient quantities of Pi Zeros is not the easiest thing, though.

somber rock
#

I ran this by on the arduino forums a while back, and was frowned upon because I wanted to try and make money with a hobby project.

cunning crypt
#

It might be better to sell everything else and have the user supply the Pi. They're not hard to get individually

#

You're talking to someone who, well, is in the complete opposite camp from what the others you've talked to have done.

tulip sleet
#

One reason they are dirt cheap is the $5 is the wholesale cost: no markup was allowed initially.

cunning crypt
#

I make custom arduino-compatible things, and sell them. There's no issue with making money with hobby projects. That's effectively why Tindie exists.

somber rock
#

Yeah, I just saw that MicroCenter sells 1 for $3.14/ea and 6 for 19.99/ea

tulip sleet
#

$3.14 is a Pi Day loss leader. Usually $5 for 1.

somber rock
#

I guess it would be hard to get 100 of them, but Pi 3's could fit the bill I suppose.

#

I figured it was too good to be true (Zero W), has everything I want except availability.

cunning crypt
#

@somber rock Having the end-user supply the pi can have multiple benefits. You don't have to worry about availability, or the cost of including them, and the user can supply a pi they already have. And if they don't have one, Zeros are cheap.

#

Side note: Don't try to say "Supply the Pi" too fast. Almost a tongue twister there

tulip sleet
#

Arduino doesn't care if you use their products embedded. They even make industrial versions of Arduino. The grumbling in the forums is not official policy by any means.

somber rock
#

👌

cunning crypt
#

Arduino is open source and that liscence allows for commerical use, if I remember correctly.

somber rock
#

The only downside is convincing potential customers that they have to buy something from someone else to be able to get my item to even function. People like the convenience of one stop shopping.

cunning crypt
#

That is true.

somber rock
#

True, this new design will be replacing a legacy controller that is run with Arduino.

solar whale
#

Just another point - Pi Zero/W are sold without headers so the end user has to install them.

cunning crypt
#

Good point, @solar whale

#

Zero W H is the exception

solar whale
#

ah - did not know there was one. Thanks

cunning crypt
#

It's really new

somber rock
#

I suppose if I write software for the Zero W, and I can't find a source, I can just use Pi 3's? Of course this is months down the road, and not really even worth considering right now. I need to get a Pi to reference a web based app via wifi in the meantime....

cunning crypt
#

and sort of flew under the radar because it's... honestly? Not that special.

#

You can take the SD card (With OS, etc on it) out of a Pi3 and put it in a Pi Zero and vice versa

#

The Pi 3 uses a different processor and has more power, but generally speaking, what runs on one will run on the other.

somber rock
#

That's awesome, yet unheard of despite the elementary logic of it.

cunning crypt
#

The Pi Foundation is very good.

somber rock
#

I'll build a prototype with a Pi3 then since appears to be a little more friendly.

cunning crypt
#

Their version of the Debian - Aptly called Raspbian - Will run on all of the Raspberry Pis

somber rock
#

If I needed help with particular aspects of programming, is this the best place or is there somewhere better?

cunning crypt
#

This CircuitPython channel is intended for discussion of CircuitPython hardware/software

somber rock
#

Ok, thanks for that info.

#

I'll get my hands on some hardware and pop back up over there.

cunning crypt
#

I look forward to it

manic glacierBOT
cunning crypt
#

It's the same 16-channel driver, just pined out for a Pi.

stuck elbow
#

there is also an independent breakout board

#

and a feather shield

#

two, in fact, one for servos and one for motors

cunning crypt
#

Yep, but TechnoSteve was looking to use it with the Pi.

stuck elbow
#

I see, sorry, didn't see the whole conversation

idle owl
#

Evidently Mu requires you to have some space on the device... it crashed with a no space left on device error in the terminal trying to use Trinket.

tulip sleet
#

@idle owl it shouldn't crash - ntoll would probably appreciate an issue

idle owl
#

ok

solar whale
#

if it is mu beta 15 then it may be trying to save some files. There is a know issue that will be fixed in next release.

#

For m it was creating a sounds and images older and putting in a few files!

idle owl
#

yeah.....

#

Is that where that came from?!

#

I seriously thought I was going crazy

solar whale
#

I reported it to ntoll and he confirmed and fixed it 😉

idle owl
#

Oh ok

#

is there a new release?

#

I'm so bloody glad you told me that, oi, I really genuinely thought I didn't remember those getting copied there earlier.

solar whale
#

no new release yet

idle owl
#

ok

solar whale
#

I was sure I had been hacked!

idle owl
#

I thought, oh right, images and sounds, I must have done that... when.... did I do that....

solar whale
#

especiially when I saw alien.png

idle owl
#

Oh right!

#

I was thinking I had copied it from someone else's test code

#

to test something for someone

#

and forgotten

solar whale
#

After deleting it - reformatting and it coming back, I reported it!

idle owl
#

It didn't even occur to me. I rarely use Mu, usually only for screenshots of REPL with code, so I didn't put it together

tidal kiln
stuck elbow
#

that's the alien from Pygame Zero

solar whale
#

@stuck elbow yes it is - for some reason mu decided everyone needed it.

stuck elbow
#

it's probably related to the recent support for pygame zero that was added to it

solar whale
#

yes and a subtle bug the ntoll found that caused mu to save it to the system - it did not show up until the second startup if I recall correctly. It was a good bug!

#

good as in hard to find.

idle owl
#

@solar whale, the King of Weird Bugs.

solar whale
#

I try 😉

cunning crypt
#

👑
🐞

timber mango
#

I'm trying to open the circuit python

prime flower
#

@timber mango don't open the .uf2, that's a firmware file.

#

these are some handy steps to follow once you have that downloaded

timber mango
#

It's for a trinket M0

prime flower
#

^ check this quickstart

raven canopy
#

@timber mango both of @prime flower's links will get you where you need to go. There is an ongoing effort to combine and unitize most of the learn guides, so here is another one that is considered the "jumping off point". And...Welcome to CircuitPython!! blinka
https://learn.adafruit.com/welcome-to-circuitpython

timber mango
#

Thanks

prime flower
#

blinka we're here to help if you get stuck anywhere

timber mango
#

Which version do I use

prime flower
#

of circuitpython? the 2.2.4 you had downloaded looked correct

timber mango
#

okay i have the right verison

tidal kiln
timber mango
#

finished downloading

#

i cant find TRINKETBOOT

prime flower
#

press the button on the trinket twice

#

like a double-click

timber mango
#

I did

#

nevermind

#

finished

prime flower
#

yay!

timber mango
#

yay!

prime flower
#

got it working?

timber mango
#

time to make to code blinka

tidal kiln
#

@timber mango the double press on the reset to go into bootloader can be a little tricky. it's like that. sounds like you got it though.

manic glacierBOT
raven canopy
#

i'm guessing that there won't be any real way for us to decipher between old feather52 and new feather52 (52832 versions)... hmmm.

#

and, now they're out of stock so i can't drop one in the cart.

slender iron
#

@raven canopy subscribe, they may not have been put in stock

raven canopy
#

done! 😄

manic glacierBOT
#

Unfortunately, changing that line didn't work. 😞 Also disabled all of the 'in function' calls to start_read to see if letting usb_bytes_available would just pick up the additional transfers...nope. I finally put in some variables to extract the function args (read_complete(return code), etc). Nothing is showing any issues just yet. So it may be deeper in the endpoint setup after all. Just gotta keep pushing...

drowsy dagger
#

Is the esp32 feather supported? I've seen some conflicting information

#

Willing to try building it myself, just curious

raven canopy
#

@drowsy dagger esp32 is not supported in CircuitPython. But, there is support in MicroPython I believe. grabbing a link

drowsy dagger
#

cheers

raven canopy
#

esp32 is planned for CircuitPython. Maybe in the next major revision after 3.x (current dev). No ETA though.

drowsy dagger
#

So pardon my ignorance, but the main advantage of CP is that you are trying to target ports for popular adafruit boards, and have cleaner parity with cpython modules?

#

Is that the main thrust of the effort? Or is there something more fundamental I'm missing

#

I'm new to this, so just trying to understand the differences better... not trying to cast stones 😃

manic glacierBOT
raven canopy
#

no pardon necessary, and no perceived stones being casted. I could attempt an accurate comparison, but there are people who could explain it better. Scott (@ tannewt; project lead) recently did an interview that has some good discussion on the subject: https://theamphour.com/383-an-interview-with-scott-shawcroft/

onyx hinge
#

so I'm looking at https://github.com/adafruit/circuitpython/issues/689 and .. where is the initial filesystem actually built? Some grepping in circuitpython.git didn't find it for me. (I mostly looked for files named main.py...)

drowsy dagger
#

@raven canopy thanks I'll check it out!

raven canopy
#

@onyx hinge it's all built from the Makefile in each port's top directory. There are also a few py scripts that gather/package things.

manic glacierBOT
onyx hinge
#

@raven canopy OK, I'm familiar with running 'make' in ports/atmel-samd, but where is it pulling the initial content (like "main.py") from?

idle owl
#

There is no initial content. The board has an empty boot.txt with some info in it and that's it.

onyx hinge
#

@idle owl ah so when my board arrived with content on it, that was due to some other step at adafruit other than uploading the .uf2 or whatever process they follow

idle owl
#

Some of the boards ship with content, and updating doesn't erase this content. However, a fresh install on an empty board will have no content.

#

Yep!

onyx hinge
#

I had noticed that upading the circuitpython with the uf2 method didn't cheese my main.py so that all makes more sense now!

idle owl
#

The boards ship with demo content, which is usually available for download somewhere.

#

😃

#

Be aware, that sometimes it will erase the board, so always backup. But most of the time, you can update and it doesn't remove any of the files or code.

onyx hinge
#

.. which makes me worry what my testing procedure for a issue 689 patch would be

idle owl
#

Oh

#

Ok so we have a flash eraser, that works on the Express boards (so the ones with SPI flash). You can run that to completely erase the board. Then when you load a .uf2 on it, it will be a clean flash of CircuitPython

onyx hinge
#

My board happens to be a Trinket M0

idle owl
#

Ok we have a tiny one for those as well, if I remember correctly.

#

Let me get the link

raven canopy
#

thanks for picking up my slack @idle owl. had to step away for a sec. 😄

idle owl
#

@onyx hinge This will erase the entire board, so backup the demo content if you want to keep it easy to get to.

manic glacierBOT
idle owl
#

This is for when your board gets corrupted but for what you're doing would start you with a clean board.

#

Basically it writes the whole thing with 0s, I believe.

#

Hmm, it works a little differently than the one for the Express boards. Trinket M0 is not an express board.

#

So hopefully it does what I am saying it does, and will work for you 😄

#

Because the Express board flash eraser doesn't dump it back into the bootloader automatically, and I'm not sure if, since the non-express version does put it back into the bootloader, if MacOS will have time to dump those files on there before CircuitPython is loaded. I believe flashing CPy will nuke anything Mac adds, but I'm not certain.

onyx hinge
#

@idle owl thanks that helps. And I found in ports/atmel-samd/supervisor/filesystem.c where it potentially calls f_mkfs

#

It's late in the local time so I think I'll call it a day instead of risking the precious program in my circuitpython board while tired. Thanks for your help and time @idle owl and @raven canopy !

idle owl
#

You're welcome @onyx hinge! Have a good night!

raven canopy
#

you're welcome! night!

manic glacierBOT
#

I wonder how this will interact with the process done at adafruit that loads the initial content onto the flash filesystem; is putting this circuitpython the right thing?

I have a compile-tested patch, but haven't run it on a device.

diff --git a/ports/atmel-samd/supervisor/filesystem.c b/ports/atmel-samd/supervisor/filesystem.c
index 45dc5667b..8819e45cb 100644
--- a/ports/atmel-samd/supervisor/filesystem.c
+++ b/ports/atmel-samd/supervisor/filesystem.c
@@ -66,6 +66,11 @@ void ...
solar whale
#

@drowsy dagger FYI - Mircopython is supported for the ESP32: precompiled images are here: https://micropython.org/download/#esp32 Note, these do not yet support BLE.

manic glacierBOT
#

Since putting the initial content on the board requires that the FS be present, this section of the code should not get run after the demo scripts are loaded. It will only get run if the FS is being recreated. If the demo code were there, it would get wiped anyway.

Just a few thoughts as to adding this to all builds. I am not convinced it is the right thing to do. MacCOS users are a subset of the users. On the smaller system, Trinket_m0, Gemma_m0 will this take a "node" out of service res...

manic glacierBOT
#

I think my patch above is probably missing a call to flash_flush(), and/o the old call should be moved below the file creation.

I don't actually have a MacOS machine to test, I just picked up this issue because it "looked easy" and was tagged accordingly :wink:

According to 'df' running on my Linux machine, creating a zero-byte file in the root of the filesystem doesn't consume any blocks of storage. However, it does take one away from the total number of files that can be created; the...

slender iron
manic glacierBOT
#

I think this is worth it because non-Mac users can always delete the file to recover the entries. Its way more difficult for a Mac user to delete all the extra files made the very first time its plugged in.

@jepler I don't think you need to actually test with Mac. I use it, added that file and it prevented the indexing.

When I'm testing this code I usually force the if statement to be true. (Back up your files first!)

slender iron
#

@onyx hinge thanks for the PRs!

manic glacierBOT
drowsy geyser
#

Someone is on a commit roll....

slender iron
#

yeah, morning is time to go through emails

#

skimming the new hackspace now though...

drowsy geyser
#

Sooo, I'm trying to help @idle owl with her CircuitPython I2C guide and I can't load her program onto a Trinket M0. I get an "insufficient space" message. My Trinket is a bare system running 3.0 Alpha 3 from one build ago. There's just no space for the program. Is there a way to create a stripped firmware so there will be more space in the flash?

slender iron
#

are you on mac?

drowsy geyser
#

Winderz 10

slender iron
#

hrm, I think it might be a bug

drowsy geyser
#

Oh? I assumed it was just a lack of knowledge on my part!

slender iron
#

are you trying to load a single file?

#

I ran into this yesterday with my samd51 oven board when trying to copy the bundle over

drowsy geyser
#

Yes, drag and copy one 60k python file. The OS is telling me there's only 47k available on the device.

slender iron
#

oh jeez

#

why is it 60k?

#

its 64k before the filesystem is added

drowsy geyser
#

Not sure - that's the Python source Kattni pointed me to.

#

Hmmmm, ok.

slender iron
#

that seems too big to me

drowsy geyser
#

Yes, just checked. Windows says the file is 60 kb.

#

Ok, I'll read the file and make sure it makes sense.

#

Thanks!

slender iron
#

np

#

(one quick fix can be replacing spaces with tabs) but thats a pretty big hack

drowsy geyser
#

Oh dear....

onyx hinge
#

The actual project I did with a Trinket M0 used the analog comparator modules to directly read 1.5V-referenced signals with no external components needed (a super neat trick, analog modules in modern chips are amazing!). I had to do it in C/Arduino instead of in CircuitPython, because there doesn't seem to be a nice interface to this facility. And also because it essentially the slave side of a unidirectional SPI, I'm not sure the speed would have been adequate.

Anyway, long story short, am I overlooking an analog comparator interface in CircuitPython? If not, does anybody have feelings about how one would look? It seems like you would want a few different classes, single-ended comparator to reference voltage, window comparator to two reference voltages, and analog comparator as differential decoder. All are possible with the T M0's analog comparator block.

slender iron
#

@onyx hinge I've never used it so I'm not sure how to guide you. Adding a new built in module for it would be good though

#

@tulip sleet did you get your metro today?

timber mango
#

What's the usual routine for obtaining the very latest code for Circuit Python, prior to a rebuild? Are there makefile targets? git commands?

slender iron
#

git pull master

#

my adafruit remote is called adafruit so I usually do git pull adafruit/master

timber mango
#

I don't know what a remote is in this context.

onyx hinge
timber mango
#

This:
git submodule update --init --recursive
is in the Vagrantfile. Seemed to be needed after a git clone of the circuitpython repository.
Does that get updated with the git pull master ?

#

I use git every day. ;)

onyx hinge
#

@timber mango 😉 me too

#

short answer, no, "git pull" won't change any file content within submodules, at least by default. A "git submodule update" is advised if the "pull" has changes to the submodules.

#

(I still haven't personally achieved a level of comfort with git submodules that lets me confidently explain them... 🙁 )

tidal kiln
#

@timber mango remote = a repository on a git server somewhere

timber mango
#

All I need to know (I think I parsed your last, okay) is if it's typically required to worry about the submodule stuff -- it all looks like its from outside sources irrelevant to CircuitPython development.

onyx hinge
#

@timber mango You DO need to have the submodules there, at least to build some of the things. But I suspect that most of the time they don't need care and feeding every day. You might put it in your list of steps to try when something isn't working, because doing a git submodule update --init --recursive shouldn't hurt anything,

timber mango
#

@tidal kiln so he's not pulling from the canonical source tree that I am pulling from. But by virtue of changing his current directory to the code he wants to update, he doesn't get an out and has tp spell it out, because he frequently pulls from multiple places, and therefore must be more explicit?

tidal kiln
#

yes (i think)

#

you can have more than one remote, so you would need to name them to disquish them (for when you push/pull commits)

timber mango
#

@onyx hinge This sounds like enough to go on. I'll capture what all three of you has said, to disk in my noteook thingie. ;)
My goal is simple: If I test something for a developer, they'll be able to trust I'm building on the correct source tree, including all updates.

tidal kiln
#

if you just have one remote, and you just use the default name, then generally don't need to specify it

timber mango
#

@tidal kiln a qualfied yes is fine there -- I think I made small errors in concept and statement of them. ;) Haha. More simply: I generally only push or pull from my own one repository, or clone from a public one.

#

I think makefile targets would be easier. Maybe they're not so portable across multiple operating systems.

#

'make source-update' or similar would work for me. ;)

solar whale
#

@timber mango when I just want to keep up to date with the master, I just do a git pull git submodule update --init --recursive works for me

timber mango
#

Thanks @solar whale that sounds succinct. I'm going to see if I can construct a simple Makefile for common tasks. There's a vacuum there, or I'm not understanding something. ;)

solar whale
#

@drowsy geyser Did you try making a .mpy of that large .py file?? Still may run into memory allocation issues once you get it on the trinket.

drowsy geyser
#

I actually have no idea how to convert .py to .mpy....

solar whale
#

can you build CP 3.0 on your system?

drowsy geyser
#

Yup.

#

In fact, I have a fresh build to flash on all my boards... Thanks for the reminder!

solar whale
#

/path/to/circuitpython_master/mpy-cross/mpy-cross script.py

#

if you do it in master it will be 3.0

drowsy geyser
#

Oh cool! That doesn't seem too terrible. 😃

#

Thank you!

solar whale
#

NP

timber mango
#

Very simple Makefile to implement @solar whale 's procedure. TESTED on another repo (not circuitpython). Behaves as expected. 'all' may not be the best choice in target names.

#

I gotta rename that -- saves as a binary!

solar whale
#

I'm happy to just type it in 😉 make scares me....

timber mango
#

make is sweet. I used it to concatenate files on my web server (serving hard documents stored as files).

solar whale
#

It is a great tool, but a slippery slope to very complex configurations ... If you start suggesting using autoconf and automake, I'm outtta here... 😉

timber mango
#

I don't know how to do any of that. I have the (now very old) Make book from O'Reilly.

solar whale
#

another project I use (RTEMS - real-time OS) relies heavily on a very complex build system that I cringe at every time I have to use it)

timber mango
#
all:
        @git pull
        @git submodule update --init --recursive
#

That's the entire Makefile I just posted. ;)

solar whale
#

I can handle that! 😉 thaks for the suggestion.

timber mango
#

NP. I think of this kind of Makefile as an executable notebook of commonly typed commands. 'make all' does what it looks like it does. Or I can just look at the Makefile and type the commands it lists for the 'all' target, one by one.

solar whale
#

Agreed - I use make a lot as well and I was just teasing. I have also seen it get so it is very hard to follow. Seems counterproductive if the mkaefile is more complex than the code it is building!

timber mango
#

I think many programmers are found to be letting their inner Baroque run wild, at times. ;)

#

example: sendmail (hehe)

#

I need a quick microphone check. I'm in 'General' voice chat room.

solar whale
#

just a sec - no mic on taht machine!

timber mango
#

haha.

#

Thanks! I love this mic. Astatic 1104c.

manic glacierBOT
#

@tannewt, by changing the line to your suggested...it didn't do anything different. still 3 calls to read_complete but only printed out 128 characters.

When I was disabling 'in function' calls to start_read, I was trying to see if any of them were stepping on each other, in addition to seeing if usb_bytes_available would keep the wheel rolling. Oddly, it reduced the instances of read_complete from 3 to 2, but still produced the same 128 characters.

Baffling is the only word I ca...

raven canopy
#

@tulip sleet am I correct in remembering that you have a Beagle USB analyzer? At this point in my debugging, I think the only pieces I can't verify are what is actually happening with the control and endpoint transfers...

idle owl
#

Interesting. If you have a main.py and a code.py, Mu won't open either automatically. You can load it manually, but when you open it, it doesn't load it. If you have only one, it loads it automatically on opening.

onyx hinge
#

speaking of editor trouble, I need a way to teach vim not to write its "swap" files on the CIRCUITPY volume...

humble mural
#

@idle owl thanks for mentioning that. I was telling my students to only use one and if they must have more than one file in the CPX to rename the but if they had a main.py and a code.py main.py would take precedence. I need to correct that. Thanks

onyx hinge
#

@humble mural @idle owl sounds like an argument could be made to improve Mu's default behavior. Opening main.py would almost always be what you want.. (I'm not a Mu user, mind you)

idle owl
#

Well it would need to be updated to read the files in the same order as CircuitPython does, as CP will read multiple files, but only one at a time in a certain order.

#

But yes, it's worth suggesting.

humble mural
#

@onyx hinge Frankly, not a big issue imo. If you just follow the policy of keeping only one as a naming convention you’re good

idle owl
#

CP will run only one of the following, in the following order: main.txt, main.py, code.txt, code.py. As in code.py takes precedence over all of them.

humble mural
#

I’ve been meaning to ask about that. What does the CPX doe with a .txt file???

idle owl
#

It's left in there in case someone new to everything doesn't have a code editor that understands .py files

#

We suggest code.py to be the file name you go with in the end, but main.py works just the same. However, again, if you have both, it will run code.py instead.

timber mango
#

@onyx hinge the -n switch to vim does .. what?

humble mural
#

@timber mango that’s a tough one

idle owl
#

@humble mural Did that answer your question or did you need something more specific?

#

About the .txt

humble mural
#

@idle owl that makes sense, thanks. I’m just not sure how it would get processed. So you plug in the CPX via the USB, you don’t have Python or Mu installed, it wants to open the default .txt editor

idle owl
#

And it might not want to open a .py file

timber mango
#

What I meant was, it works for me and has for more than a decade. I used to find the swap files annoying, so I always (always) use the -n switch with vim.
Can't figure out how that's not doing what it should do, if it's behavior can be described as:
writes its "swap" files on the CIRCUITPY volume

idle owl
#

so you could create code.txt, put CircuitPython code in it, and the board will run it.

humble mural
#

Ohhhhhhh

#

That is cool

idle owl
#

😃

timber mango
#

Amazon Kindle treats .txt as .html for many purposes. ;)

humble mural
#

You guys thought of everything

#

Forgive the slight digression of topic

idle owl
#

No, it's all good! That looks awesome!

raven canopy
#

That's Thomas' helmet right? I can never remember which one is Thomas and which one is Manuel's...

humble mural
#

Yes, with the Bluetooth controls

raven canopy
#

and yes. looks great! ✨

humble mural
#

Thanks. The kids want to add one of the CP boards to add sensors and a small display to show the data from the sensors. We’ll figure it out

timber mango
#

I don't understand this daft punk business.

humble mural
#

I don’t either. But 3D printed helmets with neopixles, Bluetooth and CP board to control sensors is very cool

manic glacierBOT
humble mural
#

@timber mango at least you knew it was Daft Punk, I call d it Daf punk

timber mango
#

I don't think I could hide my disdain in a classroom setting. ;) There'd have to be an implementation that (by process n, which is not described in the litetrature) .. somehow gained my interest (or respect). ;)

#

Fibreglas helmet for pilot augmentation of a vehicle, that might do it. ;)

humble mural
#

@timber mango I’m on my phone and I don’t know how to give you a double thumbs up. Consider it given!

timber mango
#

;) Yeah SKR is in a class by himself. He's still doing stuff like this, plus or minus the QRM. ;)

humble mural
#

I’m going for a nap, bbl.

manic glacierBOT
idle owl
#

So... I built for my M4, loaded the uf2, and no CIRCUITPY.

#

I did a pull right before it, submodule update etc.

#

@slender iron Is CP not ready for the most recent board? Or do I need to troubleshoot

slender iron
#

the green one?

idle owl
#

Yah

slender iron
#

you can help me test 😃

idle owl
#

Sounds good!

slender iron
#

let me push my changes

idle owl
#

do I need to figure out checking out a specific branch or are you pushing to master

slender iron
#

it'll be to a branch of mine

idle owl
#

Ok, I'll need help getting that figured out again. I've done it before but only once or twice.

slender iron
#

k, np

idle owl
#

I have an old clone of yours, should I start fresh

slender iron
#

do you have my remote?

idle owl
#

oh

#

might not be using ssh though, let me check

slender iron
#

(git remote -v)

idle owl
#

oh on my main circuitpython clone?

slender iron
#

you don't need a separate clone, just another remote on your circuitpython repo

#

ya

idle owl
#

ok

slender iron
#

they are all related

#

(this is why I name them after the github user)

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

is my remote -v

slender iron
#

kk, git remote add tannewt <my github url>

idle owl
#

without the tree/latest_m4 on it I assume?

slender iron
#

correct

#

I just copy it off of github for master

idle owl
#

yah I did that

slender iron
#

k then git fetch tannewt

idle owl
#
kattni    git@github.com:kattni/circuitpython.git (push)
tannewt    git@github.com:tannewt/circuitpython.git (fetch)
tannewt    git@github.com:tannewt/circuitpython.git (push)
upstream    git@github.com:adafruit/circuitpython.git (fetch)
upstream    git@github.com:adafruit/circuitpython.git (push)
#

ooh fancy

slender iron
#

then you can checkout git checkout tannewt/latest_m4

idle owl
#

oh neat

slender iron
#

this flash chip hates me

idle owl
#

hmm

#

so now do I build?

slender iron
#

yeah

#

if you don't want to be in "detached head state" you can create your own local branch git checkout -b my_latest_m4

#

(fyi its still not working for me)

idle owl
#

ok

#

building.

#

I have CIRCUITPY

slender iron
#

nice!

#

I may be clocking the flash a little fast. I may need to slow it a smidge

idle owl
#

I got overly excited and tried to do 3 things at once and now it's not happy...

slender iron
#

whats it doing?

idle owl
#

Purple LED, screen crash/disconnected, lib folder copy hung.

#

and no CIRCUITPY anymore on reset.

slender iron
#

that sounds like a crash

idle owl
#

Let me try that over again one step at a time.

slender iron
#

👍

idle owl
#

Ooohh..... goes to bootloader, copy firmware.uf2, goes to purple LED.

#

no CIRCUITPY.

#

Woops.

slender iron
#

can you hook up the debugger?

idle owl
#

Yep.

#

I need to install everything, haven't run it on this machine yet.

#

Download it from Segger's site?

slender iron
#

ya

idle owl
#

ok

raven canopy
#

@idle owl you want a link to the guide? i have it bookmarked...

slender iron
#

now mac is ignoring my device....

idle owl
#

ok downloaded.

#

Are you using command line or Ozone? I had Ozone last time. This is sort of coming back to me

slender iron
#

command line

idle owl
#

ok then follow the guide @raven canopy mentioned? Or do you have steps for me to do

slender iron
#

the guide is good still I think

idle owl
#

@raven canopy link would be great 😄

#

still brew install open-ocd?

#

Did that.

slender iron
#

nah, you have jlink instead

idle owl
#

Connected, waiting for GCB connection...

#

oh

#

ok heh

#

Sitting at this state.

slender iron
#

you'll need to run gdb

#

my guess is that I'm clocking the spi flash too fast

#

so load with gdb, run and then see if you can get to purple neopixel

idle owl
#

with this? arm-none-eabi-gdb-py build-metro_m4-express/firmware.elf ?

#

sorry, I don't remember loading with gdb.

slender iron
#

yup!

idle owl
#

in a different window or in the jlink window?

slender iron
#

different one

idle owl
#

ok thought so

slender iron
#

I do a different tab

#

jlink just runs in the background

idle owl
#

ok I have a gdb prompt

slender iron
#

k, tar ext :2331 to connect, then load, mon reset and continue

idle owl
#
localhost: unknown host
:2331: No such file or directory.```
slender iron
#

and jlink is running?

idle owl
#

yes Connecting to J-Link... J-Link is connected. Firmware: J-Link V10 compiled Mar 2 2018 17:07:17 Hardware: V10.10 S/N: 50112632 Feature(s): GDB Checking target voltage... Target voltage: 3.30 V Listening on TCP/IP port 2331 Connecting to target...Connected to target Waiting for GDB connection...

slender iron
#

weird!

idle owl
#

😄

slender iron
#

on mac?

idle owl
#

yes

slender iron
#

huh

idle owl
#

GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git

#

is that right?

#

I don't know, guessing here.

slender iron
#

thats what I'm using

idle owl
#

reconnected and that didn't help.

#

well reran the gdb command I mean

slender iron
#

I've never seen a cannot find localhost error

idle owl
#

interesting.

slender iron
#

do you use a proxy?

idle owl
#

no, haven't ever even installed it on this machine

#

I have a network filter that I just stopped

#

did not resolve the issue.

#

Unless there's something installed in the network hardware I don't know about, checking

#

nope

slender iron
#

I have no idea. it didn't look like a gdb problem

idle owl
#

Troubleshooting.

timber mango
#
$ cat /etc/hosts | sed 1q
127.0.0.1       localhost
slender iron
#

its working for me now that I removed the saleae clips 🙄

timber mango
#

It might be a little touchy.

slender iron
#

@idle owl try that file

idle owl
#

Purple LED.

manic glacierBOT
slender iron
#

weird!

#

mines working just fine but it could be a filesystem issue

#

any flashes happen before the purple led?

idle owl
#

There's no audioio in the Gemma 2.2.4 build?

slender iron
#

I think its express only

idle owl
#

D13 flashes a bunch, then I get one red flash on the NeoPixel and then it goes purple

#

So you can't use rtttl on Gemma then. Correct?

slender iron
#

not sure, I think brent added pwm tone support to it

#

I wouldn't expect D13 to flash

#

I wonder if the bootloader is broken

#

I was loading via gdb

#

maybe thats the test code still

idle owl
#

hmm

#

still trying to figure out the issue with gdb... failing to find anything

#

must be a mac issue with localhost that I don't understand

slender iron
#

¯_(ツ)_/¯

#

we'll see what happens for limor

#

k, time to make dinner