I'm gonna close this. I haven't heard any similar reports. Please reopen if its still an issue.
#circuitpython-dev
1 messages ยท Page 98 of 1
FYI, @ladyada set me up with a sinc filter which was submitted in 557ceded00de20d2070e1397d3dec322f753d1e6.
Gemma M0 is a supported board now yay, added product link to readme ๐
Thatnks @slender iron
np @tough flax
[adafruit/circuitpython] New branch created: asf4
My work in progress is here: https://github.com/adafruit/circuitpython/tree/asf4
It is very early and it doesn't even compile. However, I figured I'd get it out there in case someone . can't wait to work on it.
Please coordinate with me if you do because I will rebase the asf4 branch as master progresses and the branch starts to actually work.
c08cc41 added Gemma M0 to supported boards section on r... - brentru
And success! (on a new thing I hadn't posted about here before...)
I wanted to do some sort of fire crackling sound, combined with an led fire effect... on the CPX, using the built in speaker, no external board, etc. No luck in finding code to generate the pink-ish noise.... BUT..... I just got background sound as a wav playing, on a loop, with fire crackles, and the led effects (not fire yet) running at the same time.
so one 268k wav file for now... improvable, and likely can do much better... but it works.
in circuitpython, btw, if that wasn't clear.
my CPX is sitting here, leds spinnings and crackling quietly.
awesome! @timber mango !
https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground looks nifty, I'll use it and give feedback/patches if needed.
does anyone know if you can connect a 8266 feather huzzah to a wireless network with coperate security (needs username and password)? I tried last year with micropython, just wondering if anything has changed since?
awesome @timber mango it does need love for the more complicated bits
I mostly just wanted to release what I had done already
I'm still working on the test script (I got distracted by the fire crackle, I was dreaming about the project I want to use that for...) but I'll rewrite to use that library, so it'll be useful both ways.
๐
is there a Gamma8 array in a library yet? Would be nice to not have to cut/paste it into my own code, since it's pretty static.
@slender iron getting error with the new express.py:
File "libraries/drivers/circuitplayground/adafruit_circuitplayground/express.py", line 187, in <module>
File "libraries/drivers/circuitplayground/adafruit_circuitplayground/express.py", line 23, in init
AttributeError: type object 'DigitalInOut' has no attribute 'module'
I blew away my entire /lib and replaced with the new one, so this isn't a code version issue.
error is underscore underscore module on last line.
it's the "sphinx.ext.autodoc" stuff, so I'm gonna comment it out for now, and move on, but that's a bug.
grabbed a fresh copy of express.py, deleted express.mpy, edited out that line and return, and all is well now.
when you're working on a circuitpython library and it kinda works but kinda doesn't yet
No comment. Oh wait, lots of comments ๐
๐
Ok, except for the above issue, the express library works so far, I used all of the exposed things, replacing working code done the more manual way(s).
Still done otherwise: touchpads, speaker, i2c. Unimplemented by me (or express lib) yet: IR, accel, sound sensor
Filed bug on github for the above @slender iron
Thanks for the bug @timber mango ! I'll fix it tomorrow. Too bad Rosie isn't going to find it automatically. ๐
@slender iron Happy to help... As you implement other bits, just let me know and I'll use them ASAP.
Is the plan to implement similar libraries for Gemma M0 and other pythonic boards (with less onboard items obviously)?
Given the library name, seems limiting... I'd prefer something that would work generically so that the same could work on any stock board regardless of it's specific pin differences. (Granted a lack of sensors on the other boards, but some items do translate, and having a standard circuit object in general could be useful. Maybe with a handling of stray calls with an generated error message? "Sorry, no button_a on this board" etc)
@slender iron ^ thoughts on above? Looks like there will be an adafruit cpx express library (and then an adafruit gemma M0 library, a Feather M0 library, etc... ) and while it makes it easy for us to build a program to run for the CPX, it seems like it makes it harder for someone who wants to run it on their Feather to port over (remove all of the circuit.whatever refs and replace with feather versions?), versus letting me write board agnostic code, and having it just 'work' for all types of boards.
or is 'circuit' going to always be the name of the object passed?
I think we definitely could. Most boards don't have as much built in
I've tried to share pin names in board to enable the cross board stuff
right, I was comparing to board, which is more like what I'm thinking of...
for example, most boards have SCL and SDA pins in board for i2c
good example, or touchpads.
the circuit playground feels like a special case to me
because it has so much built in and its designed for absolute beginners
I think of CPX as the 'loaded' version...
you might design using it, and then build something permanent using a gemma or a feather, etc...
or Trinket, or the new boards or... ๐
yup yup
but if I'm using circuit.whatever, I guess I'm worried about having to rewrite for another board, instead of being able to just solder on a few wires, add a sensor board and a pixel strand to a Gemma M0, and NOT have to massively rewrite my program, but just add a custompins.h that defines my 'addons' to the board.
(so to speak... import customized, where I define my strand and sensor pinouts)
if you are worried about it then don't use circuit
yeah, it's a tradeoff. I see the value...
๐
the code is literally half the lines...
and then I said to myself... Ok, now write this 'tester' for your Gemma (ie flash pixel, do touchpads,... not much more)... and realized the negative, that it's so CPX specific with this.
unrelated, but reasking, since you'd know the answer: is there a Gamma8 array in a library yet? Would be nice to not have to cut/paste it into my own code, since it's pretty static.
i don't know what Gamma8 is
seems like a good contrib library... "pixeloptimizations"
????
Gamma correction for leds... visually fixes color/brightness... it's literally just a single array lookup... you give it 0-255, and it comes back with value to correct for human eye.
one sec, I'll find example code on adafruit
so that one array never changes, it's actually a formula, but why recompute it? just save array, and use it. perfect use case for library function. Really, it should be a pixel function... enableGamma8 is true? rewrite all RGB values to correct values.
sounds like it could be a good fit for the color library I've been wanting to do
perfect place for it. HSV<->RGB convertor, gamma correction...
yup, want to start one?
here's how I'm using it now in my circuitpython code....
define array
gamma8 = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, (etc....)
then when I go to set a pixel:
circuit.pixels[(color_count + cycler) % 10] = (gamma8[red], gamma8[green], gamma8[blue] )
red,green,blue are int 0-255 of course.
unsure, it's unchanging, is a tuple better than array, memory/speed wise?
um, list... (I came from php world, still convert python in my head)
bytearray is probably best
it's a lookup table, thinking immutable is better, should never have to change it. if it's a byte b, then b[red] will return a number. Reading on bytes: "bytes objects are sequences of integers (akin to a tuple)" so that makes sense to me.
gonna try it.
I need a good way to compare speed of code... hmm...
I've gotta run. thanks for the help @timber mango
interesting discovery:
https://github.com/micropython/micropython/wiki/Performance
I rewrote test for CPX circuitpython:
import time
def performanceTest():
millis = time.monotonic
count = 0
millis2 = time.monotonic() + 10
while ( millis() < millis2 ):
count += 1
print("Count: ", count)
performanceTest()
it's indeed much faster to put Test into a function, and not run as main
on the order (count goes from 33-35k to 47-48k.... that's a major loop improvement... runs 30% faster)
wow, reversed the test (get time, count to 50k, get time elapsed) and it's even more apparent:
import time
def performanceTest():
millis1 = time.monotonic()
count = 0
while ( count < 50000 ):
count += 1
millis2 = time.monotonic()
print("Count: ", count, " in ", millis2 - millis1)
performanceTest()
(comment the def and test() lines, and fix indents to run the second (slower!) way. 4+ seconds, versus 10 seconds.
it really shows you that code structure matters a lot...
fyi @timber mango monotonic returns floating point seconds not milliseconds
I know, I just didn't change variable names, but I did convert 10000ms to 10 seconds.
btw, @slender iron played with using list, tuple, byte options for the gamma8 lookup last night, didn't seem to make any difference in speed (I did a loop thru 7 colors, and timed the whole loop, ran it repeatedly, and while I saw some variations, they all took about the same time, regardless of which sort I indexed.
ah interesting!
ie gamma = [0,x,xx] (list) - gamma = (0,x,xx) (tuple) and gamma = byte(0,x,xx) all performed about the same when calling x=gamma[2]
yup yup
I was surprised... I thought I saw tuples being faster at first, but not really.
I may try it again, and see if I can isolate (take led code out, just purely test the speed difference among the 3 (well, 4, bytearray too)
I think they are all similar under the hood
btw, it would be nice to have millis/etc work in circuitpython time... make it comparable to micropython time functions.
I was surprised no equiv existed.
Also, circuitpython docs are missing a link to math function anywhere I'd expect it linked. I had to search for it.
http://circuitpython.readthedocs.io/en/latest/docs/library/math.html?highlight=math
not linked from core modules OR micropython modules page (if you go backward on breadcrumbs, it doesn't link thru)
yeah, I haven't gona back and done all of the core modules
time doesn't have millis because CPython doesn't have it
I'd rather be compatible with CPython than MicroPython
we could add it in a different module though
I expected math linked from here: http://circuitpython.readthedocs.io/en/latest/shared-bindings/index.html
yeah, I mean to have that
I just haven't migrated all of the built in modules to shared-bindings
here is an example if you'd like to take a crack at math https://github.com/adafruit/circuitpython/commit/a0058e67124b93eb1c8c9c610f823396a7ff7e68
GitHub
Introduce a random module that is a subset of CPython's random. It ยท adafruit/circuitpython@a0058e6
also initializes in the same way where it takes from a true random
source when available through os.urandom(). After initializing, it
produces deterministic results until the seed is set.
This rep...
CircuitPlayground Express doesn't use TC5 for anything so its fine to have it hard coded.
I tried TextEdit which defaults to rich text and it refused to save the file without the .rtf extension. So I think this is enough of a warning.
Ok, finally got a chance to pull out a Gemma (I got a few) and play with python... and I want to light up a few neopixels...
And I'm confused by getting pin busy errors.
Assuming I want to hook up a strand to A0 pad, I did:
pixels = neopixel.NeoPixel(A0, 5)
error:
Traceback (most recent call last):
File "main.py", line 31, in <module>
File "/flash/lib/neopixel.py", line 10, in init
ValueError: Pin PA02 in use
What do I need to do first?
@timber mango are you doing anything else in the code?
Nope... it's really bare bones...
One sec...
from board import *
import neopixel
import time
while True:
RED = (10,0,0)
pixels = neopixel.NeoPixel(A0, 5)
for i in range(2):
pixels[i] = RED
time.sleep(2)
for i in range(len(pixels)):
pixels[i] = (0,0,0)
I don't have the pixels plugged in (yet), would that cause it?
(clearly not in use ๐ )
do the pixels = neopixel line outside of the while True loop
Oh, duh
๐
ack, silly mistake, cut and paste and didn't notice I left it in the loop.
and it works... was missing pixels.write() at the end. ๐
the newer NeoPixel library writes automatically by default
Removing it breaks the WebREPL.
^ yeah, that's why I realized I was missing the write. ๐
My strand test worked, now I need to work on a good port of the flame effect, haven't seen one yet.
I was having my brain work overtime on idea that while interesting, aren't likely to be built (soft/hardware0 soon (if ever), but as I pondered them, some morphed into doable things... Likely I'll do an Extra Credit with one of them soon.
Project can be done with CPX or Gemma (advantages to either, so...)
ok, after a bunch (more) googling on fire2012, and other visualizers, and finding code from TonyD (written in micropython) I think a base library of functions (like gamma, hsv2rgb and so on) make sense... basically reducing the amount of 'core' functionality anyone would have reinvent or want, to play with circuitpython led effects.
I'll try and put together a base library when I sit down again with this stuff...
Hi guys, this is Kwabena from OpenMV. We've been suffering from this issue with our micropython system and I stumbled across your thread. I think you've hit the exact problem. Thank you for your good notes on this. I'm going to modify OpenMV IDE to not truncate the file on saving to the disk.
I found this thread on how to unmount a disk using windows:
And on linux the unmount() function can be used.
@kwagyeman Glad this was helpful. The exact issue in Windows is summarized in the superuser.com link above.
On Linux and Mac, writing the FAT on a FAT12 filesystem does not seem to be delayed, so you may not need the unmount there. It seems to happen within a couple of seconds.
@tulip sleet when you commend that issue or you can write it to superuser link that go upvote the issue in feedback hub if they have win insiders in they business
I have been programming in Python since 2003. Where would you suggest an experienced Python developer look first to get started in CircuitPython?
Some of the intros I've seen were for people starting in Python, and I'm looking more for what things I need to pay attention to on an M0 that I'd never worry about on a server.
@fringe trench which dev board do ya have to play with ๐
I have 2 Gemmas, 2 Circuit Python Expresses, I think I have at least one Feather HUZZAH (Adabox 003 and 004), and a Feather M0.
I'm between coding gigs at the moment, so I have the time to start playing with all the stuff I had the money to buy earlier. ๐
@fringe trench circuitplayground expresses are a great place to start
the thing you won't be used to hitting compared to servers is the OutOfMemory error
32k ram is not a lot
Yeah. So not importing the world just cuz
@slender iron so there's probably something in the learn section about getting circuitpython onto the CPX?
Also, hey, are you guys hiring Python developers? Because I'm looking for a gig. ๐
(Figured it was worth a shot)
Putting circuit python on CPX is easy, literally drag uf2 onto it... And it helps to unzip libraries onto the python drive that shows up.
There is a learn guide, yes
@fringe trench its the same process as the feather m0 express
OK, I will start there. Thank you!
and yes maybe, we have paid folks for writing drivers
so take a look at circuitpython and perhaps make a driver or find or fix bugs
@slender iron If I get to the point where I understand enough to write good low-level drivers, I'll be pleased. I mostly write backend glue code, so libraries include Twisted, SQLAlchemy, Requests, redis, etc.
Its all learnable for sure
adafruit basically hires from their community
so start contributing to our open source stuff and keep in touch ๐
I got hired after being on show and tell a bunch
heh. Well, I guess I could start by pointing people at my github and my stackoverflow. If you see this gravatar, it's me.
ok awesome ๐
ok, wrote a simple new neopixel class, to allow splitting/changing the order of a strand...
TonyD's chainer inspired me, and I found a perfect demo for it, using the CPX, turn the 10 pixels into 2 strands of 5, and make then face in same direction. (so both 0's are next to usb)
hmmm... found a 'bug' but not sure if it's worth fixing it or not... probably will ๐
rewriting my neopixel distorter (that's what I'm calling it, since it does so much), to use/follow the latest neopixel.py routines, so it should be transparent....
and running out of memory. I think I can make this a neopixel subclass, but I'm not sure. I'll discuss tomorrow (today?) later.
had problems with building mpy, until I recalled that I needed to use 1.0.0 circuitpython, and not master checkout... then it worked.
CircuitPython takes up the lion's share of available memory, but provides a lot of tools in exchange. Interpreting on-device is a rather handy feature, especially during development.
yeah, it's a tradeoff... as usual.
Ok, rewrote my 'distorter' as a subclass (and also did Tony's chainer as one), and have renamed it neopixelninja (as in Fruit Ninja, cause it lets you slice colorful strands up anyway you want). Decided against combining Chain and Ninja as it would complicate things, and this way, folks can still use both if want, but code is much cleaner. (So you can't Ninja 2+ strands at once, but if you chain them into one, then you can slice any pixels you wish of them all)
The CPX layout really is a good use case, so I include it as example code.
remapping.
of stack in a different way.
The old way used the address of a variable on the stack, starting just below that variable. But that didn't work with -flto for some reason: I had to subtract something like 40 to not smash the stack. The new method gets a safe value of the stack pointer in a more reliable way.
Did some experimentation about how much stack we could give up, to increase the heap size. I used my project https://github.com/dhalbert/SwitchBox as a "typical" piece of code. It could not be loaded from .py or run without running out of heap. Adding 4k to the heap worked, and still left about 1k of unused stack when running.
I wish I had more examples, since it's possible other "typical" code needs more stack. But we can tune this. Let's see how it does with the test suite.
91d4cdb Increase heap size at the expense of stack size... - dhalbert
5d509ec Allow max stack checking to be used with -flto ... - dhalbert
So I ported Fire2012 to circuitpython, and it works, but it slows down considerably as the pixel strand length increases, most of the slow down is the last step, which I believe is due to the actual pixel write. I even turned off autowrite, and it's still too slow on long strands.
# Step 4. Map from heat cells to LED colors
for j in range(0, self.n):
color = heatmap[self.heat[j]]
if self.reverse:
pixelnumber = (self.n - 1) - j
else:
pixelnumber = j
self.pixelobj[pixelnumber] = color
This section was taking more than 1/10th of a second for 50 pixels.
significantly too slow to be visually pleasing...
reverse is false, and I improved the heatmapping by going from 16 values and doing math and integer to 256 values, and making sure it's int alrady in heat[j]
Which leads me to think that the real problem is the pixel setting itself.
@timber mango are you using neopixels or dotstars?
Neopixel, @meager fog ... with a CPX board.
one thing i added to the neopixel library is brightness auto-calc on write
you may want to try taking that out too
it may be slowing you down ๐
neopixel.py is pretty short and you can edit it down
I'll try that... I've been writing subclasses for Neopixel.py, so I'm familiar with that bit of code.
Oh, I understand, I think in those cases I'm still using that main class code that hits the brightness. Ill try it in the morning, and mpy a fresh copy.
From a few videos, it looks like TonyD is finding the same problem, that porting arduino code to circuit python is just too slow to run as bytecode...
Not surprisingly, C is gonna be faster.
so the brightness didn't matter, and I ran some numbers, and 50 pixels is roughly twice as slow as 25... (in fact, all of the cell operations double in time... but the others are on the order of 1/100th of a second, so it's clear what's slowest.)
@slender iron @meager fog (and anyone else interested) https://gist.github.com/sethcohn/40663773d9ddf077e1071693e7b9ebfc
[if you comment out the line self.pixelobj[pixelnumber] = color, you'll see it's the crux of the timing issue.]
Time to see if Dotstars work better, need a strand of those though.
@timber mango thanks for the sample code! I'll take a look in the next few days. I just changed the neopixel library and may have made it slower
Thanks @slender iron . Fire2012 works, the speed is the only (major) concern. I'll continue working on the pattern porting I'm doing, hopeful that a) the neopixel stuff can be sped up b) dotstars will be faster, c) newer boards will solve the issue with more speed, even if current boards will require Arduino/C code to use for led effects. I'm genericizing the code (building on TonyD's signal class, creating helper libraries for animation, color, etc, so hopefully useful all around.
is the filesystem on the Gemma M0 read only? I tried to write to a file but get OSError: 30 when trying to open the file for writing with f = open('data.txt', 'w')
f = open('data.txt') works but then I cant write my info
@untold knot yes by default. The 2.0 work in master allows you to switch it so it's read only over USB instead
@timber mango yup the m4s should be much snappier. I'll take a look though and see if there is anything obvious
@slender iron so If i understand correctly that in the next version I will be able to then write files? Im trying to make a simple temp & humidity monitor that writes the data to a file for charting later
yup @untold knot
it'll also have sd card support
I'm going to try to release an alpha in the next few days
Go Go Gadget @slender iron
๐
@slender iron awesome. Ill keep an eye out for it
cool cool
@slender iron Just curious if you are planning to release a 2.0 compatible lib bundle as well. that is update the .mpy files . Or should we plan to create .mpys ourselves as needed. Not tryin to add to your wrkload ๐ Just curious about how to proceed..
yeah, I'll probably post a link to an unofficial one with the alpha
great - thanks
all of the library releases will have 1.x compatible until 2.x is stable
make sense
ladyada did update the Arduino IDE - Gemma M0 now suppoerted!
of course CircuitPython support is excellent ๐
yay!
Closing this, covered by #175 and #182 (max stack usage measurement), #183 (add 4k to heap). Further investigations could get a new issue.
@timber mango @slender iron I found longer neopixel strands to be very slow in micropython as well last christmas..
Good to know. Hopefully somebody will find a solution for this. Granted, circuit/micropython isn't going to beat C, but it should still at least not bog down this badly on this single task of pushing bytes out to the strand.
I found after like 50 pixels or so it slowed down..
wonder if the dma stuff will help that..
it looks to me like a very linear failure... 50 is 2x slow as 25, so 75 would be 3x as slow, etc...
yeah, that seriously affects pins you can use, though, so I hope it's not the only solution.
Part of that is just the way neopixel signaling works. With single-wire data transmission, you don't have nearly enough wiggle room in how you send things, so you have to be watching the clock as you pump out the 1s and 0s.
@royal ridge yup, and python isn't up to that task?
it's not so much python as it is just neopixels
but if it is working fine on the same board in arduino.....
Yeah, but stock neopixel code using standard libraries on C, same board don't show the problem.
Exactly, @scenic timber
at some point, you can't say "neopixels are too slow" when other code runs on the same board fine. It's the OS/etc at that point.
Eh, true enough. any interpreted language is going to have more stuff to do under the hood. a compiled language (like C) has fewer layers to go through, so it can run a bit tighter
I am looking at porting the various FastLED example animations... and if they just won't run under python, it'd be good to know now... 20 pixels is a far cry from running 40 or 50...
and that's the problem, this isn't about "don't run 64", it's about slowing down much quicker.
The actual transmit code is in C so Python isn't the problem. There is a delay after the transmit that we could try to reduce
DMAing it would make it faster as well
6ace744 esp8266: Introduce multiterminal module for m... - tannewt
FYI, I've introduce a multiterminal module for the dupterm stuff and updated webrepl in 6ace74466709e0a25c60375638afb5cc3471828c
SD cards do work with this driver and the latest from master.
[adafruit/circuitpython] New tag created: 2\.0\.0\-beta\.1
@slender iron Congratualtions on the 2.0.0 beta release. Amazing amount of work. Looking forward to testing it.
thanks @solar whale! most of the work isn't mine ๐
I can't wait to hear what you think
Even better - it takes a villiage ๐
is the "beta" libray bundle the same as the master branch but just compiled with the 2.0.0 circuitpython ?
I ask because I only see the master on github.
yes
I checked out master, cd circuitpython, git checkout origin/master and then build as normal using python3 build-bundle.py
Great! thanks for the clarification.
Yup - I see that.
We should do this as a submodule with a script to autoupdate similar to the bundle. We should also prefer filesystem copies to built in versions in case there are bug fixes.
I think we should add a die attribute to the microcontroller class which is an object with a temperature property. That way you can read it with microcontroller.die.temperature.
maybe only built in on cplay express? im ok with that!
Is there anything else that would go under die? If not, just die_temperature and avoid the new object?
@slender iron Cool! so far - all my test projects run - "out of the box" on 2.0.0 - tested 14segment display - mpr121 - and a crude test of the vl53lox sensor. also can turn on/off the neopixel! This is all on a M0 express. Looks like I can move to 2.0.0 - next to try playing with the Circuitplayground Express... great start!
@slender iron loaded 2.0.0 beta onto CircuitPlayground Express and rana few basic tests. Accelerometer, audio playback and a slightly modified version of the spinner_advanced. All work without any changes. Now I need to try something new in 2.0.0 - I have to break something ๐
sometimes you can measure on-die voltage (e.g. vcc) but i haven't worked out all the tricks on samd for that yet :)
also maybe die.speed (set/get running freq)?
In the new version 2.0 how would I use that for storing some data? or is it for sd cards only?
I meant the flash
Current definitions in microcontroller:
.delay_us(t)
.disable_interrupts()
.enable_interrupts()
.Pin [class]
.pin [module, defining pins .PAxx and .PBxx]
So die looks good, kind of parallel to pin. Sorry I doubted!
@Stuff With Kirby#8486 it applies to the flash as well. The new storage module has the method to switch it to read-only over USB. @prime ingot hooked up a switch to their board so they coudl control which mode it started up in
No problem! I'm happy to have API discussed.
One tricky point is that its not possible to put properties at the top level in a module. They must be on an object. So, microcontroller.die_temperature would have to be a function call or wrapped in an object. Having it wrapped in an object can be nice because it can be passed around then like any other temperature sensor (they all should have a temperature property).
I was thinking all of the Express boards since they have the room.
Add as a git submodule and build in as an internal frozen module? Disadvantage is you need a new CPy release to update. Advantage is built-in, can't be deleted, and no RAM used for the code when you import. You could add more convenience functions without worrying about RAM usage.
Hi @Stuff With Kirby#8486 -- as @slender iron mentioned, here's some code for logging data to the SPI flash: I tried to describe the procedure in the README (hoping to write better guide this week!) -- feel free to ping me with any questions https://github.com/edgecollective/circuitpython-flash-logger
Also, @slender iron -- update on that sleep functionality -- we were able to make a Feather M0 Express go into a deeper sleep, in Circuitpython! For now, we're just implementing a version of the Adafruit Sleepydog code. It's implemented in our fork, here: https://github.com/edgecollective/circuitpython The only trouble is -- we're not able to wake the board back up ๐ We began to realize that we might need to be more thoughtful about how Circuitpython handles / uses interrupts. Now we're thinking that we might need to use built-in Circuitpython functionality to temporarily disable interrupts before calling the sleep code, then re-enable them after waking up. If this is an issue of general interest, would it be useful for us to ask a (better worded than this) question about the issue on the forum, so that the answer (regarding how Circuitpython handles interrupts -- if that's the problem) is available to the general public? Thanks for all your help!
@prime ingot Could a CPX version of logger use the built in switch instead of the resistor?
@timber mango -- Ah -- that sounds much more elegant! If the CPX switch state (high, low) is something you can query via Circuitpython code (I'd assume so), then: yes, indeed.
yes, you can, so that's worth coding into a CPX version (obviously configurable if someone wanted to use switch for something else (but if you needed 2 switches anyway, I'd argue the built in (tiny) switch make more sense as 'log/writeaccess')
@timber mango -- Definitely. I was going to write up a guide using the Feather M0 Express, but you've convinced me that a CPX-based guide would be easier for folks to follow (no additional hardware / soldering needed). Will order one of those boards now ๐
it's a sweet board, given the number of things on it, it's really perfect for (most) prototyping. (needs more pins out is really it's one weakness, at which point Feather makes more sense)
@timber mango -- wow, just seeing the specs now -- you're right, it's got all the bells and whistles! Thanks for pointing it out.
Just to clarify my understanding - If I were to remount the Flash as "read-only" via REPL or a script, can I always remount it "read/write" via the REPL later. That is can I always remount a read-only FS as read-write via the REPL?
@prime ingot thanks! Ill look at it later
Yeah, that was my plan. We can get around the upgrade disadvantage by preferring modules from the filesystem first.
@prime ingot thats awesome news about sleeping! There are definitely tricky things about it. Is it using the ASF sleep manager?
@solar whale the short answer is no. the filesystem must be remounted during boot before the USB comes up
@slender iron good to know! At least I am used to erasing and reloading the flash!
So code.py is executed before USB?
Ok. My mistake. That makes sense. Thanks for ampy reminder.
np
@slender iron -- Thanks! And yes -- the ASF sleep manager is being used -- which in the end was really just us following the Adafruit Sleepydog library code, and converting it to C. ๐ Seems to work nicely to put the board to sleep, but alas it stays asleep and isn't interrupted out of it. Our next thought to get things working (sleeping + waking up) was to try adding a "disable_interrupts" call before our sleep code kicks in, as well as an "enable_interrupts" after it is finished ...
@prime ingot Ok, I've never looked at the sleep stuff in depth. I believe the RTC is important in waking it up though.
@slender iron -- I'm not yet sure, but I think the "watchdog timer" is capable of sleeping for a set amount of time and then waking up on its own, without using the RTC as an alarm? I believe this is what the "Sleepydog" library does -- and it seemed like the simplest approach to get some sleep functionality. But then, I think you're right that one can get even lower-power sleep modes if one instead relies on the RTC to throw an interrupt to kick the board out of sleep mode. So that would be preferable. Do you happen to know if there's any SAMD21 RTC code yet working? Maybe I'll start in on trying to port the RTCZero library into Circuitpython as a first step ...
I don't know of any internal RTC code because we have no backup battery to make it worthwhile long term
@slender iron Ah -- good point. For a datalogger, what I imagine is: use the internal RTC as a way to achieve low-power sleep -- but always simply use it in "set the time to arbitrary time X, and set alarm to wake up at X + 30 seconds) -- so no worries about keeping track of time when power is cut. Then, for accurate timekeeping between power cycles, I'd imagine using an external RTC like the DS3231, with its own backup battery ...
(but, admittedly, I'm hyper-focused on the low-power datalogger use-case ...)
I wanted to give CP a try and attempted to install it using the instructions at https://learn.adafruit.com/micropython-basics-how-to-load-micropython-on-a-board/esp8266 and it seemed to go ok
I installed adafruit-circuitpython-feather_huzzah-2.0.0-beta.1
however it isn't exactly working...
It looks like the WDT keeps firing. Here is sample output
chksum 0x24
csum 0x24
l๏ฟฝ๏ฟฝ|๏ฟฝ๏ฟฝrrnb๏ฟฝ๏ฟฝl๏ฟฝb๏ฟฝlb์๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝb๏ฟฝlrlll๏ฟฝ๏ฟฝ|๏ฟฝ๏ฟฝrrnb๏ฟฝ๏ฟฝll๏ฟฝ๏ฟฝb๏ฟฝb์๏ฟฝ๏ฟฝb๏ฟฝ๏ฟฝlrl๏ฟฝl๏ฟฝ๏ฟฝ|๏ฟฝ๏ฟฝrrnb๏ฟฝ๏ฟฝl๏ฟฝ๏ฟฝb๏ฟฝb์๏ฟฝ๏ฟฝ๏ฟฝb๏ฟฝlbl๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝn๏ฟฝr๏ฟฝ๏ฟฝn|๏ฟฝllll๏ฟฝ๏ฟฝr๏ฟฝl๏ฟฝl๏ฟฝl๏ฟฝ๏ฟฝr๏ฟฝl๏ฟฝl๏ฟฝl๏ฟฝ๏ฟฝr๏ฟฝl๏ฟฝ๏ฟฝ๏ฟฝllrl๏ฟฝ๏ฟฝrl๏ฟฝ๏ฟฝ๏ฟฝb๏ฟฝ๏ฟฝb๏ฟฝbbr๏ฟฝrb๏ฟฝ๏ฟฝn๏ฟฝnn๏ฟฝl๏ฟฝ๏ฟฝl๏ฟฝl๏ฟฝ๏ฟฝll๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝl๏ฟฝn๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝbll๏ฟฝrp๏ฟฝ๏ฟฝ๏ฟฝbl๏ฟฝbrlrlr๏ฟฝn๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝn๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝb๏ฟฝ๏ฟฝ๏ฟฝl๏ฟฝl๏ฟฝl๏ฟฝ๏ฟฝrlbl๏ฟฝ๏ฟฝln๏ฟฝprl๏ฟฝl๏ฟฝ๏ฟฝ#4 ets_task(40100164, 3, 3fff82a0, 4)
boot.py output:
Press any key to enter the REPL. Use CTRL-D to soft reset.
Adafruit CircuitPython 2.0.0-beta.1 on 2017-08-07; ESP module with ESP8266
ets Jan 8 2013,rst cause:4, boot mode:(3,7)
wdt reset
I never get the chance to enter more than a few characters at the python prompt. This is on a Feather HUZZAH.
Any advice?
@prime ingot Yeah, thats just why we haven't done it yet
@limber tulip please start with 1.0.0
ok
@limber tulip the esp8266 can also be finnicky
if 1.0.0 doesn't help then its worth doing an erase and flash again
@slender iron -- Makes sense! Thanks -- I'll dig in and see if I can make some ASF RTC goodness happen ...
@prime ingot excellent! keep me posted on how it goes
๐
Thanks @slender iron I erased the flash and flashed 1.0 and can at least get hello world to work. Now time to figure out how to load code, use some libraries etc ๐
perfect @limber tulip !
Any chance the Huzzah will be mountable as a USB device in the future (e.g. for file copy/edit)?
figrued something like that, kind of a shame. Do the boards under designed for CP all support mounting? E.g. Feather M0 Express?
referring to the github page
I believe they do, by design with the added SPI flash, right?
@limber tulip its the M0's that have built in USB support
the Gemma M0 will also show up as a drive but its a very small drive ๐
I like the challenge of small
But first I need to get something a bit more familiar to work.
I looked around the MP/CP forum but didn't see a direct answer, is there an adafruit.io library?
Looks like at the moment none of the 'designed for CP' boards have builtin Wifi, right?
we haven't gotten to adafruit.io integration yet
micropython does have umqtt which could be used with it
Yeah, wifi is really what I miss most. ๐
I was hoping to get Rosie CI released by tomorrow but my raspberry pi SD card died
๐ฆ
causing non-continuous integration. ๐
good for testing the instructions setup
I probably should have backed up my config file....
Sometimes the code might need to do a reset, for example, as a way of recovering from an unexpected exception in a long-running program, or as a way of clearing the state of the device to load a new subprogram.
@prime ingot I was able to adapt your circuitpython-flash-logger to use the slide switch on the CPX. I did find that I had to enable the internal Pull-UP on the pin (SLIDE_SWITCH aka D7). Still playing with it, but so far it seems to be working. Thanks for the example.
@slender iron I am a bit confused by the setting for "readonly" in storage.remount it appears that setting readonly=False allows the CircuitPython code to write to the FS and setting it to True allows the USB to wirte to it. Is this correct? I thought it was the other way around.
yeah, I believe I made it from the perspective of the python code
OK - no problem - so the default for mount is to make it CP writeable.
yes I believe so
OK make sense - if you are going to mount it from CP then you probably want the USB to leave it alone!
So far, I have not run into any issues with 2.0.0 running my 1.0.0 code. I'll try sticking with 2.0.0 for awhile. So far, the only new feature I have tried is this logger test. I hope to try an SD card soon.
@slender iron Just a heads up - not much info, but I have managed to do something - twice - that has resulted in the test data (wirtten to to data.txt) getting written over boot.py in the data-logger test on my CPX. I'm not sure how it happened and I can't reproduce it reliabley. I just wanted to let you know and I'll see if I can find a reproducible method. It may be due to the many resets I have been doing while changing the switch postion to enable/disable FS writes.
yeah, I'll do some 2.0.0 usage, testing tonight... had actual work today ๐
thanks @timber mango !
@tannewt, thanks for the heads-up. Looks interesting, I'll take it for a test drive.
Ok, so I used circuitpython on Gemma M0 for my dotstar test (I got a strand of white only cheap, color are in coming soon)... And I'm seeing the same sort of 'large numbers of pixels' issue with Dotstar library: When I told it I had 10 pixels, and lit up 1 at a time, turning off the previous and .show() looping, it was slow but acceptable (certainly not fast, with no delay timing added, it was countable...) When I told it the strand was 150 (when I said 10, #11 lit up (N+1 seems to get lit due to catching 'end of line' signal?, figuring setting to 150 was quick test of that, the 'pixel at a time' loop CRAWLED along, visibly slower. Something on the bitbanging of both neopixels and dotstars is very slow, more so the longer the strand.
have you tried the DMA stuff on the neopixels?
would be interested to hear the difference
This is all within circuitpython though... Just a normal Arduino sketch should be much faster.
I thought someone got some prelim DMA in circuitpython going? Maybe I am mistaken
Nope, all C: https://github.com/search?q=org%3Aadafruit+DMA
yeah guess i my mind invented it..
I think I was reading https://learn.adafruit.com/dma-driven-neopixels/overview and took 'circuit playground express' to mean circuitpython....
So it looks whatever pushes the pixel buffer out to the pins has a problem with size, it's just not fast enough, and you don't notice it at small values for N.
Yeah I ran into the same thing following TonyD's christmas wreath last year trying a 4m strand on a christmas tree. I had to remove all sleeps and such just to get a decent speed going it was still really slow but it was fast enough for the animations I was trying.
link?
just found this for CP: https://github.com/NJJLClub/PlaygroundJingleBells/blob/master/PlaygroundJingleBells.ino
I believe it was this
feather huzzah 8266
correction: part 3: https://www.youtube.com/watch?v=EfguZ8mLCgk&t=14s
Live stream to http://twitch.tv/adafruit showing part 3 in the MicroPython smart holiday lights project. This follows the video for part 2 from: https://www....
Yep the guide was written from that video series.
I tried porting a bunch of different animations from arduino.
in the end it worked fairly well but again could not get the speed up.
with circuitpython?
or micropython?
Cause the speed he's getting on 200+ pixels, I know that's not possible on circuitpython.
(at this point)
it's slow, but, now it's WAY slower.
I was using mico circuit did not exist at the time.
Thanks for pointing to that, @scenic timber It really helps to narrow down that it's not micropython universally. He's getting way more responsiveness from 240 pixels than I could from 60 now.
yes, but it's been changed, so at some point, something got tweaked (maybe/likely for the SAMD stuff), and it's got a bug.
and that dotstar acts as sluggish might point to something outside of either library, maybe.
@slender iron want me to file a github issue on this?
I don't think so...
try loading up one of TonyD's samples
@timber mango I don't think its a bug
CMFly: on a different board mayb.
the show methods block as they transmit data and the more pixels you have the longer it takes
it's just a .py file don't need a different board..
@slender iron so why was Tony getting better performance on 240 pixel under micropython? The board he was using?
he's doing animation and changing 240 pixels faster than my simple loop can do 50-60.
are you computing all of the pixels and then calling show?
I can do something trivial, and it'll still be too slow. I literally saw the problem earlier, doing 2 dotstar pixels (set X to lit, set X-1 to off, show) and watched it slow down like molasses when I changed pixel strip from 10 to 150.
so it's all in the show dumping to the strand.
right, agreed.
but Tony's video above, he's pushing 240 pixel faster than I seem to be able to push 60.
can you get it to just dump 1 pixel?
and CMFly is saying that he tried Tony's micrpython stuff on circuit and despite removing all delays, never saw the speed Tony got in the video, both of them using 4 meters.
so something's different.
I think I was using more pixels.
for the neopixel did you set auto_write=False?
Tond was using 30 pixels/m I was using 60/m
hes also on esp8266 are you?
https://gist.github.com/sethcohn/40663773d9ddf077e1071693e7b9ebfc (says I did use autowrite false)
that should work
that example shows has timing, and it's all fast, until it hits the show, which bogs down quickly as N increases... but by the time N is 60, it's dog slow.
no way can it do more and be useful.
it should be linear with the number of pixels
it is, clearly.
then thats not a bug
no, I think you misunderstood what I think got broken...
I don't think it's a neopixel library bug anymore. I'm questioning if something about pushing data out on the pin is getting slowed down somewhere.
(cause I see the same issue with Dotstar, so....)
well their implementations are very different
neopixel is in C and dotstar is bitbang python
then shouldn't the neopixel C be reasonable fast to push the bits?
@slender iron if neopixel is in C why is it so much slower in micro/circuit than in arduino?
^ what he said.
its usually all of the math needed to compute the pixel values
not the transmit itself
so if we push all red, and it's still slow?
ok the math might make sense I didn't do a more basic test..
I'll do an example, strip all of the firecode, and make it merely push red pixels, and it'll still bog down far too early at 40-50, I'll bet.
yeah, there could be a bug in how long we think it is
a saleae or oscilloscope can be used to measure how long it takes too
@slender iron your getting past my skill and hardware level ๐
my timing says the math portions were faster, and if I comment out the show line, even that loop is fast, the entire delay is the show. (which should be just 'take buffer, push out to pin')
@timber mango do you have timings for each number of pixels?
and yes, I agree, it's a linear speed delay, 50 is twice as long as 25... but 50 is too damn slow.
I started timing it, I can get you data.
there should be a fixed overhead plus a per pixel timing
neopixel protocol is fixed timing so we can't shorten it
we should be able to write a simple test to get timings.
I'll replace all firecode in my example with Push Red, Push Green, no math otherwise?
so we can see speed timings on 10,20,30,40,50, 60,70, etc pixels?
sure, the pixel values shouldn't matter
I won't use .fill() cause that messes with autowrite... so purely "for i in range (0,X): pixels(i)=(10,0,0)" is math free.
you can call the neopixel write directly if you want to measure that
there is a neopixel_write module
not in neopixel_write
or should I just try it all there.
the vm may have changed with the update to 1.9.1
(this still all blows my mind that there is an os/vm running on there interrupting my code...)
its running your code ๐
I'll try both. Should I try both CPX and Gemma? So we remove board from equation too? (grin)
And I've got a feather I haven't played with yet.
start with one then scope creep later ๐
hahahah
^^^The bot sold me out lol^^^
๐
lol
Really cool project you are all working on ๐
๐ thanks @scarlet mulch
damn, Gemma M0 data (started there, since I had it hooked up) has me confused now. Gonna run script on CPX to compare before I share.
@slender iron so is the core of this all written in c and you guys are adding different functionality in python
?
@slender iron NICE! I C++ my C is alright I know no python though. Thats crazy that the drivers are written in python. How is that even possible?
all the fast timing sensitive stuff is in C
Very nice that makes senses, how long have you been working on circuit python?
since august last year. its based on micropython thats a few years old though
Right on bout to make a year if you didnt already ๐ ๐ ๐
Does it only run on adafruit boards?
mostly
arduino zero is supported somehwat
anything with esp8266 or m0 will mostly work though
Ok, @slender iron I am more confused than ever. Results: https://docs.google.com/spreadsheets/d/1-wN5-hrkhSK5iJHKrbl4AgSp6GpJi5EloPB_6hLqMDo/edit?usp=sharing
Google Docs
Sheet1
Pixels, Autowrite, setred, writered, setgreen, writegreen
CPX, 10, 0. 01397705, 0. 0009765625, 0. 01501465, 0. 001037598
Gemma, 10, 0. 01708984, 0. 0009765625, 0. 01660156, 0. 0009765625
CPX, 10, 0. 02203369, 0. 0009765625, 0. 02301025, 0. 0009765625
CPX, 30, 0. 04699707, 0. 00097656...
I'll post the test code in a gist, gimme a sec...
I may rewrite it to run multiple times and take high/low/avg... cause these results don't make sense.
I'm gonna have to look tomorrow. I've wrapped up for today
No worries, I'll prep it for you to look tomorrow.
ok thanks!
but tl;dr: all over the place.
Lol you guys are awesome love the collab
the usb stuff will cause it to fluctuate
I'll setup averages, that'll smooth it out, maybe.
I'd expect auto write to be much slower since its doing show each assignment
but I'm seeing it pushing 100 as fast as 50, which shouldn't be the case, we agreed.
ya
@slender iron thanks for all the question answering. Have a goodnight everybody ๐
night...
np, you too @scarlet mulch
@slender iron I'll package this up for you to review. Gist of code, plus a spreadsheet of results. (gonna now include 10 trials of each 10-step)
have a nice night!
k, good night!
@solar whale -- Great to hear about the CPX experiments! And good to know about the pull-up. Very interested to hear any further news on reliability, esp. re: the corruption of boot.py you mentioned. Thanks for your intrepid exploration!
^ Snakes! Snakes on a plane! A horizontal plane!
Hey guys, I have a generic ESP8266 devkit (NodeMCU), should I use the HUZZHA binary?
@digital charm you can try it just beware the pins in board will be different
@slender iron didn't put together stuff from last night cause I found my results confusing and wanted to bounce off you first...
i'm free for a while now @timber mango
perfect, I have a 1pm call, and one task I need to tackle before that, but I can do 5-10 minutes now
https://docs.google.com/spreadsheets/d/1-wN5-hrkhSK5iJHKrbl4AgSp6GpJi5EloPB_6hLqMDo/edit?usp=sharing
Google Docs
Sheet1
Board, trials, autowrite,# pixels, setredlow, setredavg, setredhigh, writeredlow, writeredavg, writeredhigh, setgreenlow, setgreenavg, setgreenhigh, writegreenlow, writegreenavg, writegreenhigh, setrandomlow, setrandomavg, setrandomhigh, writerandomlow, writerandomavg, writerandomhigh
C...
(look at sheet 2, please)
let's look the 'red' data (pushing just red led, varying pixel length, and autowrite)
6 values, 3 (low, average, high) for pixelobj[i] = red, and then 3 values for pixelobj.show()
that's what's confusing me.
it's very clear that if I turn autowrite ON, that it takes longer to set...
which makes sense, it writes the entire buffer after every pixel.
but, and this is my question: why is the show part, almost unchanging?
writeredaverage, regardless of autowrite on or off, regardless of pixel length... is about the same.
so whether I'm pushing 50 or 100 pixels from the buffer to the pin, it's taking about the same time?
what column is that?
writeredavg
that's literally the difference of time.monotonic before and after pixelobj.show()
so it's just that fast.
I'd say about that fast
interesting....
but repeated 50 or 100 times, it's adding up to seriously slowdown.
if you want to get into more timing detail I'd suggest using a scope or saleae
yeah, I'll continue to test. I just got an 8x32 dotstar panel, too.
nice!
using a saleae or scope is nice because you can set pins high and low in teh C code to measure the duration of a particular section
yeah, I was gonna try using neopixel_write as well next.
๐
My test code needs another revision, I thought of some ways to play with it. This afternoon, aftr a work phone call at 1pm.
Ok, see ya later!
sounds good! I'll be around mos tof th eday up through the live shows
when I load either circuitpython or micropython onto my esp8266 I get a constant stream of serial text that is garbled at 9600 and 115200
sorry if this isn't the correct group, let me know and I'll ask in general
the bootloader outputs debug at a weird baud rate
*python will output at 115200 once its going
do I need to erase my flash before flashing the bin?
yes, its recommended
ah ok, so I should do that using nodemcu fw that is working ok
I usually erase using esptool.py
ok I've been using the GUI nodemcu flasher, I'll switch to esptool.py
ah, I haven't tried that
my previous question, is the Huzzah build appropriate for nodemcu devkit?
just a generic esp8266 dev board so I'm assuming yes?
it should mostly work
theres a board module with pin naming that will be wrong but it should run
thanks for your help, much apprech
np
esptool worked much better! thanks!
๐
ok so far micropython is working better for me
tried circuitpython and it's resetting my board, I think because the led is tied to the reset pin, the machine api is more manual
I tried using the upstream machine api and I didn't have access to some basic things
I'm sure if I grab a feather everything would just work
@digital charm if you get circuit python running on a nodemcu board, and figure out the pin differences, submit the changes, those boards are so cheap I've thought about buying a bunch and putting circuitpython on it would be more incentive.
I has a nodemcu board
@slender iron @digital charm FYI -I was able to deploy 2.0.0-beta-1.1 to a feather ESP8266 and access REPL.
WIFI and WebREPL also work on the ESP8266 Feather with 2.0.0-beta-1.1
Wifi works?? Nice.
https://gist.github.com/sethcohn/8ee563517b95a9a19ce55636a7665bd9
still improving this timing tester, but it's in a good sharing place for now.
I think I understand the issue way better. thanks to @slender iron for his help in understanding it.
Going to take anothr crack at Fire2012 now, and see if I can improve it.
So far the only WiFi testing I ahve done is to configure WebREBPL but it was able to obtain an IP address and I can connnect to it via the WebREPL Client. Good start!
@slender iron ran into an issue on ESP8266 - ampy ls command fails - it appears to be tryig to import uos which is not present. ampy get and ampy put work OK.
basic web client test works ok on ESP8266 with 2.0.0-beta-1.1
@solar whale please file an issue on AMPY for me
@slender iron just did ๐
perfect ๐
at least put works!
๐
Ok, @slender iron , does it make sense if I pass a pixelobject to a class, and explicitly turn off auto_write, and then write to it, that it could take a 1/3 of a second to just do that (no lights happen)?
have to confirm, but that is what looks like problem might be..
post the code please
gonna strip everything else and isolate that now.
kk
Ok, that'll print the time of the set pixel loop, but it never lights, but it take serious time anyway.
and if you comment out the pixel set, the loop is quick again.
what board are you running it on?
CPX
should be. I can go grab and copy it in again.
And I can try this on 2.0.0 too.
I'm glad I finally isolated this.
just asking. I'll try it now before show and tell
my other test code was so much faster... I figured I'd just made a silly mistake somewhere.
installed bundle rc5 (I was on rc4 I think). Same results.
way higher...
Timing total: 0.2929688
Timing total: 0.2421875
Timing total: 0.203125
Timing total: 0.1796875
Timing total: 0.3125
Timing total: 0.296875
Timing total: 0.3164063
Timing total: 0.3046875
Timing total: 0.34375
Timing total: 0.3828125
Timing total: 0.2929688
Timing total: 0.3398438
Timing total: 0.34375
Timing total: 0.34375
Timing total: 0.2929688
Timing total: 0.3398438
Timing total: 0.3710938
Timing total: 0.2851563
Timing total: 0.3320313
Timing total: 0.3671875
Timing total: 0.328125
Timing total: 0.3203125
Timing total: 0.3632813
Timing total: 0.3242188
Timing total: 0.3242188
Timing total: 0.3320313
Timing total: 0.3476563
How big a strand do you have on it?
I have a 144 hooked up but set to 100 pixels.
but as I said, shouldn't be doing any writes, it's all turned off, and no show is used during the loop.
I don't have anything hooked up. it should actually know if they are there
the original object is set to auto_write False, and so is my object right before the loop.
- shouldn't
for j in range(0, self.n):
pixelnumber = j
self.pixelobj[j] = (30,0,0)
That's going to construct (30,0,0) 100 times. Maybe move that out of the loop?
Or I think it might. Not sure what the compiler will do.
it's going to set the pixel at j to red, IF it was written to the strand.
that's the goal of it, Dan: put Red into 100 spots in pixelobj's buffer to go to strand.
I just mean do red = (30,0,0) outside the loop, then do self.pixelobj[j] =red
inside the loop
Ah, let me try it.
@slender iron do you know if it builds the tuple every time through the loop
yeah probably
moved (30,0,0) to red, and results are still:
Timing total: 0.24292
Timing total: 0.250977
Timing total: 0.265137
Timing total: 0.228027
Timing total: 0.246094
etc...
updated gist, btw
@timber mango So saved some time (0.24 mostly instead of 0.32), but it looks like the self.pixelobj[j] = red is still fairly slow. Just curious if you comment that out temporarily to see whether the time goes way down (it should).
It does, yes.
Timing total: 0.109375
Timing total: 0.1083984
Timing total: 0.1103516
Timing total: 0.1103516
Timing total: 0.1103516
Timing total: 0.1103516
Timing total: 0.1113281
Timing total: 0.109375
Timing total: 0.1113281
Timing total: 0.1103516
Timing total: 0.00537109
Timing total: 0.00488281
Timing total: 0.00488281
Timing total: 0.00634766
Timing total: 0.00585938
Timing total: 0.00585938
Timing total: 0.00488281
Timing total: 0.00488281
thats what I get with it
^ with commented out.
@slender iron are you using 1.0.0 or 2.0.0?
1.0.0
when not commented out:
Timing total: 0.225098
Timing total: 0.203125
Timing total: 0.224121
Timing total: 0.225098
Timing total: 0.236816
Timing total: 0.200195
.2+ second to do a 'non writing set'?
After the show I'll try this.
kk
I am getting 0.125ish with self.pixelobj.auto_write = False; 0.26-0.27ish with = True. No strand actually connected. So this matches @slender iron's timing, and not yours. @timber mango What's the host computer and what is the USB connection you're using (USB2, USB3, hub?).
Is your code.py/main.py the only thing in the drive besides /lib? Do you have boot.py with anything in it?
No boot.py, and I've wiped everything (I'm getting similar results with both 1.0.0 and 2.0.0, and I replaced entire /lib with correct versions.
Yeah, just try disconnecting the strand.
in fact, by reflashing, and all of the connect/disconnect, it's certainly been a clean setup including resaving main.py
The strand is all dark, right?
yes, all dark.
But, still, you're powering the little processors in each NeoPixel, so try disconnecting. Maybe it's a power sag if it's all being powered from the USB port. You could try interposing a USB hub.
ok, gonna try no strand.
good idea about power @tulip sleet
Timing total: 0.1811523
Timing total: 0.1806641
Timing total: 0.1811523
Timing total: 0.1811523
Timing total: 0.1811523
Timing total: 0.1806641
Timing total: 0.1806641
Timing total: 0.1821289
Timing total: 0.1821289
Timing total: 0.1811523
Timing total: 0.2368164
Timing total: 0.2602539
Timing total: 0.1806641
Timing total: 0.1816406
Timing total: 0.25
Timing total: 0.2314453
Timing total: 0.1816406
Better, but not quite ....
so power could be a factor, strand attachment/drain...
@slender iron Do you think there's anything weird with the USB-derived clock?? Can't imagine it would work if it were messed up. @timber mango Do try interposing a USB hub if you have one.
I considered it but time.monotonic is based on it too
so if it was actually the clock then time.monotonic would appear correct but actually be off
I can dig out a hub, find one in the unused pile... ๐
wrong chat room ๐
ahah
Ok, powered hub, into Mac, plug the CPX in... (on 1.0.0 again). And it's still .2 seconds.
Timing total: 0.2380066
Timing total: 0.2390137
Timing total: 0.2310181
Timing total: 0.2180176
Timing total: 0.2229919
Timing total: 0.2399902
Timing total: 0.2250061
Timing total: 0.2359924
I did some lower numbers too. I wonder what the variation range is...
@timber mango This is a rev G board? Look on the back at the bottom. Should be G in circle.
The variation might be the garbage collector running during some trials.
Yes, definitely try another. This is weird. So the 0.23 is with auto_write = False?
dafruit CircuitPython 1.0.0 on 2017-07-19; Adafruit CircuitPlayground Express with samd21g18
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
main.py output:
Timing total: 0.2410278
Timing total: 0.2050171
Timing total: 0.2520142
Timing total: 0.2589722
Timing total: 0.2700195
Timing total: 0.2620239
Timing total: 0.2609863
And yes, auto_write = False, and no strand attached.
Last thing to try is another microUSB cable. But it would have to be weirdly defective.
yeah, thats pretty wild
Ok, gimme a few to prep new board And I can change USB too, if you want...
different board, using same powered hub setup:
Adafruit CircuitPython 1.0.0 on 2017-07-19; Adafruit CircuitPlayground Express with samd21g18
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
main.py output:
Timing total: 0.2010193
Timing total: 0.256012
Timing total: 0.2509766
Timing total: 0.2569885
Timing total: 0.2630005
Timing total: 0.2720032
Timing total: 0.2689819
(fresh 1.0.0 install, fresh rc5 bundle)
I'll try a new usb cable now.
my mind is boggled. gotta make dinner now
new (good quality) cable, no change... values average .25 or so...
with no strand attached.
I'm gonna try changing the strand value.
Can you just double-check the code.py/main.py file? Open it directly with a fresh text editor and make sure that assignment = False. Those values look like my True values.
False confirmed.
I just had interesting error happen:
Adafruit CircuitPython 1.0.0 on 2017-07-19; Adafruit CircuitPlayground Express with samd21g18
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
main.py output:
Timing total: 0.1449585
Timing total: 0.1449585
Timing total: 0.1450195
Timing total: 0.1459961
Timing total: 0.1449585
Timing total: 0.1450195
Timing total: 0.1450195
Timing total: 0.1449585
Timing total: 0.1450195
Timing total: 0.1459961
Timing total: 0.1459961
Timing total: 1.362976
Timing total: 0.1900024
Timing total: 0.1879883
Traceback (most recent call last):
File "main.py", line 33, in <module>
File "main.py", line 30, in run
File "main.py", line 30, in run
File "main.py", line 17, in update
File "libraries/drivers/neopixel/neopixel.py", line 136, in setitem
File "libraries/drivers/neopixel/neopixel.py", line 121, in _set_item
KeyboardInterrupt:
soft reboot ( this is a glitch, I did do anything....)
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
main.py output:
Timing total: 0.2650146
Timing total: 0.25
Timing total: 0.2230225
Timing total: 0.2600098
Timing total: 0.2700195
Timing total: 0.2739868
Timing total: 0.2609863
Timing total: 0.2689209
Timing total: 0.2249756
Timing total: 0.2310791
should say 'didn't' do anything above
Are you using screen to do a serial connection to the board, or something else?
screen. I was wondering if baud rate was an issue (I wasn't always giving it the 115200, it still works) so I did it explictly... and watch these values:
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
main.py output:
Timing total: 0.1349945
Timing total: 0.1329956
Timing total: 0.1310043
Timing total: 0.1319962
Timing total: 0.1310043
Timing total: 0.1319962
Timing total: 0.1310043
Timing total: 0.1309967
Timing total: 0.1310043
Timing total: 0.1309967
Timing total: 0.1320038
Timing total: 0.1320038
Timing total: 0.1319962
Timing total: 0.1320038
Timing total: 0.1319962
Timing total: 0.1320038
Timing total: 0.1309967
Timing total: 0.1319962
Timing total: 0.1320038
Timing total: 0.1320038
Timing total: 0.1320038
Timing total: 0.1320038
Timing total: 0.1329956
Timing total: 0.1320038
Timing total: 0.1430054
Timing total: 0.1450043
Timing total: 0.1970062
Timing total: 0.2149963
Timing total: 0.1620026
Timing total: 0.1329956
Timing total: 0.1330109
Timing total: 0.1329956
Timing total: 0.1329956
Timing total: 0.1320038
Timing total: 0.1329956
Timing total: 0.1329956
Timing total: 0.1330109
Timing total: 0.1340027
Timing total: 0.1329956
Timing total: 0.1329956
Timing total: 0.1340027
Timing total: 0.1329956
Timing total: 0.1330109
Timing total: 0.1329956
Timing total: 0.1329956
Timing total: 0.1340027
Timing total: 0.1340027
Timing total: 0.1340027
Timing total: 0.1399994
Timing total: 0.1499939
Timing total: 0.147995
Timing total: 0.1419983
Timing total: 0.1340027
Timing total: 0.1340027
Timing total: 0.1350098
Timing total: 0.1340027
Timing total: 0.1399994
Timing total: 0.2000122
Timing total: 0.1349945
Timing total: 0.1349945
Timing total: 0.1349945
Timing total: 0.1349945
Timing total: 0.1459961
Timing total: 0.1719971
Timing total: 0.230011
Timing total: 0.2369995
Timing total: 0.2030029
Timing total: 0.2259979
Timing total: 0.2100067
Timing total: 0.2310028
Timing total: 0.2339935
Timing total: 0.2299957
Timing total: 0.253006
Timing total: 0.2379913
Timing total: 0.2389984
Timing total: 0.2110138
Timing total: 0.2200012
Timing total: 0.2019958
Traceback (most recent call last):
File "main.py", line 33, in <module>
File "main.py", line 30, in run
File "main.py", line 30, in run
File "main.py", line 17, in update
File "libraries/drivers/neopixel/neopixel.py", line 126, in setitem
KeyboardInterrupt:
it was 14.... then it went back to .20+
I have an old Macbook Air here. I'll try that. I was using Windows. What's the device to use with screen? I forget -- I don't use a Mac very much.
slash dev/tty.usbmodem (something...)
my numbers are all over, some as low as .13, some as high as .30
and higher... .35 is common in some runs.
OK, I am getting similarly weird timing! I am moving the SAME board back and forth between the Macbook Air and Windows, and the timing is more random and higher on the Air!
ok, confimed, size of the strand in the pixel matters [edit, IGNORE ME HERE. OOPS]
put in 20, goes fast, put in 100, slower, put in 200, slower yet.
with NO strand, and supposedly, no writes. (buffer size will change, of course)
Makes sense: you are going around the loop <strand-length> times
No, that timing is per pixel[i] set.
so it's a single set.
with no write.
so it's just supposed to set buf value for i to the right value.
for j in range(0, self.n):
pixelnumber = j
self.pixelobj[j] = red
stoptime = time.monotonic()```
self.n is strand length, right? So the j loop executes strand-length times.
it used to do what I said, I changed it.
I'm going to boot up Linux and try this. Dual boot machine so I'll be back in few minutes.
you're right, back to 100, for consistency.
On Linux, the timings are 0.125-0.127, as on Windows. My Macbook Air is (13-inch, late 2010), running 10.12.5 (Sierra). What's yours ("About this Mac?")?
Both pretty old. So you're not crazy, and it's the Mac. WHY, I don't know. Perhaps some USB weirdness. @slender iron is using a much newer Mac
Yes, same machine. I have two disks and boot from one or the other. I didn't even unplug the CPX>
Hmmm... let's see what else I can hook up too.. I have linux server in basement... I can plug this CPX in there.
A lot of my life with Adafruit has been debugging USB problems. I think this is another one! Maybe there's a different serial program to try on the Mac.
OK, I got it. I have USB2 and USB3 ports on this Linux/Windows machine. The consitent
low numbers are on USB3. The higher .21 -.25 number are on USB2. Our old Airs have USB2. Your Linux server probably does too. Scott's newer machine is almost certainly USB3. Scott and I will have to look at this more.
I don't know why you see even .3 on your USB2, but there may be some delay going on somewhere.
But I see .3 on my Air as well. Maybe it's just because it's old and slow.
good, so I'm not crazy. whew.
I guess I have to say "we'll get back to you". I'll write up an issue.
๐
Good night and thanks for your perseverance. It was very helpful!
@slender iron I have created my branch and merged the changes for the CCS811 library, but github will not allow me to execute git push origin. Permission denied...
I created a branch called jerryn then tried git push origin jerryn, but was denied.
@solar whale Scott went to dinner. Did he mean to give you write permission to that repo. You know about pull requests, right?
I am trying my first pull request so I may have done something wrong. not sure if I have permission - He asked me to do the pull. I cloned the repo, created branch jerryn - made changes, merged changes then I think the next thing to to is the push of the branch, correct? then I can do the pull request, right?
You fork the repo on github, then clone your fork, so you have jerryn/name_of_repo. Then create a branch, make your changes, and push to your fork. From there you can then see a button that says "Create pull request". You'll do that, and it will show up in the upstream repo.
That is, the pull request will show up. Upstream will take a look, and merge it in if it looks ok.
OK - I'll try that - still shaky with git...
I'll try to find you an online recipe that explains things.
...ok we are so doing a video on doing "contributing to circuitpython" tomorrow
nice, when, @prime flower ?
now that I know I'm not crazy, I can get back to working on the helpers I was planning (and started)
whenever I get in tomorrow, I'll set up a demo git repo and show all these commands. I was planing on the DHT22 but I'm running against timing issues as expected,
I think I'll touch on doing this exact thing considering I've had a lot of experience doing things wrong, as tannewt knows
@tulip sleet thx 4 links, i bookmarked
Thnaks - first step of fork rather than cloning master was a big one! Makes sense
@solar whale scott got me in the habbit of renaming my remotes
i.e: rename your http://www.github.com/adafruit remote --> adafruit
so you can do "git push adafruit"
then your local remote can be renamed to github.com/yourusername and then git push brentru
I looked at several tutorials. Some of them are not so great. This looks good: https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github
ugh and rebasing is an useful topic, but should also be discussed...I think we'll have 2 vidz: "contributing to circuitpython" and then "converting arduino libaries to circuitpython libraries"
@timber mango great work on the test code for the slow pixels ๐
...adafruit sponsored facebook ads keep hitting me
Github has a new feature of doing rebasing during the pull request merge. There's a setting in the repo that does that. I found it for Scott. So the poor pull requester doesn't necessarily have to do a rebase or squash or whatever.
thanks @scenic timber hard time knowing there was a problem, and not being able to pinpoint it... and it's something usb hardware like usb2 vs 3, that's why it's "I don't see a problem" so often.
huh...cool. is there any way to do that from the terminal @tulip sleet ?
@timber mango i am using an old mac too.. dang usb...
It's a setting in the upstream repo to do the squashing automatically. Do you want to do the rebase before the pull request? You can do "git rebase" or "git rebase -i". But you have to know what you're doing. I've found it very annoying. At my current job we rarely rebase - it's not worth it and we don't care about extra junk in the commit logs.
@tulip sleet cool - I think I did it - Pull request submitted to Adafruit_CircuitPython_CCS881. it was a trivial change, but good practice!
@solar whale Congrats! It took me a few times to get it right too. After the pull request is taken you can delete your branch; Github makes it really obvious how to do that. Also don't forget to sync your fork from upstream after the pull request, and later if there are any further changes. The digitalocean tutorial above explains that, I believe. It takes a while to get the hang of the workflow.
@tulip sleet Thanks for the links. and tips.
@prime flower the learning system has been a great resource,, thanks!
This code https://gist.github.com/sethcohn/0d2493dc2b854bd5584fe09fc0cd8509 shows timing differences when the USB port is attached to different USB ports (major differences USB2 vs. USB3, minor differences on various USB2 ports).
Dell 7010, has USB2 and USB3 ports:
USB2: typically 0.25 secs per loop iteration
USB3: typically 0.125-0.127 secs per loop iteration
(using Tera Term on Windows, screen on Linux)
USB2, old Mac Airs (2010, 2011):
May start out with 0.1x, but rises to 0.24 ...
USB 2, screen, Linux, similar to Mac Airs.
Happy to help :)
like the title says, it would help to have a way to detect if the device is connected only on an usb power source or actually is accessed as a mass storage device
this way i could write myself a boot.py that could wait around 5seconds before actually calling my main.py
if the device is connected as mass storage, i would prevent causing damage to the internal writing system but if the device is not connected as mass storage i would disable the mass storage interace after 5 seconds and allo...
I'm not sure how we'd be able to do this exactly because USB isn't started until after boot.py finishes. One tip for making a logger is using a physical switch or button to read at boot and determine which mode to boot into.
oh shit i did not know that, sorry :(
yeah i did that with the jumper but i thought it could be made easier that way :)
No worries! I think it's a super common thing that will come up and don
from discord came up with the switch idea which is a good one!
On Thu, Aug 10, 2017 at 12:26 AM mindforger notifications@github.com
wrote:
oh shit i did not know that, sorry :(
yeah i did that with the jumper but i thought it could be made easier that
way :)โ
You are receiving this because you commented.Reply to this email directly, view it on GitHub
<https://github.com/adafruit/circuitpython/is...
@slender iron can we use ROSIE?
@sick creek I'll make the repo public today though I won't turn it on in CircuitPython master until I fix all of the tests
@timber mango you may be able to get rid of the repl loop entirely to speed up execution of your neopixel code. Treat the USB cable as hostile... As a noisy wire. Essentially remove it. Instead rely on a quiet power supply entirely independent of a host PC. Abandon any form of character-based timing reporting. Instead use an oscilloscope. These are just my own ideas and are not to be taken as authoritative.
And I'm back quiet.
Is there a way to get at the MCU registers from within circuitry?
Er. Circuitpy .. Stoopid autocorrect
@timber mango while true, it makes debugging and development harder. Solvable by knowing it's an issue first. Which we do now.
@royal ridge not currently. What are you interested in doing?
@slender iron I was thinking about mindforger's thing. Unless circuitpy is bypassing the native USB bits, it there's a register that shows the current USB state on a protocol level, which with a dumb charger stays as disconnected...
before the peripheral is initialized?
That part I'm not completely sure of.
I've just been thinking about it since I saw that when I woke up this morning, haven't had a chance to check anything really
yup yup, we could change the hardware so that it can measure the voltage coming from the usb plug
๐
82ecc95 tests: Add empty path back into MICROPYPATH bec... - tannewt
Note that frozen modules are currently loaded when the path is "". I think we should change it to something like ".frozen" to be explicit. We'll need to change the make-frozen.py script to change the filenames.
Ok, I converted a nifty candle flame routine as a classed object... Works well, giving it as many pixels as I'd like (each flickers like a flame, independently....
Doesn't work (for me) as the 'fire' I want to see, though, so back to drawing board. But I'll be sharing this as one of many classes that I'm writing up.
sounds awesome @timber mango
@timber mango is the speed issue fixed?
@scenic timber no but they determined its USB port dependent
GitHub
This code https://gist.github.com/sethcohn/0d2493dc2b854bd5584fe09fc0cd8509 shows timing differences when the USB port is attached to different USB ports (major differences USB2 vs. USB3, minor dif...
So in theory it will be fast(er) if it was just a usb power source and not a computer port?
cool cool. Pretty sure I always had it hooked to my computer... Ordered a CPX should get it soon then I can start playing without having to dig out my christmas decorations...
Hopefully, a fix will happen eventually, if we can figure out why it happens.
I'm not sure it can be fixed if its a matter of how much the usb host talks to the board
interesting issue. I guess knowing that you can unplug the usb to test helps
it's a little concerning when your pixels slow to a crawl when you increase the count
@timber mango have you tried your animations on a regular power source and not the usb port?
Not for the stuff I'm doing right now, since at 10 pixels, the CPX is fine. On the other hand, when I hook up my 256pixel Dotstar panel or my 144 strip of Neopixels,....
but right now, I'm working on a simple project (figuring it's an ExtraCredit one), to just do a nifty flame animation on the CPX
the candle stuff I mentioned above was today's work on it, and it works great.... but it's a candle (flickering), and not a flame pit.
should post a video clip or gif or something ๐
or code for people with a cpx i guess..
@scenic timber neopixels are always slower the longer the strip is unless you use a DMA library
because the data is transmitted serially
@slender iron I know I am trying to figure out why the speed in arduino was so much faster is all.
yeah, DMA access for circuitpython would be nice.
@scenic timber its compiled ๐
but is the slow part the math or the telling the pixels to light?
no, the lighting is only slow due to the usb interrupts surrounding it
that is fixed for neopixels
dotstars can be clocked faster
I didn't find my dotstar any faster (in my test last night...)
but I don't have much to go on yet... I'll play more.
dotstars is slow now because its bitbanged
it can be DMAed super fast though
neopixels have a fixed timing which limits how fast they can be updated
so it's the math that is slow?
between circuitpython and arduino yes definitely
so could I just manually write out all the transitions and it should at that point run at the same speed?
just wondering if I should program smarter or if the hardware will always get in my way...
sounds like I can program around it.
we can improve the dotstar library
I'm skeptical we have things to improve in circuitpython though generally
it will never be as fast as arduino on the same hardware
yes definitely
the math side of things for sure since it has a faster clock speed and floating point support
was tempted to wait for those but impatience got the better of me..
๐ arduino will be even faster on the 51s
lol true.
really I want to teach my nieces to program and circuitpython just seems like the right place to start. I just need to learn first ๐
well I hope it works well for that! thats my priority over speed for sure
yeah, I realize C is always going to be faster (and I'm loading some sketches into the arduino IDE and running them to see what they do on CPX. I know enough C to hack at it. And I'm enjoying spending my time getting back up to speed on Python, and rewriting the routines into better things (like Animation classes), figuring that it only helps others in the long run, if some good examples exist, and basic code is there for the tweaking of newbies.
@timber mango definitely, good examples and quick iteration time are super important
@slender iron What's the pin numbers on Gemma M0?
not sure what you mean
I'm using sketch that I need the numbers... PA05 and PA04 aren't working... It expects a number.
in arduino? I have no idea
did you try the numbers based on the silk screen?
?
D0 = 0
ah, that's what I wondering.
It's supposed to be the same as on the original Gemma.
So you could use examples from those tutorials.
bingo that worked... it's 0 and 2 instead of D0 D2
now it says missing bootloader for Gemma M0... samd21_sam_ba.bin
so off I go to find it.
(trying to load up a arduino dotstar sketch)
you should be able to ignore that warning
oh well, compiled and loaded but didn't work. Calling it a night.
and of course didn't give up, and got neopixel version working at least. Now I'll hit the sack
Scott is in the news: http://makezine.com/2017/08/11/circuitpython-snakes-way-adafruit-hardware/
@slender iron well done!
@slender iron Great interview, Scott!
what a good read!!! hopefully this will get more people over here, keep growing the python
awesome read, liked the code of conduct one too http://makezine.com/2017/08/11/project-code-conduct-contributors-yes/
Thanks @sharp tangle @tidal kiln @tulip sleet @prime flower and @fast wharf
@prime ingot o/ scott told me you're working on using the internal RTC for, like, sleepydog-like operation. do you have any code written yet? I'm very interested in this as well
Silly, tangientally-related-to-circuit-python question: would the u2f bootloader work on the other M0 feathers?
@royal ridge yup, there might be some slight tweaks needed but generally yes
kk
I think the plan is to switch all boards to it at some point now that we've had time to find bugs with it.
Does anyone know if there is design criteria for what makes for a good CircuitPython board? Obv. a SAMD21 is a good starting point, but anything else? I'd like to give making a custom board a go. Would something like a Feather m0 express be a good starting point?
@pastel panther yup, the external SPI flash helps a lot
More== better? Or is the 2MB plenty?
I guess it probably depends on the application.
2MB is plenty now
thats what the code is set to support currently
the PSB layout doesn't need to change with size which is nice
PCB
just the code
How trivial would it be to fork and update/expand the code to support larger sizes?
pretty easy
perfect
๐
I'd love to contribute once I get a compatible board though it might take me a minute to dust off my c/c++ skills
"skills"
you should pick up a metro m0 express then ๐
Any benefits over the feather?
for dev its got a SWD header
ah
a dev feather would be cool though
Maybe I can whip up a board this weekend
๐ the files for the metro and feather expresses are available to start with
Yea, I've been pillaging the feather git repo
are you hoping for a different form factor or just to learn more?
both
rather I don't have a current need for a different form factor, but I'm enjoying making boards and and developing that skill set.
indeed. I reflowed my first design two nights ago and it was amazing
what did you use to do it?
I may have bitten off a bit much though as I have to figure out how to program it using the isp header I put on the board
I was considering getting something to do reflow here
my old toaster oven
did you do it by eye?
yup, using the good ole' mk1 eyeball
I have no idea it it worked but at least I know the voltage reg works
yup yup
I'm def headed that direction but I'm also trying to not spend my whole paycheck on setting up my lab
M0s are cheaper than 32u4 I think
good to know
jeez, you're right
totally. I'm still trying to 'earn' the hardware on a attiny85 but I'd be lying if I wasn't drooling at the m0
It will probably be handy for some upcoming projects though.
earn it?
Use it to it's full potential?
My first board was a basic motor controller that definitely didn't need a m0 ;P
yea, I dig the accessibility that it provides. I think it will do a good job of broadening 'market' for embedded dev
Anyhoots, back to the salt mine
thanks for your help
np cheers @pastel panther
ok added make story to title of chat for now, z00m!
http://makezine.com/2017/08/11/circuitpython-snakes-way-adafruit-hardware/
For example, a NeoPixel strip animation may not refresh the pixels as fast on CircuitPython as Arduino.
Why is what I'm typing getting deleted?
f i t t i n g example
we just turned on automod
apparently that is a bad word?
seems to be
it is very weird to see your message for a second before it disappears..
good interview ๐
You're welcome @slender iron.
I'm sorry I will stop prefix swearing...
๐
What? Neopixel animation is slower on CircuitPython than on Arduino? No way!!! ๐
a little while ago i was watching some adafruit video that showed someone editing circuit python code on a Gemma M0 but now I can't find it. Anyone know what I'm talking about? I tried skimming through the last couple ask an engineers and now I don't see it.
It's probably Tony D
most recent one, and he did use Gemma MO : https://www.youtube.com/watch?v=2BwV9WYFo0I
Live stream to http://twitch.tv/adafruit showing how to get started with CircuitPython on macOS / OSX. See how to load firmware onto a Circuit Playground Exp...
i haven't seen any of his videos in a while. I think it was Limor or Noe
i'll look at that though. thanks
the one i'm thinking of was just a quick demo
Hmmm... then it was Noe's recent Gemma pendant.
In this project, we've built a Legend of Zelda themed pendant using GEMMA M0 and a NeoPixel Jewel. Click for links and info! https://learn.adafruit.com/gemma...
oh wait, that's not the long one...
one sec.
Hang out with Noe & Pedro Ruiz and discover 3D printing! Get your 3D news, projects, design tutorials and more each week on Google+ Hangouts On Air. Today's ...
Yes, that's the one, thanks! (beginning at 16:30)
i have a friend who is a python programmer and not much electronics experience. She wants to do a project with her daughter so this sounds perfect.
agreed.