#circuitpython-dev
1 messages Β· Page 154 of 1
Oops. I was over at the Maker Garage (Microsoft's maker space) tonight. I was working on CircuitPython guides and one of the Makers asked what I was doing. I explained what CircuitPython is. He took interest and sat down. I was showing him the boards I'm working with and he was fascinated with the CircuitPlayground Express. He was like a little kid, looking at all the sensors and NeoPixels. So I gave it to him. Then I got home and found out that may have been my only unintegrated CPX. So I can either tear something apart or get a few more boards. I prefer the latter, but it's out of stock. sigh Oh well. I got "volunteered" to speak for an hour about Adafruit and CircuitPython, which is cool. So now I need to write a presentation and line up my boards to demo live!
@drowsy geyser that is awesome, shame about the last board though
It's ok. When they make more I'll order a few and all will be good again. π
it's weird that it's out of stock though, since they now add it to orders...
Oh hey, I'll be getting another one with my subscription to Maker: Space magazine. I'll have to go check my mail.
And who knows how many I'll find if I finish cleaning and organizing the lab. Maybe I'll do that this weekend.
hehe, like pennies in the couch
LOL, yes, like that!
since I'm traveling later, got to dig out the traveling with electronics guide (https://grathio.com/2012/04/flying-with-homemade-electronics/) to refresh my memory.
finding devboards and random wires in my backpack was "like pennies in the couch"
@drowsy geyser What do you mean by "unintegrated" CPX?
not in an existing project
ah yes,of course
Yep, that's it. Like one of the is soldered into my arc reactor project, for example.
@stuck elbow Did you use any existing art assets to create your blinka board or did you do the whole thing in fritzing?
@pastel panther I traced the logo from adafruit's website in Inkscape, and prepared all the graphics layers in that program too, then imported it into Fritzing
now I have a vector logo, though, so it will be better quality
Have you thought about making a blinka badge? With all this "badge life" talk I thought it would be a fun idea to advertise CP at cons
I was thinking you could have her belly scales be cap touch responsive
yeah, sure, but it would need to be larger, to include the battery
also, that's kinda low priority atm
I think badges are generally around 70x140mmish
Would you be willing to share the artwork?
I have no idea if/when I could/would work on it but it sounds like fun
I need to send a note to support about getting SVG Adafruit logo files. I want to make someone a present with the laser cutter.... π
That would be cool
This is already split into layers. You should be able to use it with whatever program you like for PCBs.
It's also cleaned up as much as practical
π
@drowsy geyser I have spare CPXes if you need another soon
Thanks, @slender iron! They just got restocked, so I'll have another set on Wednesday - some to use and a couple to give away in the Maker Garage. π BTW, laser training is completed successfully, so if you need acrylic objects created, just let me know.
@drowsy geyser ok perfect. π I just ordered parts for a shruthi (synth) filter and will probably just use a feather and circuitpython to generate the inputs
Oh cool!
I was thinking it'd be neat to have a module control panel system
Oooh, that would be neat. Collin would approve. π
yeah, I was thinking it'd be trellis compatible
On it. Looks like the register docs removed a reference that the CircuitPython docs link to. Fix is here: https://github.com/adafruit/Adafruit_CircuitPython_Register/pull/13
@slender iron are you making one of these?
https://cs80-com.myshopify.com/products/cs80-filter-board-for-shruthi-synthesizer
I did the classic one: https://mutable-instruments.net/archive/shruthi/build/smr4mkii/
@slender iron I know you may not have an answer for this, but is there a targeted release data for 3.0? I'm trying to schedule a talk in the Maker Garage about Adafruit and CircuitPython and was wondering if I could time it to coincide with new software/hardware releases....
LOL! Ok. (That's the answer I give my kids when they ask how long they should cook something. "Till it's done.")
π M4 board releases aren't blocked on it
That's cool; I was wondering about that
Oh cool. So it's just production scheduling - I heard a rumor the chips are available.
if either of you have time for a quick review you could help me fix the build: https://github.com/adafruit/Adafruit_CircuitPython_Register/pull/13
@drowsy geyser we're still fiddling with the pinout
Ah, ok.
we want to support as much stuff as we can
Totally understand. I'm not nagging, just collecting information. I'll schedule the talk and fortuitous timing will just be icing on the cake.
I can take a look in about 15
Good point!
its because we need the audio stuff to get into beta
and dma is nice to have but not critical
(for qspi)
I'll check it in commented out if you want to poke at it @pastel panther
Ok cool
hopefully you can figure it out for me π
Lol,suuuuuuuuure, I bet I'll figure it out in no time π
@pastel panther you going to review? i just jumped on and catching up...
aww man...that was my change. see, i'm really good at breaking stuff.
@slender iron reviewed and merged.
well, in usual fashion. kattni gets it done just as i'm starting to look.
lol. page blinked, and i was like "merged? huh?"
π
Restarted the build on my PR. Waiting on that now.
@idle owl! Leave some for the rest of us!
j/k π
π
I mean I'm totally ok with that... π
Passed!
@raven canopy https://github.com/adafruit/circuitpython/pull/661 Can you approve or request further changes?
can do!
@idle owl approved!
thanks for the review sommersoft
Thanks for the merge!
np
thanks for the doc fix!
Thanks for all the thanks!
you're so welcome! π
Oh. Was busio how we controlled DotStars before we did up the DotStar lib?
Not sure? It's certainly how the status dotstar was working. I'm assuming the dotstar lib has more features since it's not trying to fit in the main CP code
I'm updating some guide code and was confused momentarily about the fact that there was no dotstar import until I remembered that it was written pre dotstar-lib. And it seems to use busio. So I asked.
I've been meaning to read the code that does all the animations for error stuff because it's obviously not blocking so it must have some update routine that gets checked periodically
i've seen it...just can't remember where exactly off the top 'o my head.
@idle owl yeah busio
Thanks
@pastel panther @raven canopy https://github.com/adafruit/circuitpython/blob/master/supervisor/shared/rgb_led_status.c#L204
haha, I probably glanced over it more than a few times as I was communing with the top half of that file
Is there a reason we don't have board.DOTSTAR on the boards with dotstars?
Is it the nature of DotStars vs NeoPixels that it can't be narrowed to one label?
right
oh ok
since its two pins
Ok. Wanted to make sure there wasn't code magic that could change that. And also that I wasn't missing something.
QSPI is not currently working so its commented out.
This is progress on #652.
It works for me with the changes from #663
Hi developers, I search for help.
I have received 2 pcs Trinket_m0 from a friend from US, it's a nice and inspiring piece. Recently I have also contributed to campaign INDIEGOGO and few days ago I received 5 pcs of Exen Mini (https://www.indiegogo.com/projects/exen-mini-smallest-32bit-arduino-comp-dev-board-diy#/).
I got an idea to port CP to this piece as itΒ΄s the same microcontroller, SAMD21G18A. I did git clone CP and uf2-samd21 and successfully build bootloader and CP. Somehow it works, IΒ΄ve tried several small programs in CP but one thing worries me... if I do tap reset twice, I canΒ΄t get back to bootloader... itΒ΄s smooth with Trinket_m0, I can try 100 times without any problems.
Probably I miss some information, knowledge to build the bootloader correctly. Can someone please help?
PS: Your work is perfect, same with documentation. ItΒ΄s not a problem that IΒ΄m on the other side of the Earth (Czech Republic), I always find what I need on your web pages. Thanks.
So you were able to get CP loaded and working? The CIRCUITPY drive shows up? But you're saying the bootloader won't go into bootloader mode?
Did you base your uf2/bootloader build off of the trinket files?
Yes, CP is working like you say but if I tap 2x reset I am not able to "jump" to bootloader...
... CP drive shows up and I can move *.py files there...
... bootloader and CP built from Zero... I have changed only LED pin to PA06 in bottloader (board_config.h)...
But it worked once for you to load CP?
CP works all the time... I cannot simply recall bootloader by 2x tap the reset button.... CP drive stays for all the time unchaged om the same COM...
... yes, bootloader worked one time after flash and never again...
@buoyant wigeon CP drive stays for all the time unchaged om the same COM...
does a single tap reset the board? it sounds like reset.c is at minimum not recognizing the DBL_TAP_MAGIC value.
https://github.com/adafruit/circuitpython/blob/f00d2814b78e092656a05cb16674c37f6587b062/ports/atmel-samd/reset.c#L37
if I do single tap reset the board get stuck ....I have to unplug microUSB cable and plug back... and CP is working again...
a single tap should just reset the board. If you're connected to the REPL with screen, sometimes it can leave your terminal in a unusable state if the connection drops
yes, my small test program does some prints and after single tap the output is stopped...
CP is working ...
@buoyant wigeon thats awesome! Feel free to contribute a board definition for it by making a pull request
@buoyant wigeon the only thing I can think of (which is why i wondered what single tap did) is that the reset button isn't acting exactly how it would on a zero. do you have any documentation on the whole pin setup?
π I am amateur... if it is not ironic?
and there are people here that would be much better than I at helping with that further...
and we love amateurs (well, i do, since i'm one) π
@raven canopy Is that everything from issue #566 ?
It is sad I have asked Nerdonic for schematic but he answered "Hi Frantisek, unfortunately we are not giving away the schematic and PCB design for the Exen Mini, but we plan to in the future.
Kind Regards,"
@idle owl as mentioned in the task list, still need to go back and add the Travis badges for quite a few. avoidance is what i'll admit to; needed a doc break. I could most likely knock them out this weekend.
Oh no worries!! I realised I had gotten through them and wasn't sure where that left the issue. Take the break!
most of the "work" will be git'ing. π
Seems like it always is π
the temptation to script it all is there...but it's a one-off, so would likely take more time/energy than its worth. π
@buoyant wigeon it can't be that complicated since its so small
@stuck elbow is gamepad working in 3.x? it looks like its reset method isn't called
@slender iron I think so.... but I do not know where to go now ... I have to think also about HW.
I hoped that you have "some hidden SW hack" why I am not able to build OK bootloader...
so bootloader is probably OK... also webUSB is working...
@buoyant wigeon I don't think the bootloader issue is due to circuitpython
where did you get the uf2 source?
here ... https://github.com/adafruit/uf2-samd21 ... at your place
@slender iron I have one question before the midnight here ... if I built the bootloader today I got a bootloader with this name "bootloader-zero-v1.26.0-adafruit.0-dirty.bin" ... why is there the appendix "dirty"? The results of the build were sooner without a word "dirty". Does it mean something "not allowed" or "any warning"?
@buoyant wigeon I don't know the details, but it's not a warning. I know we've worked with many builds containing that appendix. I believe it has to do with changes made to the build that aren't part of the final build. But like I said, I'm not certain.
@buoyant wigeon Someone else will know better than me, and I'm sure they'll get back to you later, so check back in the morning. But know that it's perfectly fine to work with a ...dirty.bin build.
@idle owl Thanks, I'll sleep more relaxed π
@buoyant wigeon π Have a lovely sleep!
@slender iron its not. it works when created from the repl, but crashes when created from code, and I didn't have time to debug it
I didn't even report a bug as I planned, because I didn't test it properly
@buoyant wigeon "dirty" is a term used to indicate changes have been made locally since the last commit
Ooh I was essentially right.
yup
PWM and Cap Touch are both ready to be looked at!
Continuing on Internal RGB LED now.
@slender iron is this blocking anything? I'm hoping I will have some time this weekend to debug it.
I didn't report this properly so far, because I wasn't able to pin point exactly what makes it crash. This is what I know:
- When imported and created from the REPL, everything works perfectly fine and there are no problems or crashes.
- When imported and created from a frozen mpy module, it crashes as soon as it tries to read the pin states inside the tick. The crash completely disables USB communication, so the disk becomes unresponsive too.
- The crash happens in the tick function whe...
Did you remember to uncomment gamepad_reset in port.c?
Yes. I also found and fixed a potential race condition in initialization, but that didn't help.
@slender iron for expanding supervisor to nRF, should I add some handling for set_rgb_... , since the LED isn't currently on the board? if you currently set it, it acts like everything is fine... i can have it return something, or raise a NotImplemented.
I guess the same would go for the [dis/en]able_reload...
which is the same as just leaving it as is? the common-hal doesn't handle them..
just food for thought. i know you're heads down, so don't break away for this.
its fine if it silently fails
someone will tell us it doesn't work if they care
/ we'll fix it up as we refine it
π
nice!
alright. π done! time to slice. then a movie..i think. pre-teens can be fickle. π
oh esp8266, you little oddball. π€
yea I don't if the right place or not but still gonna ask
so the concept of Deep learning and machine learning intrigues me
as a Mechanical Engineering student I can see so many places that it can be used
but I have no clue on how to " GIT GUD " at it
so my question is
from where should I start ?
ps: should I install ubuntu in pc or windows is fine for a beginner like me
This is probably better suited for maybe general or project help, however I have a few resources I can point you to. One minute while I find them in my bookmarks
@tribal pecan I @mentioned you in #help-with-projects with a bunch of links to check out
i just dug farther into the esp-nonos-sdk than i ever wanted. i can now proclaim, i'm still lost. π΅
the naming conventions (which carried over into micropython [understandbly so]) are....bizarre? hehe
A wise man one said "being lost is the first step to understanding"
that man was me, just now
π
well, i just read someone's "esp uart journey", and I think my "lost" was actually a state of "can't be done". π
I've come to the conclusion that serial_connected will not be possible on the ESP8266. Full details posted in #544.
Pending any changes after review or further discussion, this is ready to merge.
After a slightly exhaustive dig into the ESP8266 UART realm, I have concluded that serial_connected will not be possible on ESP8266. My previous comment on "poll UART0" didn't pan out. Here is what I think I know:
- UART is handled on chip, with serial going through the USB-to-UART.
- UARTs are setup the same regardless of power supply situation.
- The chip handles UART with interrupts, filling the FIFO on RX. The interrupt is switched off when reading the FIFO, then turned back on.
- T...
Good morning everyone. What is the board the functions with BLE and CP?
There is budding support for the feather nrf52 on the 3.0/master branch but it's not really ready for regular use yet
Adafruit CircuitPython 2.2.3 on 2018-02-05; Adafruit CircuitPlayground Express with samd21g18
@humble mural I think however that there are some ble breakouts that might be useable with CP
@pastel panther Thanks, I am running through several of the guides in Adafruit and I am having trouble using Wifi options. Our schools has many restrictions and firewall and they really don't allow stuff to talk to each other.
speaks UART which the feather m0 express, metro m0 express and likely others should be able to speak, however I don't know of any guides that would talk specifically about using them together
@humble mural are you just looking to do wireless stuff or do you have specific goals like talking to a computer/phone/internet?
In short, I am an building a 2-3 year curriculum that includes as many uses and applications for "IoT" type of devices. I like BLE becasue we can run that in the classroom with no issue.
I'll start the kids on the CPX, then move up and on from there.
So I am doing a lot of the guides at home so that I can determine what works and doesn't work in the classroom setting.
Overtime, I would like to develop lesson plans tied in to nation standard that we can share.
this might be useful for working with the aforementioned nrf8001 breakout: https://learn.adafruit.com/adafruit-gemma-m0/circuitpython-uart-serial
@pastel panther After all that I would like to control NeoPixels, servos etc, wirelessly.
Can I ask why IOT? not that it isn't a decent theme to organize this type of learning around
right
@humble mural esp8266 can act as both a station and an access point...
even at the same time
yep
that's better than my laptop
@pastel panther Not married to the term, just a term that I can use in discussion with school personnel and they will have a concept of what we are doing.
@raven canopy for wifi only correct
it's probably really good for that purpose as most admins might have heard of it but probably have never heard of "embedded"
yes, wifi only. but, just wanted to make sure that you knew that 2 esp boards can talk to each other.
it seems the people who know what they're talking about have awaken so I'll defer to them
says the guy working on M4 core stuff... π
I only look like I know what I'm talking about, honest
mimics deshipu
@pastel panther Let me give you a quick run down of where we are at, I teach programming (high school level) and we are experiencing high level of burnout (basically kids get bored of coding in front of a computer for three years). I was brought in to change the program, keep the programming roots but infuse other skill that will make the student better prepared for college.
brb. time for coffee cup #2... β
@raven canopy that's a great idae
we also have to compete for students with other schools, we are a 100% magnet school, if kids don't apply, we don't have students, so the program has to have a marketing edge to it.
In searching for a name for what we do, we came up with the (IoT Strand of the Acadamy of Information Technology)
well, with that in mind, i can see the draw to BT/BLE. Then you can marry the programming side to something they absolutely love: their cellphone. π
@raven canopy BTW, I had no idea two ESP8266 could talk to each other, that is a game changer for me,. I'd buy you that second cup of coffee just for that bit of news.
Bingo!!
I think an esp8266 working in AP mode can accept connections from up to four other devices
so there are limitations
People think they understand IoT, I feel embedded (though more accurate) would make parents think that we are sticking there kids somewhere) like embedded reported in the military etc.
how do I type the first character of your name beshipu so Discord picks it up?
the idea that you should be chasing students at a magnet school is crazy to me
but that's beside the point
the esp would allow you to construct a "how do we" scenario. but like you said, that's all in front of a computer screen. the off the shelf BLE apps will only do so much (that i know of; haven't messed with it myself), so look into that set of limitations too.
nRF is young, but it is functioning on a basic level.
I should really get 3.0 on my nrf52. I just want to figure out how to get mynewt back on before I wipe it
@pastel panther It is nuts, we have some schools (regular public schools) that have enrollement issues becasue of violence, school grade etc. The district has set up very appealing (all marketing) programs at these schools to draw students to stay at their home school. People want to come to our school because rankly, it's paradise, but we are losing kids the other public schools because of the glitzy programs they offer.
Thats crazy
We have to offer programs on the down low. We have students visit our school and they see what we dow but the actual program can't appear on a Magnet Application.
It's been a while since I was in HS but I was fortunate enough to get into the locala magnet school, but people were beating the door down
say that again
?
@raven canopy left me finishi this thought, I'll catch up
π i'm going to get back to documentation work; i'll be bouncing in and out of discord.
@pastel panther so My prinicpal wants the kids programming, making bluetooth helmets, programming neopixels, 3d printing case for the stuff they make so that when kids walk in to my room with their parents they are blown away. Trust me no one is doint this in our county, This will be the frist true "Maker" program in our district, just can;t call it maker because most parents just don't know. We are a title 1 school
@raven canopy I just read your comments a bit over my head. can you post a link to a guide that explains (provides an example). I have about three ESP8266 in my bookbag, I can test it out today.
@pastel panther me too, hate politics love working with kids!
thanks
@humble mural that last comment was kind of a mash of two topics. let me expound a little.
- using the esp8266, I was thinking that using them to communicate with each other for a targeted reason (esp1 detects a button push, tells esp2 to turn on an LED) would allow you to construct a "how can we make this work scenario". obviously you'd have to start with explaining capabilities in a way that doesn't exactly make the desired end goal blatantly apparent.
- The Bluetooth apps that are available to work with the nrf52 boards do have some limitations as to what they can do. As far as I know of, at least. here is a list/info on the apps: https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide/software-resources
- I understand the concept, no guide for that, or do I Google that one?
- I will look at that guide today, though I don't think I have an BLE board in my bookbag
Also, this is all for CP?
i don't recall Adafruit having a learn guide on having two esp8266s communicate. but, there are plenty of examples in "the wild" of having the esp8266 handle incoming requests (mostly Arduino).
the nRF resources for CP are pretty non-existent at this point; still young and all. once it's officially supported, they'll start flowing.
maybe? my knowledge of micropython comes mostly from circuitpython. i don't spend much time on that side of the tracks. π
π½ enjoy!
hey @slender iron I pulled master again, updated my board files and got QSPI working on my m4 board, wew!
aaaaaad he runs away
nice @pastel panther ! now you should get dma working π
(had to feed hungry kitties)
haha, sure. I'll take a look. Does the code show well enough what wasn't working or can you give me some clues?
I was ussing the saleae to watch it
I'd get two sets of four (maybe eight) clocks to read data in but then it'd stop
the code would hang waiting for the dma transfer to complete
hmm, ok
I was able to make some sense of the traffic with the normal SPI plugin, however I found a third party QSPI analyzer. Couldn't get it to compile though
the spi one works just fine because the command and address look the same
the data just won't make sense
right; I was slowly training myself to recognize the commands. The one I found can decode the commands as well (it seems from the code)
bbiab, running to frys
ok. the PR emails should slow to a trickle now.. π
@slender iron subtract 42 from the PR numbers for the meeting; today was cleanup for missing Travis badges on most of the docs. rework doesn't count!
@slender iron what is the [desired] RTD path for cookiecutter? going to work on the conf.py (both actually) before i get this library started. Also going to put some Windows "warnings" in based on my experience. π
you mean url?
yeah
hmm. i might have to explore using WSL Ubuntu...
@slender iron can you point me to that plugin?
might make things like cookiecutter a little easier.
nevermind, I can google
https://github.com/kasjer/saleae_spiflash if anyone is interested
By the way, gamepad will not with CPX buttons, because they are pulled down and when you press them, the connect to VCC, and the gamepad library expects the pins to be pulled up, and when pressed, connected to GND, as is the usual way for handling buttons. I didn't know about CPX buttons when I wrote it.
Nevertheless, it should not crash.
@drowsy geyser cpx back in stock.
@timber mango Yep. My bag full of them arrives Tuesday. π
I messed up one of my three (somehow) but it's functional enough to keep using it. The other two are awesome.
I ordered extras since I'm giving a talk at about CircuitPython for the Microsoft makerspace. I'll have some extras to give away. π
Yeah on my TODO list is to obtain a few boxed sets (it's a 5 dollar upcharge) to hand out.
People go nuts when you just h and them hardware and say, "here, these are awesome!"
I gave the nephews a variety at xmas time; cpx, trinket m0, feather m0 express and maybe something else or a duplicate. Figured they'd fry at least one and hoped they'd not fry the CPX right away. ;)
LOL! How'd it work out?
They are lost boys (now men in their early 20's) and do not speak except in their basement/dungeon areas to other friends. Surprisingly, quite verbal when stuck in a car with them on family errand. So not one word. ;)
π
They're all hooked up to internet and are in college so I don't worry too much.
We went out and did mischief with our cousins (outdoors) at family gatherings. these two bow their heads and pray to handheld devices. Six of one, half dozen of the other.
I hear you. Conversely, I gave a CPX to a friend, who handed it to his 11 yo son and said, "go make a burglar alarm". Kid loaded up MakeCode and about five minutes later brought it back. You turn it on and if the accelerometer detects movement it beeps and flashes the lights. My friend was impressed with his kid. π
is that how Tested got a hold of one?
That's pretty good. I wonder if there was some existing knowledge in the son the friend was previously unaware of.
My niece was 2-3 yrs old and in the grocery with her mother (long ago). She conversed fluently in spanish with the produce guy. Her mother was completely unaware the girl had acquired a second language (from someone they employed about the house).
That's awesome!!!
Her brother is now fluent in Mandarin and has had an interest in it since age 9 or so (he's mid 20s now and in a formal training program in Mandarin).
I envy people with language and artistic skill. Since I have none....
that is pretty awesome. i've tried to push a second (and his mother's native) on my kid...not successful.
My mother was fluent in Polish when I was a child; with nobody to speak it to/with, she lost the skills. Her grandmother spoke no English (at all).
Same with my grandmother and her grandmother (only it was German, not Polish).
I just try to tell any young people to try to preserve whatever they've got in cultural heritage. In the name of assimilation our family lost a lot of ground.
the downside to being a herding animal...
Agree. Mine is the same way. Though genome sequencing and ancestry.com have done a lot for preserving/exploring the family tree. My family's ancestors for example, came over on the Mayflower.
Ellis Island also took away our proper names (Irish and Polish names). I think. Don't know the conventions in names to be sure. Then one great (xn) uncle decided to change the spelling of our branch of the family's name, because he was tired of getting his brothers ground mail deliveries by mistake. ;)
Alright I'm not #circuitpython-dev even a little, here. ;)
True, we've wander just a TAD off topic. π
I'll put what I think about this in #general-chat, after watching it a bit so I don't just splashdown, there. ;)
@pastel panther I saw your note about being lost... Davey Crocket was once asked if he'd ever been lost. He replied "Lost, no, but I've been bewildered for a few days at a time, on occasion. So I guess he knew quite a bit. :^)
LOL
some people call it lost, others call it adventuring or exploring
"The only true wisdom is in knowing you know nothing." ~ Socrates
Or "learning"
@languid sage i generally fashion myself as a "its about the journey, not the destination" kind of person. so, like Davey...nope, never been lost. π
even though, i'm quotable for saying "im lost" in this very channel (and elsewhere). hehe
I usually start off with a destination in mind, but some times there are unforeseen forks in the road, with no route signs. When I entered college I never dreamed/imagined the job I'd retire from many years later. As the say, when life gives you lemons, make lemonade. So, it is all about the journey.
Strange things happen above (1 << 22):
Adafruit CircuitPython 3.0.0-alpha.2-dirty on 2018-03-10; Adafruit Feather M0 Express with samd21g18
>>> hex(int(float(0x300001)))
'0x300001'
>>> hex(int(float(0x3fffff)))
'0x3fffff'
>>> hex(int(float(0x400001)))
'0x400000'
>>> 0x400001
4194305
>>> int(4194305.0)
4194304
>>> hex(int(float(0x4fffff)))
'0x4ffffe'
>>> hex(int(float(0x4000001)))
'0x4000000'
>>> hex(int(float(0x4ffffff)))
'0x5000000'
>>> hex(int(float(0x3fffff...
Iβm not sure I understand the βstrangenessβ. floats can only represent about 7 significant digits. https://en.m.wikipedia.org/wiki/Single-precision_floating-point_format
CircuitPython uses a modified single-precision floating point representation. It's a conventional 32-bit IEEE float with the bottom two bits set to zero (parts of encoding pointers, ints, and floats in a single-word format). There are 8 bits of exponent and 22 bits of mantissa. Further explication in https://github.com/adafruit/circuitpython/issues/230.
So in a "lull", I found myself diving down this rabbit hole. I'm thinking that it's ATMEL/ASF USB related. I narrowed into mphalport and the stdin/stdout functions. ATMEL uses the ASF USB construct for interaction.
So, to test my budding theory, I did two things:
- Tested pasting a long string in both regular REPL mode, as well as paste mode (Ctrl+E). Pasted string cut off at the same point (128 chars).
- Full Test string: `x = "Testing 128 character pasting into the REPL to see if...
Ok, so I don't think I'll have to get to the ASF level. But, here are more intermediate notes...
mphalport.c:mp_hal_stdin_rx_chr&mp_hal_stdout_tx_chruseusb_read()andusb_write()respectively.usb.c: read and write functions rely heavily on constantUSB_RX_BUF_SIZEusb.h: setsUSB_RX_BUF_SIZE = 128
Might be too coincidental, but I'll keep pulling. Really wish I had a JLink...
@slender iron @tulip sleet for Monday .. Does CircuitPython support i2c clock frequency setting by the end-user in a friendly way? Is the default frequency modest enough to ensure good communication with a low skill level of circuit implementation?
refs.
* https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/common-hal/busio/I2C.c#L42
* https://github.com/adafruit/circuitpython/blob/master/shared-bindings/busio/I2C.c#L42
* https://github.com/adafruit/Adafruit_CircuitPython_BusDevice/blob/master/adafruit_bus_device/i2c_device.py
or, if you prefer documentation: http://circuitpython.readthedocs.io/en/2.x/shared-bindings/busio/I2C.html#busio.I2C
Doesn't seem to work for me with the changes you mentioned
Thanks, @stuck elbow. ;) Missed that #L70 and didn't realize the readthedocs was quite so specific (by URL).
I think it strange that the implementation doesn't understand it's own limitations when it comes to printing numbers. I expect it to work like cpython or say so when it can't. At least it's suprising behaviour for someone not steeped in the implementation.
And loosing whole number precision is very suprising, for me at least, but then again I have never looked at how float is implemented.
>>> int(4194304.0) == 4194304
True
>>> int(4194305.0) == 4194305
False
>>> int(4194304.0 + 1...
I just tested this today on the build-metro_m4_express_revb and it seems to work. The cases I tested:
- imported and initialized from REPL
- imported and initialized in main.py
- imported and initialized in a .py module imported from main.py
- imported and initialized in a .mpy module imported from main.py
- imported and initialized in a frozen mpy module imported from main.py
I will test on the M0 to make sure, but maybe the bug got magically fixed somehow.
Speaking of issues, I found a bug in either simpleio or CircuitPython 3.0 Alpha 2 where PWM output works only intermittently (whilst testing @idle owl 's guide code). I opened an issue in the simpleio repo. Do I also need to open an issue in the CircuitPython repo and link the two together? I'm really not sure where the bug lies yet....
I tested it on feather_m0_express and the bug seems to be gone.
With #664 closed, we can finally enable it.
It would be great to get touchio ported to the latest CircuitPython release.
Board: Trinket M0
Version: Adafruit CircuitPython 3.0.0-alpha.2-13-gdde5ade-dirty on 2018-03-10; Adafruit Trinket M0 with samd21e18
Replicate by: "import touchio" generates "ImportError: no module named 'touchio'"
It would be great if gamepad were "ambidextrous", button polling is, as I'm sure you know, a surprisingly tricky business and I don't expect they can/will change the pull-ups on the CPX buttons at this point.
Sure, but I'm still thinking about how to do that.
(Though it might be simplest if it's all-or-nothing, "mixed mode" would not only be hairy to implement, it would make for a complex/confusing interface; better to make two GamePad objects, one for "negative-press"/standard buttons and one for positive-press.)
Note: I'm thinking the GamePad init would take a "pressed = True"/"pressed = False" (defaulting to the latter) argument; clients would make two instances if they wanted some buttons pulled-up and some pulled-down.
This ticket kinda duplicates #268, but that ticket is specific to the M4 and this one talks about the m0
I opened an issue in the CircuitPython forum and tannewt and jerryn helped me. Now it's a couple weeks later and I continue with an issue using a DotStar 30/m white strip. I've reviewed the APA102 & 102C data sheets, read Tim's blog (cpldcpu), and I am mystified at what I'm seeing. I've got a sorta big write-up going with the latest DotStar library (1.1.4) and some empirical evidence regarding the End Frame size. Where would be the best place to post this?
I received/built a MetroWing board form @pastel panther /OshPark. Going to revisit my dotstar wing game stuff on a MetroM4 with 3.0
I would rather prefer checking if the DigitalInOut instance has already a pull, and then react accordingly, otherwise default to pull-up.
Hmmm.. except that it doesn't give me a CIRCUITPY drive. CP build from master. It's running, and REPL works fine. Just no CIRCUITPY drive.. although it sounds like it tries to mount & unmout (Ubuntu makes noises for those things)
@umbral dagger is that the black metro m4?
@umbral dagger build the firmware for rev b board
@umbral dagger the new revision has flash connected differently
I want to emulate a DS1307 on a Feather M0 so I need access to clock time. Has anyone given this some thought?
What the internal representation should be: seconds or struct tm, and how should the clock be set, board.setclock()?
I see that the samd21 clock can run in several modes.
Code so far:
inline uint64_t common_hal_time_time() {
return (18 * 365 + 74) * 86400 + (19 * 60 + 4) * 60;
}
mp_obj_t struct_time_new(size_t n, const mp_obj_t *items) {
// TODO: How to co...
ya, @umbral dagger make sure you're using BOARD=metro_m4_express_revb
'twas changed with the addition of the rev D with qspi which should be close to the final board
@pastel panther are you also adding qspi to your board?
already did. It's tested and working
I have a debugged board file if you're interested but I think I'm going to shrink and stretch it into a bitsy and feather
I think the bitsy will omit the SWD connector and qspi debug headers
how about the oscillator?
@timber mango it's got a crystal but I'm not sure that 3.0 is using it yet so technically it's untested
I suppose I could write a simple clock setup but it's not at the top of my list
also "simple clock setup" on a samd = lol, right
I'm asking, because ultimately I would like to make a bare minimum board for it, crystalless like the trinket
You certanly could you only need it if you use it. You could also omit the inductor for the voltage reg if you can make sure it only runs in linear mode
And you can also use the 2x3mm flash chip like is on the bitsy express
now that I look at it, the bitsy is also crystalless
You can also make it even more minimal if you don't need to have two simultaneous power sources which requires the two diodes, though there are some really, really small diodes out there
gotta run for now
@stuck elbow @pastel panther That did it. Thanks
And... it's mounting readonly.
π¦
@pastel panther I know it's technically possible, I'm just afraid that I won't be able to figure out the correct settings
[Afternoon , everyone!]
@dawn gull If you believe it's an issue with the DotStar library, you can open an issue on the DotStar GitHub repo. Otherwise you can open another thread on the forums if you'd like.
@idle owl Thanks for the quick response. It's more of a question about the End Frame, either Python or compiled. I'll open a new forum question with the data.
@dawn gull Ah that would be great! Thanks!
why do i keep jumping head first into ASF/USB issues. the framework is so long and fragmented that i end up retracing myself every step of the way. π£
ASF is a jerk.
yeah. i get Atmel's goal of "why spend your time writing drivers?"....but, bleh.
I wonder how hard it would be to make a modern, 32-bit microcontroller, but with the interface as simple as the AVRs have.
@idle owl I think you should consider ASFs feelings before posting such negative comments π
@solar whale It's true, that was very inconsiderate of me.
Internal RGB LED is ready to be looked at!
Next up in some order is Servo, NeoPixel, DotStar, CPU Temp. And the rest :)
@raven canopy https://github.com/adafruit/Adafruit_CircuitPython_APDS9960/pull/6 failed travis.
hmm...i thought i checked all of them. looking now.
thanks!
argh! a space snuck in...
or, not?
hmmm
protip: close your opening parens... π
π
and, hopefully merging brentr's PR doesn't cause conflicts...
there. Travis is happy once again.
Which PR of Brent's?
on APDS9960. from the autodoc fixes. its still open
Oh good catch. Thanks.
well, the file that he changed...doesn't exist anymore. and that PR looks weird. "2 commits" with "0 files changed". π€
I retriggered the build and it passed...
I think the changes were merged.
Maybe you came through and did it also and that PR got merged?
Because the changes are in master.
I think it can be closed.
@raven canopy Thoughts?
i'm trying to make sense of it. π
Ok. Let me know what you conclude.
i think if you try and merge, it will conflict. closing it will cause no issue, since the changes in that PR are also in mine.
but, git AND github are mystical lands that often make no sense to me...so yeah. π
π
https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH/pull/27 -- maybe I should have another example?
but I wrote that code at least a month agoand hadn't actually tested it until now
so I wanted to finally make a PR π
...
it's ucollections?!
I have tried to import collections multiple times and been disappointed. I didn't realise it existed in u form.
Haha I only know because @tulip sleet told me basically exactly what to do
Oh dang I didnβt include the issue number
Oh... It's the automock
I think anyway, I believe you need to add ucollections on this line: https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH/blob/522775f6c1c0aec48b94f27fedb4639c8f31dfcd/docs/conf.py#L21
what's the command to run the test that failed?
oh wait, The command "cd docs && sphinx-build -E -W -b html . _build/html" exited with 2.
/home/dconley/circuitpython-repos/Adafruit_CircuitPython_LIS3DH/docs/api.rst:: WARNING: default role any not found
computers are hard π¦
pushed, let's see how it goes
that did it! thanks.
@opal elk autodoc gets us all. π
I need to figure out how to get the Travis build to run on my local machine to avoid βwhoops I did a boo booβ commits
Of course I referenced the wrong issue number in my second commit too. Iβm on top of it tonight.
it's pretty easy. i run travis on my forks before PRing
i can help if you need. (i don't build on local machine...travis does it better)
Ah, got it. Iβll look into it soon-ish.
I run pylint and build sphinx. And that covers most travis failures.
well, i will put this disclaimer: my method increases commits. π
But I can always delete the branch on the remote, squash commits and push a fresh copy to hide my shame!
(Not that Iβve ever done that at work...)
We don't judge π
why do buffers always have to be...well, buffered? harumph.
<@&356864093652516868> and anyone else interested. Meeting tomorrow here on Discord at 11am Pacific / 2pm Eastern. Note: We here in the US changed to daylight savings time. So double check your times here: https://www.timeanddate.com/worldclock/fixedtime.html?msg=CircuitPython+Weekly&iso=20180312T11&p1=234
Late night notes/sanity check, after beating usb.c into my brain and breaking it by using printfs.
Using the USB_RX_BUF_SIZE = 128 thread I latched onto yesterday, I think we're hitting the buffer limit on line 125 of usb.c->read_complete():
if (count > (uint8_t) (USB_RX_BUF_SIZE - usb_rx_count)) {
atomic_leave_critical(&flags);
return true;
}
I got to this point with my crude printf debugging (no output; only breaking). When pasting under 128 cha...
[Morning, crew! π ]
Yep, had to sneak it in before 0900 (Adafruit NW here)
@slender iron Iβll be listen only for the Telecon today. On a plane.
<@&356864093652516868> The meeting is in an hour!
Ooh. I'll be here
Yep. Moved a work meeting so I can attend. π
I will either not be on, or late/lurking. Someone schedule a work telecon. Might need to put up a recurring calendar item for Monday 1PM CT "Highly Critical, Life-Saving Off-site Appointment". π
I think my record was 3 telecons at once.
I will have a live meeting at the time
Cool! I can listen from the plane!
Nice!
What's next, listening from the moon?
Start with McMurdo Station on Ross Island in Antarctica. ;)
@slender iron The cat thinks your talking is garbage, it seems.
Mumble is cool!
I've used it in the past for gaming, as a replacement for TeamSpeak
Hmm, audio is not very reliable. Oh well...
@solar whale You're saying your connection isn't very sound?
<@&356864093652516868> meeting starting soon!
Lurking for now..
@slender iron You should call it the Sunday board then, because it's hole-y.
groan
Mixing of metric and Imperial is super annoying.
@cunning crypt Especially when creating spacecraft. Tends to cause crashes....
Or planes. Run out of fuel.
must be annoying in certain cad packages, it's quiet flexible in f360 π
Hug Report: Group Hug, because you all are awesome.
inside-out
Group hug!
@ me when I'm on deck..
Hug reports: to @idle owl and @raven canopy for continuing to rock out with the docs (out?) and everyone of #help-with-audio for already rocking on some exciting projects
@raven canopy you too!
HUGS: @kattni & @tannewt for pushing through on the second round of doc update PRs. @hukuzatuna for helping out kattni with learn guides and discord support; nice to see you back on a regular basis. And a group hug!
thanks!
Thanks @raven canopy
"spy" means SPI here. ;)
A potentiometer feather-wing would be a big seller for a lot more than audio applications.
@timber mango are you saying it has a lot of Pot-ential?
My projects have been... not at all CircuitPython related
Working on replacing 130-ish ATMega328s with ATMEga328Ps
That's.... "fun"
Going gold in music means something about record sales
Enjoyed great weather in Seattle! Looking forward to getting back to stmpe610 driver. Hope we keep power in storm tomorrow.
Like @cunning crypt I've been pretty exclusively in hardware & guide writing land of late.
No problem! Happy to help out!
CircuitPython code (or driver) for:
http://adafru.it/811 7 segment display x 4 digits
with:
http://adafru.it/450 *74HC595 Shift Register (2x, cascaded)
Probably will bit-bang the 74HC595 initially, as I just did one for the ST7565 LCD. Then I'll see if SPI makes sense for this chip (74HC595 Shift Register) or not.
@timber mango https://learn.adafruit.com/i2c-spi-lcd-backpack uses SPI for a 74HC595.
I've learned the most by effectively re-inventing things...
@twin mica You've decided to kick things up a notch?
Also, "Enter the REPL" sounds like a movie.
@raven canopy You'll have to go back and listen to the beginning, it was all about you. π
Where is the...there it is: π
BTW the PID 811 7 segment display is incredibly efficient. 18 mA to illuminate '8.8.:8.8.' (all segments lit).
Status: Figured out the last bit needed for hardware dotstar support in 3.0 and verified qspi flash is working on my m4 board so Iβm ready to pull the trigger on some new board revisions, likely slightly smaller and somewhat larger. Iβm also going to try and create a reference version with notes on how to create new board versions with more or fewer features. PM me if youβre interested in what I have so far.
I will probably switch gears into working my pinmux tool. If anyone has javascript canvas or 31337 CSS skills, ping me as I might need a bit of help with some UI bits Iβm hoping for longer term
Also trying to teach myself about op amps to level up my audio electronics skills. Let me know if you have any tips, resources or insights.
Op Amps are mostly on my short list as well.
STATUS: doc updates are done & done! supervisor.runtime.serial_connected is done; pending review & merge. Working on the "128char max paste in REPL" open issue. Have cookiecutter updates ready, but would like to do the conf.py before putting in PR. FRAM driver is still in queue.
Si
http://adafru.it/2086 Evil Mad Scientist giant 741 op amp (they're used in EML 101 analog synth)
He is now...
Yes, as he speaks.
<looking at the Trellis> No mounting holes? Hmmmm. I'll need to look at the PCB design to figure out how to mount it.
There's two unused holes... 4 would be better.
http://manuals.fdiskc.com/tree/EML/EML 101 Schematic Re-Draw ( Draft 1 ).pdf EML 101 schematic redraw (incomplete)
Ok, perfect!
... and rotary encoders?
The old 1/8 versus 1/4 TRS debate...
Untztrument!!!
A midi-din and CV wings would be great for those of us with old synths
If you go to 1/8", use the 3-conductor (TRS) version so that differential in/out is available. OldCrow would have better feedback on this, though.
pitch
Please Link, Comment and Subscribe!
Thanks everyone!
Hit Dat Like Button!!!!
At some point @slender iron will be able to "play us out" with his synth.
Thanks peoples!!! Talk to you laters...
Thanks!
$ zdump -v EST5EDT | egrep 2018
π
So... does a Chiropractor have a "Back catalog"?
VCF (voltage controlled filter) ?
Yes, just like a lumberjack has a "back log"
+/- 15 VDC is common for old school op amp based circuits.
Yes, iirc
^^^ needs to go look at the M4 specs. The tiny robot can load either the FeatherWing library (to control the drive motors) OR the SR-04 control code. Trying to run both gives me memory errors.
"I've got a fever. And the only prescription, is more CircuitPython"
Hug report: the fellow who ported CircuitPython to a new target board the other day.
>> [Friday at 9:34 PM UTC] @buoyant wigeon : CP is working ...
Can I take a minute to comment on the quality of CGrover's mic?
@pastel panther comment on the mic is okay. The vocals, though...
I really would like porting as much of this to adafruit compatible & CP boards:
http://ucapps.de/
lol
THE MIDI ASSOCIATION, a global community of people who work, play and create with MIDI and the central repository of information about anything related to MIDI.
Oh man, a trellis version of the OP-1 would be amazing
β€
op amps were chosen for EML 101 due to their stability
@slender iron This video helped:
https://www.youtube.com/watch?v=7FYHt5XviKc
The most often requested video! In this tutorial Dave explains what Operational Amplifiers (OpAmps) are and how they work. The concepts of negative feedback,...
This is work..
π
We could put it in C...
Firmata is said to be based on a protocol not wholly unlike MIDI.
Requested by JohnPark and Noe. Then we can create simple button instruments using midi.
This is used by DJs to control lighting.
π
r a b b i t h o l e ..................
@slender iron @errant grail maybe this will help?
https://github.com/jaydcarlson/microcontroller-test-code/tree/master/SAMD10/dmx
@pastel panther Thanks. A friend of mine has some custom Python DMX-MIDI applications he uses to run his for-rent PA system service. I believe he also uses the DMX wireless protocol over LoRa.
nice
... with a few RPi node using a grid network.
it's "research!"
I like "frontpack"
"featherwing, double-wide"
Pressure sensitive pads would be sweeeeeeeeeeeet
MPC dreams is what pushed towards the lib (and ladyada)
'velocity' is the oldschool word for that in music controllers
@slender iron let's be honest, we're talking about a trellis/feather modular ecosystem π
I like 1.625 " minimum between potentiometer shafts, on a (35-ish? degree) diagonal.
About 1" horizontally (maybe 1.125" horizontal pitch). Just measured this grid I created a few weeks ago.
Rotary > pots. Feedback is nice...
@raven canopy You're not a fan of pot? I guess you don't live in Colorado then.
Haha. I do not...
There's no wizard emoji. I am disappointed.
There is a catch-all emoji for magical things.. π
Alright. Gotta go earn some dollars... Later taters.
Wait, trellis talk..
You could do a new layout... Just need new traces. HT16K33 is the brains
π© β¨
@idle owl That's about as close as I can get to "Magic"
@cunning crypt Ok that's pretty well done.
Looked at it. Didn't gain full understanding
Do the x,y and width,height types in Layer.h and Text.h need to change as well?
Later
This is a great "example" project for USB MIDI. Simple button presses for triggering midi notes. https://learn.adafruit.com/arcade-button-control-box
With a Trinket M0 running circuitpython, Is it possible to use the USB as a serial port. Not only as a serial console. Sending and receiving bytes and bits over usb the serial port ?
I don't know. That's a good question. I would expect it to interfere with the REPL
@glossy radish we don't have a good answer now
So it's on the way, in the future. Best way now seems to use the trinket with CPP and Arduino.
@siddacious and @jerryneedell can you send me the text from the top of the flash chip? We may have different ones. Feel free to send a picture of the board.
Sure, but Itβll be late tonight or more likely tomorrow before I can. I have not tried the latest version yet an will do that as well.
I'd probably add an rtc module which has a native singleton copy of an RTC class. Then the RTC class could be used just like the DS1307. The rtc module itself could allow you to set a default RTC to be used by the time module. That way you could use a Python-implemented RTC potentially.
No rush! Thanks for the help!
On Mon, Mar 12, 2018 at 1:33 PM jerryneedell notifications@github.com
wrote:
Sure, but Itβll be late tonight or more likely tomorrow before I can. I
have not tried the latest version yet an will do that as well.β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/adafruit/circuitpython/issues/655#issuecomment-372452759,
or mute the thread
<https://github.com/notifications/...
yup, on the radar @glossy radish
If this ever gets done a great project would be an Artemis "red alert" siren:
http://artemiswiki.pbworks.com/w/page/68387358/DMX Interface
No, those are in tiles (16Γ16), not pixels, so they are fine at least until we have 4096Γ4096 screens (and enough memory to handle them).
@sommersoft I think I have it set up to wait for a character input before thinking its connected. Its not exact but good enough in my mind.
I think you are on the right track! I wrote the ports/atmel-samd/usb.c code so its not perfect. :-)
What does ASF4 do when true is returned?
The Feather nrf52 is a bad example because it uses a USB -> UART chip like the ESP8266. (We don't yet support the USB on the ones that have native USB.)
@slender iron do you have a link to the meeting recording?
yup!
<@&356864093652516868> Here is the recording of today's meeting: https://youtu.be/BbFtXSyU-Tg
Notes with timecodes are available here: https://gist.github.com/tannewt/9b3c3c8c4193d7e31075b23cecdbde6d Join here for the chat all week: http://adafru.it/d...
thank you!
Thanks @slender iron!
np, good timing. π
my feather m0 express's usb isn't happy when I'm copying the bundle over
slow?
its not going at all
well, that's a form of "slow". π
switching to the metro m0 to investigate
yup yup
the status led kept going though
Has anyone had success with the adalogger featherwing with a feather m0 express? I'm looking at the guide: the https://learn.adafruit.com/adafruit-adalogger-featherwing/circuitpython I got to the bit about cs = digitalio...it states this line is for feather m0 so I think this is where things differ and I am second guessing whether this is the right guide. When I do a dir(board) I don't see SD_CS
@stoic gazelle I think you'll need a different pin
Are there different ways to set the pins for the feather wing? I guess I thought it'd be a set thing
I guess that's where the confusion started - the learn page is specifically for the adalogger featherwing
So I thought ooh cool it should be a good starting place :)
Sure thing
I'll update the guide if it does
I was reading someone's status
ah, sorry
np
listening it while doing something else, and I missed the context
np, just know you need to ping someone else π
@pastel panther I can CSS
protip: don't close all tabs when you haven't submitted typed comments...
@tannewt, looks like I may have a file system issue as I got an oserror: 19 when I do a soft reboot (it has the example code in the main.py with SD_CS set to D10) The 16gb SD card was formatted with fat32 from gparted
what line of code generated the error?
I don't think it said, I'll look again
sometimes we fail to reinitialize everything correctly
Line 16
whats on the line?
storage.mount(vfs, "/sd")
Ah, I didn't see there were multiple complete examples, this is the sdcardlist example
I'll come back to this in a bit I need to get on the road to get home. Thank you for your time and help
np, I think there is a bug with "unmounting" on reload
welp, I got active_read, active_write and usb_busy all true for usb_mass_storage...
#shouldnothappen
lol
digs out the beagle
I think something in usb land is saying we're done when we're not...
The Feather nrf52 is a bad example because it uses a USB -> UART chip like the ESP8266.
When I initially glazed at the issue, I failed to recognize the "atmel-samd" label. I really just wanted to figure out if it was a core versus a port issue (with the knowledge that USB/UART implementations differ).
What does ASF4 do when true is returned?
What I'm surmising is that it is releasing the lock on the received buffer [usb_rx_buf] and letting usb_read() return the data to `stdo...
man...was just getting into the zone, and the child unit reminded me we have walking dead to watch... life is so conflicting sometimes. π
Haha tough life man.
tannewt, not @ing since I think you're likely away but thought i'd send an update.
I tried from the with the step by step repl instructions and got an error on: storage.mount(vfs, "/sd")
which I think is probably expected
thats the oserror 19?
yup
would you mind filing an issue?
_spi_m_sync_trans
oops
thank you! that way I won't lose track of it
using an feather M0 with adalogger featherwing in trippler I get an OSError: 19 when trying to run storage.mount(vfs, "/sd")
REPL:
import board
import busio
import digitalio
import adafruit_sdcard
import storagespi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
Use board.SD_CS for Feather M0 Adalogger
cs = digitalio.DigitalInOut(board.D10)
sdcard = adafruit_sdcard.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
...
@slender iron let me know if anything needs clarification or additional info
π
(fixed missing express from issue...)
2.x (ASF3) does not have this problem (I think), so that would an example of looking at how this is dealt with sucessfully.
Just verified, 2.x does not have the problem.
Quick glance at 2.x's equivalent higher level functions (all in mphalport.c; not broken out to a usb.c), and it seems to function in the same manner. From my previous googling, it seems there was a switch with how the ASF USB drivers operated between 3 & 4.
Having said that, EXCELLENT suggestion @dhalbert! Back into the abyss... :smile:
for the gps featherwing, could cloudy skies and precipitation (it is snowing) + end of antenna by the window keep me from getting fix?
I think some FS weirdness was introduced with the latest ASF with 9b4477e1dc088d18127838310b828514cb33edea. I'm looking into it now.
@stoic gazelle yeah I think so. south facing is best I think
My ItsyBitsy_m0_espress works fine with the latest build:
Adafruit CircuitPython 3.0.0-alpha.2-17-g9d928b5-dirty on 2018-03-12; Adafruit Itsy Bitsy M0 Express with samd21g18
>>>
Even the dotstar works!
trying to read the flash chip markings....
@solar whale I have luck using my phoen to take a picture of the chip sometimes
@slender iron ah i had it facing west thanks i'll try again another day when the weather is better
I'm making a (hopefully) simple pothole and stoplight tracker which will hopefully record to sd card so I can send the pothole information to the city/county road departments
@stoic gazelle ingenius!
i'm hoping i can use the joywing, adalogger featherwing, and gps featherwing together
as long as you don't run into pin-smashing, should be good. but, code space might get a little tight?
yeah i'm going 1 step at a time, if i can only use 2 i'll do the data logger and the gps and then wire up 4 buttons
one button for each: stop, start, other side of road, my side of the road
i ran into issues with sd card and gps though so i'll have move on even though those are core to the project or if need be switch to arduino - still will need to make sure no pin smashing is going on
@solar whale that looks like the right chip. if i had to guess at least...
@stoic gazelle if you want to stay with circuitpython, and code space becomes tight, you could try and strip out non-essential functions from your libraries. thinking along the lines of, say, gps.speed (haven't dug into the lib...just an example). that'll save you space on imports.
@solar whale seems yours is the same one on the product page pictures.
ah ok i'll remember that, thanks
you'll still have to locally mpy-cross them afterwards.
hey adafruit! thank you so much!!!!!!! i love your cir-py boards and have been truing to make my own specific purpose board with cir-py for a while. and i just used adalink and a j-link edu to flash the itsybitsy_m0 bootloader back onto an itsybitsy by following your github notes and using the awesome resources you provide to teach myself. thank you so much. the cir-py community and the adafruit company have helped me learn so much. you all have my eternal gratitude. and i still need to work out some of the kinks but thank you all so much! would anyone mind giving alittle help?
@stoic gazelle did you get teh SD card working - I think you have a line missing in your mount.
i didn't get it working
just a sec - checking.
i was going by the guide so if we find the bug we can help pass the knowledge on to get it fixed
@marble hornet glad you're enjoying circuitpython!! what sort of help do you need? we'll try to help. it's a little quiet right now, but people generally scroll back and read what they've missed.
@stoic gazelle my mistake -- that sequence works for me on am M0 Express - but I do use D5, not D10
import adafruit_sdcard
import busio
import digitalio
import board
import storage
import sys
# Connect to the card and mount the filesystem.
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
cs = digitalio.DigitalInOut(board.D5)
sdcard = adafruit_sdcard.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
import sys is foe something else - not needed.
OK you - have to cut teh jumper
meant to say - mine is on a metro_m0_expres
oh
I can try moving it to the feather m0 express - may take a few minutes
@marble hornet also, I put your "thank you adafruit" message over in the #hug-reports channel. If you object, let me know and I will delete it.
I have used a SD_Cadre breakout board on the feather M0_express - same pins - not problem
Also - are you using 2.x or 3.0?
@raven canopy thanks for the quick responce! well after the loader was flashed it only appears as "itsyboot" when plugged in. i dragged the .uf2 for the itsybitsy onto it after remebering where to find cir-py updates: here: https://github.com/adafruit/circuitpython/releases/tag/2.2.4 this seems to have fixed the issue
however
i am curious if i can make my own .uf2 version so I can add my own pin names and other things etc any tips? and @raven canopy thanks for putting it in #hug-reports
@solar whale currently 2.2.4
trying it first with 3.0 since taht is waht I have installed.
i'm okay with upgrading if that helps, it'd be nice to not have to modify the hardware just yet if possible
is there a different library bundle for 3.0?
@marble hornet it is possible. this guide, while outdated and refers to micropython, will get you setup with the toolchain to build your own firmware.
Mounts with D5 - now trying D10
@raven canopy thanks ill take a look.
you're welcome. also, if you do decide to build your own, i recommend using the 2.x branch. master is for dev and doesn't have everything working right now.
@marble hornet and, what OS are you on?
jerryneedell@Ubuntu-Macmini:~/projects/feather_m0_express$ cat sdmount_d10.py
import adafruit_sdcard
import busio
import digitalio
import board
import storage
# Connect to the card and mount the filesystem.
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
cs = digitalio.DigitalInOut(board.D10)
sdcard = adafruit_sdcard.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
``` ```>>> import sdmount_d10
>>> import os
>>> os.listdir("/sd")
['.Spotlight-V100', '.fseventsd', 'test.txt', 'lib', 'hello.py', '.Trash-1000']
@stoic gazelle that was an adlogger featherwing on a feather M0 express with CP 3.0
@raven canopy im running osx but i have windows installed too, it just hasn't been setup. like no discord or even arduino ide just atmel studio. (unused atmel studio )
>>> import busio
>>> import digitalio
>>> import board
>>> import storage
>>>
>>> # Connect to the card and mount the filesystem.
>>> spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
>>> cs = digitalio.DigitalInOut(board.D10)
>>> sdcard = adafruit_sdcard.SDCard(spi, cs)
>>> vfs = storage.VfsFat(sdcard)
>>> storage.mount(vfs, "/sd")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: 19
Teh version fo CP3.0 was a few weks old - I am updating to current master - just to check.
how does adafruit make thier .uf2 files w/ libraries included. like where the pin definitions for the board module are located? can they be customized? many thanks for all the help
for the VM, i recommend you stay with osx. as one of the very few windows guys here, it can be painful get it all working.
@raven canopy i was planning to stay with osx (im comfortable with it.) thanks for the tip though. i am unfamiliar with github, what is 2.x ?
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "sdmount_d10.py", line 12, in <module>
OSError: 19
@marble hornet here are the pin defs specific to the itsy. the MP_QSTR_XX is the name part. https://github.com/adafruit/circuitpython/blob/2.x/atmel-samd/boards/itsybitsy_m0/pins.c
and that link is to the 2.x branch. you'll need to setup a GitHub account to create a fork (copy) of circuitpython . GitHub actually has a very good set of tutorials to get you familiar with using the site.
@stoic gazelle - confirmed taht is still works for me with CP3.0 master. Do you ahve anything else connected to the feather_m0_express?
i took off the gps and joy wings so no not any more
If I rad things correctly, Error 19 is "No Such Device"
so possibly an sd card error?
waht kind af card are you using?
it is a fat 32 16gb card
brand
sandisk
Yup! I think so. I'll need to compare with the datasheets tomorrow.
I think it may actually be a code bug too. If you have time, try with commit 9c5a9e34118532bd54d92c9f968534ad9f9409ae (before the latest asf4 update).
I need to head to bed, I can try with cp 3.0 tomorrow and double checking the micro sdcard/trying other micro sdcards
thank you very much
mine are only 4Gbyte - do you have anotehr card to try.
OK -- good luck and good night!
good night @stoic gazelle .
@marble hornet i do recommend watching TonyD's youtube video on that page a couple times. helps to understand the process before diving in. took me like a week to get it all going (but...Windows π )
oh so each fork is a copy, regardless of selected branch!! ill be sure to look at that video when time comes.
@raven canopy last question (probs not but... i neeed sleep (just had a first robo-comp this weekend)): do you know what is used to create the .uf2 file? how it is synthesized?
yeah, a fork is the WHOLE repository, to include all of the branches.
Off to bed as well - hope te power is still on in the morning.... Good night all!
night @solar whale
night @solar whale
@marble hornet I'm not exactly sure. i know that the .uf2 concept/format was developed by Microsoft...and it works. thats about it. π
or @pastel panther do you know how? (above)
@raven canopy thanks so much, ill start chewing away at cir-py more. stay safe!
again, you're welcome. there's a lot to chew on...i'm still in my early bites as well. π
** bytes ?
haha. correct, you are!
sorry, can you restate your question? You're trying to build a uf2?
@marble hornet If you're trying to build a uf2 on osx, you'll want to get the arm dev tools cask from brew
let me look up the exact name
brew cask install gcc-arm-embedded
uf2 is a reformatted bin file
i pointed him to the Vagrant setup. but, if there's a better way...well, that's even better!
you'll obviously need to install homebrew if you don't have it
osx + brew is my setup
is there a better guide for building firmware, than tony's micropython ones? (not for me...i know i'm stuck in VM land with windows)
@raven canopy not that I've seen but then again I didn't look hard
@pastel panther is the intall above good to go?
brew cask install gcc-arm-embedded is exactly what I used
@raven canopy its still a good option, especially for windows
@raven canopy what version of windows? I've heard the linux subsystem for Windows 10 is actually pretty good
especially = essential (we don't enjoy make like everyone else)
@pastel panther i downloaded WSL Ubuntu the other day. I need to find out if folders can be shared...and USB. neither would in the little time i spent with it
and i read that only USB MSC passthrough is currently supported...which may or may not be all i need.
also CDC for the REPL?
yeah, CDC would be needed for REPL. but, i could still use the Windows native for that...
so a uf2 file is a bin with a different file ending?? I'am guessing in the dark here but is a .uf2 file where the python interpretter is? and the uf2 bootloader handles the magic block management and serial / usb appearance while the python runs "ontop".
@marble hornet Almost but not quite
done installing
what board are you trying to build for?
@pastel panther okay, i cloned my fork of cir-py to my local hardrive
i have an itsy bitsy m0 hooked up right now eventually i want to make my own board w/ a samd21g and another samd21e. im also using it mostly to make a tricorder.
@marble hornet actually your prior description of how uf2 works was pretty spot on with the caveat that the bootloader only sets up usb MSC for loading the uf2 file onto the board. After it's loaded CP (yes in the uf2 file) takes over and handles running the interpreter and setting up USB mass storage and serial for loading python files and communicating via the REPL
you'll want to go into <your_cp_dir>/ports/atmel-samd/
in terminal?
once it's done compiling, you'll have a folder build-itsy_bitsy_m0_express
and the firmware.uf2 will be in that folder.
its throwing a " Makefile:5: *** Invalid BOARD specified. Stop."
hmm..
okay
if you ls boards/ you should see a dir for it
so the folder w/ the config and etc is there but when i tell terminal to make the file ports/atmel-samd/build-itsybitsy_m0_express/ stays empty
oh I forgot
go into the root of your circuitpython checkout and type
git submodule update --recursive
There submodules are essentially references to other repos that your project/repo has included
it probably didn't build properly if you didn't get the submodules
hmm. it should error out if the submodules aren't there. well, it does for me...
root in this case means?
the lowest level directory of the checkout
that was not the error i was looking for
it should have the ports dir
when I say "lowest level" others mean "highest", fwiw
~/circuitpython/?
probably
unless you cloned it with an alternative name
sorry by checkout I meant clone
so it should be called 'circuitpython'
go into that dir and run the git submodule update --recursive
i have circuitpython in the .git dir shown here. when you say root does that mean i should navigate into cirpy?
just saw your message, trying....
run
navigating back to port
still not making the uf2 file. @pastel panther THANK you for all the help. if you want to head to bad i'm fine with waiting till tomorrow
I'm up doing stuff so I'm happy to help but I can't tell if you're doing everything precisely correct
I'll write a list of steps that you should follow explicitly and it should work
okay, want to take it slower?
im going to exit and restart terminal. take all the time you need
make a local copy of circuitpython by cloning it:
git clone https://github.com/adafruit/circuitpython.git
stuff downloads
go into the directory that you just made:
cd circuitpython
update/fetch your submodules:
git submodule update --recursive
more stuff downloads
Once the submodules have successfully updated, move into the port directory for the SAMD chips:
cd ports/atmel-samd
build for the itsybitsy_m0_express:
make BOARD=itsybitsy_m0_express
If the build is successful you should see a message when its done saying that it created a firmware.uf2. If you don't see this, post or screenshot any errors you see
you can skip the first step if you're confidant you can get into the directory that was created as a result of your original git clone....
If after any step you see something that looks like an error, let us know
taking video of me typing in the commands
file is too large
i'm going to paste in the terminal if thats okay w/ you all. how do i make the code in the dark box?
Jonahs-MacBook-Pro:~ jonahy-m$ cd .git
Jonahs-MacBook-Pro:.git jonahy-m$ git clone https://github.com/adafruit/circuitpython.git
Cloning into 'circuitpython'...
remote: Counting objects: 73490, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 73490 (delta 1), reused 1 (delta 1), pack-reused 73481
Receiving objects: 100% (73490/73490), 44.55 MiB | 3.79 MiB/s, done.
Resolving deltas: 100% (53623/53623), done. (skipping ls) Jonahs-MacBook-Pro:.git jonahy-m$ cd circuitpython
Jonahs-MacBook-Pro:circuitpython jonahy-m$ git submodule update --recursive
Jonahs-MacBook-Pro:circuitpython jonahy-m$ cd ports/atmel-samd Jonahs-MacBook-Pro:atmel-samd jonahy-m$ make BOARD=itsybitsy_m0_express
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
install -d build-itsybitsy_m0_express
python3 tools/gen_usb_descriptor.py \
--manufacturer "Adafruit Industries LLC"\
--product "Itsy Bitsy M0 Express"\
--vid 0x239A\
--pid 0x8012\
build-itsybitsy_m0_express/autogen_usb_descriptor.c
Traceback (most recent call last):
File "tools/gen_usb_descriptor.py", line 9, in <module>
from adafruit_usb_descriptor import cdc, standard, util
ModuleNotFoundError: No module named 'adafruit_usb_descriptor'
make: *** [build-itsybitsy_m0_express/autogen_usb_descriptor.c] Error 1 ```
there was no output after git submodule update --recursive
trying...
i thought it's git submodule update --init --recursive
that's probably right π
do what @raven canopy said
ooh @raven canopy 's code did something
sorry, it's been forever since I did my checkouts
im going to try making again
it should work after the submodules update
yay
you can, but I never use it
its making a bunch of files
I probably should eventually
ya, it helps when you don't have a clown telling you to run the wrong commands π
*two clowns π€‘
it made ```54136 bytes free in flash out of 253440 bytes ( 247.5 kb ).
4820 bytes free in ram for stack out of 32768 bytes ( 32.0 kb ).
Create build-itsybitsy_m0_express/firmware.bin
Create build-itsybitsy_m0_express/firmware.uf2
python2 ../../tools/uf2/utils/uf2conv.py -b 0x2000 -c -o build-itsybitsy_m0_express/firmware.uf2 build-itsybitsy_m0_express/firmware.bin
make: python2: No such file or directory
make: *** [build-itsybitsy_m0_express/firmware.uf2] Error 1```
clown or not thank you
but
do you have python installed?
i do
do which python
try which python2
in term?
ya
where in term?
/usr/bin/python```
do it with python2
Jonahs-MacBook-Pro:atmel-samd jonahy-m$```
you probably need to install python2
ya, you should be able to install it with brew
does a .pkg not work?
line 370 of the Makefile: python2 $(TOP)/tools/uf2.........
all of the others are 3... uf2 might be written in 2. checking.
uhhhhh?
you're probably looking at the wrong Makefile
atmel samd?
should be circuitpython/tools/uf2/uf2tool/Makefile
oh
though hold up as sommersoft is checking if changing it will even work
um.....
no, i was talking about L#370 from atmel-samd/Makefile. though, i may have been on master not 2.x. at anyrate, the line points to uf2conv.py, which is written in python2. it'll fail with 3 (print statements without parens).
ok
so, long story short install python2?
I think I'm going to just keep my mouth shut for now...
ok so install 2 .pkg work? also where shoud the final file show up? thanks so much you two!!
lol. its a team effort!
the final file will be: circuitpython/ports/atmel-samd/build-itsybitsy_m0_express/firmware.uf2
no worries, man. getting the toolchain running is a task in itself. and usually only done once... (this was told to me when i was setting it all up; wise words)
at least you don't have to use the VM. that's an added layer. but, like all things, it becomes muscle memory.
i'm sure you could, but i don't think it'll work.
it didn't
there should be 3 firmware files: elf, bin, and uf2
woohooo π π
holy mother of....when did it turn 1AM? ugh..."they" stole an hour from me yesterday and haven't given back yet. π
just move to the best coast and you'll get 2 extra
alright, i'm out. @marble hornet welcome to the firmware builder's club!
@pastel panther "the bill always comes due" <insert eijofor dr strange meme>
'night @raven canopy
π¦ π€
guten nacht
nacht! schlaf schoen!
