#circuitpython-dev

1 messages ¡ Page 152 of 1

raven canopy
#

@idle owl sweet! PR inbound...

solar whale
#

@vague monolith - I foolisly tried to upload once as root - it failed, but may have created the dir name METROM4BOOT owned by root.

#

I did not think to look for it.

vague monolith
#

@solar whale why are you using a root account?

pastel panther
#

@errant grail where did you get your boards made?

solar whale
#

no - I was getting permission errors and tried using sudo.

errant grail
#

Express PCB for now. Need to move my component libraries to KiCad so that I can use other vendors.

vague monolith
#

@solar whale which distro are you using? perhaps your user doesn't have access to /dev/tts devices, but I came here late.

solar whale
#

@vague monolith - its all good now - I was just beeing foolish.

manic glacierBOT
#

@sommersoft I built this and tried it, but the use did not match the documentation:

>>> import supervisor
>>> supervisor.
__name__        enable_autoreload
disable_autoreload              set_rgb_status_brightness
Status
>>> supervisor.Status.serial_connected
True
>>> supervisor.serial_connected
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'serial_connected'
>>> 

Just doing `supervisor.serial_c...

solar whale
#

Im not sure how I initially ended up with a "stale" METROM4BOOT folder, but once I did, I confounded it by using sudo and makeing it a real local folder owned by root. Once I deleted it, the problem was resolved.

#

I was using the command line to copy th .uf2 to /media/user/METROM4BOOT so if there was an problem it created the folder locally. Next time I entered bootloader, it used METROM4BOOT1 - and I got confused.

idle owl
#

Pro tip: header pins belong in breadboards, not under your thumbnail.

solar whale
#

ouch

pastel panther
#

hey @solar whale I don't think I'm going to be able to get something to you till later tonight. Pulling in the 2x fixes didn't work so I have to hook up the jlink and poke some more, but I have to pick up dinner and hang with the fam before they leave town

#

@idle owl ow!

solar whale
#

@pastel panther no problem - I'm off to bed anyway -I've done eough damage for tonight.

pastel panther
#

hah ok

#

ttyl everyone 👋

solar whale
#

Be happy to try something when you have it

idle owl
#

Later @solar whale

solar whale
#

Good night all!

tulip sleet
#

@vague monolith if you're experienced with udev, I have a query for you

vague monolith
#

@tulip sleet ?

tulip sleet
#

@vague monolith usually getting to the UF2 bootloader will cause the ...BOOT drive to appear in a file manager (nemo, nautilus) and be mounted. However, sometimes the drive appears but is not mounted, and so then it doesn't show up in /media/<username>/...BOOT. . It's a UF2 drive, so it's simulated, doesn't have a bad dirty bit, etc. So I have to click on it in the file manager and it mounts, and then I can copy to it. So why would it sometimes not auto-mount?

#

I've done some research on this and haven't come up with a reason.

#

sometimes the CIRCUITPY drive doesn't mount either. Is that due to a previous error associated with the USB device or the port. Switching ports or rebooting I think clears the problem, but I haven't tested systematically.

#

as an example, I'm seeing that right now with a Metro M0 board

vague monolith
#

When the drive appears and isn't mounted, does dmesg have output showing errors?

#

@tulip sleet

tulip sleet
#

hold on, collectin the syslog text for you

vague monolith
#

This all should be handled by some sort of udisk wrapper

#

It could be an issue with the wrapper

timber mango
#

He probably has more permissive automount foo. I don't .. never learned how to do that. So mine never (Ever) automount. I have to click on fooBOOT or CIRCUITPY to mount, in nautilus. Every time. Debian.

tulip sleet
#

trying to make it short enough to paste

vague monolith
#

@tulip sleet I did find a tool for exploring the dbus messages would help debug more than syslog

tulip sleet
#
Feb 27 22:45:54 salmonx kernel: [...] usb 1-1.4: USB disconnect, device number 126
Feb 27 22:45:54 salmonx kernel: [...] usb 1-1.4: new full-speed USB device number 127 using ehci-pci
Feb 27 22:45:54 salmonx kernel: [...] usb 1-1.4: New USB device found, idVendor=239a, idProduct=0013
Feb 27 22:45:54 salmonx kernel: [...] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Feb 27 22:45:54 salmonx kernel: [...] usb 1-1.4: Product: Metro M0
Feb 27 22:45:54 salmonx kernel: [...] usb 1-1.4: Manufacturer: Adafruit Industries
Feb 27 22:45:54 salmonx kernel: [...] cdc_acm 1-1.4:1.0: ttyACM0: USB ACM device
Feb 27 22:45:54 salmonx kernel: [...] usb-storage 1-1.4:1.2: USB Mass Storage device detected
Feb 27 22:45:54 salmonx kernel: [...] scsi host6: usb-storage 1-1.4:1.2
Feb 27 22:45:54 salmonx kernel: [...] hid-generic 0003:239A:0013.00C0: hiddev0,hidraw2: USB HID v1.00 Device [Adafruit Industries Metro M0] on usb-0000:00:1a.0-1.4/input3
Feb 27 22:45:54 salmonx mtp-probe: checking bus 1, device 127: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4"
Feb 27 22:45:54 salmonx mtp-probe: bus: 1, device: 127 was not an MTP device
Feb 27 22:45:55 salmonx kernel: [...] scsi 6:0:0:0: Direct-Access     Metro M0                  1.00 PQ: 0 ANSI: 2
Feb 27 22:45:55 salmonx kernel: [...] sd 6:0:0:0: Attached scsi generic sg3 type 0
Feb 27 22:45:55 salmonx kernel: [...] sd 6:0:0:0: [sdc] 8000 512-byte logical blocks: (4.10 MB/3.91 MiB)
Feb 27 22:45:55 salmonx kernel: [...] sd 6:0:0:0: [sdc] Write Protect is off
Feb 27 22:45:55 salmonx kernel: [...] sd 6:0:0:0: [sdc] Mode Sense: 0f 00 00 00
Feb 27 22:45:55 salmonx kernel: [...] sd 6:0:0:0: [sdc] No Caching mode page found
Feb 27 22:45:55 salmonx kernel: [...] sd 6:0:0:0: [sdc] Assuming drive cache: write through
Feb 27 22:45:55 salmonx kernel: [...]  sdc:
Feb 27 22:45:55 salmonx kernel: [...] sd 6:0:0:0: [sdc] Attached SCSI removable disk
timber mango
#
$ pwd;ls;cat 90-extraacl.rules 
/etc/udev/rules.d
70-persistent-net.rules  90-extraacl.rules  98-openocd.rules
KERNEL="ttyUSB[0-9]*", TAG+="udev-acl", TAG+="uaccess", OWNER="chris"
KERNEL="ttyACM[0-9]*", TAG+="udev-acl", TAG+="uaccess", OWNER="chris"
tulip sleet
#

yes, I went down the udevadm rathole for a while but didn't really come up with anything

#

@timber mango it's not a permission issue, because it mounts somtimes

vague monolith
timber mango
#

I think Tony prescribed those rules in the 'building micropython' guide of olde. ISRT that I followed a recipe.

tulip sleet
#

@vague monolith - that looks like it's going to be extremely helpful -- I was looking for some kind of writeup like that, which didn't seem to exist.

#

thanks!

vague monolith
tulip sleet
#

you can see in the syslog stuff there's no obvious error -- it always looks like that, so there's some state somewhere I can't see

vague monolith
#

Most of the document is his output it's not really 18 pages of info

tulip sleet
#

@vague monolith I'll bookmark those and read them later -- thanks again. it's a small annoyance but mysterious

timber mango
#

I'll try to pay attention to what happens when I plugin the USB for /dev/ttyACM0

manic glacierBOT
#

Ok, repo folder is created, all relevant code has been copied over and renamed to CircuitPython_** where ** is the concept we're covering - this can obviously be something different if you want. I have updated code for DigitalIO. I'm waiting until we've discussed things and finalised the images, etc, before I try to update the explanation content in the guide.

I had an idea, regarding the code for the DigitalIO example specific to CPX. If we use D7, we either call it button and we ad...

timber mango
#
Feb 28 04:08:58 laz kernel: [4289332.944017] sd 1644:0:0:0: [sdb] Attached SCSI removable disk
Feb 28 04:09:20 laz kernel: [4289355.049296] FAT-fs (sdb1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
Feb 28 04:09:20 laz kernel: [4289355.098816] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Feb 28 04:09:20 laz org.gtk.Private.UDisks2VolumeMonitor[32545]: index_parse.c:191: indx_parse(): error opening /media/chris/CIRCUITPY/BDMV/index.bdmv
Feb 28 04:09:20 laz org.gtk.Private.UDisks2VolumeMonitor[32545]: index_parse.c:191: indx_parse(): error opening /media/chris/CIRCUITPY/BDMV/BACKUP/index.bdmv
Feb 28 04:09:20 laz org.gtk.Private.UDisks2VolumeMonitor[6390]: index_parse.c:191: indx_parse(): error opening /media/chris/CIRCUITPY/BDMV/index.bdmv
Feb 28 04:09:20 laz org.gtk.Private.UDisks2VolumeMonitor[6390]: index_parse.c:191: indx_parse(): error opening /media/chris/CIRCUITPY/BDMV/BACKUP/index.bdmv
tulip sleet
#

@timber mango main q is whether CIRCUITPY is mounted automatically (and same q for the ...BOOT drive for that board). It might not auto-mount if there are errors.

#

i.e. is it showing up in /media/<username>/<drive> or not?

#

but time for sleep now

#

BDMV is about Blu-Ray drives (??), so maybe you have some support for those enabled.

timber mango
#

Yeah CIRCUITPY never (ever) automounts on my Debian amd64 system. It's present, but I must click on it in nautilus (or use 'mount' at the command line) to mount it. When I do, I have the right permissions to write to it.
I tried (just now) installing 'usbmount' which mounted the target as /media/usb0 and required root permissions to modify main.py and friends.
Removal of the usbmount .deb restored the prior behavior (didn't cost me to give it a try).
goodnight Dan. ;)

manic glacierBOT
#

Holy moly! I totally forgot to update the documentation after I moved it from shared-bindings/__init__.c to Status.

With regards to putting this in Status, the decision was mostly based on possible USB enumeration & REPL detection (discussion in #544), and how the ports vary/will vary on how they handle any of that (Feather52 for instance, doesn't use USB CDC, and has additional REPL options vice SAMD). The fact that all the functions in shared-bindings/__init__.c are SAMD specif...

raven canopy
#

alright...calling it. 💤 till tomorrow 🦉s

pastel panther
#

night duder

pastel panther
#

hey @slender iron I think I found a bug with the itsy bitsy's hardware

#

it looks like the clock pin of the dotstar is wired to pin 1/PA00 which can't be used as a SCK because it can only mux to sercom 1 pad 0 and SCK has to be on pad 1 or 3 for the SAMD21

#

This just means that it has to be bitbanged; not the end of the world but 🤷

solar whale
#

@slender iron @tulip sleet so far buillt 3.0 master for itsybitsy_m0,trinket_m0,ESP8266, feather52840 and loaded onto boards - no problems other than known issue with dotstar on trinket_m0. minimal testing on esp8266, itsybitsy and tinket, just enteered REPL - tested dotstar on itsybitsy - tested i2c devices on M4 and feather52840 as well as SPI (SD Card) on feather52840 - no issues so far.

manic glacierBOT
frail geode
#

I've got a Metro M4 unit here and I can't reprogram from Arduino without doubleclicking the reset button. Any ideas? Expected behavior? (and once again, if there's a better channel for SAMD51 non-python stuff, sorry!)

solar whale
#

@frail geode I have been experiencing the same problem recently. This had been fixed for awhile, but may have been broken again with recent changes to the USB handling in CP3.0

#

@frail geode just to clarify - if you have an arduino sketch loaded, can you reload a new on without double tap?

#

I think I only have this problem if I have CP running and want to go to Arduino.

#

If it happening all the time (that is with arduino already loaded) then check taht you have the latest samd51 support installed.

frail geode
#

I think it is happening all the time, even if an Arduino sketch is already loaded, but I need to confirm.

#

I installed samd51 support from the Adafruit samd repository maybe a week ago.

#

Let me confirm and I'll be back tomorrow!

solar whale
#

I'll also confirm that I can upload without double tap if arduino already loaded. I know I could do it awhile back but not sure if I was able to do that a few days ago when I ran into the issue when CP3.0 loaded. I don't think the tools have changed recently.

frail geode
#

Yeah, I am not sure if it ever worked without the doubletap either.

tulip sleet
#

@frail geode @solar whale could you file an issue?

#

if there isn't one already?

#

@pastel panther the itsy bitsy pin choice may have been deliberate to maximize the available SERCOMs

solar whale
#

@tulip sleet I'll file one this evening after I verify the behavior.

#

@tulip sleet what is teh impact of the itsybitsy pin concern @pastel panther raised?

tulip sleet
#

@solar whale it just means we have to do bitbang.SPI to control the DotStar. I think there might even be conditional code to do that already.

solar whale
#

But I was able to use the dotstar with CP3.0 Master as is

frail geode
#

Thanks jerryn

tulip sleet
#

@solar whale did you use busio.SPI? Then maybe @pastel panther drew an incorrect conclusion. I haven't looked at it yet.

solar whale
#

let me check

manic glacierBOT
solar whale
#

@tulip sleet I just used this ```from board import *
import time
import adafruit_dotstar as dotstar
pixel = dotstar.DotStar(APA102_SCK, APA102_MOSI, 1, brightness=0.1)
#pixel.fill([1,1,1]) #fill is whole strip at once
pixel[0] = [0,0,255]
pixel.show()
time.sleep(60)

