#circuitpython-dev
1 messages ยท Page 153 of 1
[insert bad word that means how very photograph, that is]
_ montessori! [send SASE to the nis foundation for a glossary]_
@humble mural There's no significant intersection between level shifting and the role of the capacitor and resistor for the NeoPixel interface. The resistor current-limits; the capacitor holds up the power supply against voltage sag.
The level shifter is used like a lock on a waterway -- allows interchange on two different levels. It is a buffer (I think some older level-shifter datasheets use that word as the primary descriptor).
The usual method for level-shifting is to specify a particularly low voltage value for a logical '1' on an input pin of what is otherwise a buffer circuit. In this manner, a lower-voltage'd logic device can successfully signal the buffer's input, which it then mirrors on its output (at full voltage).
Haven't quite looked into how this works in the other direction (signalling on a higher-voltage input).
Some shifters are not bi-directional and are generally used when no input is required (as when using a write-only peripheral device such as an LCD that you didn't need anything back from).
I think that's the most concise description of level shifters that I've ever read....
Thanks. ;)
@timber mango thanks
74AHCT125 -
http://adafru.it/1787 Level Shifter
Messing around with a Circuit Playground Express at the moment; can't seem to find a convenient library for the accelerometer. Anyone got a good pointer to documentation for it?
How convenient do you want? There's the library specific to the accelerometer and then there's the cpx lib that makes it super simple.
Which library is specific to the accelerometer, and where is the documentation for it?
LIS3DH is the name of the accelerometer and library. I'm not entirely certain on documentation for it. There will be a learn guide for the breakout version of the accelerometer. https://learn.adafruit.com/circuitpython-hardware-lis3dh-accelerometer/software but it's not specific to the CPX.
To use it on CPX, the pin will be different. The import line will look more like python i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA)
And it has a different I2C address, so you'll need to specify that as well, I believe. address=0x19
Ahh, I ignored that because it's external. Had a browse and found this:
"The LIS3DH 3-axis XYZ accelerometer is in the dead center of the board and you can use it to detect tilt, gravity, motion, as well as 'tap' and 'double tap' strikes on the board. The LIS3DH is connected to an internal I2C pinset (not the same as the ones on the pads) and has an optional interrupt output on digital pin #36"
So I think that solves my problem. Thanks!
Yah. Be aware the interrupt pin is called ACCELEROMETER_INTERRUPT when you're using it on CPX
The whole setup will look something like this (I pulled this out of another lib, so if I missed a self, apologies):python i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA) int1 = digitalio.DigitalInOut(board.ACCELEROMETER_INTERRUPT) lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c, address=0x19, int1=int1) lis3dh.range = adafruit_lis3dh.RANGE_8_G
I've been meaning to learn how to use I2C anyway, so this helps a little
Bought an external clock and accurate temperature sensor at the same time, both I2C
One odd little problem was creating a ten-colour rainbow for the lights. Eventually made one with all three colours varying in sine waves 120 degrees of phase out from each other.
sine_rainbow10 = [ 0x80ee11, 0xcbb400, 0xf96520, 0xf92065, 0xcb00b4, 0x8011ee, 0x344bff, 0x069adf, 0x06df9a, 0x34ff4b ]
Does the Python Imaging Library (PIL) rub on circuitpython? I used the technique of reading in a PNG and processing it with PIL to play color animations when I'm on a RPi.
I removed the products from the Gemma guide, it's back to where it started.
What's the plan for CPX? Nearly that entire section was written specific to CPX which makes sense, it's a special case. Am I removing what's there and replacing it with mirrors? Or does CPX remain as-is?
@inner raft seriously doubt it, the HW CP runs on is too limited
lets keep CPX with the custom one for now, do you want to add these to the intro-to-circuitpy guide or make another guide where these pages can have a home?
What do you folks think? We're taking all the basic CP stuff, i.e. digitalio, analogio etc, and making unified pages for them that will be across all the guides. They're in some of them already. For the pages actual home: Do you think they would be best having a section in the "Welcome to CircuitPython" guide or should they have their own guide? I'm leaning towards the Welcome guide.
We keep sending people to different places for different things when they're new to CP and the more we can have in one place, the better. But I'd like to know what you think.
@tidal kiln Thoughts?
hmmm. are they being written to be board agnostic?
Entirely. Well, stretch the definition of agnostic to including info for all the boards.
i see, commented out lines, uncomment the one that applies
Yep
also reinforces what you often see in people's code...
but, i would caution about making it TOO massive. The Welcome is already long, and to a newcomer it can be easy to lose track of what is where...
Well, a collapsing Table of Contents presents a problem when you want to find information quickly. The Guides are pretty much monolithic -- they're very long; if you haven't read them before, it can be hard to find the relevant information.
The Guide(s) are long enough now to warrant a detailed table of contents, though that presents another problem (it occupies the 'headline' space of this 'newpaper').
i'm kind of thinking a separate guide. the welcome guide is pretty large already
It would be in a collapsed section of the Welcome guide if we put it there.
Just like it is now in the guides it's already in.
the welcome guide should focus on getting up and running, trouble shooting, updating, etc.
Which are also massive with the entire welcome guide, the CP section, and the Arduino sections.
Ok that was my original plan for it. Before it got even as big as it is.
There needs to be a document that does not require any use of the mouse (at all) to see the entire plan of the document. Think for a moment about people who have difficulty with basic use of the mouse, and clicking on the screen -- who are also very good at simply reading, even dense texts.
Well, I can't fit the entirety of the CircuitPython built-ins into a non-mouseable page. That's not possible. But I understand what you're all saying.
Separate guide. And then, if we want it accessible from the Welcome guide, I can include a single page with links to each for the sections in the Welcome guide so if you want to get there, you can, but they're not actually pages on the left side of that guide.
There's an interesting work-around for the individual product catalog pages: if you zoom the text (enlarge the fonts) enough, some sidebars immediately go away. This makes the sales sheet a scrollable document, especially with regard to Add to Wishlist (which is broken in Mozilla, as-is).
i'd just link to the guide, don't worry about trying to provide specific links to sections
Fair enough.
once they get to the guide, the left hand nav will do that
People need wiring diagrams -- exact answers, to some of this stuff.
Ok. Thanks for your input, everyone! Separate guide it is.
I try to include fritzing wiring diagrams in my github stuff.
Any link present should always do exactly what is expected of it. More links, the less likely that'll happen.
Ah heck, there's no collections module in Circuitpython. I can understand it's cut out for space, but it's a convenient module at times.
Correct and yes, entirely.
I opened this one up to discussion because I could see the merit of both options. The conclusion is separate guide, and we can link to it from the Welcome guide. The Welcome guide is already pretty big and should focus on getting started and troubleshooting. This would be the next-step guide. :)
So I'll create a new one and get the initial stuff moved over, and get it mirrored to all the boards from the new guide!
@idle owl probably already what you're thinking, but seems like you could just pull that whole CircuitPython Playground section out of the Gemma M0 guide and make it the new guide
Yep. We're updating it to include all the boards, and it'll end up mirrored back into all the guides from the new one.
It's not getting pulled out entirely. The origin is being moved.
move to a new separate guide and then mirrored back in?
I believe so.
ok make a backup before moving the page. i lost a page when i tried moving it once :/
I didn't know you could literally move a page. I copy and paste all the elements individually. It works out because it gives me a chance to proof everything anyway.
Ok first page published and guide is in moderation. I don't have an intro page for it yet. I'll add the other pages as we go. I figured get it up so I can mirror the pages into the other guides as we go. Unless you want to have this guide completely finished before publishing it?
@raven canopy Having another taco evening, I see?
hehe. i knew the email would give it away. wanted to break up the monotony for when you started reviews...
๐
i've been dropping some Star Wars commit messages too. only a couple so far...trying to keep it somewhat "professional". ๐
oh sweet! don't have to do SSD1306...it was already done! missed that one in my initial review I guess. #ItsTheLittleThings
I love that's it's "somewhat professional". ๐
I've had one from Radomir that said "Either I didn't write this or I was drunk when I did because I don't remember this at all" right below his name in the author spot.
oh phooey. just realized that we wanted Travis build image on the READMEs... I even removed a couple.
@fading solstice Are you around?
RE: Radomir: that's hilarious!
It was! I got a good laugh out of that one.
sphinx is smacking me around right now. it should build, but refuses to. ๐ฌ
Yeah.... it does that.
i've re-read this thing like 8 times trying to find the one letter i've missed. although, maybe i've missed it 8 times.. ๐
Yeah, that also happens ๐
chips-n-salsa+TV break. that always helps...
Just as long as it's a movie, and not episodic tv ;)
might talk the kid into Ragnorok...haven't watched it since it came on amazon.
Well, the Trinket M0 CircuitPython 2.2.3 holiday lighting controller is done! CPy made it easy. Photos were posted to #show-and-tell if you're interested.
Easter is now a 'lit' holiday? Boxing Rebellion Day? April Fools?
@timber mango Ha! Nope, just getting a jump on our December lighting extravaganza.
Hello, I am totally new to Circuitpython. I am having problem getting MU editor to run on OSX 10.11.6. The MU editor I download from adafruit does not want to start. Is there anyone that had ran MU on OSX ?
Pretty sure they know all about it -- lead dev I think has a Mac system.
I totally agree that event driven input can bring working with these boards to the next level.
Whomped this up for a small project, as I didn't want to keep recalculating them on the fly:
`python
#On a Circuitpython Playground Express, these are the bearings of each Neopixel from the
centre of the board; first in radians, then in degrees.
bearings_in_radians=[-0.5028432109278608, -1.067953115867036, -1.5707963267948966, -2.0736395377227574, -2.6387494426619322, 2.6387494426619322, 2.0736395377227574, 1.5707963267948966, 1.067953115867036, 0.5028432109278608]
bearings_in_degrees=[-28.810793742973058, -61.189206257026946, -90.0, -118.81079374297306, -151.18920625702694, 151.18920625702694, 118.81079374297306, 90.0, 61.189206257026946, 28.810793742973058]
bearings_in_radians_positive=[5.780342096251726, 5.21523219131255, 4.71238898038469, 4.209545769456829, 3.644435864517654, 2.6387494426619322, 2.0736395377227574, 1.5707963267948966, 1.067953115867036, 0.5028432109278608]
bearings_in_degrees_positive[331.18920625702697, 298.81079374297303, 270.0, 241.18920625702694, 208.81079374297306, 151.18920625702694, 118.81079374297306, 90.0, 61.189206257026946, 28.810793742973058]`
Hm, didn't seem to get the formatting right
#On a Circuitpython Playground Express, these are the bearings of each Neopixel from the
# centre of the board; first in radians, then in degrees.
bearings_in_radians=[-0.5028432109278608, -1.067953115867036, -1.5707963267948966, -2.0736395377227574, -2.6387494426619322, 2.6387494426619322, 2.0736395377227574, 1.5707963267948966, 1.067953115867036, 0.5028432109278608]
bearings_in_degrees=[-28.810793742973058, -61.189206257026946, -90.0, -118.81079374297306, -151.18920625702694, 151.18920625702694, 118.81079374297306, 90.0, 61.189206257026946, 28.810793742973058]
bearings_in_radians_positive=[5.780342096251726, 5.21523219131255, 4.71238898038469, 4.209545769456829, 3.644435864517654, 2.6387494426619322, 2.0736395377227574, 1.5707963267948966, 1.067953115867036, 0.5028432109278608]
bearings_in_degrees_positive[331.18920625702697, 298.81079374297303, 270.0, 241.18920625702694, 208.81079374297306, 151.18920625702694, 118.81079374297306, 90.0, 61.189206257026946, 28.810793742973058]```
Nice.
Is there any reason not to enable the framebuf module for the nrf52 builds?
https://github.com/adafruit/circuitpython/blob/master/ports/nrf/mpconfigport.h#L128
It is enable for the ATMEL SAMD "express" boards, but I think the NRF52s have sufficient flash for it as a default.
I enabled it an built the feather52840 BSP and was able to write to an SSD1306 SPI OLED display so it works OK.
I'll be happy to submit a PR for thsi if you want - or it can just wait for the next update. ...
diggin' it! can you mirror from an unpublished guide? if so, lets keep this hidden until we get at least the first 5 elements done
I suggest we close this as OBE (Overcome By Events) - It was initiated before the Flash FS was enabled and never reproduced. I just tried overfilling the Flash FS several times and it was handled gracefully on my Metro M4 Express Revb with current master build.
@raven canopy You here?
i am.
I can! Are you happy with the intro "The Next Step" page? If so I can use that as the main page for the section inside the guides, and nest the rest of the pages under that instead of "CircuitPython Playground".
Also for Trinket, it's obvious to delete the mirrored page, but for Gemma, do you want me to delete the original once we have it in place? I reverted it to draft for now so there's not a duplicate publicly for now.
@solar whale If you think that issue can be closed, go for it. We can reopen it if we run into the issue again. It sounds like you've tested it solidly.
@proven kettle I'm sorry to hear you're still having issues with getting Mu editor running. I hope the forums will have a better answer. The version available from codewith.mu does not have the Adafruit support, there have been a number of updates since that version. To get the most recent version, you'll need to install it from command line which involves having a few things already installed. https://github.com/mu-editor/mu/tree/master/package Expects you have Homebrew installed. There is a link there to Homebrew which explains how to install it. Hopefully this helps.
@proven kettle Once you have the prereqs installed, I believe it's pip3 install mu-editor. You'll need to run it from the command line as well. You can either run python3 -m mu or you should simply be able to type mu into the command line and run the program.
I found some issues with deps, when trying to install on 32bit ubuntu a few weeks back..
64-bit mu via pip3 worked fine
They're trying to get it running on Mac, I don't think there's a 32bit issue there. But, that's good to know.
sorry I mean it worked fine on 64bit ubuntu
I understood what you meant ๐
yeah seemed to work ok on the mac IIRC
Also good to know. I haven't tried it in a bit.
but then I've done a ton of different installs on the mac so my experience might not be 'pure' if that makes sense
Last time it failed for me on a few of the dependencies if I remember correctly. And yeah, that makes complete sense, I also have a bunch of stuff installed, so my experience won't be theirs either.
This time it worked on the first try.
Although here's an entirely noob question. How do I run it now that I pip3 installed it? python3 mu-editor isn't working.
python3 -m mu
Oh excellent. Thank you.
but you should also have the "mu" command available now
So I do. More excellent.
@proven kettle Once I had Python3 and pip3 installed, I simply ran pip3 install mu-editor and it installed the other dependencies automatically, so I didn't do them individually. Try this first, if you can get Python3 and pip3 installed.
I did have an issue with the micro:bit micropython version bundled with it...which I raised but haven't checked back
Ah. I don't have a micro:bit so I wouldn't have found that.
yeah, the officially released micro:bit micropython is ancient
I think it was an issue with the neopixels lib
they are working on releasing new version, but it needs more testing
they'd just go to 255,255,255 regardless of what you were setting them to
I believe that's fixed in master
@stuck elbow cool!
The new plotter capability in mu beta15 is pretty nice. I recommend playing with it!
Yah I see that.
mu takes a long time to start for some reason
It's quick for me. I installed it a half hour ago though. On MacOS.
I like this plotter!!
(may write a guide for using it if others are interested in it for scientific purposes, I have a few ideas)
plotter is useful for seeing waveforms w/o having to send them to dac & scope
yep first page of the guide is good! mirror awayyyyy
gemma, delete original, have only this guide's pages mirrored.
for the next pages, you can just work in the playground guide, then mirror out - easier that way :)
@raven canopy You have a minute to verify a few guides for me?
give me a sec to finish up this doc update. shoot 'em over in DM and i'll get to 'em
Ok keen. They're public now, so it's all good. (Or that's the idea anyway ๐ )
put here then, if ya like.
https://learn.adafruit.com/adafruit-feather-m0-express-designed-for-circuit-python-circuitpython should have "The Next Step" and "CP Digital In & Out" underneath that.
https://learn.adafruit.com/adafruit-trinket-m0-circuitpython-arduino and https://learn.adafruit.com/adafruit-gemma-m0/what-is-circuitpython should have "The Next Step" with tons of stuff nested underneath, and the Digital In & Out should be the updated version.
Ok, I mirrored The Next Step in, and for Gemma and Trinket, I put all the current pages under that one, so as we go, all we need to do is delete the current ones and mirror in the new ones.
I'm having someone check to verify that the mirrors worked. (It's weird how it worked, so even though it did the first time, I'm still having someone check.)
Excellent, that was the plan! And since we're working off of live guides, I'll leave everything in place until we're mirroring the replacement ...
The Next Step checks out good. Digital In & Out doesn't display anything on all three... ๐ฆ
Hmm ok. Let me try something
OK pick one and go for it!
Can you check Gemma again for me?
I that was the first one we did
I'm wondering if it's the nesting.
Check this one now: https://learn.adafruit.com/adafruit-feather-m0-express-designed-for-circuit-python-circuitpython
still a no-go on Gemma. Feather M0 is the same...
let me check the source (if it will even glean anything)...
Oh weeird.
It mirrored into one guide, and then mirrored out of that guide to the others. Like it couldn't find the original.
Def not grabbing the mirrored elements (if you can even decipher this) ๐
Check Gemma again. I deleted and remirrored it, it's at the bottom of the list
It's showing up for me in private browsing, but I don't know if that's enough to have it not show up for me.
Gemma now has it at the bottom (not inside "The Next Step")...but it works.
Still works for me in private browsing. And it says it's mirrored from the right place.... Ok! Now to carefully redo the others......
๐
(that means good, in sommersoft parlance)
Indeed ๐
in unrelated news: we've successfully pushed my Edge instances to consume over 1.5GB of memory. ๐
modern browsers are such pigs...
Truth.
Ok..... so it should be both in the correct place and working on all the guides now.
getting the F5 key warmed up...
There was an obvious issue in Learn, so at least I know what to look for next time without making you go through this every time ๐
Thank you for dealing with this... super helpful
I'm in process debugging SPI on Feather. Forgive that my brain is fried (caveat in case stupid ?)...what are the names of the include files (or where is the mapping) for digitalinout for all the boards? I want to make sure I've mapped cs to the right digitalio.DigitalInOut() thank you.
@proven kettle Ok I looked into it. The Mu author is currently working on an updated MacOS package, but there is no ETA on when that will be available - you can keep an eye on this: https://mu.readthedocs.io/en/latest/packaging.html . The option for installing Mu right now is using Python3 as detailed previously.
@bronze geyser which board are you using?
@solar whale using something like lfsr_mask = 0x8008006 is fine, except for "long int not available in this build"
so, I will have to split the 32-bit shift register up
@bronze geyser does that help? http://www.pighixxx.com/test/portfolio-items/adafruit-feather-m0-express-pinout/?portfolioID=360
@ruby lake where do you see that error response?
in the repl
I was using 2.2.3
in fact, it is 2.2.0:
Adafruit CircuitPython 2.2.0 on 2018-01-02; Adafruit Feather M0 Express with samd21g18
lfsr_mask = 0x80008006
OverflowError: long int not supported in this build
I can try applying 3.0
Ok. Clearly a change in 3.0.
I expected a similar error but it did not occur.
>>>
>>> lsfrmask = 0x80008006
>>>
>>>
>>> lsfrmask = 0x80008006
>>> lsfrmask = (1<<31 | 1<<15 | 1<<2 |1<<1)
>>> hex(lsfrmask)
'0x80008006'
>>>
just a sec - will try on trinket_m0
good call ``` Adafruit CircuitPython 3.0.0-alpha.2-3-g15b8455 on 2018-03-01; Adafruit Trinket M0 with samd21e18
lsfrmask = (1<<31 | 1<<15 | 1<<2 |1<<1)
OverflowError: small int overflow
from mpconfigport.h
#ifdef SAMD21
#define CIRCUITPY_MCU_FAMILY samd21
#define MICROPY_PY_SYS_PLATFORM "Atmel SAMD21"
#define PORT_HEAP_SIZE (16384 + 4096)
// If you change MICROPY_LONGINT_IMPL, also change MPY_TOOL_LONGINT_IMPL in mpconfigport.mk.
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE)
#endif
#ifdef SAMD51
#define CIRCUITPY_MCU_FAMILY samd51
#define MICROPY_PY_SYS_PLATFORM "MicroChip SAMD51"
#define PORT_HEAP_SIZE (0x20000) // 128KiB
// If you change MICROPY_LONGINT_IMPL, also change MPY_TOOL_LONGINT_IMPL in mpconfigport.mk.
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MP_SSIZE_MAX (0x7fffffff)
#endif
i've read too much in that repo... lol
@ruby lake sorry for the mis-information - my first report was from an nrf52 - also M4
it looks like an M0 limitation
yeah. same reason for 31bit ints, i think...
I suppose the LONGINT takes up too much resource in the M0...
I'm still a bit fuzzy on the #define MP_SSIZE_MAX (0x7fffffff) since the example has bit 31 set.
i think i understand it, but to keep my erroneous perceptions from leeking out...i'll refrain from sharing it. ๐
>>>
>>>
>>>
>>> lsfrmask = (1<<31 | 1<<15 | 1<<2 |1<<1)
>>> hex(lsfrmask)
'0x80008006'
>>> type(lsfrmask)
<class 'int'>
>>> lsfrmask
2147516422
>>>
seesm like it is handling it as an unsigned int.
or a larger thatn 32 bit int
I'll also refrain from further self-incrimination -- good luck @ruby lake
the M4 does what I want
hence the impending "one per order/address" limitation when the boards are released. ๐
The idea is to generate a white noise signal using a Galois LFSR:
import digitalio
import board
#lfsr_mask = 1<<31 | 1<<15 | 1 << 2 | 1 << 1
lfsr_mask = 0x80008006
lfsr_init = 0xdeadbeef
lfsr = lfsr_init
gateLED = digitalio.DigitalInOut(board.D13)
gateLED.direction = digitalio.Direction.OUTPUT
noise = digitalio.DigitalInOut(board.A0)
noise.direction = digitalio.Direction.OUTPUT
while True:
if(lfsr & 1):
lfsr = (lfsr >> 1) ^ lfsr_mask
noise.value = 1 # Galois LFSR
else:
lfsr >>= 1
noise.value = 0
but it needs a 32-bit shift register
I can make one of a smalelr length
~smaller
ah - that makes sense. I was curious what you were doing.
the M4's will be in high demand. I see taht even the feather52 are out of stock -- still some feather52 pro's avaliable
"0xdeadbeef"? at first i thought it was notation mnemonic related...then googled it. i rarely hexed back in the day, so i clearly missed the reference. ๐
oxdeadbeef is the time-honored value for initialzing a block of ram ๐
speaking of which, supper time
Have a good one!
night @solar whale. happy ๐ค
Can you simply get analog voltage readings from any analog pin? On any of the M0 boards? It's possible on Trinket and Gemma I see, but I'm wondering if I understand it correctly or not.
well, peeking at the feather m0 on my breadboard, I would assume all six A pins would act the same, but I'd have to check the overview page...
Trying to figure out if I'm right that I can write a single piece of code that would work across all the boards that grabs the analog voltage off of A1 (or whatever analog pin).
Seems like it should work without any external wiring or sensors needed. (All being Trinket, Gemma and M0 Express boards)
yeah. was just peeking at analogio. i don't see anything that would limit it for any particular board...let me check the common-hal real quick.
@idle owl looks to me like you can proceed with that understanding. but clear with tannewt, dhalbert, or ladyada...they're def more adept at answering that question than i is.
It'll get tested regardless. Thanks for looking into it ๐
I wasn't sure where else to look past what I had already found.
@idle owl, yes you should be able to get an analog reading from any A(n) pin as they all have ADCs. right?
blerp
That's what I thought, but then I keep second guessing what I think I know
I'm pretty sure the A in A1 etc means analog and given they certainly don't all have DACs, I'm pretty sure they have ADCs
The M0s have a ton of ADC channels
Some of the A pins are also D pins, I do know that
but not all. or on all boards.
See this is why I always second guess it. Weird stuff like that.
As far as I understand it, a D pin is a generic digital in/out GPIO pin which any pin should be able to do
the D aren't special as far as I can tell other than having a D# label
Ah ok
Also in CP they're just strings you assign to pins on the chip. Like my m4 board might just have a board.WTF pin tomorrow
Right
The pin labels are a nice reference but most pins can do a lot more than their name implies. A1 for example has an ADC and a sercom so it can do i2c, SPI, USART, toggle leds and read an analog voltage
Right. Which is what confused me in the very beginning. And probably more recently than it should have at times ๐
btw it also has a timer so it can do PWM
Right, that's a different page altogether.
it's a super pin!
but it can't take analogin like A0... the true alpha pin. ๐
(and it can do touch)
Yah, but only sometimes. We finally had to say it didn't. Too many caveats.
@raven canopy what do you mean it can't take analogin? It's got an ADC
Owait. I read that wrong then.
I was thinking about analogout. A0 is the only true analogout. And also can't do touch reliably. So we stopped having it do touch at all.
Hah. I read what you meant then. Figures.
Do you want a single "Internal RGB LED" page with code commented out for both or do you want two separate pages for the internal LEDs, DotStar and NeoPixel, and then mirror into only the applicable guides? (Still planning on separate DotStar and NeoPixel pages as it is right now for external.)
Which capacitive touch breakout should I use for the Cap Touch page? https://www.adafruit.com/product/1374, https://www.adafruit.com/product/1982 or other?
I'll have more questions, but those are ...
I'll get started on Analog In.
Yes, it's the only pin with a DAC
i'm totally off right now. this is what happens when you start a workflow, interrupt it by updating other things at different points in the same workflow, coming back to the original workflow, then letting discord interrupt you... ๐
Well I'm excited because my code works on at least 2 boards. So thanks for the input on that being possible.
These two libs to be changed to reflect the move to lowercase (am I forgetting any others which use the TVOC/eCO2 property naming?):
https://github.com/adafruit/Adafruit_CircuitPython_SGP30
https://github.com/adafruit/Adafruit_CircuitPython_CCS811
uh-oh. Travis is having job log issues again... ๐ฆ
On the lsm9ds1: I am getting 3 significant figures using the .mpy lib on the feather, but only getting 2 sig figs when using the .h lib on the Uno. This is for magnetometer readings. Any way to get up to 3 sig figs on the latter?
@drifting nexus You're talking about Circuit Python in one case and Arduino in the other?
yes, sorry if this belongs on another forum
It's tangentially related I suppose. No worries
Theoretially you could look at the code for the arduino library and figure out how it's coming up with the specific value that it's returning and change it
where is the sig fig setting in the .mpy lib?
@drifting nexus it has to do with the formatting in the examples. the circuitpython example sets the format to 3 decimal places:
print('Magnetometer (gauss): ({0:0.3f},{1:0.3f},{2:0.3f})'.format(*sensor.magnetometer))
the arduino example doesn't include any formatting, and defaults to 2 decimal points.
try this in arduino for x, y, and z:
Serial.print("Mag X: "); Serial.print(m.magnetic.x, 3); Serial.print(" gauss");
print(value, format) # for floats, the <format> is the number of decimal points
I'll try that - thank you
Hello everyone, I am looking for some help regarding transceivers
@untold ermine if your question isn't directly CircuitPython related, you may get better attention in #help-with-projects. but, someone may still be able to help you out here.
Okay thank you
you're welcome.
A discord user requested a driver/library for the Nextion display(s).
Upon quick glance, seems to use UART for communication.
Main site: https://nextion.itead.cc/
Arduino GitHub: https://nextion.itead.cc/
I can continue to research when I have time, but most likely won't tackle this.
Re: AnalogIn. Still having some issues with the code. I'll get back to it tomorrow.
I think its time to call it... my brain doesn't have another doc update left in it. ๐ด
Sleep well, @raven canopy .
Had missed this. @tannewt sure, I will check them out.
<@&356864093652516868> and anyone else interested. Normal meeting time tomorrow, almost exactly 12 hours from now. Mondays 11am Pacific / 2pm Eastern here on Discord.
oh my gosh, I'm so behind on my CP stuff
few weeks have been crazy
and it's not over yet
but i haven't left the project !
@indigo wedge Good luck with it!
Arrgh! I was almost going to open an issue about my Metro M4 Express spontaneously resetting. I finanly manged to make it very repoducible and it occured every time I stood up from my chair! It turns out scuffing my behind across the material of this desk chair must be very good ESD generator. All I had to do was slide forward and stand up and the M4 would reset! I have replaced my "Van de Graf" chair with a simple wooden chair and I can stand and sit without any resets. I decided not to do extensive tesitng on other boards, but I think this explains a lot of "odd" behaviors that I have experienced. I'll be paying better attention to this going forward. While not directly Circuitpython related, I thought it worth sharing here since it may have been relevant to some past unexplained issues. At least I can hope so ...
anti-static mat ftw
@ruby lake I have it on an AS mat and it happens even if I am wearing my wrist strap. Clearly something is not as it should be....
May well be related to my footwear - I have noticed that "Crocs" are very bad in an ESD environment. They must be good insulators. I just hate to give them up...
hm
@solar whale @tulip sleet found the reset line very sensitive too. The next rev will tweak it I believe
@solar whale The internal pullup on the reset pin is broken on the SAMD51 so you're required to have your own . This could mean it's extra sensitive I suppose, depending on the value chosen?
Ah - can I just add a resistor - where? what size?
I think there is one already or else it would be totally borked
before I figured it out, getting my hand anywhere near the chip would cause it to wig out
I could be wrong but I'm pretty sure ladyada mentioned doing a board rev to fix it; maybe that's why we have rev B?
I think rev b added it but changing the value could improve things
I've been helping @idle owl validate guides using different boards. If any of you are developing under CP 3.0 alpha 2 and want extra eyes validating that things work, I have the following boards and would be happy to help in the evenings: Feather M0 Express, Metro M0 Express, Metro M4 Express (revb), Trinket M0, and CircuitPlayground Express.
Thanks @tuupola! Let me know if you need any guidance on how to get it done.
On Sun, Mar 4, 2018 at 9:55 PM Mika Tuupola notifications@github.com
wrote:
Had missed this. @tannewt https://github.com/tannewt sure, I will check
them out.โ
You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub
https://github.com/adafruit/circuitpython/issues/622#issuecomment-370317543,
or mute the thread
<https://github.com/notifications/u...
Perfect! Thanks for filing it in the first place and circling back.
I'm ok having it enabled.
@ronysh please follow #619 for more info.
I have a feeling this is because 3.x doesn't reset into the bootloader after receiving 1200 baud serial.
I like supervisor.runtime.
@sommersoft Newer nRF52 boards will likely follow the same "express" design of spare spi flash and status pixel.
@l8gravely On the SAMD21 it is millisecond.
I'm still unsure we want to provide precise timing because we pause the VM from time to time to do other things. I'm worried about making timing promises we don't always keep. If we did, I think we could introduce a precisetime module for it.
@l8gravely also follow #619 for a different way to do things concurrently.
I am changing it with the DMA work so I'll take a look at it after.
Someone is going through their email.... ๐
@slender iron I figured you were just getting ready for the meeting. ๐
yeah, that too
trying to get all the admin stuff out of the way so I can go heads down after the meeting
<@&356864093652516868> Meeting is starting soon!
so weird i can't unmute
All hail @slender iron ! Our Fearless Lead Developer Thingie! ๐
is this thing on? I can't even hear typing sounds
๐คฃ
yay @raven canopy !
Sorry, technical problems on my side, can't hear anything, see you next week.
Thanks for stopping in, @stuck elbow, sorry you couldn't get it sorted.
@idle owl for the work performed on muโs installation. @meager fog and @plucky flint for the work done on mu editorโs plotting functionality, adding it into the METROX-CircuitPython guide. @slender iron for 3.0.0, weโre getting close! @raven canopy for doc updates.
And, Lemon Squeezey?
Ok, go ahead. Not sure what's wrong.
maybe you could add an easter egg to CP like import antigravity that runs blink, call it import easypeasy
Hug reports: To Scott for helping me with GDB tips and Dan for helping me reason through testing SPI and sercoms on my m4 board.
oh yeah the fun/joke modules in microbit i made configurable so you can choose to include or not ๐
HUGS: just a group hug today.
they do take a bit of flash, like 20k or so IIRC
Exactly!
No worries! Happy to help out more!
Status Report:
Finished testing every possible combination of sercom pinout with SPI and i2c on my m4 board over the weekend(works!). Started shoving more onto the board and fixing bugs until eagle took two hours of work and threw them in the trash can.
Also tested QSPI which seems to be at least communicating with the chip though Iโm not seeing CDC or MSC working. If I get that figured out Iโll take a look at DMA if Scott still needs a second pair of eyes
I got hardware dotstar support working on the trinket m0 and my m4 board except for the part where Iโm still tracking down a OS error that is thrown when trying to make a sercom on a pin that can be muxed to the same sercom as the dotstar. In doing so found a โfeatureโ of the itsy bitsy m0 board layout that requires you to bitbang the dotstar.
With luck Iโll finish the dotstar work this week and maybe finish rev b of the m4 board. Probably not this week but maybe another rev of the metrowing and a medium sized run to make some kits.
If anyone has a name suggestion for my m4 board Iโd love to hear it. Itโs currently called the oh so creative โsamd51_protoโ however other ideas are โโlil-sebastianโ, โitsy-bitsy-XXLโ and โTHICChip" as it was meant to be bitsy sized but ended up almost as wide as a feather
The new guides are very useful. It's very easy to find focused as well as general info!
name suggestion - sammie the samd
i vote lil-sebastian, if you put a small pony in the silk
STATUS: "driver" docs PRs are done. only the "helpers" remain; should be done by tomorrow night. Then I'll focus on serial_connected et al. Then FRAM driver.
saw it. thanks.
It's muscle memory at this point... ๐
@stuck elbow Do you know when you will have more ugames ready?
@opaque patrol I was planning to make an order for another batch soon, however, life interferes โ day job, moving house, etc.
here's the 3.0 bug: https://github.com/adafruit/circuitpython/issues/584
Thanks @timber lion!
@raven canopy Do you think we can use your doc update list for the driver testing issue? (Since you already put the work into typing them all out)
Just wanted to note (discussion not necessary): #classroom had activity this week, and it seems to be working as intended. :happy dance:
@idle owl definitely! It's a couple drivers short though, being 2+ weeks old.
@raven canopy It's a great start then. We'll get it set right.
@idle owl could we do a new issue with the large checklist for the other (non-high-priority) drivers, similar to the docs-to-be-updated sommersoft is working on?
@prime flower We'll figure out the best way to do it. I'd like to see a list somewhere including all of them, even if it's two lists.
maybe a test matrix for the library, then the configuration tested
"Funny notes in config file"....is a feature
#ifdef SAMD21
#define CIRCUITPY_MCU_FAMILY samd21
#define MICROPY_PY_SYS_PLATFORM "Atmel SAMD21"
#define PORT_HEAP_SIZE (16384 + 4096)
// If you change MICROPY_LONGINT_IMPL, also change MPY_TOOL_LONGINT_IMPL in mpconfigport.mk.
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE)
#endif
#ifdef SAMD51
#define CIRCUITPY_MCU_FAMILY samd51
#define MICROPY_PY_SYS_PLATFORM "MicroChip SAMD51"
#define PORT_HEAP_SIZE (0x20000) // 128KiB
// If you change MICROPY_LONGINT_IMPL, also change MPY_TOOL_LONGINT_IMPL in mpconfigport.mk.
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MP_SSIZE_MAX (0x7fffffff)
#endif
from mpconfigport.h
HT16K33??
we have that
Thanks!
Thanks peoples!!
bye all!
@stuck elbow Right I did use segments.py yesterday. Had forgotten. Bad soldering job prevented a successful test (could not find i2c dev at 0x70)
byeeeee
btw all the 3.3 volt pin does on that module is offers a pullup to 3.3v on SDA and SCL -- isn't connected elsewhere. On 5V logic it's tied direct to Vcc.
ref. https://www.adafruit.com/product/1911
a glass of water works to restore cognitive function. ;)
Ok...back to the day job. :eeyore:
Start with 100k
With pin-sharing you lower the pullup resistance to make it stronger.
usually, /RST is its own pin, but on low-pin-count target boards sometimes there's pin sharing.
Pin-sharing /RST example. C8051F330D, which uses a single pin as both as C2CK and /RST. C2 is their two-wire debug interface.
All those capacitors in parallel were meant to substitute for a single, larger capacitor I did not have on-hand (so I used 10 ceramic bypass caps instead).
The correct value is 1 uF for that cap and it is polarized (+ connected to the anode of that diode (D1, 1N4148) nearby).
AnalogIn should be ready to go.
I'm doing AnalogOut next. I did up code for an LED at different brightness levels with a dac_value(volts) helper. Does this work for you? And if so, do fritizing diagrams for all the boards?
@idle owl are you looking at this one? https://github.com/adafruit/Adafruit_CircuitPython_Bundle/pull/70
@slender iron Yep
๐
Waiting on travis
I'm looking over the list of commits that haven't made the bundle because of needing releases now
Ah ok keen
git submodule foreach "git log --oneline HEAD...origin/master"
Merged.
I hadn't planned on it, didn't update anything that needed it. Was it missing an earlier release?
I'll do it. yeah, jerry added buadrate stuff
Ah ok keen. Thanks!
My PR lead is diminishing...must. submit. more. ๐ ๐
@raven canopy You're doing an amazing job! Thank you again!
i will have to go back and add Travis badges on a lot of those earlier ones anyway...
like i said eariler, it's muscle memory at this point. got my average workflow down to around 18 minutes. at least i get to pay it forward...lord knows how many hours i've read adafruit documents that have been created/maintained up to this point. 
k, new bundle released
Excellent.
is the bundle submodule stuff in a good state @slender iron ? git is doing very strange things for me
it won't update a submodule i point to
curious if you've seen this
@timber lion I think so. I was just poking it
git is very unhappy
i'm forcing it to sync ds18x20 but it's ignoring and syncing everything else
but accordin to git submodule sync it should update what i point at and nothing more
what happens if you do git submodule update ?
doesn't touch ds18x20 either
it just pulls in si5351 and such
i think i need to just totally annhilate the ds18x20 and add fresh
because you changed the url?
yeah i updated the .gitmodules file
maybe deinit it first? https://github.com/adafruit/Adafruit_CircuitPython_Bundle#removing-a-library
and git submodule sync is supposed to see that update and make git happy
but it's not
I've never run submodule sync
ah that might be the magic step
@timber lion were you perhaps updating ds18x20 for the OneWire issue while @slender iron was updating the release?
yeah not many other people have online either.. no good docs on it
just imagine it's failing the sync because it's still pointing at an incorrect url (like apt-get does...fail, skip, move on)
yeah i think delete and re-add is going to fix it.. we'll see in a moment
just changing the .gitmodules apparently doesn't update the other metadata git hides away regarding what pinned version
@slender iron bus_device had some pretty old versions of docs stuff. is setup.py related to docs, or is it truly for setuptools?
Yep check out the new guide page here for info on the new library: https://learn.adafruit.com/adafruit-rfm69hcw-and-rfm96-rfm95-rfm98-lora-packet-padio-breakouts/circuitpython-for-rfm9x-lora It's very similar to the RFM69 library but made to work with the RFM9x radios in LoRa mode and with RadioHead compatible headers/config. Basic send/receive between two modules running the CircuitPython code or the RadioHead Arduino library RFM95 example (basic 'raw' client / server) work great.
Ok I think we're through all the PRs!
good job! (but...now my lead is gone. for now.)
Would it be possible to have a variable which states the approximate interval at which time.monotonic() is increased? This would save people form having to write code to guess what the interval is, since it appears to change based on which board is being used.
it's eerily quiet in here.... ๐ป
Discussing potentially giving a talk at a conference in July.
oh nice! ๐ค
It'd be the first time I've ever done an actual tech conference. Trying to decide what to do. Worried anything I would do would be to beginner. Also keeping a talk to 30 minutes... oi.
But there's the 2 hour tutorial option as well. Which is equally terrifying for its own reasons.
hehe. i feel ya on the "long-winded". ๐ ๐ณ
My last talk was over an hour.
The workshop I'm doing in May at a local convention is a 2 hour slot. But it's suuuper beginner. I'll be going through cpx class essentially.
i'm a horrid public speaker...especially when I don't actually know the audience. depending on the subject of course...
if it were a talk on, say, obscure movie lines...i could nail it. though, most people would be like "that dude needs medication". ๐
any dealing with pytest, so far? the motor lib has it in there, but Travis won't get past it...
Hmm
It took me a few years to get used to public speaking. I settled on a few guidelines that I always follow now: 1) always talk about something you know and care about, 2) tell 'em what you're going to say, 3) say it, 4) tell 'em what you said. I've given a few national-level talks over my career and was nervous before each, but the "rules" helped me get comfortable in the first 5 min or so.
Travis says:
$ py.tests
No command 'py.tests' found, did you mean:
Command 'py.test' from package 'python-pytest' (main)
py.tests: command not found
might give py.test a roll...
@errant grail That's a pretty great set of guidelines.
They worked for me, anyway.
What's it doing in the motor lib?
yeah, 2-4 have been hammered into my brain. both speaking and writing. but, implementation... ๐
#1 was always the most important for me, but certainly your mileage may vary.
@idle owl it looks like it's testing the code through a simulation...
https://github.com/adafruit/Adafruit_CircuitPython_Motor/blob/master/tests/test_stepper.py
py.test will run through all directories and execute any test_*.py.
yeah. i'm giving py.test a run. Travis suggested it...and he's always right. right?
he was right this time...
$ py.test
===================== test session starts ======================
platform linux -- Python 3.6.3, pytest-3.3.0, py-1.5.2, pluggy-0.6.0
rootdir: /home/travis/build/sommersoft/Adafruit_CircuitPython_Motor, inifile:
collected 6 items
tests/test_stepper.py ...... [100%]
================= 6 passed in 0.09 seconds =================
The command "py.test" exited with 0.
nice
this was my stopping point for tonight anyway. :phew:
alright. zone-out time... talk to ya'lls later. have a great night!
later! Have a good one!
sigh My Feather M0 Express running CP 3.0 Alpha 2 doesn't work well as a robot controller. As soon as I try to add two digital I/O variables it runs out of memory. Oh well, I should eat and watch the SpaceX launch. And I have a headache. Time to knock off for the evening.
Thanks, @idle owl ! Just let me know when you need more guides checked out.
I never tried this robot with 2.x....
I don't.
Ok, oscilloscope?
Otherwise there's nothing to check for AnalogOut is why I ask.
We're not changing that one up any. Honestly I'm not sure there's anything worth checking anyway, except to go over it once I get it done and make sure I did up the fritzing diagrams right
๐
Ahhhh, that's true.
Have a good one!
where can I find more info on the CPX touch & touch threshhold and their range of values?
would be nice if the mu help button did something useful ๐
is there a full formatting uf2 to use when having problems with a circuitpython board? my cpx drive seems to be corrupted. nvm, found it: https://learn.adafruit.com/welcome-to-circuitpython?view=all#troubleshooting
@heady dove some links:
https://learn.adafruit.com/adafruit-circuit-playground-express/adafruit2-circuitpython-cap-touch
https://learn.adafruit.com/circuit-playground-express-piano-in-the-key-of-lime/touch-tone
http://circuitpython.readthedocs.io/en/2.x/shared-bindings/touchio/TouchIn.html#touchio.TouchIn.threshold
to get a sense of the range of values, write a little program that just loops and prints out .raw_value
if you want to adjust the threshold, use the adjust_touch_threshold function:
https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/blob/master/adafruit_circuitplayground/express.py#L410
@ruby lake response on that from mu author himself:
https://github.com/mu-editor/mu/issues/306#issuecomment-347157131
@timber mango yep. that's it. specifically the "Drive Issues" section:
https://learn.adafruit.com/welcome-to-circuitpython?view=all#circuitpy-drive-issues
did that solve your problem?
@idle owl I'm refering to a post from yesterday. You mentioned a talk at a convention in May. Will that be on video and posted in Youtube?
here is a good micropython talk from nickzoic: https://www.youtube.com/watch?v=inUMgHQ62sA
@humble mural Unsure. It's a workshop, and it's not a professional tech conference, so there's not video of every talk. Depends on whether I can find someone to video it, and whether it's even worth videoing since it'll be all about the participation of the attendees. There's also consent issues for anyone involved. So there are many variables.
@slender iron Thanks I am going to wathc that shortly. I have to find and print some printer supports. I was tightening the belts and the arcrylic supports blew up. Once I set the printer I can watch in peace. My students are eager to start making the bluetooth controlled daf Punk helmet. @idle owl Bummer, my ears perked when you mentioned a newbie crowed (not your term, but what I understood). Thanks to both of you.
@idle owl has one talk already that was recorded
They've already watched that one, I believe ๐
ah ok
@slender iron When I first discovered CircuitPython and MicroPython I went on a mad search for all things CP and MP. I devoured every video I could taking notes, ordering stuff from Adafruit and replicating what I was seeing. I saw @idle owl give a talk. that is not the funny part. It took me about a 2-3 weeks to figure out that the Kattni from the video was the Kattnie whose guide I was reading and chatting with in discord.
๐
@idle owl I'm updating the circuitpython drivers page
Excellent, I was wondering about that a few days ago
Forgot to make a note of it to ask
its a library day for me so its a good task to knock out
Nice
I've updated adabot to check it for me too
๐
@solar whale RESET line on Metro m4 i touchy because there's no cap from RESET to ground. Add 0.1uF cap. New rev boards will have it. You could tack solder a cap from RST to GND on the back or stick one in the headers since the RESET pin has its own header connector.
@tulip sleet Welcome back!
@idle owl @slender iron at SRQ airport; plane is 2.5 hours late. Catching up. We did not wait here the whole time! Left where we were staying later.
@tulip sleet Ah, that's good at least!
no worries @tulip sleet
@tulip sleet thanks! It would be nice to have my old chair back ๐
i left #circuitpython-dev for last
I used to telephone my maid (lived in a dorm) and ask her to go into my room, turn off the UPS, count to ten, and turn it back on -- to reset my BBS when I was traveling.
better get home before tomorrow - you'ls have some shoveling to do!
@solar whale I-95 was possibly the rain/snow line at least as of noon, so we'll have to wait and see.
11" snow in NW Connecticut predicted.
Oi
we seem to be in the crosshairs
@drowsy geyser Do you have a potentiometer?
@idle owl Uh, yes! Somewhere in that box of components.... ๐
@drowsy geyser keen, that's what we're doing up for AnalogIn, so I'll have you test my diagrams ๐
Sounds good! I can certainly help with that.
@humble mural daft punk helmet? sweet! i like your students even more now...
I'm getting a trinket m0. I want to use it with a linear softpot and interpret swipes and taps then send messages over uart to a pi. this will be my first circuit python experience, any tips?
@raven canopy No to brag but my classes have always been popular (I attribute the content) we always have to turn students away. Since I have incorporated IoT and the use of Adafruit boards and guides, interest has exploded. The recruitment season is over (8th graders selecting a hig school, I work at an all magnet school) but I can't wait to see those children's faces when they visit us next year.
@feral sage we don't have a driver for it specifically but it shouldn't be hard
The softpot?
ya
I'm going to use analog in and read the data until it stops and then see what the values are and which direction they go in
Not sure about the taps
that should work!
@slender iron ever seen this helpful sphinx error:
Warning, treated as error:
failed to reach any of the inventories with the following issues:
The command "cd docs && sphinx-build -E -W -b html . _build/html" exited with 2.
yup, I moved a redirect
hehe. that would probably do it..
which docs are you building?
onewire
and it refers to bus device?
yep
let me see if I can redirect it
that was the line above the "warning, ..."
https://circuitpython.readthedocs.io/projects/bus_device/en/latest/objects.inv
do i need to update the intersphinx mapping?
if you are changing things
I added a redirect to rtd too
so it works ok now
just warns that it was moved
ok. is adabot fixing all the rest?
ok. i only have like 5 left to do, so i'll get those and the straglers that are pending changes. is it just changing bus_device to busdevice?
๐
I'm updating the driver page in the docs to point to the awesome updated docs!
i was going to ask how that page was built...it was a little behind. ๐
and i'll test the new intersphinx both ways real quick.
intersphinx inventory has moved: https://circuitpython.readthedocs.io/projects/bus_device/en/latest/objects.inv -> https://circuitpython.readthedocs.io/projects/busdevice/en/latest/objects.inv
``` ๐
updated conf.py works with busdevice as well.
excellent! sorry for the hiccup
no worries
@ebon horizon nice writeup! (saw your preview here before it was blogged..but, eh)
https://blog.adafruit.com/2018/03/06/intro-to-circuitpython-with-a-python-heart-matrix-project-by-baldengineer/
@raven canopy Thanks ๐ Iโm a big CP fan now.
haha, nick blogged it too ๐
two easy PRs if anyone wants to take a look
gotta have the blank line after it
Ok. change request inbound once I get through the rest of it.
For sure ๐
Sensor name or URL incorrect? Looks like sensor name is duplicated from above.
@slender iron Do you want me to do inline on the other one as well? It looks like the same issues are present in both.
nah, it'll pick it up automatically
Ok.
they are merges from the same branch
Ah ok. Makes sense.
ugh read the docs bug
bleh.
swoops in someone say docs? ๐
Now I'm picturing The Doc, Superhero at Large.
so, SimpleIO's module filename is (simply?) simpleio. should i rename to adafruit_simpleio?
nah, I think its too late for a rename @raven canopy
k. that's what kept me from doing it without asking...
I was wondering the same thing a while back. There's only a couple like that. Fair enough though. Makes sense.
๐
@slender iron Nice! Waiting on travis.
thanks!
w00t! Thanks @idle owl !
๐
@idle owl merge conflict...conquered!! only took one test branch. ๐
but...upon closer inspection, it tripled the commits. ๐
@raven canopy no worries! Should be fine
+51 for the commit count.. hehe
AnalogIn is set! I'll get it into the other guides.
We sorted all the questions above: yes to "Internal RGB LED", everything has cap touch built in, and analogout will use the REPL and a scope or Saleae if someone has those options.
We also sorted basic details for: PWM, servo, UART, I2C, NeoPixel/Dotstar, CPU temp, DHT, HIDKeyboard, Audio Out.
AnalogOut is next!
I tried to use the gamepad module to read the buttons on my CircuitPlayground Express
I added .txt to the filename so it would attach; in case it matters, rather than renaming it, I have a main.py that just imports the script I want to run.
This is the same as #568. You need to give it something from board rather than from cpx because the CPX pin is a DigitalInOut.
Actually GamePad expects DigitalInOut objects, so that part of the code is correct.
@inventhouse what versionf of CircuitPython is this?
Hello everyone, I am getting ready order the items needed to build the 16x128 matrix. The list of materials includes a RPi3, I would like to do the project (and all projects) in CP. Can someone provide me a โBOMโ of CP boards for this project with the addition of Bluetooth. As always thanks in advance.
@humble mural for what project exactly?
starting with, a matrix of what? microphones? hal effect sensors? leds? servos?
@stuck elbow leds/neopixels
can someone who has a bme680 try and replicate this? https://forums.adafruit.com/viewtopic.php?f=60&t=132231
@humble mural I don't recall what you settled on with regards to neopixels vs leds and shift registers; did you have a tutorial you were working from ?
you can also chain led matrix driver chips
but you would still need quite a number of them
power is going to be a problem too
@slender iron I have a 680 but it's at home and I'm at work. I'll try to replicate this evening.
ok thanks @drowsy geyser
<@&356864093652516868> Here is the recording from the meeting this week: https://www.youtube.com/watch?v=rfifzCznKQw&list=PLjF7R1fz_OOUvw7tMv45xjWp0ht8yNgg0
Notes with timecodes are available here: https://gist.github.com/tannewt/ab97740543753ecdcd6f356edae3cfba Join here for the chat all week: http://adafru.it/d...
I'm working on shift registers and LED matrices today:
https://www.adafruit.com/wishlists/458579
Mostly layout, today.
I won't know the extent of use of the BJT's** until I get a bit further along in this project.
** transistors. NPN generally used to complete a ground; PNP to source +3.3 VDC.
The shift registers may be enough to source 3.3V to the LEDs (which are configured as common-cathode -- many segments sharing a ground).
Since these shift registers have an output enable pin (/OE) they can be modulated with pulse width modulation (PWM) to keep the supply current down to (hopefully) about 100 mA or less, with all segments lit. ;) Not sure how/if I will use that; I'm used to turning on segments individually (pulsing via a simple loop in the code turning them on and off sequentially).
Could try to see if Charlieplexing would work; these shift registers have a high-impedence state (they are tri-state outputs) which is a requirement for Charlieplexing.
https://en.wikipedia.org/wiki/Charlieplexing#Refresh_rate
New word (for me): the trit.
After reading all those caveats in https://en.wikipedia.org/wiki/Charlieplexing#LED_failure
I'm thinking: .oO(..not so much.)
@pastel panther @stuck elbow thanks for the reply, but I work in a concrete bunker and Discord is blocked, the kids would be on it all day. The project we are targeting is https://learn.adafruit.com/16x32-rgb-display-with-raspberry-pi-part-2/software
We want to to the whole thing in CP. I have tons of RPi3โs that we got from Adafruit, plus I have lots of power supplies and wires. I need to know what boards would work best
Thanks
@humble mural I see. I think we don't have the driver for that display. I have it, and I wanted to write a driver, but upon reading the datasheet realized that it's much more complex than anticipated.
Well we are married to the display. Is there another one that we do have drivers for?
not married
Is all caps a no-no????
The goal is to make a marquee using CP.
Sorry, it is starting to rain, I have to go inside, Iโll see your comments when I come out.
@stuck elbow What stood out as complicated about writing a driver?
@pastel panther it's not i2c or spi, but rather a custom bit-banged protocol, IIRC
@humble mural Adafruit has a number of different matrices: https://www.adafruit.com/category/327
all the dotstar and neopixel ones will work for sure
but they tend to be expensive and power-hungry
Thank you both.
The backplane of a large LED matrix tends towards a prohibitive complexity, so whatever the designer of such a matrix has in mind, you must follow.
Hey @slender iron , can you help @tulip sleet and I understand a piece of the SPI code? This is from around SPI.c:60, updated by me to compile with a different sercom reference for the dotstar and cleaned up to remove the #if defined code:
if (potential_sercom == NULL ||
(potential_sercom->SPI.CTRLA.bit.ENABLE != 0 &&
potential_sercom != status_apa102.spi_desc.dev.prvt &&
!apa102_sck_in_use)) {
continue;
}
My brain is compiling this to:
potential_sercom is enabled &&
potential_sercom *is not* the dotstar sercom &&
the dotstar SCK pin is not being used
The best Dan and I could figure is that itโs mean to skip the sercom that the dotstar would use even if itโs not currently using it. That said the logic has stumped us both
@pastel panther will look now
thanks
@slender iron not sure about the function of the third clause
most of the time we use ENABLE to check if a sercom is already in use
If my assumption of the purpose is correct (hah!) I would expect something like:
if ( potential_sercom == NULL ||
( potential_sercom->SPI.CTRLA.bit.ENABLE != 0 ||
( potential_sercom == status_apa102.spi_desc.dev.prvt ) && !apa102_sck_in_use
)) {
continue;
}
yeah, I think that works too
its a special case for the dotstar where apa102_sck_in_use is used to check if someone has already taken over the sercom to use it
actually I don't think that works
(your rewrite)
because there is a case where enable is 1, the potential sercom is the dotstar and no one has taken it over
we shouldn't continue in that case because we can use it
I didn't think that case was possible. You're saying it's possible that the sercom could be enabled (is the the same as in use?) and it's the same sercom as the dotstar is using/would use and the dotstar isn't actually using it?
I assumend that a enable=1 sercom was in use and the dotstar would claim it's sercom. Perhaps I was mistaken?
the sercom for the dotstar is always enabled
however, we want user code to be able to take it over temporarily
thats how you can use the dotstar from user code
(I was sleeping in class when that was covered)
I forgot how to make git clone into a differently named directory. git clone -o kattni git@etc what else do I need?
filename gets provided after that
so in that case !apa102_sck_in_use is epected to be true as long as the dotstar isn't being used? Is it constantly being used then not used? That would explain all the calls tocommon_hal_busio_spi_construct from rgb_led_status.c
so git clone -o kattni git@github.com:kattni/repo.git directoryname?
@idle owl yeah iirc
ok thanks
@pastel panther apa102_sck_in_use is false unless the user is using it. I believe its tracked in claim_pin
aaah, I got that backwards. I assumed it was false unless the CP was using it to indicate status
nope, I think its the reverse. feel free to rename to something clearer
ok, thanks for the help. so just to clarify the idea is skip any enable=1 sercoms unless it's the dotstar sercom and a user isn't using it? Meaning we don't mind re-purposing the dotstar's sercom even if CP is using it to indicate status?
correct
takes control back
ok, thanks
toodles!
@tulip sleet or anyone else who has added to the bundle, do I just update the 3 lines in .gitmodules? And the directory in /drivers/ is automatically created?
@idle owl you also have to do a git submodule add <url.git> on the bundle, IIRC.
the url is to the release tag
i think
๐
Not as part of the PR though right?.. that doesn't make sense.
yes, as part of the PR.
if you look at one of the previous PRs, you'll see the two different commits.
yah that was the confusing part.
agreed. i missed the submodule on VEML6070 on my initial PR
Can someone @mention me a few times? Discord is bugged on my phone and won't clear the 1 mention indicator I have
@pastel panther i like sammie vs lil sebastian
@pastel panther I've had to reinstall it to get that to go away if I remember correctly.
i think i force killed it once b/c of that problem...
It's gone! Though it's now showing the new one
android or ios?
Oh well. I suppose this is better? Android
force kill. clear data. and maybe clear cache (will have to re login if this one i believe)
Nevermind, I had server mute on apparently
hehe
@slender iron when doing git submodule add, is the url to the release tag, or just the master.git?
I copy it from the front github page
ok. so just the master... @idle owl ^^^
@slender iron how do I undo what I've already done, or will doing it again with the http link overwrite it?
what do you mean?
it created the directory
just change the URL in the .gitmodules file? or rerun the git submodule add
I think changing .gitmodules will make travis happy
@slender iron how is this possible, that CP works with all those different SPI flash chips without having to define the commands for each model separately?
@stuck elbow they all mostly follow the same commands
@slender iron seems like the atmel's chips don't โ the LUFA demos don't seem to work, anyways
I need to debug this properly, and get the commands from the datasheet
got a datasheet link? I can take a look
I have a couple of things to try, and this is not directly related to CP โ I'm trying to get that USB filesystem access for the esp8266
but thank you very much!
I'm making some progress, but using atmega32u4, because that has the best documentation that I could find
ah, I'm samd through and through now
I even got a samd11 dev board for this
but couldn't figure it out
without any experience with usb, etc.
what were you trying to figure out? the usb stack?
the MSD example
well, I will make a proof of concept with the 32u4, and if that works, I'm sure it can be written for other chips
man those "examples" are .....not good
I wish they'd focus on good examples not templated project generation
well, Enterprise
@stuck elbow how far did you get? If it's anything like my experience you eventually got it to compile and then it did nothing
@pastel panther I switched to 32u4 pretty fast, because it simply has so many examples and so much docs
and since I have no idea what I'm doing...
I have the usb2serial working with it, and I have the massstorage demo enumerating as a device, I just can't write to it
@stuck elbow I have done a bunch with it so feel free to ask me to look
the beagle usb analyzer is very helpful
wireshark can also analyze usb packets
if you can capture them in another way
thanks! I will once I have anything worth looking at
right now I'm just hacking at the demos
@slender iron wireshark! Huh, never would have though of it but it makes sense
wireshark can do a lot of protocols, not just network
I have friends who use it with SDR too
would one be better served by looking at CP code or the uf2 code to try and understand samd usb stuff?
btw, Michaล Moskal made an UF2 bootloader for the UNO's 16u2 chip
a shame he didn't manage to fit a real serial in it, only some weird serial over HID
@pastel panther I know the CP code better
so, best way to update both a local copy and a fork of the lib bundle?
Is the local copy a clone of the fork?
yeppers
Did you add upstream? git remote add upstream url-to-original-repo-that-you-forked. Type git remote -v to see if you added it.
with adafruit set as upstream
Ok
i've done git submodule update --remote..but haven't committed all of the updates...
be on master branch, then git fetch upstream git merge upstream/master git push your-username-or-origin master
Easier to read, sorry.
ok. almost went with merge before running submod update. time for a stash
that should bring you even with adafruit both locally and remotely
but I've run into issues when I'm mid commit and had to do craziness to fix it, so...
no guarantees ๐
disclaimers. essential. ๐
would the craziness have to do with the ds18x20->onewire? (haven't gotten there yet...just pre-planning)
Oh I meant in general I've run into issues, not with this repo specifically
Good call, yes probably.
@idle owl hmmm. failed "docs"...but travis won't pull up the log. and i don't see anything that would fail...
Yah I know I'm trying too and failing...
I don't have the brain for this anymore tonight I think. It'll have to wait.
ok. i'll try restarting that job...maybe travis had a hiccup.
Naturally....
that moment when you realize you've been fighting line endings in a local repo, then discover a .gitattributes file exists... ๐
yay?
hehe. not really. but, such is life as a Windows user. ๐
wub wub
why couldn't they all just agree back in the day? why is lf vs crlf even a thing?
i believe in you. :catposter:
hmm, I don't think this will fit, even in the m4:
~/cpf$ du -sh build-samd51_proto/firmware.uf2
688K build-samd51_proto/firmware.uf2
๐
on second thought, the optimized version is pretty large too. I forgot I'm not talking about a binary
@pastel panther uf2 is 2x larger than the flashed size usually
ya, the -O1 version seems to have fit
check the bin size
๐คฆ ๐คฆ ๐คฆ
read your datasheet closely folks
@slender iron it strikes me that gdb and the jlink are very capable tools created by many very smart people and do an excellent job of telling me what dumb mistake I've made
one of these days I'll level up my mistakes ๐ค
it'd be boring otherwise
@slender iron lmk when you have a minute
yeah, I'm winding down
was ready to try and hammer out i2s but had to update python...
so fire away!
regarding the clauses for reuse of the dotstar :
(potential_sercom->SPI.CTRLA.bit.ENABLE != 0 &&
potential_sercom != status_apa102.spi_desc.dev.prvt &&
!apa102_sck_in_use)) {```
shouldn't the last part be an ||?
because you still want to continue if the sercom is enable=1 and the sck is in use?
gah, now I've confused myself again
I think its demorgan's law
you want to continue if the user is using the sercom or if the sercom isn't the dotstar sercom
๐คค
That's my brains leaking
this is the same right? ENABLE == 1 && !(sercom == dotstar || sck_in_use)
@pastel panther I usually grab some paper and draw the truth table when I get myself befuddled by some boolean logic. Just a thought....
I'm going to shelve wrapping my head around that for now
Part two: if we do decide we can re-use the sercom and it's ENABLE =1, don't we need to disable it before we can init it again?
my brain is done and distracted by synths... ยฏ_(ใ)_/ยฏ
now that I re-enabled the code above, it's blowing up here hpl_sercom.c:2611
ok
np
what synths?
like musical synths?
perhaps it is time for the untz
playing with soft synths?
Sidebar: they used Moog synths to get that old-school sound for the Thor: Ragnarok soundtrack....
nah, oldcrow pointed me to shruthi
I'm sure; analog is even more in recently
nice
this is on my list of things to do: http://www.ucapps.de/index.html?page=midibox_sid.html
apparently there is a version of the core module for the stm32f4 and the SID app needs some porting work
I'd love to split up the shruthi xt main plate into smaller chunks that I can oshpark
that shouldn't be too tricky
just gotta figure out how to wire across the chunks
whenever I look at stuff like that I want to SMD-ize everything but I don't know enough about audio electronics to know which components need to be through hole for audio performance reasons
happy dance
I wonโt be online much today. No power.
@pastel panther Don't you need valves? https://www.ebay.com/itm/Little-Dot-MK3-III-Valve-Tube-Headphone-Amplifier-Stereo-HiFi-Audio-Preamplifier/263536039749?hash=item3d5bf8d745:g:0eIAAOSw5idanyxy
how do I send data to the plotter of the latest mu editor beta?
I think you just print the numbers
@solar whale that's not cool. Stay warm!!!
@ruby lake if multiple numbers, you might need to print them as a tuple with parens
(1,2,3)
right, I have it going, thanks
I wrote my first circuitpython program, gotta wait till I get my trinket m0 tomorrow to test it, I am very impressed with how easy it is
Yay! Power is back on ๐
We got about five inches of snow in NW Connecticut. Maybe 7. But nearby (10-15 mi) they got about 24"
about 12 here and power out for 12 hours but all OK - still snowing but very wet stuff.
SE NH
@pastel panther I want to smd everything too so less material is used and cheaper pcbs. @ruby lake should be able to tell us why through hole is used
hm?
why are DIP and through-hole parts commonly used in audio design?
That is a DIY thing
still a lot of people scared of surface mount
I prefer SMD parts myself
yeah me too
I'd love to shrink the shruthi filter designs
make them usb powered would be cool too
except for connectors, I still prefer those to be TH for mechanical reasons
yeah that makes sense
I made both TH and SMD layouts for the module playground
thats eurorack format right?
It's also a retro-part thing. For some "authentic" distortion voicing, matched germanium transistors are sometimes the only way to go and are tough to find in smd. I have mixed opinions about that. To me it's like trying to duplicate vinyl scratches in other recording media -- I lose interest quickly and move on to newer technology.
I want something smaller ideally
I was thinking about something around the size of trellis and shruthi xt
I don't have enough dexterity to do a nice job using through-hole. ;)
@slender iron well the shruthi xt is bigger ๐
I made a euerorack version of the shruthi
yeah but its about 3 trellises next to one another
its could be a standard grid size you could link together like trellis
basically a modular digital control panel
Ok, I think I finally got it working; I was able to get the status dotstar status-ing and then was able to re-purpose the same sercom for a SPI connection. I tested on my m4 board so I'll test on the trinket, bitsy, m4 metro and perhaps others before submitting a PR tonight.
@slender iron The base board I envision similar to a feather, perhaps with a few more I/Os and onboard linear and i2s dacs. Then that can just be attached to various host/panel boards
@ruby lake yeah that'd be awesome
thats how module playground started, a breakout of feather I/O aimed at modular rack use
so, you can make an Ambika (poly shruthi) or a euro module, etc
Well, another option being a smaller host
yeah, that'd be nice
@slender iron do you think the discord could use a audio/synth channel? Maybe AV more generally?
@pastel panther and games
@idle owl building master for the cpx gets me
Traceback (most recent call last):
File "../../tools/preprocess_frozen_modules.py", line 6, in <module>
import semver
ModuleNotFoundError: No module named 'semver'
Updating submodules didn't help; do I need to install https://pypi.python.org/pypi/semver?
@pastel panther you need semver installed as a python module
@solar whale and anyone else interested, here is a zip of uf2s for various boards with some changes I made to get the status dotstar working on the trinket and other boards; SPI and the dotstars should be the only bits affected but who knows what else I may have borked.
@pastel panther Will give it at try.
danke schoen
cool! works on trinket!
I still can't get itsybitsy to show up - can you?
@slender iron @pastel panther did you ever get itsybitys and 3.0 to work?
I think the last time I tested it it was still having issues; let me check again
OK - just trued your UF2 and got nothing - ```[13699.104393] FAT-fs (sdc): unable to read boot sector to mark fs as dirty
well - glad it's not just me ๐ Nice work on trinket!
<- answers his own question
Always a bonus when that happens
I'm still working on avoiding asking questions I can answer myself
๐คค
survey says master is also avec issues
๐
issues know no languages
I don't like that emoji. I would prefer the tongue were in the corner of the mouth
๐คท
<insert Python language definition for issues>
from master import brokenness
Baroque. When you are out of Monet.
lol
I'm still amazed that a cell-phone can transmit in so many languages ๐
an 'oldie' but a goodie
@solar whale can you/did you test SPI works as expected?
(that is non-dotstar SPI)
on trinket - no - but I'll set up a test.
Thanks, no rush; I'll verify as well after work
are you specifcally interested in trinket or would M0 express tell you as well?
feather m0 express
testing both wouldn't be bad but the trinket specifically since it has the dotstar enabled using a sercom
ok - just take a few minutes to set it up
hmm - having issue with both SPI and I2C so may be setup -- still working it
ok - found config erro for I2c - now back to SPI ...
@pastel panther yes - both SPI and I2C work on Trinket - at least for my test driver for STPME610 touch screen - its just what I had easily available
perfect, thanks
BTW they dont work if you hook up the wires wrong! Can you fix that ๐
I kinda did on my m4 board, and the same is likely true of the metro m4 and some of the m0 boards. Certain pin pairs can work both ways for i2c SDA and SCK because there are two sercoms with the pads swapped
once I have this checked in and I look at QSPI on my board again I'll get back to work on my project that should help with choosing pins
looks good to me. Thanks for the preview.
AnalogOut is all set and mirrored across the rest of the guides!
As discussed, I'll be doing PWM next with a simple example using D13, and include the two piezo examples. I have code working for the D13 LED. I'll write up that section first. Then I'll look at the piezo code and add to it to get it working across all the boards.
gotta run - have a good evening
later @solar whale!
@tannewt calling for an assist. Travis is failing docs, for an odd reason. I've restarted the docs build twice, same result.
Kattni's first commit passed, and nothing changed that I can see other than moving the addition to the beginning of the section.
Content is written and code is uploaded and embedded. Verified that you want hw diagrams of the piezo example. Diagrams created - need to make images big enough for 4x3 cropping and then do up the side2 elements.
Started on cap touch. A0 works on five out of six boards, but it's disabled on CPX. I plan to do up the code to use A0 since it works on the rest of the boards, and include a warning that it doesn't work on the CPX. I'll do up one of the boards attached to a banana. Then at the bo...
Some time time and many dead ends later I finally got it working, as far as I can tell. Tested on my m4 board and trinket m0 both of which have a dotstar. The itsy bitsy m0 can't use a sercom because of how it's wired (dotstar clock to a sercom 1 pad 0 which can't be a clock).
may the odds be ever in your favor (The Travis Games ยฉ 2018)
lol
Oh bugger, it's late. Oops.
oops? hehe. happens to me every night.
"i'm going to bed early tonight". 2 hours later.... ๐ฆ
Meh yeah.
Need to head out now that I realised it though. At least my wiring diagrams are done.
And I have a picture of a Gemma attached to a banana
so
woohoo! night. "nanners" is a nickname of mine from a former boss. eat one every day...
Thanks for fighting with travis. Hopefully we can get it sorted tomorrow.
nanners... I love it
night!
@pastel panther kattni and I are both getting the same Travis failure. something be borked...
hmm
the line it's complaining about: blank (if i'm counting sphinx lines correctly)
I'm seeing it complaing about not being able to find console.out
I don't think it has anything to do with my changes, does it?