#circuitpython-dev
1 messages ¡ Page 152 of 1
@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.
@solar whale why are you using a root account?
@errant grail where did you get your boards made?
no - I was getting permission errors and tried using sudo.
Express PCB for now. Need to move my component libraries to KiCad so that I can use other vendors.
@solar whale which distro are you using? perhaps your user doesn't have access to /dev/tts devices, but I came here late.
@vague monolith - its all good now - I was just beeing foolish.
@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...
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.
Pro tip: header pins belong in breadboards, not under your thumbnail.
ouch
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!
@pastel panther no problem - I'm off to bed anyway -I've done eough damage for tonight.
Be happy to try something when you have it
Later @solar whale
Good night all!
@vague monolith if you're experienced with udev, I have a query for you
@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
When the drive appears and isn't mounted, does dmesg have output showing errors?
@tulip sleet
hold on, collectin the syslog text for you
This all should be handled by some sort of udisk wrapper
It could be an issue with the wrapper
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.
trying to make it short enough to paste
@tulip sleet I did find a tool for exploring the dbus messages would help debug more than syslog
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
$ 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"
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
I think Tony prescribed those rules in the 'building micropython' guide of olde. ISRT that I followed a recipe.
@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!
@tulip sleet Which refereces this tool which looks promissing https://wiki.gnome.org/action/show/Apps/DFeet?action=show&redirect=DFeet
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
Most of the document is his output it's not really 18 pages of info
@vague monolith I'll bookmark those and read them later -- thanks again. it's a small annoyance but mysterious
I'll try to pay attention to what happens when I plugin the USB for /dev/ttyACM0
Is in 2.x, but not reimplemented in 3.0 yet.
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...
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
@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.
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. ;)
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...
alright...calling it. đ¤ till tomorrow đŚs
night duder
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 đ¤ˇ
@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.
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!)
@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.
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!
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.
Yeah, I am not sure if it ever worked without the doubletap either.
@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
@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?
@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.
But I was able to use the dotstar with CP3.0 Master as is
Thanks jerryn
@solar whale did you use busio.SPI? Then maybe @pastel panther drew an incorrect conclusion. I haven't looked at it yet.
let me check
If you think it would make sense to have a status subcategory, take a look at how we did microcontroller.cpu.temperature, where cpu is a singleton instance of Processor. cf http://circuitpython.readthedocs.io/en/2.x/shared-bindings/microcontroller/Processor.html.
I was not in the loop on #544. @tannewt do you have a comment?
@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
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
The Arduino library handles both, but you have to know about the pins, iit looks like. This is better.
makes it all look like magic to the uninformed - like me đ
well, I didn't know that off that bat -- had to read the code
@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.
@pastel panther I was just playing with the built-in dotstar. Adding more confuison thatn help tp the discussion.
and now my CIRCUITPY is stuck read only
are you on linux?
@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
I can further mimic cpu, no problem and I concur (was my initial intent actually...missed the cpu qstr in the globals_table). Like I said, I patch-worked my way through this one, utilizing microcontroller & usb_hid as roadmaps for the most part.
I'll wait for any further comments from tannewt before I start pushing forward with changes.
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!
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 đ
the compiler can be so helpful at times.
some times you have to be the CPU
though I think even the m0 has a much larger cache than me
can you "outsmart" the compiler by declaring those varialbles as "volatile" so it won't optimze or cache them? jsut a thought...
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
sometime it works - sometimes it changes the flow enough to hide the problem too...
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
@pastel panther sorry - was away - I would just have to try it to be sure. Probalbly several times đ
my testing says "no, that's not going to help"
I give up for now! The salary man/salt mine calls
@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.
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>
yup yup
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
How about renaming the supervisor module to circuitpython and making a Supervisor class and supervisor singleton (just like cpu)?
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
@pastel panther hrm, have you tried using the debugger to see the values?
yeah, there is a lot of state to check there
refer to my previous comment about status_apa102 (or was it potential_sercom) being optimized out
did you turn off lto?
?
commenting this line can make it easier to debug: https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/Makefile#L99
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
I set variables to volatile, and sometimes do -fno-inline, without having to lower the optimization level.
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!
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...
^^^ what have I started, and gotten myself into? Hahaha. đ°
siddacious pats your head and tells you everything will be OK
@raven canopy Welcome to development!
resists urge to purr
I don't know of anything we'd have directly under circuitpython yet. autoreload is two functions now because modules cannot have attributes that are backed by C.
I'm ok with it being called something else.
siddacious scratches behind your collar
I'm going to close this and make a new issue for DMA. DMA is not needed for the alpha.
Great work @dhalbert!
Use it for SPI communication and the audio related modules.
Does this mean normal SPI and QSPI?
@tuupola Would you like to switch them to the lower case version?
YAY!
Is there a definitive list of CircuitPython Compatible boards ? Also curious which libraries have been confirmed compatible.
If the library is in the CircuitPython Library Bundle, then it's confirmed compatible. Here is a list of some of the hardware https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-hardware, however I realise I need to update it to include the ItsyBitsy M0 Express. It also works on ESP8266 boards.
@idle owl Thank you!
Kattni! Savior of the Universe!
(sung to the tune of "Flash" by Queen)
@tawny creek You win. I couldn't find a good emoji!
haha! the theme tune is catchy đ
Fantastic ear-worm, @pastel panther ! Thanks! đŹ
fwiw I did it to myself as well đ đŹ đ
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?
@heady dove was that on mac or ubuntu with the CPX?
@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
so it still gets into bootloader ok?
@tidal kiln yes it does
"I downloaded those and extracted them to the CPX" <-- describe how you did this more
@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
CPLAYBOOT or CIRCUITPY?
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
you want to copy it to CIRCUITPY, not CPLAYBOOT
https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries#installing-the-circuitpython-library-bundle
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"
sounds like the firmware. yes, that should go to CPLAYBOOT:
https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython
and you're right, it's not a zip file, you can just download the .uf2 directly
@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
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
@tidal kiln well the library bundle is a zip
that was what I extracted to the CIRCUITPY drive
correct. that's a 2nd step. once you've got a functional firmware install.
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
ok. see if you can recover by simply dragging the UF2 over to CPLAYBOOT
(we'll worry about the library bundle next)
@tidal kiln I have tried that twice so far
filename = adafruit-circuitpython-circuitplayground_express-2.2.3.uf2 ?
correct
and you're doing this on ubuntu or mac at this point?
just did it a thrird time, replete with another download
ubuntu
I can go try it on my Mac if you think I should
nah. just wanted to make sure which one.
the Mac is my "Music making machine"
@heady dove sorry you're still having the issue. @tidal kiln is a master troubleshooter, so you're in good hands with him.
@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
@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)
@tidal kilnDone! and I extracted the lib forlder to my desktop and copied it to the CIRCUITPY folder
so all good now?
i haven't done much (any) CP on the ESP8266
"In response I get a blank "screen" screen,"
no worries, you saved the day on the CPX, nice to know about the erase uf2
could there be a script running? did you try <CTRL>-<C>
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
hmm. not sure on that issue.
there are better esp8266 ninjas here than me
@heady dove did you type characters into the screen session?
I type, but nothing displays
hrm
ctrl C doesn't interupt, it's "frozen"
its just blank right?
the only thing I can do is pull the USB cable which returns me to the commandline prompt
yes
that did indeed work
just tested it, I couldn't remember that command, though I knew it existed
hrm, I've had it work after erasing and flashing
it's weird, I can use both ampy and esptools, they all seem to work fine
ampy works?
yes
but screen doesn't?
correct
I thinks, but I can try right now
its possible ampy left the serial in a state that doesn't echo anything back
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
what was your screen command? garbage can occur when the baudrate is wrong
and the screen is "frozen"
I hit return
screen /dev/ttyUSB1 --baud 115200
was what I typed at the command line
ubuntu
ah
lol
I have access to and have tried on my Mac
same results
I don'y have a Windoes machine
yes, sometimes it is ttyUSB0 depends
I typically ls the dev directory to see prior to ..
okay
holy moly!
that work?
sure did
sweet!
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?
yup!
If I want to send data from an sensor over the wifi , how do I format the command
I'm using the lsm303 library
thats a complicated question I don't have a good answer for
okay can you point me at something to read?
@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...)
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
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?
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
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
@slender iron Is it really that dificult to print data to the wifi port?
ok. like i said, my esp wifi experience is in Arduino, so all I can really do is send you to the information you'll need. circuitpython docs don't cover much any of the wifi, since micropython does all/most of the dev. I would start here: http://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/network_basics.html#
yes
@slender iron all of micropython's wifi function is still in our build, isn't it?
yeah, I think so
but I haven't looked at it
@heady dove I'd like to make it simple đ
me neither. yet. đ
(the bot doesn't like lots of x)
I was wondering what the heck that waas
dyno is very PG...
dyno?
@heady dove for your side of the wifi, ignore the AP stuff. STA is short for station, which is the client side.
?whois dyno
155149108183695360
None
online
None
Tue, Aug 8, 2017 6:12 PM
None
Thu, Mar 3, 2016 10:07 PM
Dyno
Kick Members, Ban Members, Manage Channels, Manage Messages, Manage Nicknames, Manage Roles, Manage Webhooks, Manage Emojis
The one and only...
dyno is "The one and only..." đ
wow, who knew
okay, so there isn't a explicit "port" to send data to, that goes over the wifi
nope. it just sends it over the broadcast. you'll need to use the socket library to send data to an IP
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
đ
I think I shoulld go make dinner đ
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.
I thought I used it, maybe not
also, micropython has a JSON module that could do the formatting for you (it isn't hard to do manually in small bits though)
I'm working on three different platforms concurrently
haha. good times.
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
we'll be here
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 ...
@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.
@heady dove found socket in circuitpython...you should be good to go. and of course jerryn shows up after you leave... đ
@solar whale its likely that the 1200 baud baudrate detection is broken
ah - ok - just wanted to get the issue documented.
thanks!
he is once again interacting with REPL.
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.
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.circuitpythonwould also prove a natural spot for future thin...
and with that GitHub novel...i think i'm taking the rest of the night off. but, i've said that before... đ
Phil B did up the ItsyBitsy fritzing for me so that's done and added to the guide. Thanks Phil!
@slender iron Have you ever ran into trouble setting breakpoints and resetting after adjusting the -flto and -fno-inline flags?
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
yea, my m4 board
ok, thats usefu
+l
is monitor reset the expected way to start over from the top?
yeah I do it that way
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!
info locals is helpful too
is 0x0 null/unset?
hmm... i set an asm("bkpt"); and now I can't see to continue past it
I usually just read the local state and then reset
I don't think I continue past it often
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)
you can always put an if around the bkpt
đ¤Ś
np
also congrats!
đ
@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.)
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?
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
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?
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...
Hello ! Anyone running Circuit python MU in Mac OSX ?
@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
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...
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
đ
@proven kettle I have it installed but haven't used it much. Are you having an issue with it?
@plucky flint nice!
ooh, thats nice
@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).
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.
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...
@drifting nexus you can get the latest builds here (scroll down to the bottom for March 1st runs): http://mu-builds.s3-website.eu-west-2.amazonaws.com/?prefix=windows/
@tidal kiln Do you happen to be lurking?
Thank you!
yw
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
@idle owl am now
@tidal kiln I'm about to test the code for LSM303. But can I throw up a gist and have you look at it?
sure
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.
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
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.
and update readme example?
Oh. Good call, I didn't even think about that.
@solar whale doesn't do that for me on ubuntu, what're you running?
Ubuntu
how'd you get that output?
Click on gear at lower right
well. now it does.
Cool! Youâre welcome đ
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?
@tidal kiln Do you have merge capabilities on LSM303?
prolly
I'll add you as a reviewer, if you can and have a moment, that would be great.
sure
Waiting on travis.
passed.
@tidal kiln just glad Iâm not alone!
@raven canopy Where in the LIS3DH guide did you see the update needed?
Nevermind. It's within the text. I see it now.
yeah...its a few IIRC.
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?
hehe. give me a sec. it's prob only one that needs to be updated, since we only changed one filename
No, you're correct. I'm up to 3 now.
@idle owl done. couple of tweaks.
Should all be updated now. But if you could check it again, that would be amazing, since I'm clearly missing things.
that was quick. one of them was already changed, and threw me off. đ
Refresh again to get the rest đ
@idle owl need to change the ampy --port /dev/serial/port run -n accel.py right below Accelerometer Usage
Brilliant thank you! Updated
looks GTG!
Thanks so much for the second set of eyes!
i'm sure my balance is still in the red... đ
alright..gotta go start a fire. flank steak + arugula + blue cheese tonight... đ
@umbral dagger sorry. we broke your digital sand code with this:
https://github.com/adafruit/Adafruit_CircuitPython_LSM303/pull/3
@tidal kiln Iâll revisit it. The renames make sense.
@tidal kiln @umbral dagger There's already a PR into the Learn repo for the update.
Ah cool
@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.
this one is affected also:
https://learn.adafruit.com/lsm303-accelerometer-slash-compass-breakout/circuitpython
@timber lion sorry. we broke your guide. ⏠(see PR link a few comments up)
how so?
I updated the example in the repo. If you click "view on GitHub" the file looks right. https://github.com/adafruit/Adafruit_CircuitPython_LSM303/blob/master/examples/slow_both/slow_both.py
I'll reembed it.
Or are you talking in the snippets.
snippets and guide text
Yah the guide itself. I see it now.
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?
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...
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!
This is reproducible - 2.x loads and boots consistently. 3.0 does not . Dotstar turns blue and nothing happens. I tried connecting it to a Mac with same result.
@tannewt you can merge when yer ready! i dont have the ability to test on hardware at this time :)
Travis be crawling right now... đŞ
I may have seen some strangeness with 3.0 on the bitsy but I was under the impression that @tannewt recently fixed something with the flash for it that had been causing issues. I'll test again and report back.
@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 đ
np - good luck DMAing
ya, I'm seeing the same with the bitsy
nice to have company đ
whoo?
thats with the merge I just did?
yes
does it work in the alpha I released?
I just pulled like 10 minutes ago
it did not work just before your merge - was taht still alpha - ut was working yesterday.
I'll grap alpha and try it.
I've been changing it a bunch đ
yup, got a sweet blue dotstar with 3.0 alpha and no CIRCUITPY
đŹ
same here - but I know it worked before....
lemee check dmesg
ooh - rebooted and it mounted !!!
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!
but comes up as 2.1 MB Volume - not CIRCUITPY
my m4 board came up as 'NO NAME' yesterday though I imagine it was me just fooling around
lemee reboot
brb
I meant I rebboted itsy - not computer
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)
it mounts as 2.1MB Volume after several seconds - REPL works
rebooted my computer - now back to blue dot ....
mine is purple now
red is during a mass storage access
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
it sounds like its unreliable
yup
funny thing is I know it worked when 3.0 alpha was first released - I was playing with dotstar. But not today....
weird!
been a strange day...
if it compiles, then it'll work right? đ
what could go wrong...
I erase my flash đ
I even tried forcing it to build a new FS - did not help.
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
@timber lion did you get your veml6070 acting right?
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
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.
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 đ
yeah, i should probably take it on a journey outside. just don't have a mobile setup (yet?).
@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.
@tidal kiln at least I now know where the odd mu files came from - nstill not sure why --- https://github.com/adafruit/mu/tree/master/mu/resources/pygamezero
@solar whale could be a bug
opening an issue now
did you install via pip?
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'
@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...
@tidal kiln - looks like ther read-only erros are real! my FS is corrupted
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 ...
@pastel panther if you have time, I can't figure out how to get DMA working with QSPI. my code is here: https://github.com/tannewt/circuitpython/tree/dma3
Anyone know of a python implementation for esp8266 esp-npw, point to point ?
the trinket m0 is really smoll (first time I've tinkered with it) !
@prime flower did you ever get the arm tools updated?
I didn't, I'm going to do a VM with ubuntu for builds
@raven canopy got em, unless you're thinking of something specific?
nothing specific. just checking if you needed them.
@solar whale sry, lost track of thread...
corrupt FS <- is that on your itsybitsy?
@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.
ah. so just lag a bit and all problems are solved. đ
itsybitsy still does not like CP3.0 but fine under 2x.
i did not make this morning's coffee strong enough. this doc update is taking me like 3x longer than usual...for simple misses. đ
...we should have a #coffee channel
Things would be a lot simpler if I only knew what I didn't know ...
@solar whale 42. now you know! đ
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.
you should be able to interrupt it with <ctrl><c>
@tidal kiln It's not interrupting. So CircuitPython is the what comes shipped on it?
No, it doesn't ship with CircuitPython
What comes on it?
either a makecode demo or an arduino fimata demo
@slender iron Okay, thanks
np
@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?
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
No problem. I was gonna look at QSPI anyways so I can finish validating my board
kk
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
nice!
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
I usually make custom footprints
osh park is tricky because the holes usually need to be round
Ah, ok
@cunning notch yah, what @slender iron said, got confused when you said you were able to attach with screen
@tidal kiln ampy didn't reply so I assumed something else. I don't have makecode installed.
nothing to install for makecode, it's all browser based: https://makecode.adafruit.com/
@tidal kiln well that shows how much I've read up on it. lol
@cunning notch no worries. with the CPX there are three ways you can program it:
- Arduino
- MakeCode
- CircuitPython
lots of options! more info here:
https://learn.adafruit.com/adafruit-circuit-playground-express/overview
@tidal kiln Thanks.
oh. four ways. there's also Firmata đ
@cunning notch The quickstart for circuitpython is https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-quickstart
@tidal kiln a quick glance suggests firmata is just a protocol like bossac and is suggested by Arduino.cc:
https://www.arduino.cc/en/reference/firmata
EDIT:
It's looking a bit more like a tethered forth in some ways:
https://github.com/firmata/protocol/blob/master/protocol.md
^^ 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.*
Also:
https://learn.adafruit.com/circuit-playground-firmata/overview
quote
By programming Circuit Playground with a special Firmata sketch you can control it from Python and other code running on your computer.
The Adafruit github repo search function is suggestive of the fact that only the CircuitPlayground (not the CPX) has a Firmata sketch.
CPX uses Firmata for the Code.org implementation: https://learn.adafruit.com/adafruit-circuit-playground-express/code-org-csd
Thanks sommersoft.
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
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.
@timber mango , yup, found maker.makecode.com
that sounds like it, jakes.
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
Those are all SAMD21 boards on maker.makecode.com so it may be specific to that MCU.
... starting to lose me here...
The UNO is an 8-bit board. The SAMD21 boards (usually branded as 'M0') are 32-bit boards.
from what I can gather, the requirment for MakeCode is UF2 bootloader
I see
ESP32's maybe?
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.
@frosty summit did you get a CP Classic or CP Express?
@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
ok. cool. express is the one you probably wanted (so you can program multiple ways)
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
oh wow, VL53L1 handles up to 4m distance!
the UNO and nano are not powerful enough to run circuitpython, is there a reason why you need to use those?
found this, but have not tried yet: https://github.com/mmoskal/uf2-uno
you need more than just the bootloader
you also need a procesor powerful enough to run what gets loaded via the bootloader
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.
If you own an Uno already, certainly worth investigating.
https://makecode.com/blog/uf2-for-arduino-uno
the main problem is ram â you need at least 16kB ram for micropython/CP, iirc, and UNO has what? 512 bytes?
Haha.
perfect! this is exactly what I was looking for. thanks. I would've completely overlooked that
https://en.wikipedia.org/wiki/ATmega328 << should be the Uno chip, right?
2kB
ESP has 512KiB, but looking compatibility
that's 510kB more than the UNO
can run micropython, unsure re CP & MakeCode
esp8266 has 90kB and can run CP
So. SPI on the CPX.
I don't see no pins for that. Not sure what to wire to, to access MOSI and SCK.
@timber mango https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/boards/circuitplayground_express/pins.c#L48 shows MISO.MOSI.SCK on A1,A2,A3 not in that order...
Haha Thanks Jerry!
sck = A1 MISO =A2 MOSI = A3
I can see it on the schematic for CPX -- this is great. Can't wait to try it in hardware.
the should show up in dir(board) -- after import board...
dyno killed my joy.
Apparently, pasting code that has capitalization is verboten. pfft /stupid machines
You kids with your robots.
its to stop people who type lots of caps
grrr.
It also ate my post, including all the legit stuff in it.
That's not right.
Your robot is broken, Sir.
we need an ombudsman bot to hear grievances
hahaha.
so does NSA đ
I'll learn more by doing the analysis a second time.
lol, I can turn it off too

It's stupid as all get-out. I don't know exactly what all-get out means, but it is at least that stupid.
dyno needs a hug. hehe đ¤
I'm sure Jerry gave me what I need. Can't fight city hall, so I won't state what I learned.
@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.
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).
ah yes -- also higher up in the pins.c file đ https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/boards/circuitplayground_express/pins.c#L6
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).
@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 !!
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.
I think for 2.x the MISO/MOSI/SCK refer to the internal SPI, not the external -
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.
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.
I think you can use 2.x but just have to use the A1/A2/A3 names. Will test later.
@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 ...
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...
hi here's feedback!
-
there should be pull UPs on all the switches, they all connect to ground when pressed. please update the code and check
-
don't refer to line numbers in the text, refer to the actual text, because line numbers may vary if we change a pylint note
-
where did you add 'all the new products'? please provide the link you're referring to :)
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'. ;)
- Ok. Code is updated. Tested successfully on ItsyBitsy!
- Updated to refer to text, and cover the potential for someone to start with CPX and work backwards to Feather, etc.
- 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...
@tidal kiln @timber lion Screenshots updated.
@idle owl awesome
oh rad, thanks!
Np
@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.
https://github.com/adafruit/circuitpython/blob/2.x/atmel-samd/samd21_pins.c#L52-L65
https://github.com/adafruit/circuitpython/blob/2.x/atmel-samd/samd21_pins.c#L155-L175
The lines above seem to suggest:
- There is no primary SERCOM on these three pins: PA05-PA06-PA07
- SERCOM0.1 .. 0.2 .. 0.3 .. are the secondary SERCOM's for these pins
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.
@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.
Oh haha. I'm out of my depth, but my guesswork sometimes is functional, just the same.
@timber mango I'm pretty familiar with sercoms on the SAMD boards; let me check the schematic and datasheet
I have a Feather M0 Express ready to go, and it has lots more pins to investigate.
And the SPI pins are labeled đ
@timber mango can you use any pin on the CPX or are you trying to avoid certain ones?
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)
k
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).
@timber mango D6 as SCK and D7 as MOSI should work
On CPX I had to use the A names to succeed in Circuit Python 2.2.3
So you're saying PA20 and PA21 (irrespective of target board config) scratch that
We're talking about the CPX, right? that's PA5 and PA6
You should also be able to do
SCK=A3
MOSI=A2 or
SCK = A1
MOSI = A3
Okay because they're the same SERCOM0.x group.
Yea, SCK can be on pad 1 or 3, MOSI on pad 0,2,3
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).
@pastel panther thanks for the Rosetta Stone! That helps a lot.
what do you mean by "not really SPI or "always SPI"?
Terribly stated.
@solar whale hah, that's nothing; I'm working on an even more rosetta stone but it will take a while
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.
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
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?
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
That's what I needed to know -- that helps a lot.
I've already done the bitbang version and they're nothing alike.
I ran into this yesterday with the adafruit _dotstar.py driver. It does bit bang if HW fails. Silently..
bitbanged SPI, ST7565
@timber mango are you aware of bitbangio?
That was why I thought the itsybitsy dotstar was working but it was using bit bang.
@pastel panther I've heard of it and probably glanced through it.
@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
Yeah. I saw that, I just did not appreciate how clever the code was to automatically work around it https://github.com/adafruit/Adafruit_CircuitPython_DotStar/blob/master/adafruit_dotstar.py#L73
Probably this very conversation is what got me concerned I was doing non-hardware SPI without a code change. ;)
hah, no that's a feature of the library consuming the SPI lib, not the SPI lib itself
fair concern though!
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.
Sound like you are making great progress!
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.
I fought with that a long time ago wit ssd1306. Good luck!
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.
Time for bed here. I learned a lot tonight. Thanks @timber mango @pastel panther goodnight!
Thank you, jerry. You're always helpful and informed. ;)
night @solar whale
pa05 pa06 pa07
A1 A2 A3
D6 D9 D10
sercom0.1 sercom0.2 sercom0.3
sck mosi mosi
sck
looks right
@candid sun Great job on the new guide!
@candid sun Totally! I saw the video on YouTube and I'm looking forward to watching /reading it!
@idle owl @pastel panther thank you both very much! đ
Oops. I think I just bricked one of my Trinkets trying to put latest firmware on it.... đ
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. đ
Solid purple neopixel, no mass storage mount, and no COM port in the device manager.
You can still get into bootloader mode?
Yup\
I suppose "bricked" is a relative term. I would say "3.0 is broken on a trinket m0"
LOL yes, I guess that would be more accurate.
let me test the same real quick
Sure thing. Fortunately I have a second one right here to test Katni's guide....
you can just put 2.x on the "bricked" one
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.
Hahahaha! Last time I tried that I left my soldering iron turned on all night....
Note you said "left my soldering iron turned on" not "burned my house down"
True that!
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
i'm pretty sure 3.0 was working on my trinket... let me boot 'er up.
also...did you mean to do haxpress??
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
3.0 from 19 feb is working for me... but that was before Scott broke it, right? đ
I'm working on fixing the sercom'd version
probably? @drowsy geyser was having issues with current master
bbiab, gotta pick up food
only 28 more doc updates to do... đ tomorrow is a new day.
Hello everyone, does a logic shifter replace the need for a capacitor and resistor when wiring LED's?
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 đ
@raven canopy I have been in Google for an hour. When I see a shifter I don't see capacitor/resistor combo.
is this for "regular" LEDs, or neopixels?
@humble mural are you talking about wiring up neopixels? or a current limiting resistor for a normal LED?
@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
ahhh. the cap would still be advised. the resister...shouldn't be needed.
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
assume you're using a separate power supply for the neopixels?
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
I always add the cap for stability and a resistor for input voltage/current inrush protection, even with a logic level shifter.
ya, that's pretty good practice
Older neos are a bit more sensitive than the newer ones, though.
Ahh that was my next question. I power the RPi3 using the onboard plug and I power the NeoPxls with another adapter.
does the Uberguide cover RPi? I can't remember...
@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.
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.
it's a pretty good reference
alright. i'm doc'd out for today. heading to dreamland... (not disney). đ¤ night đŚs!
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!
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?)
... and an array of 4,096 neopixels can eat up a lot of MCU memory
also that would be prohibitively expensive I would think
You'd do better with normal leds and shift registers
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.
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)
I mean a huge neopixel display could do some really cool stuff but it would be order of magnitude more software, and $$
@compact solstice are you limiting yourself to circuitpython?
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.
@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:
My build of a 9x9x9 Led Cube, -729 RGB Leds -3000 Soldering Joints - Arduino Mega - Further Upgrades planned I do not own the music.
Is my calculator correct? 4096 neopixels at 20mA each totals 82A (~410W)!
that sounds about right
and 20mA is the low end.
So I would need a comluter psu?
This will be a very fun project! I'll buy some treats!
That would be a beefy power supply
You could power it in sections pretty easily.
I have a couple of 450W that we have salvaged from old computer and I think even a few 550W.
@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
@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.
Were you to take something like this on you would obviously work up to the full size with successively bigger tests
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
... and usually have single byte-wide data inputs (sometimes with a control input) and ability to daisychain from panel to panel. Good idea. https://www.adafruit.com/category/327
I like starting with one of these https://www.adafruit.com/product/2026 then when they get it working add another, then add the last two.
Bring a little bit of Times Square into your home with this sweet 32 x 32 square RGB LED matrix panel. These panels are normally used to make video walls, here in New York we see them on the ...
Look at this...... I'm lat to the dance again. Lucky for me Adafruit beat me to the punch https://learn.adafruit.com/16x32-rgb-display-with-raspberry-pi-part-2
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!
@errant grail how do you prepare your popcorn?
Pretty easy since we're focused on low-fat, low-sodium. Microwave Orville R's.
not air popped?
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?
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)
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.
yum
Time to leave the cave, though. G'night @pastel panther !
ta ta
@pastel panther PIBKAC. I built for the Trinket with the wrong board definition. 3.0 is not broken for the Trinket.
@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)
@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)
ok 1 & 2 are now good
3) yeah you can only add products per guide not per page. so each guide should just have that board it references
time to mirror into the rest of the guides (itsy doesnt exist rn) - so please do that so each board mentioned has this page :)
???
mistake... input into other window đ
I do the same thing all the time
discord just starting talking to me... what the???
"codingpro just said 'fin'"...
đ
I'm streaming a video so just heard "garble"
hmmm - I hope there is a way to disable that!!
i have "text-to-speech" notifications set to "never".... maybe wumpus is groggy today.
Thanks for that, @raven canopy . I didn't know that setting existed.... đ
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...
yeah that talking is weird, glad we can disable.. i can see people abusing that
last minute comicon costume, all python powered: https://twitter.com/tdicola/status/969996417795174405
No second like the last second to put together costume for #ECCC2018 ComiCon: Tony Stark's 'punk rock' power armor with @adafruit Circuit Playground Express and @RealSexyCyborg sino:bit arc reactors! :) All Python-powered lights. Will have to get better video after the show. https://t.co/ZZq6Ngr2er
Speaking of things I don't know, what's the latest estimate for M4 production?
Tony! I figured you'd be on a mountain today. đ
ah that's tomorrow đ
nice double arcs, tony!
@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
@pastel panther Thanks! I was wondering if they were taking a hard dependency on 3.0 for the release....
It would make sense given that a lot of the excitement about the '51 seemed to be about how it would help CP
Agreed!
hey @timber lion did I hear that you put together an altimeter? Presumably with the MPL3115A2?
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. ;)
That makes a lot of sense, @timber mango . I kinda thought that might be the case, but I wanted to ask instead of assume. đ
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?
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
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.
yup yup yup
@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)
$ /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..
Hmmmm, maybe they're going with a CP-only release.
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.
Oooh that's interesting....
It's in the scroll back for yesterday or the day before, probably in this chan.
It's a sleeper -- CPX is also in there!
https://github.com/adafruit/CircuitPlaygroundFirmata/commit/92d3a35af4707a387e5a6d67527f2147305cbaf3
is straying offtopic. ;)
@solar whale a thousand thanks for the PAxx PBxx mapping info in circuitpython. I had no idea it was that flexible!
@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
@pastel panther It's a rather big rover. I need 120 Amps.
Per wheel?
A pi per wheel just seems excessive to me when a tiny85 could handle it
Oh no no, not that big. That's total.
heck, a tiny10 could probably do it
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.
How are you planning on having the pi's communicate to the "brain"?
Yes, absolutely. There's an onboard network.
The other p roject (the high power rocket flight controller in CP) is done and built.
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
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.
are you using the BME for control or just altitude monitoring?
Now I'm building a 62" x 4" High Power Rocket around it. đ The BME is just for altitude.
Is it a fully custom board or a feather wing?
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.
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
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.