#

looks like it is using busio.SPI

#
def __init__(self, clock, data, n, brightness=1.0, auto_write=True):
        self.spi = None
        try:
            self.spi = busio.SPI(clock, MOSI=data)
            while not self.spi.try_lock():
#

that is in adafruit_dotstar.py

tulip sleet
#
        self._spi = None
        try:
            self._spi = busio.SPI(clock, MOSI=data)
            while not self._spi.try_lock():
                pass
            self._spi.configure(baudrate=4000000)
        except ValueError:
            self.dpin = digitalio.DigitalInOut(data)
            self.cpin = digitalio.DigitalInOut(clock)
            self.dpin.direction = digitalio.Direction.OUTPUT
            self.cpin.direction = digitalio.Direction.OUTPUT
            self.cpin.value = False

If ValueError (SPI not working), it falls back to GPIO (bitbang)

#

@pastel panther is correct about the pins, but we handle it with ease

solar whale
#

Oh! thanks for clarifying - sorry for the confusion.

#

clever code...

tulip sleet
#

The Arduino library handles both, but you have to know about the pins, iit looks like. This is better.

solar whale
#

makes it all look like magic to the uninformed - like me 😉

tulip sleet
#

well, I didn't know that off that bat -- had to read the code

pastel panther
#

@solar whale @tulip sleet That's interesting; I wouldn't have thought of that as an approach to save sercoms but it does seem like it would work, though it could be confusing (as it was to me)

#

@solar whale It looks like you're essentially taking control of the built in status dotstar. Is that an established use case? It sounds like it but I'm still trying to wrap my head around the code involved. I'm running into a case with my bitsy-ish m4 board now where I get an error if I try and use SPI on pins that share a sercom with the sercom that my dotstar is using, even if there is a spare sercom on the same pin. Like the check for if it's in use isn't working correctly.

solar whale
#

@pastel panther I was just playing with the built-in dotstar. Adding more confuison thatn help tp the discussion.

pastel panther
#

and now my CIRCUITPY is stuck read only

solar whale
#

are you on linux?

pastel panther
#

@solar whale No, not at all! The code for the status led and SPI is confusing so you letting me know about other valid code paths actually helps

#

no, OSX so similar but different

manic glacierBOT
solar whale
#

I often end up with drag.drop - read only, but can copy to the CIRCUTPY from command line. --- or else the FS is hosed and I have to wipe it!

pastel panther
#

for me it seemed to happen when I had CP stopped at a breakpoint, then continued again and tried to open a screen to the CDC

#

I'm going to reboot to see if that helps

#

ta dah!

#

well I can debug the code again but that doesn't mean I understand it!

#

🤦

#

it doesn't help that the variables I care about have been optimized out so I can't inspect them 😑

solar whale
#

the compiler can be so helpful at times.

pastel panther
#

some times you have to be the CPU

#

though I think even the m0 has a much larger cache than me

solar whale
#

can you "outsmart" the compiler by declaring those varialbles as "volatile" so it won't optimze or cache them? jsut a thought...

pastel panther
#

I tried that previously to some success, though I think I know the problem, just have to verify it

#

smart idea though; I didn't know about that tactic until I read up on it a while back

solar whale
#

sometime it works - sometimes it changes the flow enough to hide the problem too...

pastel panther
#

hey @slender iron do you have a minute for a SPI/dotstar question?

#

@solar whale, maybe you know this

#

if i have a typed pointed (say Sercom* sercom) and a void pointer (say void* hw) do I have to cast the void pointer to the type of the other to compare them correctly?

#

🏏

#

haha, that's the cricket emoji

#

silly commonwealth

solar whale
#

@pastel panther sorry - was away - I would just have to try it to be sure. Probalbly several times 😉

pastel panther
#

my testing says "no, that's not going to help"

#

I give up for now! The salary man/salt mine calls

slender iron
#

sorry @pastel panther I'm here now

#

you should be able to compare the two

timber mango
#

@tulip sleet

 $ pmount /dev/disk/by-label/CIRCUITPY 
 $ pumount /dev/disk/by-label/CIRCUITPY 

I found that iterating pmount and pumount restore the automount behavior (but for me, only in GNOME; ordinarily I run an .xsession and few GNOME daemons).

#

Debian shipped out of the box with GNOME enabled; I disable in the simplest way I know: run an .xsession file (and fluxbox). So GNOME is still installed and chafing at the bit; I just don't unleash it.

pastel panther
#

hey @slender iron I'm looking at line 60 in SPI.c; current master has it like so:

