#circuitpython-dev
1 messages ยท Page 105 of 1
ya
ch-yeah
lol
Fixes so many of the weird problems. Wish it was still on some of the other boards.
bwhahaha. No worries. Figured you are going to be on ShowandTell
yup yup
Great job, @slender iron
@slender iron I don't know if you recall but a couple of weeks (months?) ago we talked about a dev version of the Feather m0 Express. Here it is, complete with a few angle DRC errors https://github.com/bsiepert/feather_m0_express_dev
- a SWD header and SPI header for the flash
Someone had the idea for an 'auto double tap' button for the bootloader but I couldn't find room just yet
Should I? I'd be happy to send you one when I order some off of OSHpark. I guess if others want some I could sell some but then again people can always make their own
I still have to work out the rest of the BOM but I'll add that to the repo as well once I have it sorted
(also by send one, I meant the board. I would probably need some money to cover the cost of a populated board)
@pastel panther yeah, a board would be cool. I probably have the parts
I also have a toaster reflow oven in the making too
nice. I would practice reflowing a few QFNs beforehand. I've only done two so far but they seem impossible to avoid shorts though a few swipes of an iron fixes them easily enough
yeah, its the thermal pad I need it for
This just in. Adafruit IO working on my Feather HUZZAH ESP8266 via IFTTT integration on Adafruit IO
@formal plover Nice!
Thanks @idle owl!
Awesome @formal plover
Thanks @floral dagger!
and I'm not talking about 100% working, I can't send like temp data and stuff yet, I can do triggers though
I was looking at the micropi MQTT implementation earlier, but I think I am way out of my depth on that, so nicely done
*micropython
If I can figure out the API, I'll be able to do everything
@floral dagger same here
MQTT would be a way down the road thing for CircuitPython (probably until at least an express board with wifi comes out)
You can do mqtt on an esp board with micropython, so why not with circuit? It should be possible.
@floral dagger it's definitely possible. Would just require some work to get going. I tried a direct port from micropython, didn't work. Over my head and or I'd run into memory issues.
Btw, that wasn't meant as rudely as it may have sounded. I'll have to look up my c++ implementation on BBB. I remember there were some quirks that may apply here.
Nomenclature differences and such that made it really interesting
@floral dagger It didn't seem rude. We've discussed this before with the same questions.
so I've been trying to read up on the ASF to get access to some of the awesome features of the m0 and in that context I just listened to/watched the pinned circuit python hangout video. It got me wondering if there was something I could be doing coding wise to kill two birds with one stone
is there any work that needs to be done on circuit python that would introduce me to the ASF and some of the fancy registers of the m0?
@pastel panther It will be @slender iron or @tulip sleet who will know that best. It's distinctly possible. There's all kinds of things that are super helpful to work on.
@idle owl ok, thanks I'll touch base with one of the two once I'm rid of this cold and can think straight
@pastel panther Oh good luck with that, I hope you feel better soon!
๐
@formal plover I had Suse in dual booth when i had win10 but not have like that recently but now i can get a terminal of suse but i like ubuntu more but red hat is cool too
wow wacky @dreamy dagger @tulip sleet I got my first corrupt SPI flash on a circuit playground express
it's my arc reactor, when it stopped working on AAE last night i thought it was battery but digging into it now the SPI flash is empty
i have a feeling the battery died and it went into brownout
dunno if there's any info that's handy for me to get, but it looks like the flash is empty
i have a feeling flash was corrupted, it rebooted and then couldn't mount FS and created a new one
So, um, I turned my Gemma into a password-dot becuz I forgot my REAL password keeper at home and my fingers forget where the keys are. 20 minutes
does happy booty wiggle
haha wait are you saying it was faster to create a password vault than remember your passwords?
that's amazing ๐
No, just more efficient than my normal fatfingers allow with as much as I have to log in
I'm blaming @split ocean for this, btw
@royal ridge awesome. How do you cycle through the accounts to get the right password?
The "always need" set is a pair, so it's dedicated pads at this point.
Figure I'll go bigger and better and use a1/a2 as scroll with a0 for fire, and the dotstar with color/blink combos for an indicator
@royal ridge oh yeah, that'd be slick
On CircuitPython 2.0 with Circuit Playground Express unfortunately I'm running into a lot of trouble getting mic samples. If I use the record function twice (in separate context managers) I get a pin already in use error. Here's a simple repo:
>>> import audiobusio
>>> import board
>>> with audiobusio.PDMIn(board.MICROPHONE_CLOCK, board.MICROPHONE_DATA) as mic:
... samples = bytearray(160)
... mic.record(samples, len(samples))
...
>>> samples[0]
128
>>> with audiobu...
Here's another interesting audio in bug, if I create a PDMIn and save it and try to use it twice to record (all within the context of a context manager for init and deinit) it locks up the entire board and it becomes unresponsive to Ctrl-C, Ctrl-D, etc. Even worse if you put code like this in main.py you're in a bad state that isn't recoverable without erasing the SPI flash in Arduino. Here's a simple repo:
Adafruit CircuitPython 2.0.0 on 2017-09-12; Adafruit CircuitPlayground Expre...
@timber lion I've never seen it create a new filesystem without me erasing the flash first. But I've never run the battery down either. If the first 512 bytes looks like a filesystem, it should attempt to mount it. That sector is not rewritten under normal circumstances. We should probably provide better diagnostics when it thinks something is wrong.
There's more than one reason why it might give up.
Looking for help... I fail at "import pulseio" on a 2.0.0 Trinket. Did it change? Do I have to install some library from the bundle?
I just want to try some PWM for a buzzer. Nothing fancy.
Adafruit CircuitPython 2.0.0 on 2017-09-12; Adafruit Trinket M0 with samd21e18
import pulseio
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'pulseio'
No help? Then I am going to watch this: https://www.youtube.com/watch?v=0pUBP0k5WD4
Live stream to http://twitch.tv/adafruit showing how to read analog values and output analog voltages with CircuitPython. Learn about analog to digital conve...
@tulip sleet and @timber lion that sounds a lot like what was happening to me yesterday when underpowering my ESP. The filesystem looked like it was rewritten with just blank data. Then toda it happened again when I accidentally switched off the power while sending a file via ampy.
@floral dagger @timber lion These are great leads. Perhaps we could check for undervoltage at crucial times.
Found my problem: This module is not available in some SAMD21 builds. See the Support Matrix for more info. ( http://circuitpython.readthedocs.io/en/latest/shared-bindings/pulseio/__init__.html )
Now I am very confused... There seems to be two different SAMD21, SAMD21 maybe used in Trinket M0 and Gemma M0 and in SAMD21 Express maybe used in Circuit Playground Express.
So it is not only the storage difference, but some important feature difference...
@half sedge So you have a trinket M0, correct?
Yes
@half sedge Yeah, as you mentioned from the support matrix, the Trinket M0 has the SAMD21(not the express) therefore it doesn't support pulseio.
In fact I have... almost everything. ESP8266 HURRAZ, Tricket M0, Gemma M0, Circuit Playground Express, ...
Haha wow, nice collection you got there @half sedge!
So I am suffering from fragmentation. 1st between Circuit Python and Micro Python. 2nd between Circuit Python 1.0.0 and 2.0.0 3rd with that compatibility matrix.
Like... I made this https://gist.github.com/dglaude/897874ef6a09196b22e21618021bca98 a few days ago... And no I don't remember on what hardware/software. But it was Blinkt with PWM (silly but working). It might be an HURRAZ 8266 and with Circuit Python 1.0.0 ... or Micro Python. At least it use "from machine import Pin, PWM" so it can not be Circuit Python 2.0.0
Micro Python documentation let you select both the version and the board. So you only see the relevant information... like if you an ESP 8266, you see those special tricks and not the feature not available to you. Circuit Python documentation do not have that feature. So there are warning in the text saying: "This does only work on Express" and a link to the matrix.
There is room for improvement there, especially since all those are Adafruit supported hardware.
@half sedge CircuitPython is a maturing language. It's picking up speed on development mainly from great Adafruit peeps like @slender iron, @timber lion, and @tulip sleet; just to name a few. There has also been a lot of community involvement helping speed up the development.
Yes, the may be some fragmentation (especially with the ESP8266); however, it's making huge leaps and bounds every time there is a release.
If you are looking for the most true CircuitPython experience, use one of the express boards.
The ESP8266 still has a lot of the Micro Python type language on it because it's a niche port that was added, but I am thankful it's available. I've been playing with it a lot learning what works and doesn't work. Getting it to work with awesome services that have API integration like Adafruit io.
Long story short @half sedge... To get the most out of CircuitPython, reach out here (as you already have) and get involved with CircuitPython development ๐ 
Let's say that I will come back here for help... and use Circuit Python.
I don't plan to compile myself Circuit Python, nor to write proper library, ...
My feeling is that @river quest was interested in a Circuit Python port for 8266 because that let many give a try to Circuit Python. But the real goal might be to create an ecosystem where they are the main distributor. So porting to M0 and being the only provider of M0 make sense to them.
This might sound rude, but I am still not fully convince by the fork.
You can judge it on the reason for the fork or based on the consequence of the fork.
And even if the great leader of the Python foundation seems very happy with Circuit Python... I still keep some reserve.
Isn't the M0 open hardware? Like so many other adafruit products, it won't be long before clones are available all over the place
All in all, I am very happy with my acquisition, and happy that I learned a lot about micro Python from @timber lion and now a lot about circuit Python from him.
That's good @half sedge. Yeah, @timber lion's videos are super helpful
Great if it is open hardware. Still waiting to see some other vendor embrace Circuit Python to avoid it being an Adafruit only language.
All in good time @half sedge. Especially with the Arduino drama.
I'll be back, but my timezone tell me it is time to sleep now... tomorrow is in a few minutes now.
Okay, night @half sedge!
I don't remember how to, when using the adafruit_dotstar library, go from lighting one pixel with pixel[0], to lighting an entire strip all at once. pixels.fill and pixels.all aren't working. I had code for this once but it didn't get saved.
That's on Gemma. I can't remember how to make it work at all on the Circuit Playground Express, lol
@half sedge I realize you are asleep but I'm happy to chat more about CircuitPython's direction next week when I'm back from New York. This weekend is kinda crazy for me.
Figured out what I had wrong with the CPX, but I still can't remember the pixels.fill related syntax.
I figured it out!
@idle owl Yay!
@idle owl I felt brave enough to continue the SHT31-D i2c... Welp, that's over with. I lost. lol
@formal plover lol. I didn't realise that's what you were working with. What happened?
trying to understand this chat like
@formal plover I don't know if you remember, but that's the one that Tony D told me it would be better to start with pretty much anything else.
@idle owl Well I moved onto it earlier today. I finished working on Adafruit io, so I was like; hey, I'll see if I can get things to work with my SHT31-D..... NOPE
@autumn umbra Hi! Anything we can help make sense of?
@idle owl It is the exact same one @timber lion was like uhhh yeah, don't waste you time.
I didn't listen
@formal plover Yeah it was the only one I had and had planned to use with the Metro M0 Express.
lol
Fair enough.
@autumn umbra Are you trying to get started with CircuitPython? Or just confused because you got here in the middle of conversations?
@autumn umbra Read the #code-of-conduct
i know...
hey can you make them
like
simpler
like how 99.9% of discord servers are
Hey everyone, quick question. Is there an api for accessing the webrepl inside of a program?
I was doing some stuff that will run routines wirelessly, and thought that instead of building that into the ESP, why not just make a library with the functions and leverage the wireless interface that is already there with webrepl to send function calls and such through my program.
@floral dagger Webrepl is just like the normal repl except you're accessing it from the web
So you can do the same things. I probably am misunderstanding your question though
Can it be accessed programattically? Like say I build an rc controller interface on my pc. left rght, all that. Can I then have that send goleft(90) through the repl interface to activate the library?
activate that function in the library
I adapted the rainbow code! It's the whole thing slowly going through a rainbow, it's not animated, but yay!
Great lol
@floral dagger don't think it works that way. for something like that, you'd just build into the program. via serial reads, etc.
I grabbed the code off of another board, so I was trying to figure out how to adapt it from 1 dotstar only to an entire strip.
thanks @tidal kiln it's not a huge deal, but just figured if I could, then why build a new "listener" when one was already there.
@floral dagger You could technically make it work. Create a function and execute it from the webrepl
But for something like a RC car, it wouldn't be a good idea haha
@idle owl And it works the way you figure it ?
@delicate pike Yep, the entire strip cycling through a rainbow.
yay @idle owl (reading back to catch up) way to stick it out! you're inspiring me to try harder at code ๐
@fierce oar Thank you! That's so great to hear!
Glad you got it sorted out @idle owl
@formal plover I was thinking of a situation similar to the mars rover. Where it's not real time. I was talking to one of the guys that drove it one time, and he was saying how it was weird to get a picture or video, analyze it, then send a command like "turn left, and go forward 800mm". Then watch it happen after a while. I always thought that would be a neat project. Obviously the transmit/receive time would be shorter here, but still not completely real time
That's why I was wondering about webrepl. It could execute those commands pretty easily if I have access.
i guess you could do that by creating a module
then access webrepl, import module, and interact with it through repl
@fierce oar, @idle owl Is very persistent.
There ya go @floral dagger, @tidal kiln is on the right track
import mars_rover
rover = mars_rover.Rover()
rover.go_forward(800)
Bingo
>>> import mars_rover
>>> rover = mars_rover.Rover()
>>> rover.go_forward(800)
there. more reply.
@tidal kiln , @formal plover yeah, that's what I was talking about. But I would like to have a separate control interface on my computer to send those commands rather than using it directy
Now that would require something fancy
But hey, if it's not there, that's cool too. I can implement it another way. I can always to a web interface of sorts and send it through urls.
in that case. what i first said.
Just trying to avoid running down unnecessary rabbit holes ๐ Thanks
Haha right right
@idle owl Still admiring your chef d'oeuvre ? ๐
@delicate pike I'm trying to get a smooth rainbow animation now.
@delicate pike Definitely!
It would be great @idle owl thanks ๐
Update....looks like using the webrepl IS possible in my application. I found the code for webrepl on github for Mpython. It's just a connecting via a websocket.
BTW...there's also a file on there that allows command line file transfers over wifi
https://github.com/micropython/webrepl
@floral dagger the file transfer is using the webrepl, you don't send the file to the webrepl
@formal plover no, i mean you can type python webrepl_cli.py test.py 192.168.1.128:/ at the command line, and it will send the file test.py
Haha yeah, I found the section you were talking about.
that's pretty nifty I think.
Yeah. The GUI version of webrepl has a file transfer utility as well.
I use Ampy to move things around.
Yeah. I've not tried the webrepl client file transfer. I assume it works about the same as the command above.
I prefer using the command line, so this helps
Gotcha. Well I'm curious if you can navigate directories that way. Because the only way I'm aware of is via Ampy
here's the response I got when I was trying to figure it out
Arguments:
<host>:<remote_file> <local_file> - Copy remote file to local file
<local_file> <host>:<remote_file> - Copy local file to remote file
Examples:
webrepl_cli.py script.py 192.168.4.1:/another_name.py
webrepl_cli.py script.py 192.168.4.1:/app/
webrepl_cli.py 192.168.4.1:/app/script.py .```
So probably not fuoll navigation, but good enough to upload into folders
or download from I suppose
true, it would still need to be connected for housekeeping, but just day to day overwriting and testing this will work
Cool beans
or could use webrepl itself for the housekeeping
I don't know how to remove files and directories via webrepl. I think that's only possible via Ampy
I was thinking I recall seeing a way to remove them, but may be right. I know you can make them
os.remove('data.txt')
I don't think that does the trick
Anymore at least
I remember going through the guide and it's like: if you want to do anything with files without Ampy, you're gonna have a bad time
Weird. Wonder why I had that impression. Well, cool.
I remember seeing that somewhere to, so I'm a bit surprised as well
maybe it's just inconsistent?
Could be. Alrighty, I'm calling it a night. Have fun.
@slender iron I found what seems to be a copies of ASF 4 in the ASF4 branch but documentation seems sparse. Any pointers?
I have a micropython (simple question(s)....
For the M0 devices (not circuitpython like circuitplayground) but like the trinket M0 and such. Do the .mpy files go into the 'lib' folder? If so, do a folder for that .mpy have to be created?
Yes and yes, @carmine basin
At least, in the latest releases. Anything later than 2.0.0. I'm not completely sure of earlier...
ok. thank you. I'm trying to dive into understanding and implement micropython library(s).
Technically, micro python and circuit python are different beastts.
My answer was specifically for circuitpython like you find on the Trinkets and Feather M0 Express, for example.
@drowsy sonnet Ahhhhh. ok thanks.
Also Scott (aka @slender iron) has written guidance on library development. I'll get you a link....
@drowsy sonnet Thanks. I have something that's working in Arduino. I'm trying to learn how to make that same thing work in micorpython world.
Here is the guide on writing and sharing CircuitPython libraries! https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/releasing-on-github?view=all
@drowsy sonnet Thanks for posting.
and/or make it the description here
oh yeah, I forgot you're one of the cool people who can do that ๐
Pinned... I'll edit to improve the link description.
enjoys magic status
@carmine basin You're welcome! I hope it's helpful. Feel free to check back in if any other questions come up!
@drowsy sonnet Will do.
@carmine basin currently one of the libraries I use with my ESP8266 running CircuitPython is a micropython library I dragged over without any modifications
UPDATE 2: Got socket connection to webrepl working in javascript. Now to port that over to my interface application, and I should be good to go
Not all libraries will be like that obviously, but I was pretty thrilled it worked right off the bat
@floral dagger Awesome! You should post your project after you're done.
@formal plover thanks. Will do.
You'll probably get a laugh out of this. For hours last night I could connect, but kept getting errors sending data. I could not figure it out to save my life. Today, I realized that I was just forgetting to send the webrepl password first. It actually worked all along. I was the error lol.
@floral dagger Bwhaha oh man, I've had so many things like that happen to me.
Like when I wiped my board to put 2.0 on it and didn't put any of my libraries back or even mod boot.py. I was trying to continue a project that needed all of that for hours and hours and couldn't figure out what the deal was.
lol
@floral dagger @formal plover Since "we learn from our mistakes", we will all be experts in no time ๐
Haha something like that @solar whale
lol @solar whale problem is, I will only be an expert in how NOT to do things
it wouldn't be any fun it it all worked the first time...
no one would ever ask for help - and that would be no fun at all!
@solar whale honestly... If @slender iron would have never started this discord. I probably would have loaded CircuitPython on my ESP8266, ran blinky... Then put it in a box.
I guess it's like what they say about playing guitar "If everyone could do it, nobody would want to."
Having the opportunity to interact with this community makes everything so much fulfilling (and easier at times) Haha.
@formal plover very much so!
@floral dagger In fact every body can play guitar I know what I'm talking about lol
sure, but it takes, time, patience and loads of mistakes...same as coding
True !
There's not enough discord in the world to teach me guitar ๐
I'd smash a $300 guitar before smashing a $19 hobby electronics board. Lolololol
Except that it does not take as long time as we think
You can play things in few hours
@delicate pike I used to play a mean smoke on the water.
I mean it's not gonna be a Slash solo but easy things like "Knoking on heaven's door" and few things like that
@delicate pike right right
A great one @formal plover
I'm trying to play "entre dos aguas" from Paco De Lucia
It will take a moment I think ๐
Paco de Lucia - Entre dos aguas
@delicate pike You might also want to check out Al DeMiola and John McLaughlin. ๐ธ
@lofty topaz , I just wanted to say I dig your screen name. I hope to catch one of your species one day
@pastel panther Thanks, are you from Northern Canada as your name suggests?
Pikes are fun to catch, but your better of releasing, they aren't that good to eat.
In my opinion any.
@lofty topaz does my name suggest that? How so? Sadly now, I'm from the southern wastes that is "Northern" California
I've heard the same about pikes not being amazing to eat so ya, it would be C&R for me
sadly now=sadly no
Well, actually, yes, it does. I'm what you would call a Yooper. A person rom the U.P. or Upper Peninsula of Michigan. Hence, the Northern. Now, my favorite Ancient Art of War weapon is the Pike. I figured NorthernPike would be a good monikor. Which I began using online back in 1987. Yeah, I'm old.
Anywhere near the Emerald Triangle??? ๐
Yes @lofty topaz Paco used to play with them, they made an album together
@delicate pike Yes, I know, I have it. One of my favorites from Al is Electric Rendevous. Fabulous guitar work. Gives me goose bumbs.
Hah, I never figured that 'NorthernPike' would be a name made of two parts but I respect your choice of weapon. Now the inevitable question is how do you feel about the unsullied from GoT?
@pastel panther Sorry, I'm not a Game of Thrones guy. Know absolutely nothing about it.
Also, with regards to the 'Emerald Triangle' I'm not so far from it, and have been known to on occation enjoy their exports, I prefer their (costal) fishing and camping. I'm from even further south.
Having spent my summers in Michigan, I associate @lofty topaz with a fish....
BBIAB, meeting
@pastel panther Gotcha, still, the west coast is a cool place to be. My midwest days are about through. Need heat.
And the exports for medicinal purposes. ๐
RA
Bad.
@drowsy geyser And you can. I expect it from the start. And that's cool. Some wonder why the P is capitolised and then they get the story. ๐
Which matches the avatar.
@lofty topaz UP, huh? I just moved from not far from there (Chicago) to the other side of not far from there (SW Ontario).
@umbral dagger yUP, I'm a Yooper. But I will not reveal the town. It's paradise and it's all mine. ๐
I'm in Chicago now. Far north burb. Gurnee.
Been since 1975. Two weeks out of high school. On my own at 17. In the big city. Nearly killed me.
Gotcha. I've been to Gurnee. I was in Chicago for ~6 years. Lincoln Park & Logan Square. Worked in the West Loop the whole time.
The Loop eh? Badlands for me. Too much steel, glass and cement.
Just west of the loop. between the trains and the river. Not quite as bad there.
Do you remember the Zenith headquarters off of 294. Worked there for 20 years.
The last few years was at SteelSeries dreaming up & prototyping off the wall product ideas. That's what led me back to hardware hacking. (I started out in hardware back when 8 bits was all you had ๐ )
yup. Z80 for me.
That, and 6502.
Julian Illet is building a breadboard Z80 computer....
2708 and 2716 and 8212s and 2N2222....
I remember when I had to go to a "supercomputer" to get 64 bit words....
Now you're mixing technology scales.
I used a lot of 2716s and... 6116 (I think... 2116... 2K static ram)
@drowsy geyser I remember dreaming of going to a supercomputer for 64 bit words.
I'm from Michigan as well btw
I think that every body can help me here, I have to find my way to ask you the good question in fact
2708 , 2716 --EEPROM's with the window for erasing???
8212 --8 bit Latches for custom I/O.
2N2222 -- JBT's for driving relays and solinoids.
Hmmm encrypted sentences ๐ค
I go way way back people. I've got heathkits I built in the 70's that I still use.
We're of a kind, @lofty topaz
Um, I was in middle school. Glad I'm not the only "old guy" in the room.
raises hand
Don't be sorry @lofty topaz I'm trying to find a way to inject a program in a 16F84 with a raspberry lol
I wrote the device drivers for a VME-to-UniBus adapter that was hand wirewrapped....
But I don't know anything about electronics
Do I have to be sorry for that ?
I'm not
@drowsy geyser Nice, good ol' device drivers. Was there an ISR, Interupt Service Routine that went with that?
I'm here to learn from you
@delicate pike Never be sorry for not knowing.
@delicate pike tons of experience, no experience; doesn't matter! :)
@delicate pike Very well. Ask and Ye shall learn. I like that.
Hi @idle owl
@lofty topaz ISR Don't recall. This was in '91.
The only rule is: be awesome to everyone.
hi @delicate pike ๐
I can barely remember what I had for breakfast.
@lofty topaz Wirewrapping: yes & yes.
@drowsy geyser What's breakfast
Oh yes, a cheeseburger. ๐
Lol @drowsy geyser @idle owl
I used to use that excuse, "But I've slept since then".
Hahahahaha @lofty topaz
I pulled a request on #help-with-projects
@delicate pike Not knowing about somethign just means you still have all the cool fun stuff to learn & experience.
My boss gave me a job once, I was 20, green, I told him I couldn't do it.
He said, John, just because you can't do it doesn't mean you can't do it.
He was right. Smart man.
Trust me I like that @umbral dagger thank you for understanding me lol
@pastel panther @tulip sleet has a link to asf4 docs. I can't find it now
@slender iron ok, thanks
@umbral dagger that's one thing I love about this server. Starting to learn circuit python, and my circle of knowledge is small. With each thing I learn that circle gets a little bigger, and as a result, the things I don't know that are touching the outside of the circle grow more numerous. The more I learn, the more things I can see that I don't know. You all keep me motivated to keep going.
@floral dagger You've stuck through some long troubleshooting too!
That's great @floral dagger, so happy to hear that.
@floral dagger Even with 35ish years in computing (hardware & software) I'm a beginner with Python. Learnign it in the context of hardware/making is a great deal of fun.
Same here, got started with FORTRAN in the 1970s, and for much of the time since then have worked in embedded hardware and software design in Aerospace, from circuit design to FPGA work all the way up to a GUI. While I still think of Python as a language for batch processing and not embedded systems, and I know I sound like a dinosaur - I have to say that it sure is nice to get going with a test within a few minutes of set up, and it does draw in many more new engineers to embedded systems design.
The FORTRAN was coded on punched cards for a CDC Cyber 6600. I even remember the day we got our first CRT, it was a vector display, with a huge hood.
Every EE in the building surrounding the CRT, waiting for a turn at the display, LOL
Still, I'm not the oldest one here. Close, though.
@tight flax I hear ya. I started workign with embedded in Z80 & 6502 ASM. Since then C/C++.
The only thing I truly object to, that actually scares me, about Python is the omission of begin/end statements of any kind. Depending on indentation to describe blocks is just asking for bugs
There was a long stretch where I was just doing software in higher level languages (Java, Ruby, Go, Scheme, Smalltalk). Playing with hardware again is fun!
I also did a lot of embedded work with Z80/6502, and the Motorola DSP 56k was a joy to work with when it was introduced. Actually flew a mess of them on a satellite called HETE back in the day
8 DSPs and 4 "Transputers", really high powered HW for the era
@tight flax I tend to agree, and that always what fanned by dislike of Python. But after playing with Haskel & F# for a while, it's not such a bad thing. Indentation is only one of the many ways to go wrong in a dynamic language like Python. (the others it mostly shares with Ruby)
Yeah, I find that scary, even - pasted code runs the risk of being re-indented by "helpful" text software, too
I really won't be happy until I have some akin to MicroScheme ๐
Let's form the Committee to Require or At Least Tolerate Curly Braces in Python
honestly, the indentation doesn't bother me,but I've always been one to carefully indent any code I work on to make it more readable. It's more just a habit now that we have IDEs that will allow you to collapse sections, but old habits die hard
Agreed that the indentation reflex has always been automatic, but it feels a bit like coding block statements without a net
@floral dagger i think that's mostly it (for me anyway): habit.
I just needed to whine/vent about it. Whining is in my skill set.
That kind of thing - indentation based blocking - really encourages us to break down functions into calls of smaller, more manageable functions, "in a structured, disciplined style"
That way there's less chance that something is indented like 4 levels deep, or more
Debugging code with a dozen nested IF statements is ... like a fireside ghost story
@tight flax well said
deinit() was just missing calls to reset_pin().
I now have a slowly changing through the rainbow strip of Dotstars in front of me. Yay!
And I wrote up the code so you can change some variables and have it work with any board that supports them and with any size strip.
Bravo !
After a few runs, I end up wtih a stray pixel, but I'm thinking it's actually noise fom using jumper wire alligator clips, since they can send stray signals.
@idle owl Do you use simple RGB led strips ?
@delicate pike If you're asking what I think you are, yes I'm using a half meter of dotstars. They're really GRB, but it still flows the same., and instead starts with green.
I'm not certain what you mean though
@idle owl Can you take a photo ?
@delicate pike Sure, I can try. Do you mean a close up of the strip itself or of them lit? Because I can't do both at once, they're too bright for any detail on the PCB to show up when them on.
@idle owl It would be great if you can show both, but do what's easier for you
Actually I could grab the product link. Instead of making this complicated. https://www.adafruit.com/product/2329
That's the link to the actual product. I'll get a pic of them on. ๐
NIce @idle owl Is it for a larger project, or just to get it working?
@floral dagger I have one idea for a project which would eventually use this strip, but it was almost entirely just to get it working.
well, congrats!
Thank you!
@tdicola @tannewt I did reproduce this, and it's not fixed by my fix to #275. However, think there might be a larger issue here. I have a question here about the intention of the context managers and what can be done with deinit()'d objects.
There is no __enter()__ implemented for these kinds of io objects. The pins are claimed in __init()__. __exit__() calls deinit() and releases the pins. So then you can't reuse the object again, because the pins aren't claimed any more and t...
@idle owl Excuse my english I watch the Adam Savage show and I noticed that he uses a lot of french expressions, it's easier for me as my french is much better than my English ๐
Thanks for the photos @idle owl great job ๐
I hope it make sens lol
@delicate pike Completely excused! I took three years of French, and I could probably get by if I needed to but I'm by no means fluent or even really conversational in it. It helps me follow French-constructed English quite well though!
@delicate pike Thank you so much!
Nice job @idle owl!
Lol @idle owl I'm glad you can understand me
@delicate pike I would't have known you were struggling if you hadn't mentioned it. You don't give yourself enough credit. You're doing great!
Lol thanks
@idle owl Ma foi, si vous dรฉsirez pratiquer le franรงais un de ces jours, je suis votre homme ๐
@delicate pike Not sure about Ma foi, but the rest is "if you want to practice your french in (something), I am your man". Yes?
Something about days or time.
I can understand a lot of it, I just can't produce it from scratch! ๐
@idle owl Ma foi is an old expression to say "well"
Ahh nice!
Well done realy lol
Thank you ๐
@tulip sleet I am trying to build a environment on window 10 to builld circuit python. Should i be using the incstruction in repo adafruit/atmel-samd-micropython-vagrant to do it?
Brb
>>> import analogio
>>> import board
>>> ai = analogio.AnalogIn(board.A1)
>>> ai.value
25600
>>> ai.deinit()
>>> ai.value
hangs and then crashes (tested on master branch)
@idle owl Nice. I haven't done much with dotstars yet, but I've spent quite a bit of time working with neopixels ... much the same at the higher level, though different electrically & low level... dotstars look much nicer to work with (i.e. simpler protocol and timing requirements... though 2 lines rather than 1.) I picked up that new dotstar matric feather wing but haven't even put headers on it. That's tonight's project.
@umbral dagger That's great! Which board have you used for the NeoPixels and which one will you be using for the Dotstars?
With neopixels, mainly Uno and Teensy 3.2
@fading solstice I had a bunch of problems getting vagrant set up on virtualbox. See https://forums.adafruit.com/viewtopic.php?f=60&t=109632 (LINK FIXED). I'd recommend using WSL (Windows Subsystem for Linux) or just use VMWare Player or similar to install a regular Ubuntu VM. Or make a dual-boot system with another disk drive (shared drive has complications due to shared boot manager)
oh, and Pro Minis, and a custom ATMEGA328p board.
@umbral dagger Nice
So far with dotstars it's just been the one on-board the Trinket M0.
Oh wait.. I started using neopixels with the original trinket.
@umbral dagger That's really neat, the link you sent!
@umbral dagger The parts of it I can follow anyway. Still new to circuit diagrams and such. I've definitely never designed a PCB before.
Most fun neopixel project was a "curtain" of 8 meter long strips of the 60/m type that was hooked into World of Warcraft to create ambiant light that reflected the colour scheme of the zone you were in.
Wow. Nice!
That was a serious hack.
@umbral dagger I just read the write-up. Very nice job!
They're pretty basic, but they work well enough. I have 10 of them around the apartment feeding into a central system currently running on my linux workstation, which then controls HUE lightbulbs. I never have to touch a light switch ๐
@umbral dagger That's great! We always talk about doing home automation, but we haven't gotten around to anything past our smart thermostat.
@idle owl I have neopixels on a couple of the units: a dense m long strip under one kitchen counter, and a small 8 led strip over where I make coffee. Those also have a laser distance sensor so they know when someone is close.
@umbral dagger Yeah I saw that. I was actually wondering the other day what PIR meant. I learned that from your write up. ๐
@idle owl I.e. you walk up to uit and the spot/undercounter light comes on. I drive them full on white so it's nice & bright.
Nice!
@idle owl @umbral dagger I have a fun home automation project I made using a Raspberry Pi and Zwave GPIO daughter card
@idle owl The problem with the PIRs I'm using (cheap ones off Amazon, but the same as what Adafruit sells) is that they watch a full cone... so they can see movement on the floor in most cases. I.e. the cat.
@umbral dagger Yeah our cats trip the smart-home sensor from time to time. I know what you mean.
@formal plover That's neat!
@idle owl I'm thinking of using somethign like https://www.adafruit.com/product/3538 to differentiate people from pets.
Add heat-vision to your project and with an Adafruit AMG8833 Grid-EYE Breakout! This sensor from Panasonic is an 8x8 array of IR thermal sensors. When connected to your microcontroller (or ...
@umbral dagger That would be a really slick way to do it
Do we have an Intro to CircuitPython guide anywhere yet? I'm finding specific protocol basics and hardware basics, but not a simple intro. I thought there might have been one and I just can't remember where.
@formal plover Neat
@umbral dagger thanks!
Like an abreviation ?
@idle owl the readthedocs
@delicate pike Nope, it means interesting or nifty.
@delicate pike As long as nifty is also a word you know. If it's not, that only half helps.
@delicate pike "Neat" is like "cool" or "awesome" in this case.
@formal plover We were talking about those though and how they're not really aimed at true beginners. They have examples and some explanations but it's not like a guide.
@formal plover This just randomly crossed my twitter feed: https://makershare.com/missions/z-wave-challenge
@umbral dagger Haha, what are the odds
@idle owl the per board guides might be considered "intro to CircuitPython". There's variations between each board. It's hard to make a singular guide.
@formal plover That's what I'm finding. I'm trying to figure out how much to tie into my learn guide. I'll take a look at the guide for the CPX which is what this guide is for. I was running into a wall because I was trying to tie too much into one thing. I need to just provide some resources and move onto the next part of it.
@idle owl I'd stick with working the built-in NeoPixels and sensors. Then move onto using the pads.
i put Windows 10 iot core supported ones and there was python if you want to look the link is in #general-chat
@formal plover I have most of that sorted, I just needed to declde how far into "CircuitPython Basics" I needed to go. It's a learn guide for a project I did, not anything related to the APIs.
Is there a way on the SAMD21 to do something like a deepsleep on the ESP8266 port?
@idle owl hmm well if we're going in with the assumption the end-user doesn't know anything about python syntax to begin with... Then perhaps cover functions, variables, loops, if then statements etc
@umbral dagger yes, I believe so.
@formal plover I have yet to find it ๐ฆ
@umbral dagger I have it bookmarked somewhere, I'll have to check later when I am at my PC. I think it's part of the machine module.
@formal plover I keep assuming that they will be starting from nothing, because when I started this project, I was a basic beginner and had to learn all of it. I thought it would be silly to duplicate something already written up and maybe as much was hoping it already was so I didn't have to. The code for the project, that it strarts to cover uses that stuff anyway, so you'll have a way to learn it by the end of the guide too.
Import machine
Machine.sleep or something like that
delay with the time
@idle owl gotcha. I'll scan through the learn guides and @timber lion videos and let you know. Tony D has covered some of that stuff in his videos I think.
@formal plover I already linked his Getting Started with CPX and CP video, that's how I learned to connect to the REPL and get CP installed on the CPX. I think if I link a couple more resources, I'll be happy with it.
The REPL isn't required for the project but the code is all written to give feedback in the serial connection. Helps so much to have it.
That's micropython, but the machine module works on my ESP8266 running CircuitPython
I think that best things for beginners are videos
@delicate pike For a lot of people, yes. But there are many different learning styles and for some people, reading is a much better solution. I already have a video included, so it's good to know that it was a good idea!
The built-in rtc on the ESP8266 does have weird problems I'll warn you @umbral dagger
A verry good one @idle owl a lot of people have difficulties with abstract concepts once they got the idea they can go to more specific things with reading
I mean that a text have to be methodical when a video goes to the essential
@formal plover Bad wording on my part. I saw it opn the ESP... I would like it on the SAMD. I want it to wake up every ~ hour to check a sensor. And it will be powered by a small (500mAh) lipo.
@umbral dagger oh wow, nah my bad. I misread. Yeah, pretty sure there is still though. If not you will have to sleep it with an external RTC.
@idle owl I looked for a LOOOOONG time for some very basic intro stuff, and there's just not much out there. Most of the very basics that I cobbled together came from micropython tutorials and trial and error.
@floral dagger The per-board instructions have some intro stuff in them, but it's per-board so if you're not using something specific, you wouldn't think to find it.
that's true
@floral dagger But that's one of the things we're all definitely working on. I was with you when I started. Cobbled and fumbled a lot.
I think what it is, is like a lot of things. Once you get past the very basics, they become so obvious to you that they are just assumed knowledge, and we forget how valuable that one little tidbit could have been to us early on.
You see it a lot in game mechanics where the devs tested for so long with an awkward control scheme that it became second nature. By time of release they forgot it is even an issue
@floral dagger That's exactly what I'm doing with this learn guide is trying to have that tidbit available for anyone else who happens to sail the same boat.
True!
@formal plover Actually, I believe this will do what I want admirably: https://www.adafruit.com/product/3435
Yes, it will. I won the TPL5111 on Ask an Engineer lol @umbral dagger
@umbral dagger I'd rather rely on a breakout than what's built into the board.
Generalization of #276 and #277.
After deinit(), an AnalogIn, ``AnalogOut, PDMIn, etc. object should no longer be usable. Attempts to use it should raise an exception. This can probably be marked in most cases by setting the internal struct pointer to NULL. Then check for that NULL` before any operation.
๐ค
@umbral dagger If you happen to find a SAMD sleep feature lemme know, if you remember? I've got a similar project in mind. I have a LoRa Feather and want to send data from my garden. Trying to sip power and avoid wifi.
So a delay can't make it ?
@delicate pike nope. Sleep or delay will make something wait, but won't do anything with sleeping the board or putting it in low power mode
I see
@formal plover The project that I have have to operate a small motor for few seconds every on,e or two hours, what kind of solutions I have ?
@formal plover I intend ti do it with a 16F84
@delicate pike looking at the datasheet on that, you do have a sleep mode of some sort.
google 16f84 datasheet, and there's a PDF that will explain a lot
Thansk a lot @floral dagger do you have an idea about how I can wire a raspberry pi to inject a program in this kind of PICs ?
Not a clue
I found it thanks @floral dagger
groovy. Lots of good info in there. Is there a reason ou can't just do it directly with the raspberry pi instead of using the chip?
Thanks a lot @tulip sleet I think it will be helpfull thanks again
What chip ?
Lol
I have to read it to the end
@marble talon I think I'll use this: https://www.adafruit.com/product/3435
@umbral dagger Yeah, I saw that come across the new releases. I'll consider it if my power consumption is too high. Was hoping for an onboard feature. Oh well!
@marble talon I agree. The Trinket is perfect for what I need, which is simply to wake up occassionally (every hourish likely), check a reading and go away again if it's in range. If the reading is out of range, it'll go into an alert loop (beep and flash every few seconds) until the readingt is back in range, at which time it'll go back to the "wake every hour" cycle.
@marble talon Sounds like a very similar usecase.
@slender iron Hypothetical question: other than tweaking the board config header and linker files, is there anything preventing swapping the 2M fSPI Flash for a bigger one (e.g. a 4M like the https://www.digikey.ca/product-detail/en/cypress-semiconductor-corp/S25FL064LABMFI010/428-4047-ND/7034902)?
Could you add a TODO to replace this eventually, or have this call a HAL routine that returns the frequency? Could call common_hal_mcu_processor_get_frequency().
Based on my Googling, SysTick units are dependent on clock frequency, right? The SysTick timer is decremented on each clock cycle. So for instance at 48MHz, one tick is 1sec/48e6. So are you mixing microsoeconds (us) with SysTicks units?
@umbral dagger Nope! If you get above 16M, you
won't have to use FAT12 either, which might fix some write-delay problems we see on Windows and Linux.
@umbral dagger someone hacked a trinket and did that.
@formal plover I hacked a 2M SPI Flash onto a Trinket M0. Someone asked if a bigger flash would work, which got me thinking about supersizing a Feather M0 Express. https://daveastels.com/2017/09/01/trinket-m0-express-hack/
@umbral dagger ah, that was you! Haha
@formal plover Thatโs why I know which files need to be tweaked ๐
Good night every body ๐
@umbral dagger Derp Derp. I've been popping in and out too much, not paying full attention. Sorry.
I can't import a class from a module/lib.... Still messing with this i2c stuff
@umbral dagger @marble talon making time.sleep() smarter for power is on my long todo list
I glanced at it when I did time.sleep for the SAMD51 but didn't add anything
@umbral dagger it shouldn't be too hard to support larger flash
Thanks for the review! I'll get to this in a few days after Maker Faire craziness.
@slender iron Cool.. I have some 8Mb SPI Flashes on order ๐ I may call it "Ostrich Feather M0 Express" ๐
๐
@slender iron Any insight on why the Express boards use a 2Mb chip?
we thought two megabytes would be plenty
@slender iron Then you find out...
@slender iron My endgame is to put a version of scheme on it. Likely bytecompiled so it can be executed directly from flash.
@slender iron To avoid having to parse into heap based objects.
Pondering... I wonder if one could use an image-based approach to run directly from flash, and thus circumvent the RAM limitation.
Then just keep dynamically created objects in RAM.. with fairly aggressive GC.
thats kinda how circuitpython works
I think byte-compiled would be the most flexible and performant approach.
With the .mpy files?
I have most of a Scheme runtime built. My target was ARM Cortex from the start. Leveraging the infrastructure from CP would be ideal: the flash drive approach, and the SAMD/express plarform.
sounds awesome @umbral dagger !
I didn't try to review the changes - it's just too massive. I might go through some the diffs later, but I wanted to make master be the real dev branch now. It's cooked enough now that you have the REPL and blinky working! Congrats!!
#circuitpython-dev Note that the master branch of https://github.com/adafruit/circuitpython is now well and truly the 3.0.0 development branch. The asf4 branch has been merged in now that @slender iron has gotten the REPL and blinky working with ASF4. It is cooked enough. Congratulations @slender iron !!
If you want to make changes to the 2.0.0 release for your own purposes, branch off the 2.x branch. That branch is for 2.x fixes and enhancements.
The problem with turning the pull-ups on is that then it makes it impossible for the IยฒC bus to talk to devices that use different voltages than 3.3V. Normally the pins are open-drain to make that possible. There can also be some bad interactions with pull-up resistors already included on many modules and shields โ they would all add up, at some point making it impossible to pull the pin down. Granted, that particular problem is also present without the internal pull-ups, but it's made worse ...
Handling buttons is a very common task for microcontroller boards, but doing it properly is a surprisingly complex and advanced topic. We need interrupts, we need timers, we need software de-bouncing, etc. Instead of exposing all this complexity to the users, and letting them write the button-handling code themselves, I think it could make sense to have a buttons module built into CircuitPython, which could be configured to handle buttons connected to the GPIO pins (and built into some of t...
I updated this to mark "4-Digit 7-Segment LED Matrix Display FeatherWing" as supported, since the HT16K33 dirver handles it.
Seems like we only have radio, ethernet, GPS and music featherwings missing. I have the radio and music featherwings, but they are a bit complex, so I haven't written drivers for them yet. I also have the GPS module, but since ESP8266 only has one UART that is already used by the REPL, I didn't wite a driver for it.
There is a driver for the motor shield for micropython: https://github.com/mwm/Micropython-Drivers/blob/master/motors/AFMotorShield.py
Hello People of Adafruit Discords CircuitPython room. I have been reading a book that I think anybody trying to learn Python would benefit from immensly. I probably shouldn't promote things of such nature on Adafruits Discord room but the value of this book is worth it. It's Python Cookbook: Recipes for Mastering Python 3. It's an O'Reilly book by David Beazley and Brian Jones. There is an incredible amount of valuable code examples that clearly describe features of Python that many of us may not be aware of.
In fact, I'm wondering if a room for book discussions might be in order. Books are where it's at. Yes, the internet has it all as well, but books still reign supreme in my world.
MAKE a nice day. ><>
@lofty topaz I have a top o' the line Kindle that I use for a lot of reference materials. For fundamental learning, though, I prefer physical books! I just can't transport those books around with me everywhere I go. Thus, I have an electronic copy of the Python Cookbook, but a physical copy of "Deep Learning" so I can stare at the page longer. ๐ I have an electronic version of my Learning Scala book since I need it both at home and at work. My "Elements of Rocket Propulsion" and "Spacecraft Systems Engineering" textbooks, though, I have at home in physical form (actually, I was in the middle of moving when I got into actual spacecraft design, so I have both an electronic and a physical version of Spacecraft Systems Engineering!)
@drowsy geyser I to have a Kindle HD. Which is where I have ALL if my books. Wether they're physical or electronic doesn't really matter to me. It's just the fact that they are available to me to read or peruse when needed or wanted. I do have a rather large library of physical books accumulated over the years of my career, but ever since the Kindle came out, I buy nothing but ebooks for it.
I must have at least 300 books on my Kindle.
Ranging from software to hardware to writing to crafting, etc...
By the way, isn't it 3:30am where you are.
Unfortunately, you have to be a server admin to create a channel (I just tried). @river quest or @slender iron, when you have a moment, may we please have a #bookdiscussions channel for on-topic discussions about learning and reference books? I would start by pinning some posts with lists of "must have" electronics books (Art of Electronics, Electronics for Inventors, Bunnie's books, Make books, etc.).
Wow, do you think they would actually go for that?
@lofty topaz It is indeed 0330!
You must have some clout with Adafruit. Being a Community Helper and all.
@lofty topaz The worst thing that happens is they say "no." It doesn't hurt to ask, and creating the channel only takes about eight seconds.... ๐
Exactly. Now, they're both just a tad busy right now, so it might take a few days longer than usual, but it might happen. I think it's a good idea!
The upcoming ABC book. Simon Monk's books. Lutz's "Learning Python" book.
Effective Python.
Learning Pythong The Hard Way.
You see, in my opinion, Python is a great high level language. It's just that it is so high level, developers can get confused very easily by the criptic syntax of rvalues when programming complex data manipulation algorithms. In other words, Python is easy to learn, but very difficult to master.
Yet, once mastered, you can become a powerfull developer.
I think Python also has a shorter path to "productive use" than more traditional languages (cough C++) or functional languages (cough Scala).
Python is an ideal language for learning computer science and quickly becoming productive in "real world" applications - look at the Circuit Playground Express, for example.
Yes, I have a CPX developer edition given to me by Adafruit. They are so generous. But MakeCode is not Python and Javascript belongs where it's at. The web.
Ok, we agree about MakeCode and Javascript.
It's like programming the Sphero! That graphical drag n drop programming environment is not a "real" programming language. There's a clear distinction between toy programming languages and production programming languages! The notable exceptions being NetLogo and Processing, IMHO.
All I'm trying to say to people about Python is that learning to use it is easy. Just like any other language, except C++, but to be a true Python programmer requires the additional knowledge of iteration, comprehensions, regular expressions, lambda's, sets, tuples, lists, dictionaries, mutability, and so much more that you could spend years using Python and not know all of its capabilities. And that is a good thing, don't missunderstand, which is why I think there needs to be more discussion of the language features itself than just a language for the latest and greatest hardware.
It's one thing to teach Python to people, it's quite another for those same people to continue to use Python.
Totally agreed!
I still haven't "mastered" python, IMO. I don't effectively use comprehensions, for example.
And I'm somewhat hobbled by my "old school" imperative programming background (assembly, compiler design, EBNF specification, C/C++, etc.)
Whether your use of comprehensions is effective or not isn't my point. You do use them, and others should recognize the use when seeing the code. Instead, I've seen people say, "What is THAT?". Only because they haven't had to use that feature of the language.
Your "old school" background is going to do you good when considering how "pointer" heavy Python is. Don't think for one minute that iteration isn't done without the use of pointers. If you've done compiler development, then you're aware of the Linking and Binding processes prior to generating the executable. Those two procedures alone are so pointer heavy that knowledge of them can only help in Python.
I'm rambling, RA's kickin' my butt. Sorry.
Ahhhhh enlightenment ๐ก
Sorry to hear about the RA this morning, buddy. I wish I had a magic wand to fix it.
You're right about the language, of course. A strong programming background means you can teach yourself effectively by picking up a book (like I'm doing with Scala).
You're at a disadvantage if you try that without formal training.
Funny story: I got bored 2/3 of the way through my compiler design class and asked the instructor if I could do a project instead of finishing the class. He said, sure, but the grade will be dependent on the compiler design skills I illustrate. I wrote a cross-compiler so you can run Cray-1S assembly language programs on a Dual VAX-11/780 (I'm showing my age). Got an A though. ๐
No, but close enough. ๐
The VAX, PDP-11, IBM 360/370, all those mini's and maxi's are gone. Devoured by the micro, the PC. And in 1981, when I first bought my first PC, serialnumber 352, I told everybody that their mini's and maxi'a where through. Their future was finished. Nobody beleived me then. Sometimes the Ol' crystal ball makes things so clear you just can't ignore what you foresee.
True! But then I've had some major crystal ball failures. I still remember my friend Davey calling me to his office one day to show me "this new markup language from CERN." I looked at HTML and the example web browser and said, "so what, it's another documentation language. Big deal." LOL!
That's funny. But your right, just another Markup. It was the Browser though that was the kicker. The killer app for the internet. Remember, the internet is not the WWW.
There I go, saying "remember". Gotta catch that better. Sorry.
Maybe an exception handler in my cerebral cortex might work. ๐
Oh, totally. Remember, my first e-mail address was prm@arpa.net! I clearly remember participating in the arguements about whether we should allow a ".com" TLD.
Hey, Dan's here. That dude knows his stuff.
Aye!
Now you have me thinking about compilers. And I have a work project that could be solved with a compiler design....
LOL, quick question, Ever break the build?
I donโt have admin privs to create a channel, but Iโm sure @slender iron would consider it. Maybe something more general though, like #edresources. #bookdiscussions could be about the last novel you read.
Iโm out and about and wonโt be on much the next couple of days. Iโm not at Maker Faire.
Fair point, @tulip sleet . I messaged Scott and asked him so he can consider it at his convenience.
Yay. ๐ Just cloned "circuitpython" and am starting to drill down into NeoPixel code....
Good morning every body ๐
@opal elk I updated the temperture logger example . Added the error checking as in your guide and tweaked a few other things. Mostly played with the blinking as an indicator. Only logs every minute now. Take a look when you have time and let me know if you see any problems or have suggestions for additions. https://github.com/jerryneedell/m0_temperature_logger
Cool!
I ordered some 8Mb SPI flash chips. Will supersize a Feather M0 Express & write it up when they arrive (backordered).
@drowsy geyser @lofty topaz looks like you guys got your book channel! Lol.
I have a ton of make magazine Arduino and Raspberry Pi cook books I got in a couple humble bundles... They are PDF's, wonder if I'm allowed to share those or if it's considered piracy.
Quick question for anyone working with CP source: What IDE do you use? I opened it up in CLion, but it's having trouble figuring out how to locate all the libraries ๐
Thanks for the reference @lofty topaz it's a great book
Hi @formal plover Can't you share them with the "fair som'thing" ?
"Fair use ?"
@tacit glade that's a good question for @tulip sleet or @slender iron . I do everything in a text editor. I test on the board in the repl.
I don't think there is an official IDE per say.
@mmabey#0446 Vi. ๐
rocket VI
There ya go. I knew someone had an answer. Thanks @drowsy geyser
Wait, Vi, that has to be a joke. Lol
Nope. Not as a build environment of course (I haven't gotten that far).
VI
LOL!!! This is true!
VI as virtual intelligence
@formal plover I can't tell you how many times I've been in word (or the Arduino IDE) and instinctively hit :wq
@formal plover Oh actually I was talking about the C source code of CP itself, not the Python scripts that run on the board
@tacit glade I figured that out after I posted lol. That's why I pinged Scott and Dan. I'm like oh man, this is going to go over my head
Atom is very popular with the Ada-crew.
I will probably create my build toolchain in Visual Studio 2017.
Also, EMACS us really, really useful when writing Verilog and VHDL - instantiating blocks is automatic. Saves a lot of time.
Integrates directly with compilers of all sorts, too
butterflies
@opal elk Is the guide you wrote up for the Temperature logging going to become a learning guide or something like that? Would you mind if I copied much of it into the README file of my example? Do you have a github usename that yo uwould like me to use to credit your work on it or is there some other address you would prefer?
Iโm Sigafoos on github. I did write a learn guide which is still awaiting moderation. I donโt mind!
@opal elk thanks!
Neither Scott nor I use an IDE. I use emacs and Scott uses Atom or Sublime, I think. I was going to use ctags but Scott told me about silversearch (command name is โag โ), an enhanced grep.
I have used emacs for 40 years. I used vi when I was a grad student at Berkeley. I use an IDE for Java.
@tulip sleet you truly are the real deal. Very impressive background; I have the up most respect for you. Thank you for the work you do and how involved you are with the community on Discord.
as Arduino get CLI so next step is Circuit Python CLI
@opal elk and your project could be sigfox
@opal elk just found a minor correction for the temperature/files sytem guide. the example should work on all M0 boards using D0 and D13(LED) but on the CPX, the SLIDE_SWITCH can be used instead but it named SLIDE_SWITCH or D7 (not D0). Also D0 is not on the CPX silkscreen - it isl labelled A6/RX (just to keep people on teir toes).
@drowsy geyser me doing VIsual Studio 2017 and VS Code
@tulip sleet I have playing with putting up a Ubuntu desktop adding a developement environment. I was able to build circuitplay ground, for board=metro_m0_express. But when i copy it to the actual board, it only partly works. Is the master broken right now, or is it my environment?
@tulip sleet thanks for the info. I was mostly looking for something to help me figure out where variables are defined so I can get a better lay of the land more quickly. Inspection is always a plus too
@fading solstice we just merged a dev branch into master that is in the early stages of using the asf4 library. Use the 2.x branch instead.
That could explain my issues. I will pull from 2.x
@tacit glade you might try netbeans, which deals well (in my experience) with arbitrary makefiles.
@fading solstice right. Just git checkout 2.x
ok
Yes, @tulip sleet after checkout i rebuilt metro_m0_express and copied it over and it works.!
๐
@tulip sleet @slender iron I found an error in the "main.py" example that is in the distribution for the trinket_m0 but I can't find it on github to open an issue or a pull request. Do you know where it is or who I should send the fix to . Thsi is an old bug the function wheel uses " [ ]" for the returns and that does not work with setting neopixels. It ahs to be "( ) " . oddly, it seems to work for the dotstars so it may be a funky python thing, but using "( )" works for both. Anyway let me know who to follow up with.
@idle owl that is wierd - the square brackets do work for the dotstar but not for the neopixel - it must be a subtle pythonism - I guess that s a project for tomorrow.
@solar whale Especially weird because the Dotstar drivers and such were essentially copied from NeoPixel.
@idle owl nice try today. I wonder is there is an issue with thsoe neopixels ...
@solar whale Thanks... I'm wondering the same. I couldn't replicate it at all. Even with my own weird code.
@solar whale I did find out the issue that @drowsy geyser and I were having with the neopixels is specific to the ring, not generalised to all NeoPixels.
@lament tree you might want to make a post to the forum to see if anyone at adafruit support knows more about the neopixels you are using.
@idle owl I guess thats good news....
@solar whale It's news anyway, lol...
well -a at least I got my jewel running on my trinket today - that s been on my todo list!
Excellent!
stupid move of the day....sat forever wondering why my string parsing wasn't working. I must have gone through the docs a million times. The python was right! turns out that problem was that I was supposed to be using javascript. ๐ฑ
javascript interpreters don't handle python well at all in case you were wondering
@floral dagger Public Service Announcement!
PSA it's too hot in Michigan today.
I'm having trouble using the feather motor wing with an ESP8266.
Following the tutorial here https://learn.adafruit.com/micropython-hardware-pca9685-dc-motor-and-stepper-driver/circuitpython
Using bitbang instead of busio
import board
import bitbangio as io
i2c = io.I2C(board.SCL, board.SDA)
from adafruit_pca9685 import motor
motors = motor.DCMotors(i2c)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'DCMotors'
Any suggestions?
The board is a freshly firmwared feather, running 2.0.0
import motor?
Is there L293 on the board ?
@floral dagger that would be this line "from adafruit_pca9685 import motor"
oh, duh...yeah I see it now.
@delicate pike It's using the motor feather wing from adafruit, the one from the tutorial.
@silver tapir I haven't worked with the ESP8266 boards. @solar whale and @formal plover are more experienced with it, but I'm not when they're available.
@silver tapir I had the same problem the yesterday
@idle owl I have an m0 here somewhere, let me test it with it.
@silver tapir I had to have the library directly in the lib directory, couldn't be within a folder
I'll be interested in seeing the answer. I have a PCA9685, and Huzzah breakout that I was just getting out to run the same thing
yeah...looks like I'll have to roll up my sleeves. I don't have that library
That's an odd place for that. PCA9685 is a pwm driver
Or maybe a variable dรฉclaration problem ?
@formal plover If I do an ampy ls, I have "adafruit_pca9685" on the / folder of the ESP8266.
@formal plover What "lib" directory?
@silver tapir you need to create a directory called lib
For your libraries
Maybe that's just for organizations sake, but that's how I do it
@silver tapir
Adafruit_Circuit_PCA9658 is the folder then just pca9685 is driver/library.
I had a similar problem with the I2c libraries yesterday.
@formal plover that was something I was just looking at too
@formal plover So If I ampy ls on my board I should have "/lib/" and "/lib/adafruit_pca9685" and inside it the files?
It needs to be /lib/actual library not folder
When I had /lib/folder/library
it would never work
@formal plover can you post a link to that/
Link to where I found the libraries for the stepper motor driver? @floral dagger
These files are. Also 8 months old, so I'm not sure how well they work.
Yeah....the directory I was finding didn't have the motors fle in it
ahhh...I was in the wrong spot lol
>>> from adafruit_pca9685 import motor
>>> dir(motor)
@silver tapir what does the above show?
@tidal kiln ['name']
seems like the module didn't get installed on the board completely
that class is definitely there:
https://github.com/adafruit/Adafruit_CircuitPython_PCA9685/blob/master/adafruit_pca9685/motor.py#L7
While trying it in the /lib/ folder as @formal plover suggested, I get
ValueError: Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info.
Let me try with the bundle.
oops. sorry...gotta run now unfortunately. good luck.
Thanks for the help
Yeah from the bundle is probably newer
I just posted it again for no reason.
@silver tapir I'm not even getting as far as you, but I am using the older Huzzah, so I don't know if that has anything to do with it
Yey, now it works.
@silver tapir awesome!
Should I post a bug to have someone re-do the mpy files in the individual release for the module?
@silver tapir Nice!
@silver tapir probably wouldn't hurt
Wil do then.
@silver tapir That's awesome! What did you have to do?
@floral dagger I erased the flash, uploaded 2.0.0 again and now I tried using the bundle. It has a lib/ with all of the modules.
@silver tapir good deal. Well I'm glad you're up and running now.
oooooh....ok. good call. I'll have to do that too then. Thanks!
I should have noticed that wasn't from the bundle, sorry.
too funny. I would have been beating my head on the same wall in about 10 minutes @silver tapir great timing
Teamwork makes dreamwork
@formal plover And this place makes teamwork
Thanks to all, that was very helpful.
@idle owl it sure does!
Yeah, everybody feeling the love in discord.
We're like Oprah, except we're not giving away cars, just discord love.
Oh and just in case someone wants to play, this is an esp8266 circuitpython car, with a web server and a self-hosted webrepl.
https://github.com/fede2cr/CircuitPython_WifiCar
lmao...get out of my head
๐
doing almost the same thing. I'm using webrepl through websockets on a locally hosted page though
This one has a minimined compress webrepl so it fits nicely.
Is for kits to learn robotics, so it has to be simple and portable.
that's great @silver tapir I'm gonna have a look at that. I'll shoot you a link for what I am doing once I get it further along if you're interested.
amazingly similar projects
Now I'll add an accelerometer/gyro so I can turn by using degrees instead of time.
I have a small compass module I was going to use
And my goal is to have one of the cars act as an AP, the rest as clients, and have the AP broadcast it's orientation.
oh wow. I was building this as a client that a raspberry pi could access and control
ap...sorry
that amazes me. two random people from different parts of the country/world, both working on almost the same project at the same time.
Like with a joy bonnet? ๐ โค
Pocket-sized fun is the name of this game, with the Joy Bonnetย โย our most fun Bonnet ever (no we didn't even think that was possible, either!). This Bonnet fits perfectly ...
that's in the works, yes. But will be adding a camera and OpenCV to the Pi, so it can do other stuff as well.
yeah I just got one with Adabox
Ohhh, double cool.
That's too cool,man. Keep us posted on how yours goes
Will do.
@formal plover You're using the feather huzzah aren't you? Are you powering it straight from USB?
@floral dagger yup sure am. That's just because I've been testing things. Haven't created permanent a project for it.
I have a several LiPos though, if you need me to check something
Thanks. Was just going to try mine with it, but getting the same issues as before. I guess my usb is underpowered. Meh
Was just curious if that was common or just my usb
@floral dagger hmm. Is it from a hub or directly from the PC?
Ooohhhh..i have a powered bun. I'll try that. Good thinking.
Hub...not bun. I hate autocorrect
@floral dagger Haha I was just about to Google power bun. Lolololol
I'm back lol
@solar whale email me about the trinket distribution stuff if its still outstanding
@slender iron The wheel section at the top, with the new distribution, evidently has square brackets in it which causes it to fail to work with an external set of NeoPixels. I say evidently because mine was already all () and no square brackets and worked out of the box. @solar whale said it was the new version of main.py that ships with it that contains the square brackets in the wheel helper.
@slender iron You said email. I thought you said tell. Oops.
I'll show myself out, lol.
yeah, my brain can't handle it. just email me so I can look later
Totally fair. I thought it was an odd request given what you're up to
@idle owl thank you for all of your help here. I just read through everything and love to see you all helping folks while I'm gone.
makes me feel warm and fuzzy about discord
@slender iron Of course! You're welcome! I'm really glad you feel that way. Now I have my own warm and fuzzy ๐
๐ yup I do. It was awesome to meet a few folks today too. Hope to catch up with more folks tomorrow
I honestly did show massimo discord when I was talking with him
but so much of making it work is time and not the tools
Understandably. That's where having a community that wants to be a part of helping it grow has to make it so much less work.
@slender iron awe shucks, now I got the warm and fuzzies
you should @formal plover ๐ You are a huge help too
@slender iron thanks! ๐
This is why you test your code.... The API I wrote broke my project code, lol.
all in a day's work @idle owl
@slender iron lol, yes evidently. I don't even think the project can function the same way anymore. I'll try to get around it for a little while, and then most likely accept that it will just function slightly differently and go with it.
is it the tone playback thats different?
Yeah. I was doing it so that it would play whatever one you were holding down most recently for the entire duration of the touch. I can't import speaker_enable anymore and still do adafruit_circuitplayground.express because the pin reads as in use.
Now it would mean that it will play the tone for a set duration and then sleep.
Yeah. I'm trying to figure out if I can adapt the previous code to use circuit.play_tone. That's what I'll do for a while and eventually accept that it won't work. ๐
we could tweak it to be start_tone stop_tone
This is what I had if not sample.playing or ( (sample.playing and not sample.frequency == 8000)): sample.frequency = 8000 sample.play(loop=True)
So it checks to see that you're playing literally anything else or nothing, and then plays the tone for the duration of the touch event.
I'll see what I can do with the API.
I'm not used to thinking like that yet.
yup yup, you are onto it! keep up the good work
@slender iron I'm emailing you about two things. Neopixel rings and I think we broke the Circuit Playground Express API ReadTheDocs page. I'm mentioning here in case you wanted to deal with either of them now. (I am assuming no, hence the email.)
@idle owl email is perfect. thank you so much
@slender iron Absolutely!
๐
@slender iron Are we doing the Weekly on Monday?
I hope to do it from HQ
Fancy!
I should see @tulip sleet tomorrow night so we'll sort it out then for sure
Excellent. Thank you!
np ๐
I've noticed an odd but somewhat nasty issue that appears to be reproducible. With Circuit Playground Express (but perhaps other M0 express and maybe M0 basic boards) if my project uses a lipo battery that runs low enough to brownout and turn off, after I swap in a new battery the entire SPI flash is erased and my old program is gone. It's happened twice in a row with my arc reactor project, and I have a feeling it always happens when power goes low like this. My suspicion is in the low vo...
This is a bit of a self-inflicted wound, as the audioio module is not normally enabled on the Trinket M0, so this is obviously very low priority. But I really wanted to try it, so I compiled the 2.x branch of the firmare with touchio, analogio, storage and neopixel_write disabled, and with audioio enabled. Here's the change I made to mpconfigport.h:
diff --git a/atmel-samd/mpconfigport.h b/atmel-samd/mpconfigport.h
index e99d190be..ff480f39d 100644
--- a/atmel-samd/m...
Did you try explicitly using deinit() at the end of your code or possibly use the context manager as noted in: http://circuitpython.readthedocs.io/en/2.x/docs/design_guide.html#lifetime-and-contextmanagers. This was recommended in: http://circuitpython.readthedocs.io/en/2.x/shared-bindings/audioio/__init__.html
I just tried wrapping the code in a context manager, and that seems to be preventing the crash. I will try with the deinit now.
@meager fog @split ocean @slender iron @Kurt H @fierce oar To celebrate WorldMakerFaireNY2017, I have worked REALLY hard thru the night and have cracked the puzzle of using Python 2.7 with pip, esptool, and esp8266-20170612-v1.9.1.bin onto a NodeMCU (4MB) using a Windows 7 desktop. MircoPython! !YEAH! Oh, and BTW, no wire jumpin' or button pressin' either.
Oh, need proof? I thought you might. LOL.
C:\Users\William\Downloads>esptool --chip esp8266 --port COM5 erase_flash
esptool.py v2.1
Connecting....
Chip is ESP8266
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 5.8s
Hard resetting...
.
Tested with Putty. It worked! Yeah!
@idle owl I finally understand what was happening with the wheel function and the different response by dotstar and neopixel. If you look at teh drivers set_item, the dotstar has: if type(value) == int: r = value >> 16 g = (value >> 8) & 0xff b = value & 0xff else: r, g, b = value but he neopixel uses ``` if type(value) == tuple and len(value) == self.bpp:
if self.bpp == 3:
r, g, b = value
else:
r, g, b, w = value
elif type(value) == int:
r = value >> 16
g = (value >> 8) & 0xff
b = value & 0xff
w = 0
# If all components are the same and we have a white pixel then use it
# instead of the individual components.
if self.bpp == 4 and r == g and g == b:
w = r
r = 0
g = 0
b = 0
Way to go @solar whale!
@formal plover Thanks - this has been puzzling me for a long time - I am still a python neophyte and easily get very confused.
@solar whale You're welcome! I've been using python on and off for years, but I never sat down a learned it. So I'm in the same boat.
Nice job @hollow tartan. You got CircuitPython 2.0 installed now?
@formal plover Currently loading MicroPython 1.9. No doubt I will try CircuitPython 2.0 soon. But why would I want to be on the bleeding edge of this thing? I am a Arm Cortex M4 Keil uVision C programmer. I hear things are a little different in Python land. My project is a specialized door bell notification for the hearing impaired. It is to be dog bark activated.
good morning everyone
So, I'm working through getting my motors running with the esp8266 and PCA9685, but I keep getting this errorValueError: No I2C device at address: 60 when I enter the line motors = motor.DCMotors(i2c)
Now, here's where I get confused. The pca9685.py file accesses the i2c device properly at 0x40 (the default address of the breakout). motor.py, on the other hand, is trying to create the motor at address 0x60. Anyone familiar with this?
I'm assuming this was writen for the featherwing. Is there a difference there that would account for this? Am I looking at it wrong?
@brad that deos seem odd, but I think you can jsut specify motors = motor.DCMotors(i2c,address=0x40)
ok....yep, that works great thanks @solar whale . I wonder why it does that.
the default is set to 0x60 in the motor _init - not sure why..
class DCMotors:
def __init__(self, i2c, address=0x60, freq=1600):
self.pca9685 = pca9685.PCA9685(i2c, address)
self.pca9685.freq(freq)
yeah, but in PCA9685.py that it imports, you have:
self.i2c_device = i2c_device.I2CDevice(i2c, address)
self.reset()```
I was initially getting an error on that one without the breakout connected. Then got it on the other one once I sorted that
right - I agree it is confusing and I don't know whhy the defaults are as they are. Good that they can be overridden!
yeah, it's odd. Thanks again for the help @solar whale .
@brad - no problem - glad to be of help.
adding to the confusion but a useful list - https://learn.adafruit.com/i2c-addresses/overview#the-list i
odd having trouble tagging you "@brad" does not seem to work??
weird
@solar whale I've noticed if you edit you can't tag unless you do it by clicking their chat bubble
@formal plover - taht works for you , but not brad ๐ฆ - no not on mobile - usign the app on Mac OS
There's a CircuitPython I2C guide as well @solar whale @floral dagger
This is a test, I'm going to go back and edit this @jerryn
Yup, doesn't work
If I click on brad icon I do nt get a "message" option like It do for @formal plover or @tidal kiln als if I type @brad I don't get the list of possible matches that I do for the otthers. Funny, it used to work fine for brad as well.
brad has been blacklisted ๐
lol seems that way. Let me check if I have mistakenly done something foolish with my settings
you do not show up in the sidebar list of online individuals either
odd
There is an "invisible" option in the settings - is that set?
@floral dagger
No. I just tried toggling it to check
It's just @solar whale lol
@formal plover I guess I'll just have to relay all meassges to brad through you !
hmmm...I just checked. I haven't accidentally blocked you or anything
Hahaha touche
@brad#6749
@floral dagger ha - works on my linux box!
@solar whale is super @floral dagger linker
After we figure this fiasco out, I have a challenge for you two ( @floral dagger @solar whale)
oh my
@floral dagger - boo - just restarted discord on the Mac and brad is back !!!
go ahead @formal plover
discord glitch
Do either of you have a SHT31-D?
I don't
Well then @floral dagger you can be a spectator and @solar whale might be able to help
@idle owl has one too and wanted to get it to work with CircuitPython. Tony D mentioned it might be too hard for us noobs to figure it out
@solar whale matrix glitch in the matrix system
pshhhhhhh....."too hard?". Do you think he was secretly using reverse psychology to get you to do it just because someone said you can't?
That's the guide, I got pretty far with the SHT31-D, just couldn't figure out what hex to write to. I looked at the data sheet and couldn't figure it out. I know 44 is the default
@floral dagger lol yeah. That is true
who woudn't love to test matrix with they circuitpython boards
@formal plover Not sure what your questions is - Does 0x44 not works?
ADR - This is the I2C address selection pin. This pin has a 10K pull down resistor to make the default I2C address 0x44. You can tie this pin to Vin to make the address 0x45
if you do i2c.scan() does it show up at 0x44?
@floral dagger where did you submit issue?
Not sure if this is an issue, or just an oddity. the default address of the pca9685 breakout is 0x40. This is reflected in pca9685.py. The learning system documents also show that is the default fo...
hey.....that's me lol
cool. yeah. does seem odd. not really anything motor/pwm related at 0x60 default
https://learn.adafruit.com/i2c-addresses/the-list#0x60
@formal plover ```Adafruit CircuitPython 2.0.0-2-g75c3be3 on 2017-09-23; Adafruit Metro M0 Express with samd21g18
import busio
import board
i2c = busio.I2C(board.SCL,board.SDA)
while not i2c.try_lock():
... pass
...
...
...
i2c.scan()
[68, 90]
@solar whale yeah, I just can't figure out how to read the data. The only i2C lesson has you use the default hex and then write to another
@formal plover sorry - I'm not following you very well - can you post an example of what you are trying to do.
@formal plover does this help from the i2c_device.py source?
"""
Read into ``buf`` from the device. The number of bytes read will be the
length of ``buf``.
If ``start`` or ``end`` is provided, then the buffer will be sliced
as if ``buf[start:end]``. This will not cause an allocation like
``buf[start:end]`` will so it saves memory.
:param bytearray buffer: buffer to write into
:param int start: Index to start writing at
:param int end: Index to write up to but not include
"""
self.i2c.readfrom_into(self.device_address, buf, **kwargs)```
there's also an example script in that file that shows reading an i2c device
from board import *
from adafruit_bus_device.i2c_device import I2CDevice
with busio.I2C(SCL, SDA) as i2c:
device = I2CDevice(i2c, 0x70)
bytes_read = bytearray(4)
with device:
device.read_into(bytes_read)
# A second transaction
with device:
device.write(bytes_read)```
@formal plover as @timber lion warned, the SHT31 does not use the "standard" register model so it may not respond well to the examples.
@formal plover I have only used it on my Raspberry Pi - works great there!
This example uses the MCP9808 sensor
I'm just trying to mimic it somewhat to figure things out
@formal plover the Arduino IDE library https://github.com/adafruit/Adafruit_SHT31/blob/master/Adafruit_SHT31.cpp may help especiall if you compare it to the MCP9808 https://github.com/adafruit/Adafruit_MCP9808_Library/blob/master/Adafruit_MCP9808.cpp
@formal plover I think that was what he was warning you about, the MCP9808 is much more straitforward to use.
@solar whale Haha yeah. I just wanted to figure it out anyways. Lol because I don't listen
I've used the SHT31-D with Arduino and Raspberry Pi.
@formal plover its a great project, but the existing examples may not be applicable.
@solar whale very true
I'm just scannin ghte 2 arduino codes to see ehat it different.
Yeah, I've tried looking at examples for other platforms for hints.
@formal plover I'll be happy to put some time into it next week. I will be "off the grid" most of this week - doing some hiking. If you have not gotten it working by next weekend, I'll be happy to help.
@formal plover is there anyhting you want me to try now taht I have one plugged in?
@solar whale oh that sounds lovely. Nah. I've got my API stuff and Adafruit IO all figured out, so I was just trying to get that to work so I could post temp and humidity to Adafruit IO.
Really appreciate all your help @solar whale!
@formal plover Happy to try - which I could be of more help.
You're a huge help in general @solar whale. ๐ 
Nice work @hollow tartan sounds like a great project too!
@solar whale That's a great catch! Well done!
@solar whale Did you see Scott wanted you to email him about the issue?
@idle owl Yes, thanks - I sent him the details and I also put in a pull request to implement a possible fix so the neopixel driver will work for both cases.
@formal plover The SHT31-D issue Tony pointed out is exactly what @solar whale said. And is the reason why he suggested starting with literally anything else. Tony said he had to do some tricks to get it to work in the beginning.
@solar whale Excellent!
@idle owl Haha I know I know
@solar whale I think the change happened with the latest update to NeoPixel - the description mentions adding tuples for backwards compatibility, if I remember correctly.
@idle owl It looks like the recent changes wer not the problem, but the restrictive code wade introduced on July 28 during a big update by @slender iron . As I noted in teh issue report, I 'm not sure what the intent was. It may be that type list is a bad idea and should be exculde. If so, the exampes shpuld be changed and perhaps the dotstar driver updated. If type list is OK then I think my fix works.
@solar whale Ah. I see. I was guessing based on simple information. You've already researched far more obviously.
@idle owl there is a cool feature in github called "blame" ๐ if you are looking at a source file, you can click on it and it tells you who made the last change to evey line in the code!
@tight flax I like "praise" better, but there is no "praise" button on the github page
@solar whale roger that, I must be thinking of subversion
I think you can use it on a command line interface though, but it's been a while since i used that
๐ฆ ``` [Jerry-desktop-mini:0.7.0/tools/nrfutil-0.5.2] jerryneedell% git praise
git: 'praise' is not a git command. See 'git --help'.
[Jerry-desktop-mini:0.7.0/tools/nrfutil-0.5.2] jerryneedell% git blame
usage: git blame [<options>] [<rev-opts>] [<rev>] [--] <file>
I guess git is more judgemental ๐
Well darn, maybe next rev
Wooohooooo!!!! I officially have motor control over wifi using circuit python.
@floral dagger That's fantastic!
Thanks @formal plover I'm just coding in some test code for my gui client, and am about to put together a small two motor prototype. wish me luck!
@floral dagger good luck!
@floral dagger Great job!
For CPX: I have X, Y and Z axis information, and I've used it to change RGB for XYZ respectively to make a whole rainbow of colors depending on the angle!
That's awesome @idle owl sounds like you could do a lot of fun stuff with that.
Thanks, @floral dagger ! I think it's essentially like John Park's MakeCode Light Paintbrush in CircuitPython. But the real reason I'm doing it is to write the API for the accelerometer for the Circuit Playground Express.
Hey all and <@&356864093652516868> , we're gonna try and do the CircuitPython weekly tomorrow (Monday) at 2pm EST from Adafruit HQ. Audio might be a bit funky but we're gonna try it all the same. I'll also attempt to record it since @solar whale is getting off the grid and going hiking.
Thanks @slender iron !
np @idle owl. I'm excited to hear about your CircuitPlayground Express progress!
@slender iron May I join and listen in ?
of course @drowsy geyser !
@formal plover I posted a video of my project over in #show-and-tell
@floral dagger sweet, I'll take a look!
Got quite a long ways with it considering I was starting from scratch with circuit python, and I stiiiiiink with css
It's looking great @floral dagger, I can't believe you made your own UI.
@slender iron Not sure if I'll be able to hop on either. โน I'll listen to the recording for updates though. Someone should invite @floral dagger to talk about his project if he's available. He made a UI to communicate to the webrepl.. Very impressive.
My only update is that I was able to work with Adafruit io using API calls via urequests instead of using MQTT. I had some help from @keen parcel and @opal elk. Now I'm just trying to decide what to do next. I might order a Metro M0 Express, Trinket M0, and a Gemma M0; just so I will have ALL THE THINGS
haha
Oh and a CPX so I can be cool with @idle owl
Thanks @formal plover I was going to go the route of hosting a page on the ESP8266 to accept and execute the commands, but got to thinking "Circuit Python has a built in interface for that. Why reinvent the wheel?". Some of it is a little bit of fakery (e.g. sending login password automatically instead of actually recognizing the prompt), and it's a bit hackey at this point, but it works. Hopefully I can get the code cleaned up some in the next few days and get it posted to github.
Thanks for the mention for the talk today. I will be on and off calls most of the day, so don't know that I would be able to participate.
QQ: can someone point me to the code that implements the new lock functionality? I would like to work on getting the CCS811 environmental sensor working with latest. It throws a "RunTimeError: function requires lock". Traceback (most recent call last):
File "code.py", line 33, in <module>
File "/lib/Adafruit_CCS811/Adafruit_CCS811.py", line 116, in init
File "libraries/helpers/bus_device/adafruit_bus_device/i2c_device.py", line 94, in write
RuntimeError: Function requires lock.
I have an issue open that Lady Ada asked Scott to take, but, well, everyone is pretty busy right now so I figured I should take a shot at it. ๐
do you have a line like this?
i2c = io.I2C(board.SCL, board.SDA)
myI2C = busio.I2C(SCL, SDA)
ccs = Adafruit_CCS811.Adafruit_CCS811(myI2C)
inside the drive it probably puts it in a bus device
Taken directly from the Adafruit_CCS811.py header
Ahhh, ok. I'll tinker with the I2C setup and see if I can get it to work.
it's either in the bitbangio or busio
I think I fixed it in master
yeah, so it would be busio for you