potential_sercom != status_apa102.spi_master_instance.hw &&
``` which won't compile because  `status_apa102` no longer has a `spi_master_instance` member.

I replaced it with 

potential_sercom != status_apa102.spi_desc.dev.prvt &&

which seems correct based on the call later in `common_hal_busio_spi_construct` to `spi_m_sync_init` which sets `dev.prvt` to what was `sercom` 

int32_t spi_m_sync_init(struct spi_m_sync_descriptor *spi, void *const hw)
{
int32_t rc = 0;

ASSERT(spi && hw);

spi->dev.prvt = (void *)hw;

<clipped for brevity>

slender iron
#

yup yup

pastel panther
#

The problem I'm getting is that line 60 should be seeing that potential_sercom is the sercom used by the dotstar and continuing but it isn't

manic glacierBOT
pastel panther
#

I think maybe status_apa102 isn't refering to what I think it is? Maybe? That's the only thing I can think of at the moment

slender iron
#

@pastel panther hrm, have you tried using the debugger to see the values?

#

yeah, there is a lot of state to check there

pastel panther
#

refer to my previous comment about status_apa102 (or was it potential_sercom) being optimized out

slender iron
#

did you turn off lto?

pastel panther
#

?

slender iron
pastel panther
#

ah, good to know. Does it change what gets optimized? The last time I tried optimization off it didn't fit anymore

#

I think I messed up with how I declared status_apa102; Previously I think it was brought in by including rgb_led_status.h that file is no longer included so to get it to compile I haphazardly/blindly called it extern busio_spi_obj_t status_apa102; which got it to compile but I'm thinking doesn't work

tulip sleet
#

I set variables to volatile, and sometimes do -fno-inline, without having to lower the optimization level.

pastel panther
#

I just included it as such and it compiled though I can't test it because I'm at work now.

#include "supervisor/shared/rgb_led_status.h"
#

unfortunately I haven't done any C since just before I dropped out to work so 50% or more of my coding is "does this compile?" "ok, now does it work"

#

I swear I kinda understand! I paid attention in class!

manic glacierBOT
#

How about renaming the supervisor module to circuitpython and making a Supervisor class and supervisor singleton (just like cpu)?

I wonder about permanently branding it that way, in case someone wants to fork. So would serial_connected be circuitpython.supervisor.serial_connected? How about the other supervisor operations? Is there anything directly under circuitpython?

Maybe put some of this under board instead? board.set_rgb_brightness(), board.serial_connected? That lo...

raven canopy
#

^^^ what have I started, and gotten myself into? Hahaha. 😰

pastel panther
#

siddacious pats your head and tells you everything will be OK

idle owl
#

@raven canopy Welcome to development!

raven canopy
#

resists urge to purr

manic glacierBOT
pastel panther
#

siddacious scratches behind your collar

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 3\.0\.0\-alpha\.2
prime flower
#

YAY!

rich umbra
#

Is there a definitive list of CircuitPython Compatible boards ? Also curious which libraries have been confirmed compatible.

idle owl
rich umbra
#

@idle owl Thank you!

pastel panther
#

Kattni! Savior of the Universe!
(sung to the tune of "Flash" by Queen)

idle owl
#

@tawny creek You win. I couldn't find a good emoji!

tawny creek
#

haha! the theme tune is catchy 😃

errant grail
#

Fantastic ear-worm, @pastel panther ! Thanks! 😬

pastel panther
#

fwiw I did it to myself as well 🔊 😬 🔊

manic glacierBOT
heady dove
#

I am having a heck of a time ....
I have been working on a Feather Huzzah 8266 board
My main machine is a Dell OptiPlex 755 running Ubuntu 16.04 LTS
I also have a Mac Mini as well
I had 2.2.3 installed
I continue to be able to communicate with the Huzzah via ampy
I had been having no issues getting a REPL via screen
recently (and I can't pinpoint a event where things changed) if I
screen /dev/ttyUSB1 --baud 115200 (ttyUSB1 is sometimes ttyUSB0, depending)
In response I get a blank "screen" screen, the only way out of which is pulling the USB cable
This happens on both my Ubuntu machine and my Mac Mini
After a chat with one of Discord's CP helpers one thought was to go back to 2.2.1 I have done that yet the problem persists.

In frustration I decided to work on a CPX project
(https://learn.adafruit.com/circuitplayground-minecraft-gesture-controller/overview)
I was able to screen into the device (screen /dev/ttyACM0 --baud 115200)
I also was able to inspect the 2.1M drive created by the CPX
I decided to just download the code and drop it into my CPX
Nothing seemed to happen, so I screened inagain and did a ctrl D, saw that I had neglected to add the libs required, I downloaded those and extracted them to the CPX
I rebooted the CPX
The 2.1M drive did NOT reappear, and I am unable to screen into the device
Any thoughts oh great collective mind?

tidal kiln
#

@heady dove was that on mac or ubuntu with the CPX?

heady dove
#

@tidal kiln I did it originally on teh Ubuntu machine, after I took it to the MAc and a drive never appeared there either

#

@tidal kiln I downloaded the newest .UF2 and reinstalled it, still no drive

tidal kiln
#

so it still gets into bootloader ok?

heady dove
#

@tidal kiln yes it does

tidal kiln
#

"I downloaded those and extracted them to the CPX" <-- describe how you did this more

heady dove
#

@tidal kiln clicked "newest release, cleck the appropreiate fle, after down load I opened it in Archive Manager, extracted directly to the CYPLAYBOOT

#

@tidal kiln should I not extract directly to the device?

#

@wait a minute

#

that doesn't make sense

tidal kiln
#

CPLAYBOOT or CIRCUITPY?

heady dove
#

it's not a compressed file

#

so I just drag the file to the CPLAYBOOT directory

tidal kiln
#

that's the correct folder name, but you said CPLAYBOOT above

#

wait. sry.

#

CIRCUITPY

#

CPLAYBOOT is what you see when it's in bootloader mode

heady dove
#

I put an extra Y in the original post

#

after it copies I still have no 2.1Mdrive

tidal kiln
heady dove
#

I am refering to the Circuitplayground 2.2.3 UF2 file

#

I don't have a CIRCUITPY Drive.... thats what disappeared

#

I was attempting to go back to a"clean slate"

tidal kiln
#

and you're right, it's not a zip file, you can just download the .uf2 directly

heady dove
#

@tidal kiln Yes I extracted the lib folder directly from Archieve Manager to the CIRCUITPY directory, which may have caused my problems

#

@tidal kiln I'm getting really good at messing these things up

tidal kiln
#

huh. weird that archive manager even opened it. but yah, that could've done it.

#

if you can get back to CPLAYBOOT, then you can just try again

#

just drag the UF2 file over

heady dove
#

@tidal kiln well the library bundle is a zip

#

that was what I extracted to the CIRCUITPY drive

tidal kiln
#

correct. that's a 2nd step. once you've got a functional firmware install.

heady dove
#

it had been working, when I not longer had a CIRCUITPY drive after installing the lib folder, that is when I attempted to reinstall the firmware

tidal kiln
#

ok. see if you can recover by simply dragging the UF2 over to CPLAYBOOT

#

(we'll worry about the library bundle next)

heady dove
#

@tidal kiln I have tried that twice so far

tidal kiln
#

filename = adafruit-circuitpython-circuitplayground_express-2.2.3.uf2 ?

heady dove
#

correct

tidal kiln
#

and you're doing this on ubuntu or mac at this point?

heady dove
#

just did it a thrird time, replete with another download

#

ubuntu

#

I can go try it on my Mac if you think I should

tidal kiln
#

nah. just wanted to make sure which one.

heady dove
#

the Mac is my "Music making machine"

raven canopy
#

@heady dove sorry you're still having the issue. @tidal kiln is a master troubleshooter, so you're in good hands with him.

heady dove
#

@tidal kiln so the drive is back, Thanks for the link

#

@raven canopy No worries, He is very good, we have chatted in the past

tidal kiln
#

@heady dove sweet. now go back to bootloader mode and see if you can drag adafruit-circuitpython-circuitplayground_express-2.2.3.uf2 to CPLAYBOOT

#

(guess that's like step 7 of what i sent also)

heady dove
#

@tidal kilnDone! and I extracted the lib forlder to my desktop and copied it to the CIRCUITPY folder

tidal kiln
#

so all good now?

heady dove
#

I believe so

#

at least with the CPX

#

still have to find a Feather Huzzah guru

tidal kiln
#

i haven't done much (any) CP on the ESP8266

#

"In response I get a blank "screen" screen,"

heady dove
#

no worries, you saved the day on the CPX, nice to know about the erase uf2

tidal kiln
#

could there be a script running? did you try <CTRL>-<C>

heady dove
#

I rm'd everything but boot.py from the drive

#

but let me try it

#

No ctrl C does nothing

#

it's weird that ampy works fine at the same baud rate, but screen just freezes

#

everyonce in a while and more often on the Mac, I get non displayable characters like it is a baud rate issue

#

and if I webrepl in I get a REPL prompt, but it seems to randomly generate ~N~M~r characters

tidal kiln
#

hmm. not sure on that issue.

heady dove
#

no worries

#

who is the resident esp8266 guru?

tidal kiln
#

there are better esp8266 ninjas here than me

slender iron
#

@heady dove did you type characters into the screen session?

heady dove
#

I type, but nothing displays

slender iron
#

hrm

heady dove
#

ctrl C doesn't interupt, it's "frozen"

slender iron
#

its just blank right?

heady dove
#

the only thing I can do is pull the USB cable which returns me to the commandline prompt

#

yes

slender iron
#

right

#

you can do ctrl-a k to kill screen as well

heady dove
#

that did indeed work

#

just tested it, I couldn't remember that command, though I knew it existed

slender iron
#

hrm, I've had it work after erasing and flashing

heady dove
#

it's weird, I can use both ampy and esptools, they all seem to work fine

slender iron
#

ampy works?

heady dove
#

yes

slender iron
#

but screen doesn't?

heady dove
#

correct

slender iron
#

hrm, have you tried screen right after a reset?

#

or have you done ampy before it?

heady dove
#

not exactly sure what you are asking

#

just reset and try screen?

slender iron
#

did you run any ampy commands before trying to connect with screen?

#

yeah

heady dove
#

I thinks, but I can try right now

slender iron
#

its possible ampy left the serial in a state that doesn't echo anything back

heady dove
#

so I just did a ampy ls ... it returned boot.py

#

now I'll do a reset

#

when I screened in

#

��Fܚ�L

#

was the resonse

#

response

slender iron
#

what was your screen command? garbage can occur when the baudrate is wrong

heady dove
#

and the screen is "frozen"

#

I hit return

#

screen /dev/ttyUSB1 --baud 115200
was what I typed at the command line

slender iron
#

I don't usually have --baud in mine

#

are you on mac?

heady dove
#

ubuntu

slender iron
#

ah

heady dove
#

lol

#

I have access to and have tried on my Mac

#

same results

#

I don'y have a Windoes machine

slender iron
#

is that the same port you give ampy?

#

can you try with screen /dev/ttyUSB1 115200?

heady dove
#

yes, sometimes it is ttyUSB0 depends

#

I typically ls the dev directory to see prior to ..

#

okay

#

holy moly!

slender iron
#

that work?

heady dove
#

sure did

slender iron
#

sweet!

heady dove
#

when did I start adding that ... hmm shooting myself in the foot again 😛

#

why do I hit my head against a brick wall ......

#

cause it feels so good when I stop

#

Thank you Sir!

#

can I ask one more question?

slender iron
#

yup!

heady dove
#

If I want to send data from an sensor over the wifi , how do I format the command

#

I'm using the lsm303 library

slender iron
#

thats a complicated question I don't have a good answer for

heady dove
#

okay can you point me at something to read?

raven canopy
#

@heady dove glad you're up and running again!

#

as far as sending info...where are you sending it to?

#

(note: my esp wifi experience is mostly Arduino...)

heady dove
#

a friend wants to send movement data to Ableton Live via Max for Live

#

I believe he said something about JSON ...?

#

which I think is some Java type thing..

#

he's going to open a socket and process the data

raven canopy
#

JSON is just a format, like XML. (though i think it did originate in the Java world)

#

which type of socket: TCP/IP or UDP?

heady dove
#

okay, I'm brand new to wifi and web stuff as far as ucontrollers is concerned

#

TCP/IP I imagine

#

but it hasn't been implimented yet, I'm newly unemployed and just started working on the project again after a year offf

slender iron
#

I think @solar whale has managed to do it but I don't know of any good tutorials

#

I think we'll do a proper polish job on wifi support with version 4 or 5 of circuitpython

heady dove
#

@slender iron Is it really that dificult to print data to the wifi port?

raven canopy
slender iron
#

yes

raven canopy
#

@slender iron all of micropython's wifi function is still in our build, isn't it?

slender iron
#

yeah, I think so

#

but I haven't looked at it

#

@heady dove I'd like to make it simple 😃

raven canopy
#

me neither. yet. 😄

slender iron
#

(the bot doesn't like lots of x)

heady dove
#

I was wondering what the heck that waas

raven canopy
#

dyno is very PG...

heady dove
#

dyno?

raven canopy
#

@heady dove for your side of the wifi, ignore the AP stuff. STA is short for station, which is the client side.

#

?whois dyno

digital shoreBOT
#
Dyno#3861
ID

155149108183695360

Nickname

None

Status

online

Game

None

Joined

Tue, Aug 8, 2017 6:12 PM

Join Position

None

Registered

Thu, Mar 3, 2016 10:07 PM

Roles

Dyno

Key Permissions

Kick Members, Ban Members, Manage Channels, Manage Messages, Manage Nicknames, Manage Roles, Manage Webhooks, Manage Emojis

Acknowledgements

The one and only...

raven canopy
#

dyno is "The one and only..." 😄

heady dove
#

wow, who knew

#

okay, so there isn't a explicit "port" to send data to, that goes over the wifi

slender iron
#

right

#

wifi is complicated because of networking protocols

raven canopy
#

nope. it just sends it over the broadcast. you'll need to use the socket library to send data to an IP

heady dove
#

so create a socket and send it to a IP

#

and format it as JSON, if that is what my buddy wants

#

I will investigate, thank you both so much, for getting me back on track

slender iron
#

👍

heady dove
#

I think I shoulld go make dinner 😛

raven canopy
#

yeah. i'm looking at circuitptyhon's esp8266 port...socket may be missing. i'll do some more digging, but you may end having to use mircopython instead. i'll ping you when i get a handle on it.

heady dove
#

I thought I used it, maybe not

raven canopy
#

also, micropython has a JSON module that could do the formatting for you (it isn't hard to do manually in small bits though)

heady dove
#

I'm working on three different platforms concurrently

raven canopy
#

haha. good times.

heady dove
#

well I am in way over my head, but I, sadly, have lots of time on my hands

#

so I muddle along, and I say it almost every time, this community is absolutely awesome

#

thanks again, you can be certain, I'll be back with more questions

raven canopy
#

we'll be here

manic glacierBOT
#

I am unable to upload an arduino sketch to my metro_m4_express_revb if I have previously loaded CP 3.0 to it and CP 3.0 is executing
I can upload successfully if I "double-tap" to put the M4 into the boot loader.
After loading an arduino sketch, I can load additional arduino sketches without first entering the boot loader.
I only have to manually enter the boot loader if CP 3.0 is loaded and executing.

Here is the entire build/load log for the blink.ino example - only the last bit is ...

solar whale
#

@frail geode @tulip sleet created issue for arduino upload to m4 - Note: I can repeatedly upload arduino sketches without manually entering bootloader. The only problem is if CP3.0 loaded then arduino sketch load fails as shown in the issue unless I manually enter the bootlaoder.

raven canopy
#

@heady dove found socket in circuitpython...you should be good to go. and of course jerryn shows up after you leave... 😄

slender iron
#

@solar whale its likely that the 1200 baud baudrate detection is broken

solar whale
#

ah - ok - just wanted to get the issue documented.

slender iron
#

thanks!

solar whale
#

@raven canopy is @heady dove all set?

#

I used a very simpl call to urequests.

raven canopy
#

he is once again interacting with REPL.

solar whale
#

OK - will wait until more questions are asked. I'm no expert on it. I can post to an adaftuit.io feed and that is it.

manic glacierBOT
manic glacierBOT
#

So I've taken some time to understand both of your points, and do some ponderin' and researchin'.

  • circuitpython.xxx: I agree with Dan on the branding piece. However, CircuitPython already has a number of deviations from MicroPython with respect to uncommon ports (and even within common chipsets [esp8266]). I don't think anyone wanting to fork and deviate would have much more issue than you all have had with that deviation. circuitpython would also prove a natural spot for future thin...
raven canopy
#

and with that GitHub novel...i think i'm taking the rest of the night off. but, i've said that before... 😄

manic glacierBOT
pastel panther
#

@slender iron Have you ever ran into trouble setting breakpoints and resetting after adjusting the -flto and -fno-inline flags?

slender iron
#

I don't usually mess with no-inline

#

what trouble are you having?

pastel panther
#

Previously I had no problem setting breakpoints in SPI.c for the duplicate sercom checks but when I commented out -flto it would set two breakpoints, presumably because it found two SPI.c files; I got more specific about the fie path and it seemed to find it but it wouldn't hit the breakpoint after resetting.

#

for example I tried

(gdb) break SPI.c:65
Breakpoint 1 at 0x25324: SPI.c:65. (2 locations)
``` and like it said it found two locations:

(gdb) info break
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
1.1 y 0x00025324 in common_hal_busio_spi_construct
at common-hal/busio/SPI.c:65
1.2 y 0x00027b42 in bitbangio_spi_make_new
at ../../shared-bindings/bitbangio/SPI.c:65

slender iron
#

thats ok

#

oh, wait

#

yeah two SPI.c files

#

are you on m4?

pastel panther
#

yea, my m4 board

slender iron
#

you can force a breakpoint by adding asm("bkpt"); into the code

#

its handy

pastel panther
#

ok, thats usefu

#

+l

#

is monitor reset the expected way to start over from the top?

slender iron
#

yeah I do it that way

pastel panther
#

that's what I've been using but I get the feeling sometimes it doesn't work

#

I saw that you can monitor reset 2 to use the reset pin to reset if you hooked it up but I don't know that it was successful

#

welp, I just read your gdb article again and answered a question I've had for a while regarding why I can't see variables. Wrong frame!

slender iron
#

info locals is helpful too

pastel panther
#

is 0x0 null/unset?

slender iron
#

yeah

#

unset would be anything

#

NULL is 0x0

pastel panther
#

hmm... i set an asm("bkpt"); and now I can't see to continue past it

slender iron
#

I usually just read the local state and then reset

#

I don't think I continue past it often

pastel panther
#

hmm.. maybe I'll have to rethink this. I'm trying to catch the state where my code.py tries to set up a spi object on a pin that can map to the sercom my dotstar is using (but obv shouldn't)

slender iron
#

you can always put an if around the bkpt

pastel panther
#

🤦

slender iron
#

k bedtime

#

goodnight!

pastel panther
#

night!

#

thanks for the help

slender iron
#

np

pastel panther
#

also congrats!

slender iron
#

😃

drowsy geyser
#

@slender iron Data point for you: built 3.0.0 alpha 1 yesterday afternoon, and have been starting to test sensors on the M4. CCS811 and SGP30 both work flawlessly. (Board is Metro M4 Express.)

crystal pumice
#

hey, when playing with the lis3dh, i see the acceleration output is between -1 to 1, somebody here knows what is the output with the lsm303?

crystal pumice
#

cuz i see that in the digital sand the code is using data from the raw_acceleration function(from lsm303) and with the lis3dh ive got only acceleration function with a float number, which messing things afterwards

crystal pumice
#

i see now that in the lis3dh ive got in the acceleration function a calculation that: # convert from Gs to m / s ^ 2 and adjust for the range , if ill delete these section of code, u the the data will be same as the raw data from the lsm303?

manic glacierBOT
manic glacierBOT
#

Naming problems are hard. I forgot that modules can't have properties, which is one reason why we have microcontroller.cpu.temperature instead of microcontroller.temperature.

I'm guessing that @tannewt's idea of supervisor is kind of like os or sys. Some alternatives might be circuitpython, runtime, or system (which might be confused with sys). Since we don't have a real OS or even a tiny OS right now, it can be a little confusing.

I'm ok with `supervisor.status.serial...

proven kettle
#

Hello ! Anyone running Circuit python MU in Mac OSX ?

tidal kiln
#

@crystal pumice i think the lsm303 raw_accelerometer returns milli-Gs. it looks like the lis3dh only has acceleration which returns values in m/s^2. i wouldn't delete or modify the code from the library but instead do the conversion in your modified version of digital sand

manic glacierBOT
#

The only contribution that I can think of is that misc, like utility is a bit of an anti-pattern. By that I mean that it is a tempting place to shove code that doesn't have a clear home and as a result can become a endless pile of code that has cleverly avoided being thought about for long enough to determine how it fits into the rest of the project.

That said it's clear that you folks are thinking about where this code should go so perhaps this comment doesn't apply to this scenario...

pastel panther
#

hey @slender iron I was able to get a build last night that I could properly interrogate though I only had enough brains left to learn that I'm still confused by some of the conditionals 🤔

I should have enough brains left tonight. I'm so close

slender iron
#

😃

pastel panther
#

@proven kettle I have it installed but haven't used it much. Are you having an issue with it?

tidal kiln
pastel panther
#

ooh, thats nice

timber mango
#

@tulip sleet This does something similar to what's desired:

 $ /bin/pwd; cat ./99-automount.rules 
/etc/udev/rules.d
# --sync to allow removal without corruption
# exclude sda since its the rootfs
ACTION=="add",KERNEL=="sd[bcd]*", RUN+="/usr/bin/pmount --noatime --umask 000 %k"
ACTION=="remove", KERNEL=="sd[bcd]*", RUN+="/usr/bin/pumount %k"
#

I'm seeing more subtleties to this mounting of CIRCUITPY in Linux, than I would have looked into, otherwise. I don't understand quite what is going on.

Things work a bit more automatically (for CP volume automount) when in a GNOME session, but they're really not bad, when running GNOME piecemeal, such as a standalone nautilus (without the full GNOME environment).

#

Since I don't routinely want automounting of regular USB thumb drives (at all; I prefer to mount them manually) I'm probably already where I need to be, with this (unless I can very much target Adafruit-specific devices for automount).

drifting nexus
#

Is there a win installer for MU beta 15? Can't find it in github releases. I'm using an LSM9DS1, and would love to have that.

manic glacierBOT
#

I too would like to see something better than monotonic, since it's not stable and loses precision as time goes on. Or maybe I just need to learn the CircuitPython way to do longer term ramping up/down of a NeoPixel, while not doing a busy wait, so I can handle other inputs that come in.

Right now I just try to do:

timetofire = timer.Monotonic() + delay
while True:
now= timer.Monotonic()
if (now > timetofire):
timetofire = now + delay
# do NeoPixel incremental update h...

raven canopy
idle owl
#

@tidal kiln Do you happen to be lurking?

drifting nexus
#

Thank you!

raven canopy
#

yw

solar whale
#

I just notice tht mu-1.0.0.beta15 creates 2 folders on my CIRCUTPY files sytem (images,sounds) ```Starting Mu 1.0.0.beta.15
2018-03-01 16:53:39,921 - root:113(run) INFO: uname_result(system='Linux', node='Ubuntu-Macmini', release='4.13.0-36-generic', version='#40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018', machine='x86_64', processor='x86_64')
2018-03-01 16:53:39,921 - root:114(run) INFO: Python path: ['/home/jerryneedell/projects/adafruit_github/mu', '/usr/local/lib/python3.5/dist-packages/click-6.7-py3.5.egg', '/usr/local/lib/python3.5/dist-packages/adafruit_ampy-1.0.3-py3.5.egg', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/usr/lib/python3.5/lib-dynload', '/home/jerryneedell/.local/lib/python3.5/site-packages', '/usr/local/lib/python3.5/dist-packages', '/usr/lib/python3/dist-packages', '/home/jerryneedell/.local/lib/python3.5/site-packages/IPython/extensions']
2018-03-01 16:53:40,441 - mu.logic:355(init) INFO: Setting up editor.
2018-03-01 16:53:40,441 - mu.logic:366(init) INFO: Settings path: /home/jerryneedell/.local/share/mu/settings.json
2018-03-01 16:53:40,442 - mu.logic:367(init) INFO: Log directory: /home/jerryneedell/.cache/mu/log
2018-03-01 16:53:40,442 - mu.logic:368(init) INFO: Data directory: /home/jerryneedell/.local/share/mu
2018-03-01 16:53:40,488 - mu.logic:376(setup) INFO: Available modes: debugger, microbit, adafruit, python
2018-03-01 16:53:40,489 - mu.logic:386(setup) DEBUG: Creating directory: /media/jerryneedell/CIRCUITPY/images
2018-03-01 16:53:40,697 - mu.logic:393(setup) DEBUG: Creating directory: /media/jerryneedell/CIRCUITPY/sounds
2018-03-01 16:53:41,268 - mu.logic:712(change_mode) INFO: Workspace directory: /media/jerryneedell/CIRCUITPY

tidal kiln
#

@idle owl am now

idle owl
#

@tidal kiln I'm about to test the code for LSM303. But can I throw up a gist and have you look at it?

tidal kiln
#

sure

idle owl
#

Thanks

#

There's some linting changes, too, I'm not worried about those. I specifically want to make sure I understood the changes you were suggesting correctly.

tidal kiln
#

yah. seems good. change the two function names. convert list to tuple. that's about all i'd expect it to take.

#

or property names, or whatever they're suppose to be called in python

idle owl
#

methods technically I think. But yes 😄

#

Ok keen thanks

#

I'll test all the examples with it and make sure it all works. Then put in the PR.

tidal kiln
#

and update readme example?

idle owl
#

Oh. Good call, I didn't even think about that.

tidal kiln
#

@solar whale doesn't do that for me on ubuntu, what're you running?

solar whale
#

Ubuntu

tidal kiln
#

how'd you get that output?

solar whale
#

Click on gear at lower right

tidal kiln
#

well. now it does.

solar whale
#

Cool! You’re welcome 😉

tidal kiln
#

just rm -rf the .cache and .local/share folders and restarted. doesn't create them on initial start.

#

doesn't create the image and sound folders

#

but does on second start

#

huh. maybe it's an easter egg?

idle owl
#

@tidal kiln Do you have merge capabilities on LSM303?

tidal kiln
#

prolly

idle owl
#

I'll add you as a reviewer, if you can and have a moment, that would be great.

tidal kiln
#

sure

idle owl
#

Waiting on travis.

#

passed.

solar whale
#

@tidal kiln just glad I’m not alone!

idle owl
#

@raven canopy Where in the LIS3DH guide did you see the update needed?

#

Nevermind. It's within the text. I see it now.

raven canopy
#

yeah...its a few IIRC.

idle owl
#

I only found one.

#

It looks like all the code is code-elements, not embedded.

#

I need to read before I keep asking things. It's all within the text isn't it?

raven canopy
#

hehe. give me a sec. it's prob only one that needs to be updated, since we only changed one filename

idle owl
#

No, you're correct. I'm up to 3 now.

tidal kiln
#

@idle owl done. couple of tweaks.

idle owl
#

Should all be updated now. But if you could check it again, that would be amazing, since I'm clearly missing things.

raven canopy
#

that was quick. one of them was already changed, and threw me off. 😄

idle owl
#

Refresh again to get the rest 😃

raven canopy
#

@idle owl need to change the ampy --port /dev/serial/port run -n accel.py right below Accelerometer Usage

idle owl
#

Brilliant thank you! Updated

raven canopy
#

looks GTG!

idle owl
#

Thanks so much for the second set of eyes!

raven canopy
#

i'm sure my balance is still in the red... 😄

#

alright..gotta go start a fire. flank steak + arugula + blue cheese tonight... 😋

idle owl
#

Nice! Have a good one!

#

@tidal kiln commented and updated

tidal kiln
umbral dagger
#

@tidal kiln I’ll revisit it. The renames make sense.

idle owl
#

@tidal kiln @umbral dagger There's already a PR into the Learn repo for the update.

umbral dagger
#

Ah cool

idle owl
#

@tidal kiln Thanks for catching that though! You are eagle-eye all over it!

#

I only caught it because I have the Learn repo locally and PyCharm caught it in the refactor.

tidal kiln
#

@timber lion sorry. we broke your guide. ⬆ (see PR link a few comments up)

idle owl
#

Oh. No, I'll fix that too.

#

Wait, that should have updated.

tidal kiln
#

how so?

idle owl
#

I'll reembed it.

#

Or are you talking in the snippets.

tidal kiln
#

snippets and guide text

idle owl
#

Yah the guide itself. I see it now.

solar whale
#

having an odd behavior with itsybitsy_m0 - with CP3.0 it does the USB FS is often not mounted - 2.x mounts reliably ... anyone else tried 3.0 on itsybitsy_m0?

manic glacierBOT
#

I am finding that when I flash CP 3.0 to my itsybitsy_m0 _express, my Ubuntu linux system is not recognizing the FS.

It works fine if I flash CP 2.x

dmesg output when FS fails with 3.0


[168355.572364] usb 3-3.2: New USB device found, idVendor=239a, idProduct=000f
[168355.572370] usb 3-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[168355.572373] usb 3-3.2: Product: ItsyBitsy M0 Express
[168355.572376] usb 3-3.2: Manufacturer: Adafruit Industries
[168355.573...
solar whale
#

dotstar on itsy bitsy turns blue on failed boot -- anyone know offhand what that means? digging.

#

hmm - says "CircuitPython is Starting up " takeing a long time!

manic glacierBOT
raven canopy
#

Travis be crawling right now... 😪

manic glacierBOT
solar whale
#

@slender iron FYI - built 3.0 after your latest commit - working fine on Metro_m4_revb, metro_m0.trinket_m0 -- still no go on itsybitsy_m0 - also tried feather52 even though no changes - still works 😉

slender iron
#

kk, thanks @solar whale

#

I'll take a look after I'm done with DMA-land

solar whale
#

np - good luck DMAing

pastel panther
#

ya, I'm seeing the same with the bitsy

solar whale
#

nice to have company 😉

pastel panther
#

whoo?

slender iron
#

thats with the merge I just did?

solar whale
#

yes

slender iron
#

does it work in the alpha I released?

pastel panther
#

I just pulled like 10 minutes ago

solar whale
#

it did not work just before your merge - was taht still alpha - ut was working yesterday.

#

I'll grap alpha and try it.

slender iron
#

I've been changing it a bunch 😃

pastel panther
#

yup, got a sweet blue dotstar with 3.0 alpha and no CIRCUITPY

slender iron
#

😬

solar whale
#

same here - but I know it worked before....

pastel panther
#

lemee check dmesg

solar whale
#

ooh - rebooted and it mounted !!!

pastel panther
#
USB (XHCI Root Hub USB 2.0 Simulation):Port 1 on bus 0xa connected or disconnected: portSC(0xe0206e1)
USBMSC Identifier (non-unique): 0x239a 0xf 0x4201
         0 [Level 5] [com.apple.message.domain com.apple.commssw.cdc.device] [com.apple.message.signature AppleUSBCDCACMData] [com.apple.message.signature2 0x239A] [com.apple.message.signature3 0xF]
AppleUSBCDCACMData: Version number - 4.3.2b1, Input buffers 8, Output buffers 16
AppleUSBCDC: Version number - 4.3.2b1
disk2: media is not present.
disk2: media is not present.
disk2: media is not present.
disk2: media is not present.
disk2: media is not present.
msdosfs_fat_uninit_vol: error 6 from msdosfs_fat_cache_flush
IOUSBMassStorageClass[0xffffff8034e4b400] - Device termination caused by a wake from hibernation or standby!
solar whale
#

but comes up as 2.1 MB Volume - not CIRCUITPY

pastel panther
#

my m4 board came up as 'NO NAME' yesterday though I imagine it was me just fooling around

#

lemee reboot

#

brb

solar whale
#

I meant I rebboted itsy - not computer

slender iron
#

one thing I added was a delay before trying to read/write the flash

#

some of them say to wait up to 10ms

#

(after power is applied)

solar whale
#

it mounts as 2.1MB Volume after several seconds - REPL works

pastel panther
#

ah, there it goes after a few seconds

#

actually I had to unplug then plug

solar whale
#

do you get CIRCUITPY?

#

this is with 3.0-alpha

pastel panther
#

yes and yes

#

still has the same files as well

solar whale
#

rebooted my computer - now back to blue dot ....

pastel panther
#

mine is purple now

solar whale
#

sometiems it turs red

#

red is not in the list ....

slender iron
#

red is during a mass storage access

solar whale
#

very odd - it mounted (as 2.1 MB Volume) after about 20 seconds --

#

ls -la shows: drwxr-xr-x 2 jerryneedell jerryneedell 16384 Dec 31 1969 4921-8571

slender iron
#

it sounds like its unreliable

solar whale
#

yup

#

funny thing is I know it worked when 3.0 alpha was first released - I was playing with dotstar. But not today....

slender iron
#

weird!

solar whale
#

been a strange day...

slender iron
#

if it compiles, then it'll work right? 😉

solar whale
#

what could go wrong...

slender iron
#

I erase my flash 😃

solar whale
#

I even tried forcing it to build a new FS - did not help.

timber lion
#

oh gotcha @tidal kiln @idle owl for the lsm303 changes. yeah it looks like the guide text is updated but you might want to grab a new photo of the output, it still shows reading the accelerometer and magnetometer property

raven canopy
#

@timber lion did you get your veml6070 acting right?

timber lion
#

no haven't been able to find a good uv light source, but if you want to take a look that would be awesome too

#

just check if you're getting only 1 values from the raw read

#

it's odd that i was getting just 1.. but i want to get some real UV light to be sure

#

it's a 16 bit uint so it 1 is super close to 0 or a min value that made me think something might be up

#

this is with 2.2.3 too if it helps

#

on m0

raven canopy
#

ok, i can check it. using my desk lamp when i wrote it, i had to get it a little close. if i left it on my desktop it would stay at 0 most of the time...sometimes up to 3.

timber lion
#

oh gotcha, interesting

#

maybe 1 is expected then.. hrm i'd like to get a strong UV source to be sure it's reading something

#

i think i have some UV leds stashed somewhere though, haven't had a chance to dig through them all yet 😃

raven canopy
#

yeah, i should probably take it on a journey outside. just don't have a mobile setup (yet?).

tidal kiln
#

@timber lion yep, i think @idle owl was able to update the guide except for that one screen cap. but noted that as needing to be taken care of.

solar whale
tidal kiln
#

@solar whale could be a bug

solar whale
#

opening an issue now

tidal kiln
#

did you install via pip?

solar whale
#

yes - but also cloned repo and ran run.py -- did the same thing.

#

hmmm - now getting ```
Logging to /home/jerryneedell/.cache/mu/log/mu.log
Traceback (most recent call last):
File "/usr/local/bin/mu", line 11, in <module>
sys.exit(run())
File "/usr/local/lib/python3.5/dist-packages/mu/app.py", line 121, in run
editor.setup(setup_modes(editor, editor_window))
File "/usr/local/lib/python3.5/dist-packages/mu/logic.py", line 387, in setup
os.makedirs(images_path)
File "/usr/lib/python3.5/os.py", line 241, in makedirs
mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/media/jerryneedell/CIRCUITPY/images'

raven canopy
#

@timber lion tested on 2.2.3 with library bundle 2.2.1: still producing what I saw in dev. sitting on desktop is 0-1. about a 1/8" from LED desk lamp i got up to 89...

solar whale
#

@tidal kiln - looks like ther read-only erros are real! my FS is corrupted

manic glacierBOT
#

I think we should create a new folder in the Learn repo called "CircuitPython_Quick_Starts" and have the code live there, since it's not specific to Gemma (or whichever) anymore. Next, I'll get that taken care of, get the DigitalIO code moved there, get it merged, and get it updated in the guide.

ok please do that!

I had an idea, regarding the code for the DigitalIO example specific to CPX. If we use D7, we either call it button and we add, commented out, the pin line and the setup ...

slender iron
rotund basin
#

Anyone know of a python implementation for esp8266 esp-npw, point to point ?

stuck elbow
#

I don't think it exists

#

if you mean esp-now, that is

prime flower
#

the trinket m0 is really smoll (first time I've tinkered with it) !

solar whale
#

@prime flower did you ever get the arm tools updated?

prime flower
#

I didn't, I'm going to do a VM with ubuntu for builds

raven canopy
#

do you have the links to tony's guide(s)?

#

(if you need them...)

prime flower
#

@raven canopy got em, unless you're thinking of something specific?

raven canopy
#

nothing specific. just checking if you needed them.

tidal kiln
#

@solar whale sry, lost track of thread...
corrupt FS <- is that on your itsybitsy?

solar whale
#

@tidal kiln no - that was on my M4 -- it happens ... I restored it and it is all working fine. ntoll has found the mu bug and is implementing a fix.

tidal kiln
#

ah. so just lag a bit and all problems are solved. 😃

solar whale
#

itsybitsy still does not like CP3.0 but fine under 2x.

raven canopy
#

i did not make this morning's coffee strong enough. this doc update is taking me like 3x longer than usual...for simple misses. 😕

prime flower
#

...we should have a #coffee channel

solar whale
#

Things would be a lot simpler if I only knew what I didn't know ...

raven canopy
#

@solar whale 42. now you know! 😄

cunning notch
#

How do I access the default code on the CPX? I can screen to it and see the output running but I can't interrupt it.

tidal kiln
#

you should be able to interrupt it with <ctrl><c>

cunning notch
#

@tidal kiln It's not interrupting. So CircuitPython is the what comes shipped on it?

slender iron
#

No, it doesn't ship with CircuitPython

cunning notch
#

What comes on it?

slender iron
#

either a makecode demo or an arduino fimata demo

cunning notch
#

@slender iron Okay, thanks

slender iron
#

np

pastel panther
#

@slender iron I'll take a peek after I verify the non-DMA code is working on my m4 board. I'm assuming the QSPI pins on the M4 Metro aren't broken out?

slender iron
#

nope, if I have time today I'll try normal SPI

#

I was up late last night working on it and now I've gotta prep to get outta the city this weekend

pastel panther
#

No problem. I was gonna look at QSPI anyways so I can finish validating my board

slender iron
#

kk

pastel panther
#

As a side note, I grabbed the supersized (SAMD51P20) chip to fill out an order so I might be making a jumbo m4 board before long

slender iron
#

nice!

pastel panther
#

those pins are dense

#

@slender iron I mean to ask; the micro-usb that you used on your ICE40 feather and were kind enough to share with me: did you make a custom footprint for it? I tried using it with the footprint from the feather and it's a bit off though I made it mostly work

slender iron
#

I usually make custom footprints

#

osh park is tricky because the holes usually need to be round

pastel panther
#

Ah, ok

tidal kiln
#

@cunning notch yah, what @slender iron said, got confused when you said you were able to attach with screen

slender iron
#

k, time for a run

#

I'll be back later

cunning notch
#

@tidal kiln ampy didn't reply so I assumed something else. I don't have makecode installed.

tidal kiln
cunning notch
#

@tidal kiln well that shows how much I've read up on it. lol

tidal kiln
cunning notch
#

@tidal kiln Thanks.

tidal kiln
#

oh. four ways. there's also Firmata 😃

prime flower
timber mango
#

^^ quote
*The intention of this protocol is to allow as much of the microcontroller to be controlled as possible from the host computer. This protocol was designed for the direct communication between a microcontroller and a software object on a host computer. The host software object should then provide an interface that makes sense in that environment.

The data communication format uses MIDI messages. It is not necessarily a MIDI device, first it uses a faster serial speed, and second, the messages don't always map the same.*

#

The Adafruit github repo search function is suggestive of the fact that only the CircuitPlayground (not the CPX) has a Firmata sketch.

raven canopy
timber mango
#

Thanks sommersoft.

frosty summit
#

hi folks

#

I'm waiting for a CP disk to arrive (long shipping), but wondering if any of the MakeCode/PXT stuff would work with vanilla arduino boards. In particular UNO & nano

#

from what I can tell, I should only need to load the new bootloader & then it may be off to the races

timber mango
#

They had shown something on that subject in a recent video. Maybe Ask an Engineer, say 3-5 weeks ago.
Seems to me you just change the first term of the domain to reach the web site.
Something about adding your own board (though I can't imagine the details).

#

Q: What are the options for SPI with CPX? (Circuit Playground Express) when using CircuitPython 2.2.3? I'm exploring that question now, in the REPL.

frosty summit
timber mango
#

that sounds like it, jakes.

frosty summit
#

what I'm looking for, long term, are its for STEM classes; something that's multipurpose. OTTO, SumoBot-JR, etc, programmable via mBlock, MakeCode, Python, JS

timber mango
frosty summit
#

... starting to lose me here...

timber mango
#

The UNO is an 8-bit board. The SAMD21 boards (usually branded as 'M0') are 32-bit boards.

frosty summit
#

from what I can gather, the requirment for MakeCode is UF2 bootloader

#

I see

#

ESP32's maybe?

timber mango
#

I am unfamiliar with ESPxx but some of them run CircuitPython, I think -- and therefore would be a candidate (I would think) for Makecode as well.

#

Uploading on those may be tricky .. too tricky to bother with.

tidal kiln
#

@frosty summit did you get a CP Classic or CP Express?

frosty summit
#

@tidal kiln - wanted to get the classic classroom bundle, but seems those are incompatible with CP. waiting on express, as want to spread usability - makecode, python, JS

tidal kiln
#

ok. cool. express is the one you probably wanted (so you can program multiple ways)

timber mango
#

https://github.com/adafruit/circuitpython/releases/tag/2.2.3
List of release files for CircutPython.
You can infer the names of the boards from the filenames of those .UF2 files listed there. That should be a complete list of supported hardware, and if it isn't on CircuitPython, chances are it's not supported in Makecode (unless I'm way off base, which is totally possible).
<< guesswork only

stuck elbow
#

oh wow, VL53L1 handles up to 4m distance!

tidal kiln
#

the UNO and nano are not powerful enough to run circuitpython, is there a reason why you need to use those?

frosty summit
tidal kiln
#

you need more than just the bootloader

#

you also need a procesor powerful enough to run what gets loaded via the bootloader

timber mango
#

I can't be enticed onto an Uno (they arrived on the market long before I took interest) but that .UF2 thing for the Uno looks nice.

stuck elbow
#

the main problem is ram — you need at least 16kB ram for micropython/CP, iirc, and UNO has what? 512 bytes?

timber mango
#

Haha.

frosty summit
#

perfect! this is exactly what I was looking for. thanks. I would've completely overlooked that

timber mango
stuck elbow
#

2kB

frosty summit
#

ESP has 512KiB, but looking compatibility

#

ESP32 is a series of low cost, low power system on a chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth. The ESP32 series employs a Tensilica Xtensa LX6 microprocessor in both dual-core and single-core variations and includes in-...

stuck elbow
#

that's 510kB more than the UNO

frosty summit
#

can run micropython, unsure re CP & MakeCode

stuck elbow
#

esp8266 has 90kB and can run CP

frosty summit
#

anyhow

#

thanks for the chat

#

gotta dash

#

ttyl

timber mango
#

So. SPI on the CPX.

#

I don't see no pins for that. Not sure what to wire to, to access MOSI and SCK.

solar whale
timber mango
#

Haha Thanks Jerry!

solar whale
#

sck = A1 MISO =A2 MOSI = A3

timber mango
#

I can see it on the schematic for CPX -- this is great. Can't wait to try it in hardware.

solar whale
#

the should show up in dir(board) -- after import board...

timber mango
#

dyno killed my joy.

#

Apparently, pasting code that has capitalization is verboten. pfft /stupid machines

#

You kids with your robots.

slender iron
#

its to stop people who type lots of caps

timber mango
#

grrr.

#

It also ate my post, including all the legit stuff in it.

#

That's not right.

#

Your robot is broken, Sir.

solar whale
#

we need an ombudsman bot to hear grievances

timber mango
#

hahaha.

slender iron
#

nis I can send it to you

#

we have a record of them

solar whale
#

so does NSA 😉

timber mango
#

I'll learn more by doing the analysis a second time.

slender iron
#

lol, I can turn it off too

solar whale
timber mango
#

It's stupid as all get-out. I don't know exactly what all-get out means, but it is at least that stupid.

raven canopy
#

dyno needs a hug. hehe 🤗

timber mango
#

I'm sure Jerry gave me what I need. Can't fight city hall, so I won't state what I learned.

solar whale
#

@timber mango - other than the pins.c file did you find any other corroboration? you mentioned the schematic, but I don't see it there.

timber mango
#

It's PA05 on the schematic jerry.

#

So I am trusting the code you linked to be accurate to PA05 (which I understand well enough). SCK is PA05. MOSI PA07. I don't need MISO for the ST7565 LCD (which is why I'm investigating -- already have it going on the Trinket M0 using hardware SPI).

solar whale
timber mango
#

Yeah I've done this once before -- that's right, the mappings are direct further up this file.

#

Good catch.

#

Okay the schematic for CPX needs an annotation that mentions
SERCOM 0: external SPI in order to match what is already presented (in similar manner) in cell C1 of the schematic (upper left area, just above SAMD21 /RESET pin).

solar whale
#

@timber mango hmmm - I tried a quick test ```
Adafruit CircuitPython 2.2.3-dirty on 2018-02-11; Adafruit CircuitPlayground Express with samd21g18

import adafruit_sdcard
import busio
import digitalio
import board
import storage
import sys
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Pin PA21 in use

#

@timber mango -- aha - the pins.c I showed tou was for 3.0 --- for 2.x they are different !!

timber mango
#

Thanks jerry. I will be testing this soon. No problem -- you gave me the piece I was missing; hopefully I will suss this out.

#

I'll report back here in pig-latin to fool the ot-bay.

solar whale
#

I think for 2.x the MISO/MOSI/SCK refer to the internal SPI, not the external -

timber mango
#

Okay I was worried about that already -- the internal SPI flashROM vs external SPI peripheral a user might interconnect with. but go, shoo .. enjoy your people wherever they are.

solar whale
timber mango
#

Yeah that's the flash MOSI and SCK which was what I was trying to side-step. Maybe 3.0.0 is the answer for me here -- just upgrade CPX to itt.

solar whale
#

I think you can use 2.x but just have to use the A1/A2/A3 names. Will test later.

timber mango
#

Understood!

#

Thanks again -- saved me a lot of missed details.

solar whale
#

@timber mango - last post .... spi = busio.SPI(board.D6, board.D10, board.D9) cs = digitalio.DigitalInOut(board.A4)

#

that worked - I was able to mount an SPI SD CArd

#

it did not like the A1/A2/A3 ...

manic glacierBOT
#

I noticed that with the button.

Ok I updated the code, updated the text to explain the code. Let me know if it's all accurate. It tests successfully, but there's the two extra lines for CPX because, as far as I could tell, the switch is a Pull.UP so I added the extra line for that. The text below the code explains how to use the commented out lines, but they're commented solidly in the code as well.

Also I added all the new products to it, including a few related products :). Let me k...

manic glacierBOT
timber mango
#

I had the opposite experience, @solar whale - I could not use board.D10, but board.A3 does work.

Adafruit CircuitPython 2.2.3 on 2018-02-05; Adafruit CircuitPlayground Express with samd21g18
>>> import board
>>> data = board.D10
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'D10'
>>> data = board.A3
>>> (no error was reported)
#

However, SPI seems slow, though I cannot quantify that. I can count to two Mississippi before a routine that writes to every location on the (1024 byte) LCD memory completes.

#
  File "main.py", line 78, in <module>
ValueError: MOSI and clock pins incompatible
 51 # clk  = board.A1  #  make connection  at  pin A1 for CPX   SCK    A1 SCK  PA05  D6
 52 clk  = board.A2  #  make connection  at  pin A1 for CPX   SCK    A1 SCK  PA05  D6

 78 spi = busio.SPI(clk, MOSI=data)
#

When I moved SCK onto A2, it broke, suggesting that A1 was (already) correct here.

#

In other words, if there weren't special pins then it shouldn't have mattered which pin was assigned to SCK. So it would seem that 'SPI is happening'. ;)

manic glacierBOT
#
  1. Ok. Code is updated. Tested successfully on ItsyBitsy!
  2. Updated to refer to text, and cover the potential for someone to start with CPX and work backwards to Feather, etc.
  3. I added them to the right side but it only shows the first 5 - I hadn't backed out of the "Manage Featured Products" page when I posted earlier - maybe it doesn't update until you back out of that page? Aaaaand I'm realising that it added them to the entire Gemma guide, which wasn't intentional. I was thinking spe...
idle owl
#

@tidal kiln @timber lion Screenshots updated.

tidal kiln
#

@idle owl awesome

timber lion
#

oh rad, thanks!

idle owl
#

Np

solar whale
#

@timber mango there are special pins. D6 is A1. I’m not sure which As and which Ds are usable but they are the same pins. I’ll do some experimentation tomorrow. Main point is SPI does work on the CPX in 2.2.3.

timber mango
#

The 'A' and 'D' pin assignments account for target board variants, but PA (PB) port pins are endemic to the chip itself.

#

Until I know better I'm going with the idea that any unclaimed SERCOM is worth investigating for use with SPI, when it is non-obvious (to me) what are the correct pins to use (or better, choices of correct pins).

#

I'm guessing that crossing SERCOM boundaries isn't allowed; so if you use SERCOMx for SCK you cannot then use SERCOMy for MOSI with the same peripheral.

solar whale
#

@timber mango you are delving much deeper than I have. I was just trying to demonstrate that the “pre-defined” pins did work. I have not wrapped my head around SERCOMs yet.

timber mango
#

Oh haha. I'm out of my depth, but my guesswork sometimes is functional, just the same.

pastel panther
#

@timber mango I'm pretty familiar with sercoms on the SAMD boards; let me check the schematic and datasheet

timber mango
#

I have a Feather M0 Express ready to go, and it has lots more pins to investigate.

solar whale
#

And the SPI pins are labeled 😉

pastel panther
#

@timber mango can you use any pin on the CPX or are you trying to avoid certain ones?

timber mango
#

Well I mean that's almost trivial; the idea is to discover which other pins are suitable (if any) for hardware SPI. I guess I need to see if the pins on the CPX MCU itself are the same ones brought out as SPI on the Feather M0 Express, for example.
siddacious: Any are fine on CPX; I have a five-pin interface to account for but three are GPIO -- just need SCK and MOSI for SPI (it's the ST7565 LCD)

pastel panther
#

k

timber mango
#

Okay, if the spi flashROM is taking up an SPI SERCOM, and I still have another SERCOM suitable for SPI on the Feather M0 Express, it stands to reason that (at least) two SERCOMS may be assigned on the same MCU to SPI duties, and it'll be hardware SPI (not bitbanged).

pastel panther
#

@timber mango D6 as SCK and D7 as MOSI should work

timber mango
#

On CPX I had to use the A names to succeed in Circuit Python 2.2.3

pastel panther
#

D6= A1
D9=A2

#

err

timber mango
#

So you're saying PA20 and PA21 (irrespective of target board config) scratch that

pastel panther
#

We're talking about the CPX, right? that's PA5 and PA6

timber mango
pastel panther
#

You should also be able to do
SCK=A3
MOSI=A2 or

SCK = A1
MOSI = A3

timber mango
#

Okay because they're the same SERCOM0.x group.

pastel panther
#

Yea, SCK can be on pad 1 or 3, MOSI on pad 0,2,3

timber mango
#

ah! that'll be fun swapping them around to see it work! I don't know how to tell if it's not really SPI, or if it's simply always SPI (you would then have to rewrite the main theory of the program to bitbang false SPI).

solar whale
#

@pastel panther thanks for the Rosetta Stone! That helps a lot.

pastel panther
#

what do you mean by "not really SPI or "always SPI"?

timber mango
#

Terribly stated.

pastel panther
#

@solar whale hah, that's nothing; I'm working on an even more rosetta stone but it will take a while

timber mango
#

I meant to suggest that it may be possible for the program to simulate SPI if hardware SPI wasn't available on that set of pins.

pastel panther
#

yes, for sure. CP will throw an error of some type (that you can catch I assume) if you get the combo wrong

#

then you can just bitbang

timber mango
#

I don't know what a successful failure looks like -- if its possible for the SPI LCD to display correctly, but at a slower speed, if you programmed it for hardware SPI, but chose the wrong pins to do it on.

#

So far the errors thrown have been obvious as to their meaning. I'm worried about having software SPI going and not knowing it.;) Does that make sense?

pastel panther
#

I don't think it will switch automatically so you should know based on how you code it.

#

you could have some indicator if it switches to bitbang

timber mango
#

That's what I needed to know -- that helps a lot.

#

I've already done the bitbang version and they're nothing alike.

solar whale
#

I ran into this yesterday with the adafruit _dotstar.py driver. It does bit bang if HW fails. Silently..

timber mango
pastel panther
#

@timber mango are you aware of bitbangio?

solar whale
#

That was why I thought the itsybitsy dotstar was working but it was using bit bang.

timber mango
#

@pastel panther I've heard of it and probably glanced through it.

pastel panther
#

@solar whale I don't know if you caught the convo with scott? dan? but the itsy bitsy m0 is stuck doing bitbang for the dotstar because of how the board is laid out

#

the dotstar clock pin is hardwired to a pin that can't be configured as a SCK

solar whale
timber mango
#

Probably this very conversation is what got me concerned I was doing non-hardware SPI without a code change. ;)

pastel panther
#

hah, no that's a feature of the library consuming the SPI lib, not the SPI lib itself

#

fair concern though!

timber mango
#

Well this is my first attempt at porting an unsupported peripheral that uses SPI, so I'm not sweating it at the moment. It works (at all) which I wasn't expecting to happen, so soon.

#

If it's running slower than it needs to, that'll eventually come to light, I'd think.

solar whale
#

Sound like you are making great progress!

timber mango
#

Thanks! The main puzzle right now is the framebuf -- I had to use a fake one tony wrote for devices that cannot support the internal one, when using Trinket M0 for this (it works!) I have three boards running ST7565 LCD now (feather m0 expr; cpx; and trinket m0)

#

The bouncing ball example code for SSD1306 runs so there's some sense of graphics going on.

solar whale
#

I fought with that a long time ago wit ssd1306. Good luck!

timber mango
#

Hahaha. The memory is paged so the bouncing ball crosses though an 8x128 pixel window (a 'page'). I don' t have much of an idea (yet) how to get it to use the entire LCD display area for the bouncing ball stuff. I was able to move it, though -- it wasn't intersecting the window in an interesting way, so I changed the points at where it bounces. Very satisfying result.

solar whale
#

Time for bed here. I learned a lot tonight. Thanks @timber mango @pastel panther goodnight!

timber mango
#

Thank you, jerry. You're always helpful and informed. ;)

pastel panther
#

night @solar whale

timber mango
#
pa05       pa06       pa07
A1         A2         A3
D6         D9         D10
sercom0.1  sercom0.2  sercom0.3
sck        mosi       mosi
                      sck
pastel panther
#

looks right

idle owl
#

@candid sun Great job on the new guide!

pastel panther
#

@candid sun Totally! I saw the video on YouTube and I'm looking forward to watching /reading it!

candid sun
#

@idle owl @pastel panther thank you both very much! 😄

drowsy geyser
#

Oops. I think I just bricked one of my Trinkets trying to put latest firmware on it.... 😃

pastel panther
#

do you have a jlink?

#

what did you do?

drowsy geyser
#

git pull; git submodule update --init --recursive; make BUILD=trinket_m0_haexpress; then copied firmware.uf2 onto the board when I put it in bootloader mode.

#

And yes, I have a jlink. 😃

pastel panther
#

That seems like it should have worked?

#

what happened?

drowsy geyser
#

Solid purple neopixel, no mass storage mount, and no COM port in the device manager.

pastel panther
#

You can still get into bootloader mode?

drowsy geyser
#

Yup\

pastel panther
#

I suppose "bricked" is a relative term. I would say "3.0 is broken on a trinket m0"

drowsy geyser
#

LOL yes, I guess that would be more accurate.

pastel panther
#

let me test the same real quick

drowsy geyser
#

Sure thing. Fortunately I have a second one right here to test Katni's guide....

pastel panther
#

you can just put 2.x on the "bricked" one

drowsy geyser
#

Yes, I'll do that. I took a sleeping pill about a half hour ago so I'll be getting stupid any minute now. So I'll probably wait till morning to fix it.

pastel panther
#

race the buzz! You can doo ittttt

#

😛

drowsy geyser
#

Hahahaha! Last time I tried that I left my soldering iron turned on all night....

pastel panther
#

Note you said "left my soldering iron turned on" not "burned my house down"

drowsy geyser
#

True that!

pastel panther
#

anyone @here know if you can refer to the PA01, PB02 etc. pin names in CP?

#

siddacious is too lazy to re-build

#

@drowsy geyser 3.0 seems to be working fine on my trinket

#

fwiw the neopixel isn't working on the trinket in 3.0

#

dotstar rather

raven canopy
#

i'm pretty sure 3.0 was working on my trinket... let me boot 'er up.

#

also...did you mean to do haxpress??

pastel panther
#

the dotstar is actually turned off in the board files for the trinket

#

because hardware dotstar status led isn't working ATM

#

if one cared they could switch it to bitbang mode and it should work

raven canopy
#

3.0 from 19 feb is working for me... but that was before Scott broke it, right? 😜

pastel panther
#

I'm working on fixing the sercom'd version

#

probably? @drowsy geyser was having issues with current master

#

bbiab, gotta pick up food

raven canopy
#

only 28 more doc updates to do... 😅 tomorrow is a new day.

humble mural
#

Hello everyone, does a logic shifter replace the need for a capacitor and resistor when wiring LED's?

raven canopy
#

I don't think they would work that way; think the current is too high for level shifters with regard to LEDs. but, I haven't used them in that sense, and haven't researched it so I could be way off.

#

runs to google 😄

humble mural
#

@raven canopy I have been in Google for an hour. When I see a shifter I don't see capacitor/resistor combo.

raven canopy
#

is this for "regular" LEDs, or neopixels?

pastel panther
#

@humble mural are you talking about wiring up neopixels? or a current limiting resistor for a normal LED?

humble mural
#

@raven canopy All my research has been on Neopixels not regular (students want to make a marquee). @pastel panther wiring Neopixels. and controlling them with a Raspberry Pi 3

raven canopy
#

ahhh. the cap would still be advised. the resister...shouldn't be needed.

pastel panther
#

The level shifter is used to make sure the logic level of your controller is close to that of the voltage that the neopixels are running at

raven canopy
#

assume you're using a separate power supply for the neopixels?

humble mural
#

I would use logic shifter to handle the 3.3V to 5V issue betrween RPi3 and NeoPxls, but do I was under the impression that I needed a capacitor and resistou also

errant grail
#

I always add the cap for stability and a resistor for input voltage/current inrush protection, even with a logic level shifter.

pastel panther
#

ya, that's pretty good practice

errant grail
#

Older neos are a bit more sensitive than the newer ones, though.

humble mural
#

Ahh that was my next question. I power the RPi3 using the onboard plug and I power the NeoPxls with another adapter.

raven canopy
#

does the Uberguide cover RPi? I can't remember...

errant grail
#

@compact solstice That's why the poor little Neo needs some protection. If the pixels are powered down, they could be damaged by the input signal.

humble mural
#

I have to re-read that, its been a while and I was much greener and didn't understand it all., now at least I can sort off speak the language.

pastel panther
#

it's a pretty good reference

raven canopy
#

alright. i'm doc'd out for today. heading to dreamland... (not disney). 💤 night 🦉s!

humble mural
#

Can 32 x 128 NeoPxls be wired in such a manner as to make a marquee. Students want to make one that can transmit a message.

#

@raven canopy Good night, thanks for your help as always!

pastel panther
#

sure they can; the hard part will be the software, but it shouldn't be that bad

#

well, bad is relative

#

you can essentially make one 4096 pixel strip (can they go that long?)

errant grail
#

... and an array of 4,096 neopixels can eat up a lot of MCU memory

pastel panther
#

also that would be prohibitively expensive I would think

#

You'd do better with normal leds and shift registers

errant grail
#

You can send data out more than one pin to 1) reduce the number of daisy-chained pixels per pin and 2) to increase the refresh rate.

#

Oh -- forget the comment about MCU memory since you're using a RPi.

humble mural
#

That project can be done with regular LED?? That would help. We new that it was going to be expensive, but they actually willing to fundraise to for the NeoPxls (It's amazing how much money a group of young people rasie selling oreos and rice krispy treats)

pastel panther
#

I mean a huge neopixel display could do some really cool stuff but it would be order of magnitude more software, and $$

tidal kiln
#

@compact solstice are you limiting yourself to circuitpython?

humble mural
#

We would like to, I only program in Python and Java and I only want to teach those two. If I have an over eager student that want to learn Arduino (C++) they can on their own.

pastel panther
#

@humble mural yes, (almost) anything you can do with neopixels can be done with regular leds. It's jus a matter of how much work. Here is an example that's similar to your idea just in a different shape, done with rgb leds. You could do the same with single color leds and it would be even easier and less expensive:

https://www.youtube.com/watch?v=kcxdzr1BrS8

My build of a 9x9x9 Led Cube, -729 RGB Leds -3000 Soldering Joints - Arduino Mega - Further Upgrades planned I do not own the music.

▶ Play video
errant grail
#

Is my calculator correct? 4096 neopixels at 20mA each totals 82A (~410W)!

pastel panther
#

that sounds about right

errant grail
#

and 20mA is the low end.

humble mural
#

So I would need a comluter psu?

errant grail
#

This will be a very fun project! I'll buy some treats!

pastel panther
#

That would be a beefy power supply

errant grail
#

You could power it in sections pretty easily.

humble mural
#

I have a couple of 450W that we have salvaged from old computer and I think even a few 550W.

pastel panther
#

@humble mural Maybe? I think it depends on the power supply. I'm not sure if they do their rated power on a single rail or split between 12v and 5v

humble mural
#

@pastel panther I have seen that project, in fact, the a couple of students in our electronics program are working on it. It's a cool project.

#

Yeah, I'd hate to burn 4096 LED's in a moment.

pastel panther
#

Were you to take something like this on you would obviously work up to the full size with successively bigger tests

humble mural
#

I have two PSu's that have both 12V and 5V, I just have to read what the 5V rating is.

#

As their teacher I try to limit the mistakes, not necesarily eliminate them. My suggestion was to purchase 4 32X32 RGB LED Matrix's and do it that way.

#

That way, they could program one, then add two, and so on. plus cost is cheaper

#

and they are already mounted

errant grail
humble mural
errant grail
#

Yeah, they have a nice LED matrix hat and some great examples. Pretty do-able.

#

Looks like you're on a good pathway. Time for me to join the fam for popcorn and the late news. 'Night!

pastel panther
#

@errant grail how do you prepare your popcorn?

errant grail
#

Pretty easy since we're focused on low-fat, low-sodium. Microwave Orville R's.

pastel panther
#

not air popped?

errant grail
#

Not yet. We get the SmartPop version, I think. Still has some flavor. The days of dripping tasty stuff over the popcorn have passed.

#

How about you?

pastel panther
#

It's been a while but recently run of the mill butter microwaved with a ton of old bay on top

#

Previously air popped with a spray of olive oil and old bay

#

(I got lazy)

errant grail
#

Yum. Still very gourmet compared to ours.

#

I remember stove popped corn in real butter with loads of salt as a kid. Sunday night. Popcorn and apple slices whilst watching Ed Sullivan. But I digress.

pastel panther
#

yum

errant grail
#

Time to leave the cave, though. G'night @pastel panther !

pastel panther
#

ta ta

drowsy geyser
#

@pastel panther PIBKAC. I built for the Trinket with the wrong board definition. 3.0 is not broken for the Trinket.

solar whale
#

@timber mango sorry for the mis-information last evening - this is what actually worked for me (A's all around) ```spi = busio.SPI(board.A1, board.A3, board.A2)
cs = digitalio.DigitalInOut(board.A4)

solar whale
#

@pastel panther if you have not already found it, you can refer to pins as microcontroller.pin.PA01 for example on the CPX ```>>> import microcontroller

dir(microcontroller.pin)
['PA00', 'PA01', 'PA02', 'PA03', 'PB08', 'PB09', 'PA04', 'PA05', 'PA06', 'PA07', 'PA08', 'PA09', 'PA10', 'PA11', 'PB10', 'PB11', 'PA12', 'PA13', 'PA14', 'PA15', 'PA16', 'PA17', 'PA18', 'PA19', 'PA20', 'PA21', 'PA22', 'PA23', 'PA24', 'PA25', 'PB22', 'PB23', 'PA27', 'PA28', 'PA30', 'PA31', 'PB02', 'PB03']
pin=microcontroller.pin.PA18
pin
microcontroller.pin.PA18

interestingly

pin=microcontroller.pin.PA01
pin
board.ACCELEROMETER_SCL
here is an example that workes to set SPI pins>>> import busio
import digitalio
import microcontroller
spi = busio.SPI(microcontroller.pin.PA05,microcontroller.pin.PA07,microcontroller.pin.PA06)

manic glacierBOT
buoyant wigeon
#

import board

#

sorry...

blazing trail
#

???

buoyant wigeon
#

mistake... input into other window 😀

blazing trail
#

oh

#

it's fin!

#

Fine**

pastel panther
#

I do the same thing all the time

raven canopy
#

discord just starting talking to me... what the???

#

"codingpro just said 'fin'"...

#

😄

drowsy geyser
#

I'm streaming a video so just heard "garble"

solar whale
#

hmmm - I hope there is a way to disable that!!

raven canopy
#

i have "text-to-speech" notifications set to "never".... maybe wumpus is groggy today.

drowsy geyser
#

Thanks for that, @raven canopy . I didn't know that setting existed.... 😃

raven canopy
#

discord folks have set up a very good product. I can't think of many options they haven't brought out to the user to customize, given its primary use. 🎩 tip to them...

timber lion
#

yeah that talking is weird, glad we can disable.. i can see people abusing that

drowsy geyser
#

Speaking of things I don't know, what's the latest estimate for M4 production?

timber lion
#

interesting i have text to speech disabled and it still played it

#

that's a cute bug

drowsy geyser
#

Tony! I figured you'd be on a mountain today. 😃

timber lion
#

ah that's tomorrow 😃

raven canopy
#

nice double arcs, tony!

pastel panther
#

@drowsy geyser The only thing I've heard is that they now have the chips so it's probably a matter of locking the board design and sending out for the pcbs. Scott and Dan are working with a QSPI rev d version of the board which I imagine is pretty close to the final board. I'm not sure weather or not they're waiting on CP 3.0 to release but it wouldn't surprise me

drowsy geyser
#

@pastel panther Thanks! I was wondering if they were taking a hard dependency on 3.0 for the release....

pastel panther
#

It would make sense given that a lot of the excitement about the '51 seemed to be about how it would help CP

drowsy geyser
#

Agreed!

pastel panther
#

hey @timber lion did I hear that you put together an altimeter? Presumably with the MPL3115A2?

timber mango
#

Sounds like M4 will initially only be supported on CircuitPython 3.x (not 2.x) and (guesswork:) Arduino. If the software is not stable, they probably would wait to release the hardware until some milestone was reached in the software base. /wild_guesses_dotcom

#

I'll try to install M4 for Arduino right now and see if it's a thing or not. ;)

drowsy geyser
#

That makes a lot of sense, @timber mango . I kinda thought that might be the case, but I wanted to ask instead of assume. 😉

timber mango
#

Not seeing M4 support in Arduino from Adafruit. I'll comb the actual .JSON file to see (should be published there, first, I'd suppose).

#

huk do you have a web describing your pet project?

pastel panther
#

I think I saw or heard of m4 support somewhere. I'm pretty sure someone at adafruit released a mp3 decoder that runs on the m4

timber mango
#

I've seen something, I think. Just can't remember where. Adafruit usually has software on the hook that you can install, before you can get your (hot little) hands on the hardware itself. pIRkey is out, mostly, in software. Not available for purchase yett.

#

ItsyBitsy M0 was out for a few weeks in the Arduino IDE (I think) prior to release of the first shipment of doo-dads.

pastel panther
timber mango
#

yup yup yup

drowsy geyser
#

@timber mango No web page yet. It's on the todo list. I just realized I need four more Raspberry Pi 3s - one for each pair of motors - because the motor driver hats I'm goin gto use can only drive one pair.

#

(and there are eight motors - one each for the hub drives on the wheels, and one for each of front and rear axles)

timber mango
#
$ /bin/pwd ; ls -1
/home/nis/foo/bar/.arduino15/packages/adafruit/hardware/samd/1.0.21/variants
arduino_mzero   arduino_zero         circuitplay
feather_m0      feather_m0_express   gemma_m0
itsybitsy_m0    metro_m0             mkr1000
mkrfox1200      mkrzero              trinket_m0
zero_radio
 $ 

EDIT: 1.0.22 is available. Downloading now..

drowsy geyser
#

Hmmmm, maybe they're going with a CP-only release.

timber mango
#

They did a thing for fururama fortitude fandango f-os where they did not proclaim a new repository on github for CPX -- reused the CircuitPlayground (-express).

#

Whatever the facamolus was, it's a protocol like MIDI that acts like a tethered forth, when employed with Arduino.cc special sketch.

drowsy geyser
#

Oooh that's interesting....

timber mango
#

It's in the scroll back for yesterday or the day before, probably in this chan.

#

is straying offtopic. ;)

#

@solar whale a thousand thanks for the PAxx PBxx mapping info in circuitpython. I had no idea it was that flexible!

pastel panther
#

@drowsy geyser why not make a hat with the number of controllers/h-bridges you need?

#

I'm sure you could find an adafruit board to base it off

#

a snippet of what I'm working on:

sercoms[0][1].pad_name
"PA05"
sercoms[0][1].sercom_pad
1
sercoms[0][1].pin
"10"
sercoms[0][1].sercom
0
drowsy geyser
#

@pastel panther It's a rather big rover. I need 120 Amps.

pastel panther
#

Per wheel?

#

A pi per wheel just seems excessive to me when a tiny85 could handle it

drowsy geyser
#

Oh no no, not that big. That's total.

pastel panther
#

heck, a tiny10 could probably do it

drowsy geyser
#

Honestly, I'm not that confident in my design skills. I'm trying to stick with off-the-shelf components.

#

But I am going to have to break out KiCad and design the power system board to keep the banks of LiPos charged up from solar panels.

pastel panther
#

How are you planning on having the pi's communicate to the "brain"?

drowsy geyser
#

Yes, absolutely. There's an onboard network.

#

The other p roject (the high power rocket flight controller in CP) is done and built.

pastel panther
#

did you open source that? What do you have for a IMU? I have a BN0055 that I'm planning to use for something vaguely simmilar

drowsy geyser
#

I am totally going to open source it once it's flight validated. It's based on the Feather M0 Express. It has a BME280 and BNO055 onboard for dynamics analysis.

pastel panther
#

are you using the BME for control or just altitude monitoring?

drowsy geyser
#

Now I'm building a 62" x 4" High Power Rocket around it. 😃 The BME is just for altitude.

pastel panther
#

Is it a fully custom board or a feather wing?

drowsy geyser
#

The BME280 controls the separation explosives. When it drops one meter past apogee it fires the drogue, and then at 500 feet it fires the main chute.

#

I use Feather Wings for most of it, though I built the two breakouts on FeatherWing Proto boards.

pastel panther
#

I would be cautious about using a BME for calculating the parachute deployment. Have you done the math on the error margin?

#

wait, I missed that you're using a drogue

#

that shouldn't be too bad

drowsy geyser
#

No, but I've tested it in slow motion (success) in a building elevator, and I'm going to flight test it on a rocket with other electronics several times just to collect data.

pastel panther
#

cool

#

who makes your parachute?

#

(and drogue)

drowsy geyser
#

Public Missiles.