#circuitpython-dev
1 messages ยท Page 181 of 1
I need to make a small feather to atmel 328P adapter to test a few existing modules with cp
I just need to make sre to remove 5v pullups
Hi everyone, how do i control/address individual daisy chained pixels in cp code, i want to make each pixel do a different color, tia
You are probably familiar with this already but on the subject of small cheap robots powered by micro:bits, I only recently discovered Kitronik - they have some affordable kits in this space: e.g. https://www.kitronik.co.uk/5624-move-mini-buggy-kit-excl-microbit.html and an interesting range of accessories, e.g. https://www.kitronik.co.uk/5624-tt-tipper-trailer-add-on-for-the-move-mini.html
Poated in general but since I got so much help in the area I thought it re post here. my write-up of my Makey hello world demo http://danjohmitchell.blogspot.com/2018/07/hello-world-with-adafruits-crickit.html
nice!
Does anyone have any examples of https://www.adafruit.com/product/2656 being used in Circuit Python?
Thisย eTape Liquid Level Sensor is a solid-state sensor with a resistive output that varies with the level of the fluid. It does away with clunky mechanical floats, and easily interfaces ...
th eplastic casing version has a single voltage out
just use the 'essentials' analog readings examples!
super easy ๐
Thanks ill take a look. Im trying to get my fishtank to refill itself
shoudl work easily
One thing that wasnt super clear was do I need a resistor wired into this contraption? In the example video the sensor was wired directly into the Arduino
But the Non-Shielded one seemed to come with a 550ohm resistor
i just plugged my Feather M0 Express in for the first time in a week and its not recognised by my computer and its flashing different colours on the neopixel
what do
ok looking at this:
https://learn.adafruit.com/adafruit-feather-m0-express-designed-for-circuit-python-circuitpython/troubleshooting#circuitpython-rgb-status-light
i dont 100% understand...
i get a GREEN, then ORANGE, then four BLUE
it used to do this before and it would work once i unplugged it and plugged it back in again, but now that doesnt fix it ๐ข
i re-flashed the .uf2 after double-clicking the reset button and its working now
was a little scary for a second there
ok im lost
im trying eval() and i cannot figure it out:
File "<string>", line 1
SyntaxError: invalid syntax
how do eval()
everything i try is SyntaxError ๐ญ
@scarlet fjord Are you literally typing eval()? You give it a string to eval, like eval("print(2)")
im giving it stuff to do, and i can get it to print, but i cant get it to do anything else
if i try:
f = open("/codes.txt", "r")
for line in f:
code = eval(line)
print(code)
it gives that error
but if i try just
print(code)
without code = eval(line), it works fine
ok i dumbed it all down to this:
from time import sleep
while True:
f = open("file.txt", "r")
for line in f:
code = eval(line)
print(code)
sleep(0.5)
and file.txt contains:
print("frick")
print("this")
and that works, but...
if i change file.txt to:
from adafruit_hid.keycode import Keycode
keys = [
Keycode.W,
Keycode.A,
Keycode.S,
Keycode.D
]
then it errors out
idk what im doing, but how tf do i do the thing ๐ข
ok idk what the tutorial i was following was trying to do, but this worked:
from time import sleep
from adafruit_hid.keycode import Keycode
from adafruit_hid.keyboard import Keyboard
kbd = Keyboard()
while True:
f = open("mainjoy1.txt", "r")
for line in f:
kbd.press(eval(line))
kbd.release(eval(line))
sleep(0.3)
mainjoy1.txt:
Keycode.T
Keycode.F
Keycode.G
Keycode.H
gives output: tfgh etc
so...
๐คท ๐
eval is tricky, good work ๐
aw yiss:
from time import sleep
from adafruit_hid.keycode import Keycode
from adafruit_hid.keyboard import Keyboard
kbd = Keyboard()
keys = []
macros = ["mainjoy.txt", "mainjoy1.txt"]
macro = macros[1] # changing this to 0 or 1 will change the key outputs!
f = open(macro, "r")
for line in f:
keys.append(line)
while True:
print(keys)
sleep(0.3)
mainjoy.txt:
Keycode.W
Keycode.A
Keycode.S
Keycode.D
mainjoy1.txt:
Keycode.T
Keycode.F
Keycode.G
Keycode.H
๐ ๐ ๐ ๐
Downloaded into current master and tested on feather32832 - fixes #963 Thank you!
I also verified on the feather52832 but it's good to be double sure :)
so... I'm not sure if I'm doing anything too weirdly, but I've gotten to the point where I can watch the feather m0 run through my pin array and check each button for a press. like, if I press a key, I can see the key take a second to register, then when I release it I can see the key remain pressed until the for loop gets back to the current key index to check it if 8ts been pressed...
8s there any way around this?
I saw in passing mention something about 'interupt's and that sounds like something that would work better... is there anywhere I can read up on that?
unless... the lag I'm experiencing is related to the eval() stuff that I'm doing, but I only do that at the start, not during while True...
shout out to! @katti I appreciate how your question are increasing the usability of circuit python. In many developer communities simple question are met with gruff "RTFM". In the CircuitPython community there appears to be a genuine desire modify the software to reduce barriers to entry to new users.
@idle owl working on a simple guide for CPy nightlights: https://learn.adafruit.com/circuitpython-powered-nightlight/overview?preview_token=0nLwC_BRK1vVSiZircKaAA Will add code links in the guide as soon as there's something to point to in the Learn repo. PR for your approval. Tnx. Not in a hurry.
@tulip sleet I'll take a look in when I'm at my computer - probably about an hour and a half.
Tnx!
@tulip sleet You missed a word in there, I requested changes. One is a missing word, the other two are simply suggestions. If you get it sorted in the next 20 minutes, I can merge it. Otherwise feel free to merge over my change request once you get it sorted.
@idle owl good points all. fixed up and passed travis
woot! thank you! now I can paste some links into the guide
@bronze geyser of interest re external interrupts and sleep: https://github.com/micropython/micropython/issues/3930
Hi, Can smart breadboard ready RGB neopixels in-line on one pin be addressed individually? Using circuitpyhton on express m4
@tulip sleet THANK YOU. Very kind of you.
As I've already got a LoPy4, do you figure the differences between MicroPython and CircuitPython are likely to be meaningful enough that I don't try to learn the former if I figure I'll end up with the latter?
On one hand, CircuitPython is a fork of MicroPython, so it originated in the same place.
On the other, CP has had significant divergence.
I don't think learning MicroPython would necessarily get in the way of CircuitPython, but there are things that are done differently in each, so transitioning from one to the other could be annoying.
I can't give you any examples because I've only ever used CP and never MP
at the moment on my feather m0 im just running a for loop checking all of the pins for a button press - is there a faster way of checking for a button press?
is circuitpython any slower than running an arduino sketch for this?
@scarlet fjord I haven't gotten a chance to do this in CPy yet but you could use interrupts to run a method when one of the buttons are pressed, rather than repeated checking http://adafruit-micropython.readthedocs.io/en/latest/docs/reference/isr_rules.html
oof that might just be examples for timers though, there might be stuff out there with some more digging
An Arduino sketch will generally perform better than CircuitPython code. If you're trying to do something in a hurry (like check a bunch of pins), you might want to do it that way.
I'm looking for a way to schedule when an M0 Feather powers up or down. Any ideas?
Is there a breakout board I can add to my project?
TPL5110?
connect it to the EN pin
@meager fog - Than k you.
Hi Adafruit,
Great job on your documentation. Very thorough. And the quality is really high! You've clearly got some great standards. However like any documentation it gets stale and the cost of maintenance just keeps getting bigger. So what do you do about stale documentation that's too expensive to keep up to date? Reference the source tree!
Two examples then a suggestion.
Example 1: I went through 4 different wiki pages on your site and others trying to find the appropriate magic ...
Hi everyone, trying again to get an answer to my earlier question: Hi, Can smart breadboard ready RGB neopixels in-line on one pin be addressed individually? Using circuitpyhton on express m4. Thank you in advance!
Ive read the uberguide and couldnt find any answers..
hiya "from machine import Pin; Pin(14, Pin.IN, Pin.PULL_UP)" is micropython syntax, can you let us know wher eyou found this kind of text in our documenation/wiki because we don't support micropython
thx!
@mental marsh yes, use the neopixel library
@meager fog to address each one and control it separately? Thanks for getting back to me
How are they addressed .01 etc?
yeah
like this
you're making your own strip
just copy that image
Yes thank you! You are the best @meager fog

Oh my, getting near big 1000!
I've been thinking along similar lines, after spinning my wheels for a while trying to figure out how to change the memory map (I wanted to use part of the FRAM in an MSP430FR as additional non-volatile RAM instead of ROM). There are little pieces of code scattered all over that implements this, and finding them from a standing start is time-consuming. I wonder what is the best place to put information like this. I'm guessing just continue git style, and add some MarkDown pages to the sour...
It's 1000 issues + PR's: they share the same numbering space. Still a great milestone!
I'm trying to implement pytest.approx for use with CircuitPython.
This is the example from the documentation:
>>> from pytest import approx
>>> 0.1 + 0.2 == approx(0.3)
True
However it doesn't work, __eq__ is not called when approx() is on the right side. It works for integers.
Test class:
class Approx:
...
This is a limitation of MicroPython and therefore of CircuitPython. MicroPython does not normally try to reverse the operands if the left operand does not successfully perform the comparison operator. In CPython, the first attempt returns NotImplemented, a special value, and then the interpreter swaps the operands and tries the appropriate reverse operator (which for __eq__ is the same).
This limitation does not seem to be documented in http://docs.micropython.org/en/latest/pyboard/gen...
Can you get away with having the Approx() only on the left-hand side?
if anyone here is using esp8266
plz try out this PR! it looks pretty nice https://github.com/adafruit/ampy/pull/51
I think I'd rather skip implementing pytest.approx since it wouldn't work as advertised. I'm making a pytest plugin for general use and someone is bound to put it on the right side with the possibility of it being an undetected false positive.
Maybe I could make an assert function that takes the operands as arguments.
Thank @dhalbert for a detailed answer.
@meager fog tried the ampy PR, but it did not work on my linux system -- added details to PR. I just pullled th PR then installed sudo python setup.py install -- did I miss something? Reverted back to ampy master and it works normally. Just curious if anyone else has tried it?
Thanks @tannewt, that was a helpful example.
It helped me realise/decide that I have to upload the test modules/files to the board, instead of uploading and running the individual test functions over the repl.
(and I learned that there's a tool called ampy)
I have tried to avoid uploading files, because in my experience scripted upload over usb hasn't been that stable. Stability improved when I turned off automounting, but I believe it will be a hassle to support this reliably on linux/m...
Hey everyone, im trying to change the color of neopixel #3 in a row, im trying to use the neopixel.NeoPixel. Function to select and activate the third pixel but it doesnt work.. anyone can write the correct syntax here? Thanks.
@mental marsh should be neopixel[2] = (color). if you have auto_write turned off, you'll need a subsequent neopixel.show().
I've got a strange little problem. This resets my esp8266 feather: a_pin = DigitalInOut(board.GPIO16) If that line is in uploaded code then the feather will reset loop and if put into REPL it resets once.
I see on the pinout that GPIO16 is also a 'wake' pin but I don't understand what that meens.
Oh, also doesn't matter if it is connected to anything or not.
@stark wolf what version of the firmware are you using? GPIO16 was recently "fixed". (quotes, because I may have not written error-free code. ๐ )
@raven canopy It's running 2.3.1 currently.
it may not have made it into 2.x. let me check...
I saw that there was a 3.x beta about but wasn't sure if I wanted to jump into it. I'm really not the most experianced programmer.
@stark wolf yeah, i didn't put it into 2.x. i probably should have. 3.x is pretty stable, and not much has been done with ESP8266 other than bug fixes, and unused MicroPython cleanup.
@slender iron or @tulip sleet, if you'd like me to get ESP8266 GPIO16 fix into 2.x, just say the word.
Unfortunately, I'm kind of stuck using gpio16 as I'm trying to get a kit I bought at Penguiconn to run cp and it's oled display dc pin is wired to gpio16.
If 3.x for ESP8266 is stable then I'll give it a try. Where does it live?
give 3.x a try. i know it's a bit of a pain to update on esp. native usb spoils me on the SAMD boards. ๐
I actually don't have any SAMD boards. Just a few ESP8266. Been looking at the new M4 boards but have no clue what I would use them for.
@stark wolf @raven canopy 3.0.0 final should be immiment. We'll have rc.2 and that should turn into 3.0.0 final - we don't know of outstanding issues. So please try 3.0.0-rc.1 -- no reason for a 2.3.2.
@tulip sleet I noticed that there is a daily for huzzah that was 3 days newer. Still use rc.1 or that daily?
that will turn into rc.2 -- you can test with that, sure.
@tulip sleet @raven canopy Great. Thank you both for the help.
you're very welcome! good luck on getting that kit running!
@raven canopy Thank you very much, it worked. My next issue is triggering a sound via digital io on the soundboard fx.. any idea on which pins to connect and how to trigger sounds through circuitpython? Any help is greatly appreciated ๐
well, since the GPIO on the SoundFX boards are triggered by pulling them to ground, I would try it the hard way because I don't know any better: figure out how to use it with the UART control (no library exists yet).
i'm sure there is a way to use the GPIO on a MCU to trigger it, but i am not confident enough to give you an answer on that front. i don't like frying other people's electronics. ๐
@mental marsh just pick any old pins on the CPy board, and set them to ground (False) for at least 125 msecs. That's all.
@raven canopy thanks, my only option is to trigger from a separate mcu ๐ฆ
https://learn.adafruit.com/adafruit-audio-fx-sound-board?view=all#how-many-triggers-are-there You don't even need pull-ups; the board has them already
But i need to send from itsybitsy m4 to soundboard fx triggers 1-7
just pick 7 pins on the itsybitsy
Im watching a video by Tony D, I hope it will help
@tulip sleet ahhh...so DigitalInOut set as OUTPUT, constantly set to TRUE. Then to trigger, set it to FALSE?
i was thinking the other way (INPUT), and was worried about current sink.
Awesome guys let me try that
Thats what Tony D is talking about in the video right now.. gonna try everything ๐
you can use drivemode OPEN_DRAIN to not worry about fighting the external pullups
d7 = digitalio.DigitalInOut(board.D7)
# switch to output and start high, so you don't trigger by accident
d7.switch_to_output(value=True, drive_mode=digitalio.DriveMode.OPEN_DRAIN)
...
# trigger
d7.value = False
# trigger must be at least 125 msecs
time.sleep(0.150)
d7.value = True
@tulip sleet its aliveeee! Thank you so much. Thanks goes to @raven canopy as well. You guys are awesome!
@mental marsh cool! post up a video or blog post somewhere, we'd love to see it ๐
Is there a limit on the length of videos here?
depends on how much you want to explain
youtube vids can be pretty long. 1-3 minutes is always a good length to show something off
Ok, i will have a short demo soon.. all still on breadboard. ๐
@mental marsh sweet!!! ๐ you did all the actual work... i'm pretty stoked to see the action.
Couldnt have done it without you guys and ladyada ๐
Ok, so I've got CP3 beta on the ESP8266 and the GPIO16 bug is handled. Yay. But now I'm having problems with the OLED display. It is ssd1331 based and I tried using the CP ssd1306 OLED lib and it didn't work. Will the CP RGB display ssd1331 lib work with OLEDs?
BTW, I completely understand if people prefer if I didn't ask about non-adafruit hardware here. I feel rather awkward about it myself. I'm just trying to get CP to work on anything with a supported chip.
@meager fog @raven canopy @tulip sleet a little preview:
https://instagram.com/p/Bk_2VWTAmEW/
0 Likes, 1 Comments - Tony Stark (@nytonystark) on Instagram: โJARVIS.. testing 1-2-3.. #ironmanlab #tonystark #ironman2 #marvel #marvelcosplay #avengersโฆโ
@mental marsh That looks great! I look forward to seeing where you go with this.
Dont forget to turn audio on my video ๐ may not be on by default.
Are those all clipped from the movies?
Also how the hell are you voice activating that? somthing running on another computer that the board is talking to over usb?
Just the small Jarvis voice clips.. all are only a few seconds each so i dont believe there is an copyright issue if that's what you are thinking @stark wolf
Tony's voice is me..
For now its scripted and triggered from itsybitsy M4 to soundboard fx 16mb with the 3W speakers.
I want to add a microphone later
Oh, not at all. Was more curious if it was the movie voice actor or if you made other recordings. I figured it was you talking. Took a look at a few other pics on your instagram, great cosplay btw.
Thanks @stark wolf
It would be interesting to get some form of AI assistant running on a RPi0 to handle the voice control and pass off commands to the itsybitsy.
If I may ask, why go for the itsybitsy format instead of a feather for the M4?
Itsibitsy was in stock, feather were out when i was ready to purchase ๐
Yeah, I get that.
Im not sure but i think m4 had more pins available than the feather and i have a lot of clips to control and servos
I'm off to bed. Not getting the oled to work. If anyone was curious, I'm trying to get CP to work on this: https://github.com/allhandsactive/gamegame4000
Best of luck with the project. Looks like a great start. Have a good night, @mental marsh
Thanks and good night to you sir
@mental marsh excellent work!
@stark wolf it doesn't look like the ssd1306 will work. the two screens have different resolutions (and possibly more differences). there is an older micropython library that @stuck elbow wrote. you might be able to port it over (using the ssd1306 as a template). or you could put in a issue on the circuitpython github to request the library. here is the micropython library:
https://github.com/adafruit/micropython-adafruit-rgb-display
Thanks @raven canopy
For reference, the original commentary on the interactive testing (originally targeting very low resource ESP8266 Micropython boards) is at https://github.com/cefn/Adafruit_Micropython_Blinka/blob/master/examples/index.md
However, YMMV as the changes in this repo diverge from the Micropython-specific testing arrangements of https://github.com/cefn/Adafruit_Micropython_Blinka and the tests have never been run on RPi at all.
@notro I'm guessing you're running on much more beefy platforms ...
My main take away after skimming those tests, was that I should be able to support running tests on the blinka compatibility layer, at least make decisions that don't make it hard futher down the line.
If your word platform refer to microcontroller/board, I'm doing this on a Feather M0 Express.
My pytest plugin will upload the test files to the board, but the test runner will run on the host not the board. The runner executes the test functions and fixtures (setup/teardwon) through th...
I've used BLE and they Bluefruit Connect app on my phone running Arduino programs uploaded by the Arduino IDE but I've never done Circuit Python BLE. I wasn't sure it was even supported so I went looking around the following guide. It says that you can't do BLE on Windows. I do it all the time under Arduino IDE and C++. Is there some reason you can't do it in the Circuit Python or is this guide out of date?
https://learn.adafruit.com/bluefruit-le-python-library/overview
Actually now that I think about it, I'm not sure I have done Windows. What I really want to do is to really connect to an iOS device. It doesn't mention that capability. But anyway my plan is to emulate a Bluetooth keyboard which I would think would work on any device including Android, iOS, Windows,
@brisk cairn the Adafruit Bluefruit app is a good place to start
On it. Creating the quickstart install page first. Then I'll mirror the rest.
Ok, page created, everything else is mirrored in. It's good to go!
@slender iron probably won't be around for the meeting today, but I just want to report that pfalcon made major progress on the uzlib crash fixes this weekend, reworking my proposed changes for minimum code size impact. Once the fixes make it to his master branch I'll make a PR to update circuitpython to use the fixed version. Let me know if you want that in 3.0, otherwise I'll target master only.
@onyx hinge Thanks! master is my preference
I've got some things to do and may or may not be back in time for the meeting.
<@&356864093652516868> meeting in 45 minutes
Nooooo I'm gonna miss it. At school ๐ @slender iron
School is important
I won't be able to make it today, conflicting meeting. Hugs: Group hug. Status update: no progress last week.
I'm gonna have to skip but working on nRF as usual, want to do #994 and #995 this week.
Hugs all around, especially to hathach for working on the nRF bootloader ๐
Thanks for letting us know @fluid helm @ruby atlas and @indigo wedge.
Neat!
@idle owl mind taking notes again?https://docs.google.com/document/d/1zrsFmcjE3jSe1ZhrVedU4aAORku6k77AZ57WacY4CCU/edit?usp=sharing
(everyone can follow along)
What anonymous animal am I this time?
@indigo wedge just a heads up - the current master (with many new nrf things) is causing some problems with my STMPE610 via SPI on a feather52832 -- still woking on details and will post an issue as soon as I can get a clean example. Same code runs OK on feather_m0_express.
๐ nice
@indigo wedge may well be issues with the driver that only show up on the 52832 now that you have improved it.
Thanks @solar whale please provide details when ready and I'll try to fix, I don't have a STMPE610 board to test with.
Hi folks, Mu 1.0.0-beta.17 is out.... details here: https://madewith.mu/mu/releases/2018/07/09/beta-17.html (all feedback most welcome!)
@plucky flint are you staying for the meeting?
afraid not... I'm about to step out for regular dad-taxi duty
the meeting coincides with my son's Tae-Kwon-Do. ๐ฅ
-> ๐ด ๐
๐
take care
have a good one, @plucky flint ๐
ta!
Once school term finishes, I may be able to actually make one of the meetings! In any case... I'm afk for the rest of the evening.
Survive the political issues plz
<@&356864093652516868> 1 minute!
Alison Brie has a sursprisingly amazing Russian accent.
Sit down at exactly 2:00, seems good to me
on my way
@slender iron Is that a-mu-sing that everyone is telling you?
๐ฎ
there should be invisible keyboards
Lurking mostly today
@stuck elbow A projection keyboard, but where it doesn't actually project.
@slender iron I am just lurking. first meeting.
Lurking is great! You learn a lot.
ah @cunning crypt is here, I lose my #2 alphabetical spot
Hug Report: Not related to CircuitPython, but @hidden ibex has been helping a lot of people in Discord. And as always, a group hug because you all are awesome
Hugs to the CPy team for the thoroughness of the ReadTheDocs collection. Been using it a lot lately! Big thanks to @split ocean and @ruby lake for musical synth advice, guidance, and examples. JPโs Trellis synth project was the tipping point that started me on my current tangent. OldCrowโs brilliant Modular Playground design broke through a couple of conceptual barriers as I tried to learn about analog trigger and control voltages.
This IS my retirement job
@errant grail My next project will push that even harder. ๐
nope
@slender iron Is your trash can still standing?
Group hug plus kudos to Google for adding Android support to Chrome OS and to the creators of no-root-linux-on-android apps.
@arturo182 & @hathach for the flurry of nRF work. @mrmcwethy for diving into the pypi stuff. Group hug for any I've missed.
I have to drop, nothing to report for status.
Status update: Preparing for BronyCon in a few weeks, prepping up DigiBadges. I have 30-ish 328Ps to solder, 38 1.8" TFTs to solder, and 36 buttons to replace. And then I have to upload the programming for 50 of them. It'll give me about 75 to sell at the convention. And then I have an EL Wire project I'm working on, too, but that's a "Secret Project" with an artist friend of mine, so no leeks (yet).
i.e: "I want IO to have ____ because it'd (make my life better/project run smoother/I WANT IT)", let me know and we'll add it into io.adafruit
Current: Finished the Blues Playground Learning Guide (originally in 2.3.1, converted to 3.0.0 -- works great!). The two versions of the CPy-powered DSP musical synth (Feather M0 Express and Trinket M0) are working with MIDI and now include modular-synth CV/Gate inputs and outputs. (See/hear earlier video post.) These will act as gateways into the analog modular synthesizer world for me, one that has beckoned to me for many, many years.
Next: Enclosure and rack -ize the DSP synths and start buying some foundational modular synth gear. Another expensive hobby to add to the list. Wrap up the Lissajous galvanometer project. Also on the list is a heirloom Black Forest cuckoo clock upgrade (CPy and Feather M4 -- maybe Crickit -- operating the original whistles and gong) and a CV/Gate and MIDI-compatible Trellis + rotary encoder bank (CPy and ItsyBitsy M4).
Interrupters: yardwork, eating, sleeping, yardwork.
@errant grail Thanks ๐
Really liked that night light project!
oh no!
pro. guide maker dave!
Maybe Alistair Allan would work with them on such a book
@umbral dagger IO works v well with the huzzah ๐
@prime flower Good to hear... that's what I'll be working with.
Thanks for reminding me, @idle owl. It was a wierd week...and I forgot. ๐
FrequencyIn Module: still no real fix to M4 readings. Refactored the "fail gracefully" code to not rely on calling for the value. That approach works for a blocking loop, but would lead to lockup otherwise. New approach turns off capture in the interrupt handler, but doesn't raise the exception until the value is requested.
Little Leslie amp: no movement.
General: waited a week or so for DigiKey to get the nRF52840DK back in stock; they're now scheduled to restock at the end of the month. :sadface: Broke down and got one from Mouser, plus a Microchip MGC3030 gesture controller sensor to play with in the future. Gotta keep the stable ready for the chance that I ever finish anything. ๐
CoC In Libraries: git patch/am is a possible route. Still looking into how to further automate, but might just hand jam it locally.
while not self._conversion_complete():
pass
Looks (Sounds) like my internet quality is dropping out, can't understand half of what's being said so I'm going to duck out.
@cunning crypt Thanks for coming by!
still ok for me
with the possibility of it being an undetected false positive.
What was I thinking, it will always fail.
Hmm, maybe I should implement it after all...
Oh <badwords>, I missed the meeting again. Need to put a calendar item in place....
@drowsy geyser still going -- join in
Can't talk (I'm in a team room) but I'll listen!
๐
๐

Sweet! Better solder up my M4 Feathers.... ๐
was that a joke? "people won't be using 2.0 anymore"
Yeah, let's not to what Python did!
Right? I mean, nobody uses Python 2.7 anymore!
Windows 3.1 works fine for me. Why would I update? ๐
exactly, if it's running don't mess with it
but the moment at which Adafruit won't ship 2.0 on any new CP boards, that is wonderful to consider
Is it too early in the week to request timer interrupt w/callback? ๐
Time to head back out to the vineyards. Later!
hardware SPI right?
@onyx hinge yes
looks like NRF spi frequency is from a set menu of 9 (?) rates from 125kbit/s to 32Mbit/s with a power on value of 250kbit/s, assuming I found the right bit of this datasheet . I think I heard 100kHz in the chat, so the lowest rate of 125kbit/s would be too fast.
ah
๐
@onyx hinge great! sounds good.
Thanks everyone! Good meeting and discussions!
๐ it up!
3โฃ
Thanks everyone!
sounded good:)
@tulip sleet I made a circuitpython vagrant file at https://github.com/three-bits/circuitpython-vagrant-atmel-samd
as the last steps in provisioning it does a test board build to verify that everything is set up correctly
@torpid goblet I will take a lookg and maybe add a vagrant page to the Building CircuitPython guide. THanks!
@slender iron Let me know when you merge Mike's PR into the newsletter. I'm going to close my current PR and start over once everyone updates instead of trying to rebase it on GitHub.
I'm off. Chat atchyalls in a while. (Yes. Its a word.)
@tulip sleet just build/loaded master on nrf52 DK boarrd -- REPL still works
While testing the SPI and I2C interfaces to the STMPE610 Touch screen copntroller, I found that once I start my program running, I cannot use control-C to break out. This occurs with pot the I2C and SPI versions of the driver.
Control-C does work under the REPL -- have not tried other sensors yet.
Revetring to 3.x -- control C works properly running the same code.
No exeption handling in the program.
import board
import digitalio
from adafruit_stmpe610 import Adafruit_STMPE6...
@raven canopy Do you or anyone else know what the difference between the uP-adafruit-rgb-display and the CP-adafruit-rgb-display libraries other then uP vs CP comparability? I'm trying to get a ssd1331 oled display to work with CP.
this PR add uf2 bootloader, also up-gradable via CDC with nrfutil and OTA. It also add the MSC with internal flash + CDC as serial for circuitpython. To go into uf2 mode, press button0 (on pca10056) while reset (double reset won't work for nrf series).
There is still (at least) some known bugs.
- On Linux the very first time we connect to cp with minicom, there is ~10 seconds delay. Afterwards (welcome prompt is printed) the terminal can disconnect/reconnect and work normally. On window...
Using the current master, I found that I was getting confusing data for the STPME610 touch screen driver on a feather52832. No errors reported, but data was clearly getting garbled.
The default baud rate for this device is 100000 (100K). I tried raising the baudrate to 1000000 (1M) and it works normally. @jepler pointed out that this may be a know "feature" for the nrf52 and 100000 is just too slow.
The workaround is simple, I just wanted to alter folks and see how/if you wanted to deal ...
69f224a change gitmodule link from git to https - hathach
@stark wolf I haven't done anything with the rgb/graphics stuff, really. @stuck elbow is the person I would ask about most of that (also the author of the lib I linked last night). I would have to sit down and compare the code, which I'm happy to do. But, would likely take longer...
@stark wolf the CP libraries were written by @timber lion based on the ยตP ones, but the ยตP ones later had some changes
by chance does it work ok with M0 - like is it an stmpe thing or a nrf52 thing?
dont forget the stmpe uses mode 3 or 1 (not the 'standard' mode 0)
It woks on a feather m0 express. This driver has not been changed. I thought the stmpe610 used either mode 0 or 1 depending on its whim.
ok tagged as nrf52 - those peripherals could have a bug. thanks :)
@stark wolf some of those changes later got backported
@stuck elbow @raven canopy thank you.
Wait... Does DigitalInOut not work on the A pins on the M0?
It worked on the ItsyM4, but A1 on the M4 is different.
they worked on my feather m0x
I'm trying to put a button switch on the A pins and it's acting like it's pressed, even if I don't bother wiring anything to the pin. So it doesn't pay attention to the button at all.
I'm on Itsy M0 though at the moment.
Does the same thing on D2 on the Itsy.
@idle owl pull up/down resistors?
I thought they were built in for this.
could be, but still need to turn them on?
is there a default .pull?
digitalio.Pull.UP
to the docs....
I use things like A5.pull.UP
https://learn.adafruit.com/circuitpython-essentials/circuitpython-digital-in-out is where I started since this is for the same guide. But I didn't realise we didn't use the analog pins for that, and I'm not sure why we didn't. Unless the M0 doesn't support it by default on the analog pins.
It worked on the M4. but the code doesn't work the same now.
Which means if I update it for the M0, it won't work on the M4.
It's not working.
At the risk of being a bother (I truly apologize), I seem obsessed to reach my goal of waking up from standby mode within a circuitpython script. I got this to work within the Arduino IDE on the itsy bitsy by "stealing" code from attachInterrupt. I ported this to my c module...and everything looks like it should work..but...and this is sad...it doesn't. I posted all the code I wrote and explained the steps I took to set the registers (why/what worked based on working on the Arduino IDE)...I was hoping someone could take a look. I would VERY much appreciate any advice. Thank you. https://github.com/BitKnitting/wakey_circuitpython/wiki/Circuit-Python-and-m0-Standby-mode
@idle owl what's the hw? itsy m0?
Yes at the moment.
and button on what pin? (i'll test also)
Right now, D2. I wanted it on A1. But that appears to be out.
Also there's a difference with if button.value and if not button.value being how to use it, so on A1 on the M4 it defaults to False when not pressed, it's opposite on other pins on the M0... bleh.
I was just able to get it to print button.pull which apparently = None. I don't think that's right.
what version CP?
I updated 10 minutes ago, so 3.0rc1.
oh...wait. None is valid
Here's the current iteration of the code. ```python
import time
import audioio
import board
import array
import math
import digitalio
button = digitalio.DigitalInOut(board.D2)
button.direction = digitalio.Direction.INPUT
button.pull = digitalio.Pull.UP
length = 8000 // 440
tone_volume = 0.1 # Increase this to increase the volume of the tone.
sine_wave = array.array("H", [0] * length)
for i in range(length):
sine_wave[i] = int((1 + math.sin(math.pi * 2 * i / 18)) * tone_volume * (2 ** 15))
audio = audioio.AudioOut(board.A0)
sine_wave = audioio.RawSample(sine_wave)
print(button.pull)
while True:
if button.value:
print(button.value)
audio.play(sine_wave, loop=True)
time.sleep(1)
audio.stop()
This is what worked on the ItsyM4: ```python
import time
import audioio
import board
import array
import math
import digitalio
button = digitalio.DigitalInOut(board.A1)
button.direction = digitalio.Direction.INPUT
button.pull = digitalio.Pull.UP
length = 8000 // 440
tone_volume = 0.1 # Increase this to increase the volume of the tone.
sine_wave = array.array("H", [0] * length)
for i in range(length):
sine_wave[i] = int((1 + math.sin(math.pi * 2 * i / 18)) * tone_volume * (2 ** 15))
audio = audioio.AudioOut(board.A0)
sine_wave = audioio.RawSample(sine_wave)
while True:
if not button.value:
audio.play(sine_wave, loop=True)
time.sleep(1)
audio.stop()
which means it's doing neither
well bugger.
but you're setting it.....hmmmmm
Yah, see?
I am confuse. And also frustrate.
Tried this too python button = digitalio.DigitalInOut(board.D2) button.switch_to_input(pull=digitalio.Pull.UP)
No change to the way it's acting.
I will test these when I get to the home office
Here's the wiring. Evidently only works on the M4 though. But it'll give you an idea of the rest of what's hooked up to it.
@idle owl So... reading the button is the problem (quickly skimmed the above) ?
hmmmmm.....
Adafruit CircuitPython 3.0.0-rc.1 on 2018-07-03; Adafruit ItsyBitsy M0 Express with samd21g18
>>> import board
>>> import digitalio
>>> button = digitalio.DigitalInOut(board.D2)
>>> button.direction = digitalio.Direction.INPUT
>>> button.pull = digitalio.Pull.UP
>>> print(button.pull)
None
>>> button.pull = digitalio.Pull.DOWN
>>> print(button.pull)
None
>>>
@umbral dagger It's reading it differently or ignoring it completely on the M0 on the same pin as the M4. M0 vs. M4.
Yeah, there's some differences. Different chip after all.
Add an exterla pull up/down. See if that changes things.
I had a situation last week where I did that and suddenly it worked.
10K is good
That was on an ItsyBitsy M4
D7 & D9 in my case
@idle owl something's up with 3.x
Adafruit CircuitPython 2.3.1 on 2018-05-07; Adafruit Itsy Bitsy M0 Express with samd21g18
>>> import board
>>> import digitalio
>>> button = digitalio.DigitalInOut(board.D2)
>>> button.direction = digitalio.Direction.INPUT
>>> button.pull = digitalio.Pull.UP
>>> print(button.pull)
digitalio.Pull.UP
>>> button.pull = digitalio.Pull.DOWN
>>> print(button.pull)
digitalio.Pull.DOWN
>>>
Oh interesting. That would explain what I saw as well.
@umbral dagger I'm not sure there's a point to that in this particular case because it won't go into the guide with the external pull.
So I have to figure out a way to make it work with code across the boards. That's what made the essentials guide so difficult in the first place.
@umbral dagger would appear likely. were you also using 3.x?
M4, must have been.
@tulip sleet Pull isn't getting set in 3.x for some reason with digitalio. Or that's what it looks like.
(โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
Now it's reading both true and false constantly on D5.
if button.value: and if not button.value: both work without me pressing the button.
without pull up/downs engaged, you're just reading noise
Ok
Please place this above (around line 107) with the other files in the nrf directory.
Maybe remove this extra new line
Align preprocessor if to column 0
hmmmmm'ing intensifies.... (fresh out of bag, M4 and 3.0 beta 0):
Adafruit CircuitPython 3.0.0-beta.0 on 2018-05-23; ItsyBitsy M4 Express with samd51g19
>>> import board
>>> import digitalio
>>> button = digitalio.DigitalInOut(board.D2)
>>> button.direction = digitalio.Direction.INPUT
>>> button.pull = digitalio.Pull.UP
>>> print(button.pull)
digitalio.Pull.UP
>>> button.pull = digitalio.Pull.DOWN
>>> print(button.pull)
digitalio.Pull.DOWN
>>>
Hmm indeed.
now it's just printing the variable.
Try doing it like this button.switch_to_input(pull=digitalio.Pull.UP)
i'm going back the M0 and will try sweeping through the CP versions
See whether it still prints at all.
this could well be a bug
just got off the phone, will take a look at the code
I did change some aspects of this recently to fix switch_to_input
Yes, latest 3.0 release
@idle owl Adding an external pull up/down would confirm that the internal one wasn't getting set. (if it worked)
just put a resistor in-line?
While 100K is not a speed that the nRF supports, this code https://github.com/adafruit/circuitpython/blob/master/ports/nrf/common-hal/busio/SPI.c#L39 should bump it to 125K and it should work as expected, but I will try to see if anything goes wrong when that happens.
@jerryneedell could you try testing with 250K and 500K ?
Hmm, I wonder if my UART with nRFx rewrite can fix that.
@idle owl something like a 10k between D2 and 3.3V
works!
With the same code as the M4 except for the pin.
Works on A1 on the M0 with the pull up resistor.
So with the resistor, it works as it should.
Or rather works exactly the same as the M4.
I'm not sure how the M4 worked. ๐
i can give you a test build right now with a fix; which board?
@idle owl both M0 and M4 have internal pull up / downs (just checked datasheet to make sure), it's a CP issue, not an M0 vs M4 issue
i fixed the problem. I changed the order of pull setting and direction to avoid glitches on the pins, but it doesn't work
setting the pin direction with the ASF4 routines clears the pulls
simple fix
Nice!
@tulip sleet if you wanna also toss out an itsy M4 build, i'll test that
I'd like to test on the Itsy M4... yeah that
this is why we need some regression tests on hw
@bronze geyser reading your latest iteration. came across this question you had, and figured i'd answer it real quick:
Q: The only thing missing is setting the priority. (also - why is eic_channel passed in?)
A: The functions in 'peripherals/samd' are designed to be standard API across both the SAMD21 and SAMD51. The SAMD21 only has a single EIC_IRQn, whereas the SAMD51 has one IRQ per EIC channel (EIC_0_IRQn, EIC_1_IRQn, ...).
itsy m0
Seems to be working!
without the extra pullup?
itsy m4
m4 looks good also:
Adafruit CircuitPython 3.0.0-rc.1-3-g8bb363f7c on 2018-07-09; Adafruit ItsyBitsy M4 Express with samd51g19
>>> import board, digitalio
>>> button = digitalio.DigitalInOut(board.D2)
>>> button.direction = digitalio.Direction.INPUT
>>> button.pull = digitalio.Pull.UP
>>> print(button.pull)
digitalio.Pull.UP
>>> button.pull = digitalio.Pull.DOWN
>>> print(button.pull)
digitalio.Pull.DOWN
>>>
@tulip sleet Looks like it works ๐
PR all ready to go.
@tulip sleet Link? I don't see it.
gpio_set_pin_pull_mode() must come after gpio_set_pin_direction(). I reversed this in one case because I thought it might avoid a glitch on the pin, but it didn't work.
This is an example of why we need HW regression tests.
nm. Got it. ๐
wait 20 mins or more for travis
Right.
(talking about SPI again) The nrf documentation shows those 9 specific values for the FREQUENCY register .. but they also look just like the values you'd use for DDS synthesis of those rates from a 16MHz clock... someone with hardware and a scope could try the value of 0x1999999 for 100kHz
@idle owl nice find @tulip sleet nice fix
so do ya think this should be rc.2 and not final?
Mmm... There will always be one more thing. I think it's still worth doing final.
at 250K and 500K the performance is improved, but still gives bad readings. It works very well at 1M
looks like the pull sense got fixed
@indigo wedge have you ever tried hooking up an am2320 temperature sensor to an nrf52? I can't get i2c to see it. Even on 3.x.
@tulip sleet @idle owl do either of you know how the adabot GitHub account works, wrt PRs specifically? Or does she simply do commits on the parent repos? I'm trying to piece together an approach for the ability to automate git patch across all of the libraries (with the future in mind, not just the CoC).
@jerryneedell do you have Saleae or similar to check whether the requested freq is what's actually coming out on the SPI clock pin?
@raven canopy do you mean when doing a release, etc. on a library/
no, it's more along the lines of doing actual repo changes. current case is updating all of the CODEOFCONDUCT.md files.
@tulip sleet Merged.
tnx!!
@dhalbert yes - I'll try to make some measurements tonight or tomorrow.
@raven canopy there is a github tool which I need to refind which will basically do a foreach across a bunch of repos. Another easy way to do that might be to use the bundle repo with all its submodules.
yeah, i've been reading the adabot repo. just not sure where a patch updater could fit, or how to test it "offsite" so that I don't break every single repo... ๐
Is anyone here not subscribed to the Adafruit Python newsletter?
hangs head low in shame...
oh!
me either
i rarely look at my email, outside of work. ๐
If you want to (not reqd), you can subscribe - info https://blog.adafruit.com/2018/07/09/sign-up-for-the-weekly-python-on-micrcontrollers-newsletter-adafruit-circuitpython/
I'm not pushing this (as we don't do that), but it's available and useful if anyone decided to check it out
ok, past my dinner time, chow ๐
@ @turbid radish Thank you for the heads up. I knew about adafruit newsletters but forgot about that specific one.
the more specific a newsletter the better !
@tulip sleet i think i've hooked onto what i was looking for. didn't understand/never used the sh python library. looks like that is how adabot is accessing git commands. appreciate the voice of reason to go back and look! ๐
@slender iron you can see above and in your email a bug for DigitalInOut Pull setting was found and fixed. I am getting the release ready. Do you feel we can proceed with 3.0.0 final or should it be rc.2 now?
either is fine with me
i think i'll go with final. Like kattni said, there'll always be one more thing.
i'll also add 3.x mpy-cross builds as I do them
kk sounds good!
I'll wait on continuing testing then so I don't have to build master for every board. ๐
now will build with correct tag and upload builds, so in half an hour or so
Np, thank for doing it!
i wonder how long 'till 3.0.1 ๐
someone want to help: https://forums.adafruit.com/viewtopic.php?f=60&t=137989
@raven canopy thank you for explaining why eic_channel.
<@&356864093652516868> Here is the meeting recording from today: https://youtu.be/eVSq5JjHlv8
Notes with time codes are available here: https://gist.github.com/tannewt/bc8d2158069e0b5aad29f02913900bf2 Thanks to @kattni for taking notes! Join here for ...
Warning: incoming PowerPoint. Known to cause unexpected reactions... ๐
So, here is my idea for having adabot automate patches to each library. Still kind of rough on details, but thought i'd submit for critical review.
the circuitpython_bundle.py or.. can just as easily be broken out to a separate .py. just have to steal some functions for generating the repo lists, etc.
and yes...i misspelled CircuitPython at the top. ๐คฃ
@slender iron i'll grab that forum post. seems to me they can skip the remap_range and just use static green and red, then conditional it...
thanks!
We intentionally disable wikis on github for CircuitPython repos to ensure info isn't there. So please link to what you are using.
API reference docs live on ReadTheDocs here: https://circuitpython.readthedocs.io/
Tutorials are on Learn: https://learn.adafruit.com/category/micropython-slash-circuitpython
@dhalbert I captured some samples with the Salea - the clocks are generally as commanded, but at 250 - I occasionally saw a longer cycle at 238Khz and at 500 and occasional longer cycle at 454KHz
I did not see any notable deviations at 1Mhz.
@arturo182 Let's not nitpick style. It distracts from more important feedback. I want to use clang-format to do it for us. Thanks for the review overall.
I like them but would rather spend the brainpower getting clang-format going.
Please use the common CircuitPython header and MIT license with your name. https://github.com/adafruit/circuitpython/blob/master/shared-bindings/analogio/AnalogIn.c#L1
Please write out the full names. _fl_cache -> _flash_cache
CircuitPython REPL accessible via native USB (nRF plug on DK).
CIRCUITPY fully works from native USB (nRF USB on DK)
Split into #1007 #1008 and #1009
Looks like it should be possible.
I think this is fixed.
Should feel like USB MSC but wireless including auto-reload
just a note, there doesnt seem to be a standard file transfer protocol - we'd have to hand-implement. not too hard but will need implementing per-platform
https://www.bluetooth.com/specifications/gatt
<@&356864093652516868> I built fresh mpy-cross-3.x executables for Windows, MacOS (High Sierra), raspbian stretch, and ubuntu 18.04 in the 3.0.0 release assets: https://github.com/adafruit/circuitpython/releases/tag/3.0.0. If some of these won't run on older OS's, let me know.
what? no BeOS build? ๐
I want a Tandy Color Computer build.
I or II?
I, of course.
@arturo182 ah thanks, I think I read the coding convention once, then forgot it altogether :D.
ce01496 try to fix travis build error - hathach
No yet, waiting for the cleanup to be done so I can write proper examples and test them with the new code :)
And it should be nRF52840 ;)
Sorry, I'm a bit fixated about style issues.
I have the ble module already ported and working here https://github.com/arturo182/circuitpython/commit/ecd51faa2009259743a55890271f6738f9bb4869
The code there depends on changes in #1011 so I'll wait until that is merged before i make a PR.
Woah, 3.0 was released!? Where's the release cake, and champagne and fireworks? ๐ ๐
As @tannewt mentioned in another issue, this would make sure that all code is uniformly formatted.
So let's have a discussion about how to implement this and which code style to use.
For the implementation we should run it as a part of the Travis CI for each PR for sure, but is there a way to run it also on users' computers before they commit. It can be done with pre-commit git hooks but those need to be setup manually by each user which is not great.
As for the code style, we can eith...
There is however a Object Transfer Service that could potentially be used for this https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.object_transfer.xml
I know this is already approved, but I would ask you not to remove braces around single statements in control structures. Please always use braces in control structures, except perhaps in the most extreme cases (like very stylized single-line code). I've had to fix several bugs over the years that were caused by edits to missing braces.
Sorry, I'll try to remember, at this point it's muscle memory :sweat_smile:
Put curly brace on previous line to make consistent with the rest of the code.
Muscle memory again, I'll try to get better at this! Thanks for the comments, I appreciate consistent code style as well, will fix it! :)
My major worry is making sure it's easy to continue to merge upstream micropython/micropython. It might be necessary to clang-format the upstream code before the merge; up to now our coding style has matched upstream and we haven't had to do something like that.
My major requirements are four-space indents, an opening curly brace does not stand alone, and always use curly braces in control structures. These are already what we do. For everything else I don't care very much, and don't act...
I went over the micropython conventions, and I'm completely happy with them (e.g. // not /* */ comments)
I agree on priorities with @dhalbert , I think agreeing on how switch/case/break is aligned would be nice as well :)
is it possible to do something like PDMIn on an analog pin?
@tulip sleet do you want me to add you to new PRs I make?
sure -- scott and I will split the reviewing somehow
@tough ridge could you give an example of what you want to do?
@tulip sleet trying to read audio directly from an audio jack, but by using repeated calls to AnalogIn I can only sample at so high a frequency
@tough ridge we have an issue open for such a feature but it hasn't been implemented yet: https://github.com/adafruit/circuitpython/issues/487. We do have PDMIn which will read from digital microphones, such as the one onboard the CPX.
ok, I am being redundant. you already mentioned pdmin
yeah haha I saw the message about 3.x and was wondering if anything changed
I can put a high pass filter on it in the meantime to handle anything above the nyquist limit but I'll have to find the right resistors first
i don't think a CPy loop is going to sample fast enough for you but you'll see.
Ah yeah, I always tell myself to pay more attention to format but seems failed to do so :(
I have been building Windows versions of mpy-cross statically with mingw32, so that they don't depend on any DLL's and can be used on multiple versions of windows. This makes my hacky edit more formal and records it. This might be useful on other OS's too, so that we can have a general MacOS or a general Linux version.
I actually prefer the other way around, but we indeed should stay consistency as much as possibl
not entirely sure, since copy it from samd port
https://github.com/adafruit/circuitpython/blob/nrf52840_usbboot/ports/atmel-samd/internal_flash.c#L203
I keep on missing one of those circuitpython sessions on the voice channel.
When it starts, it is 2AM for me.
Ah thanks, I will update the delay us to use nrfx. For ms func, we need them to run the background job for usb handling, (copied from samd port)
we will need to keep 2 erratas that the production chip still got ( 171 & 187)
moved it into part of tusb stack
I think you'll have to rebase your changes to master and once #1011 is merged that will be on master as well.
nrfutil 0.52d has the new --singlebank option, it just happens that my copied text is different than ktown
it is currently how bootloader bin is named, 6.0.0 is actually the version for bootloader + sd combo. In case bootloader need some fixes, we will make a new version such as 6.0.0r1 not really a good versioning, but it is easy to know which sd version it contains. I will try to figure out a better naming later.
I'm doing some work for the first time with the Feather HUZZAH and CP. Any experts in the house?
@umbral dagger I've used it quite a lot -- whats the problem?
ampy is giving me ```>:ampy --port /dev/ttyUSB1 -d1 put ~/Projects/Adafruit/micropython-lib/umqtt.robust/umqtt/robust.py /lib/umqtt/robust.py
b'#6 ets_task(40100394, 3, 3fff83f0, 4)\r\nboot.py output:\r\ncode.py output:\r\nTraceback (most recent call last):\r\n File "code.py", line 26, in <module>\r\n File "/lib/umqtt/robust.py", line 2, in <module>\r\n File "/lib/umqtt/simple.py", line 1, in <module>\r\nKeyboardInterrupt: \r\n\r\n\r\nPress any key to enter the REPL. Use CTRL-D to soft reset.\r\n'
Traceback (most recent call last):
File "/usr/local/bin/ampy", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/ampy/cli.py", line 228, in put
board_files.put(remote, infile.read())
File "/usr/local/lib/python3.6/dist-packages/ampy/files.py", line 157, in put
self._pyboard.enter_raw_repl()
File "/usr/local/lib/python3.6/dist-packages/ampy/pyboard.py", line 212, in enter_raw_repl
raise PyboardError('could not enter raw repl')
ampy.pyboard.PyboardError: could not enter raw repl
Hmm.. even doing an ls via ampy is failing now.
a few things -- for Linux, you should not need the -d1 - probably won't hurt - do you have a main.py running?
I have
It may cause problems - best to rename it to something before using ampy
This keeps cropping up as an issue -- thought it had been resolved, but apparently not -- are you using the latest version of ampy 1.0.5?
yes
Same behaviour with rc1 now
Now ampy is faling like that on everything & anything
including stuff that was workign yesterday
anything in dmesg?
nothing resulting from the ampy commands
no worries, when it got merged, I will merge the update master to usbboot branch as well
I noticed that tinyusb also cloned nrfx as a submodule, seems kind of wasteful to have nrfx twice in the repo, can we get rid of one somehow?
Can anyone tell me what I did wrong that cause the Travis build failed for most test, only the first one is ever succeeded :(

@solar whale I have to use ampy for that, yes?
ls still doesn't work, so how do I know if I've removed it?
Also, got that failure trying to rm it
ok.. that did it
Hmm, that's really strange.
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
make: Entering directory `/home/travis/build/adafruit/circuitpython/ports/atmel-samd'
make: *** No rule to make target `peripherals/samd/clocks.c', needed by `build-arduino_zero/genhdr/qstr.i.last'. Stop.
make: Leaving directory `/home/travis/build/adafruit/circuitpython/ports/atmel-samd'
fatal: No names found, cannot describe anything.
@arturo182 has its own standalone example of nrf5x as well. This would be common if you use more middleware repo. Note tusb later also include other vendor repo such as nxp driver etc ... that cp doesnt' use. I am not sure how to solve this wisely.
@solar whale OK. Thanks. Now to the point of getting connection errors ๐
(Wifi)
@umbral dagger what version of ampy do you have? I remember there were such problems with older versions
@stuck elbow 1.0.5
raw_Repl, the enemy of the esp/ampy
BTW - I like the new .ampy file supported by ampy 1.0.5 -- I have different versions for diffeertent boards (e.g. nrf52 needs a delay) - nice feature.
I recall some mention of a chart that helps identify the possible SERCOM pin assignments. Does anyone know where is is?
theres a generic sercom guide here https://learn.adafruit.com/using-atsamd21-sercom-to-add-more-spi-i2c-serial-ports
but theres so many options, only the DS is really helpful
Thanks! On to the Data sheets
Have we narrowed down what is causing ampy to fail when main.py is present? False positives on raw_repl entered?
bad karma ๐
Ok, sanity check: momentary buttons are not directional, correct? As long as you wire and ground the separate pins (as in not on the same pin), it doesn't matter which is which, right?
right
unless you have several buttons in one device, with a common pin
like a d-pad or something
does it have 4 pins?
Seems an accurate description. I like @tulip sleet's "use diagonal pins to never worry about pin orientation".
Yeah but I did opposite corners to ensure the right thing.
That's what I did @raven canopy ๐
some buttons have two actual switches in them
but if it works one way, then I would blame the connections
Great minds remember the same great advice? ๐
Ok.
@katti time to get out out the DVMand verify ๐
@idle owl what were the two ways? the one that worked and the one that didnt?
One diagonal vs the other.
With ground and the pin on the same side each time. (As themselves I mean.)
Breadboarded? Those pins can be thin sometimes...
do you have these in a breadboard?
Data sheet says they're SPST.
what @raven canopy just said
Breadboard.
Give it a jiggle. May correct the experiment. <-- actual science terminology
fwiw, these work much better:
https://www.adafruit.com/product/1010
or the round ones:
https://www.adafruit.com/product/1009
Can anyone tell me what I did wrong that cause the Travis build failed for most test, only the first one is ever succeeded
This appears to be a submodules issue for ports/atmel-samd. The error is that the atmel-samd/peripherals submodule is not present. Do this:
cd ports/atmel-samd
git submodule add https://github.com/adafruit/samd-peripherals.git peripherals
make clean BOARD=feather_m0_express
make BOARD=feather_m0_express
It should now build.
I mean it works now, but I wanted to make sure I wasn't missing something entirely.
You can also build up some solder layer on the pins, to thicken them a little. My salvage momens tend to work better since the left over solder makes em thicker.
Back to the salt mines. Lunch break over. ๐ฆ
@arturo182 and @hathach At what point do you think this is ready to try to merge to master and then have that as a PR? Do you want to make more cleanup changes? I can try the merge or one of you can. Due to all the nrf changes in master, I think this may need to be a careful merge with some manual checking of diffs after any automatically merged files.
@idle owl @tidal kiln @raven canopy This very old ladyada guide clearly explains tactile switches: http://www.ladyada.net/learn/arduino/lesson5.html
@tulip sleet Thanks! I apparently understand them. But when it acted weird, I wanted to make sure my understanding was correct, because when things go wrong, I usually assume it's me.
Yes, I think this needs a merge with master, probably best way to do this would be to cherry-pick commit by commit, fixing conflicts as you go and then squash all the commits into one and push that as PR with proper commit message. I could do it, but since this is @hathach's PR, I'll leave it for him to decide.
don't forget to read the Conclusion section at the very end!
I don't really know how to squash all commit into one, should I fork it into my own repo then submit a PR from a fork. Normally ktown will take care of this. I just have to write bunch of code :)).
I'm sorry -- I didn't realize this was a merge to master already: for some reason I thought it was a merge to the branch. The merges don't look like they'd be a problem. I don't mind non-squashed commits: it reflects the history of the work, which is fine.
@hathach Can we stop checking in .hex bootloaders and build them in a submodule? I haven't looked into whether that's feasible. I would rather not keep adding large binary files every time the bootloader changes.
@dhalbert ah sure, I will add bootloader project as submodule in the next PR.
Should I work on the usbboot branch or fork it into my own for the next PR ?
@tulip sleet @slender iron No audioio in Trinket build of 3.x?
Let's get this merged into master, and then you can work in master instead of a branch, and submit PR's more often. Then we can keep up with each other's work. We try to have each PR add a particular feature or solve a particular bug, as opposed to adding multiple things that have been in the works for weeks.. It's fine to have multiple PR's and it makes it easier to review each set of changes.
Or Gemma.
In other words: fork your own hathach/circuitpython. Keep it up to date with adafruit/circuitpython. Work in a feature or bugfix branch. When you're ready to merge, submit a PR for that branch, after bringing the branch up to date if necessary with master. After the PR is accepted, you update your fork from master, then delete the branch, and start a new branch for the next thing.
This workflow is covered in detail in @kattni's new Guide: https://learn.adafruit.com/contribute-to-circui...
Ok, so after merged, I will fork the cp. Then work on my fork and submit PR from there, right? I kind of new with the PR things on cp repo
Ah. Super thanks, I am totally new. Never read that doc before :)
Yes, exactly. It's somewhat more complicated but it's fairly standard, and it keeps adafruit/circuitpython clean from work branches. You have the freedom to push to your fork whenever you want for backup purposes.
@alpine nimbus check here: https://circuitpython.readthedocs.io/en/2.x/shared-bindings/index.html#support-matrix
dult
@idle owl ^^
Hooray! Code works on every board it's supposed to.
I am finally trying to understand how some of the SERCOM pins are assigned and the first example I am looking at has me very confused. Can anyone explain why the Metro M4 uses PB02 and PB03 for SDA/SCL even though they are not explicitly identified as I2C pins in the Datasheet. The ItsyBitsy M4 uses PA12/PA13 which are identified as I2C pins. What am I missing?
@tidal kiln Thanks
Thanks for explanation @dhalbert :D
@tulip sleet I don't want to add another voice to an already very active PR conversation, but I would reiterate checking out the guide and that Thach can message any of us with questions about the process along the way. I'm absolutely willing to help as well.
Are we sure we want to merge 50+ commits without any squashes?
@hathach Feel free to contact any of us: @dhalbert, @tannewt, @kattni, @arturo182 for explanations, either in GitHub, HipChat, or discord. We're all happy to get you going on this -- it's not intuitive and takes some rote learning to get it right.
@arturo182 Yes, we're fine with many commits. It represents a lot of work and the individual commits can be helpful when bisecting or just looking back. We used to try to keep a cleaner commit chain, doing rebases more often, etc., and it just caused more issues and was harder to explain. Now we're fine with merge commits, etc. The history is already huge and a few more commits doesn't matter.
Owait forgot to check the Metros. I thought I was done too quickly...
Ok them :) But they're still the issue that this PR is in conflict with #1011 so maybe that one can be merged and then this one could be fixed?
Right. #1011 first and then fix this one to remove the merge conflicts. I can work on that if doing the updating to master is difficult on this one. But I will wait until the code changes requested by you and @tannewt are done.
@tulip sleet https://github.com/adafruit/Adafruit_Learning_System_Guides/pull/245 when you get a chance
@solar whale with that particular case, I would say 2 other factors may have contributed. 1) physical pin locations and PCB traces. 2) other peripheral requirements, say I2S for instance. This is all of course external, "not in the know" conjecture. ๐
@raven canopy Thanks -- What does it mean for some of the pin (PA12/13) to be designated as I2C and others not? Does it impact performance?
I am referring to section 6.2.6 of the SAMD51 Data sheet
@solar whale where are PA12/13 designated as I2C in the datasheet? PB03/02 are SERCOM5 pad 0 and 1.
From what I've read in the sheets, performance shouldn't be an issue. Except for limitations on the peripheral itself (look in the electrical characteristics section [15.x iirc])
The SAM D5x/E5x has up to eight instances of the serial communication interface (SERCOM) peripheral.
All instances support USART, including RS485 and ISO7816, SPI and IยฒC protocols. The following table
lists the IยฒC pins location.
Table 6-8. SERCOM IยฒC Pinout
Package Pin Count Supply I/O pins with IยฒC Support
for the 64 pin package
64 VDDIO PA12, PA13, PA16, PA17, PA22,
PA23
Ah bugger, I should have done the direction and input like this : button.switch_to_input(pull=digitalio.Pull.UP) Reduces another line of code.
did not format well
I see that PB02 and PB03 are SERCOM5 - just confused by the I2C reference for the other pins
@solar whale I have no idea what they mean by that. I was seeing if those pins have some other common function like CAN, and it's a typo.
@tulip sleet Well, now I don't feel so bad not understanding it ๐
Just picked up an M4 Feather Express. Are there any setup docs or should I use the M0 feather files/docs?
You can use the M0 setup docs for now. The guide is on the way, but the install and so on is the same.
@rigid path Make sure you download the right UF2 to install, but the rest of the process should be the same.
@idle owl - Thanks. Is there an M4 UF2 file?
Yes, check out the releases page to download the Feather M4 Express UF2: https://github.com/adafruit/circuitpython/releases
@tulip sleet Limor weighed in on the monotonic() vs sleep() question. I pushed a couple of syntactic changes, otherwise I think the PR is ready now. Travis passed again already.
@rigid path Note that D4 exists on the Feather M4 but is a GND pin on Feather M0 (next RX to TX pins)
@rigid path Yeah like Dan said, the pinouts are different on the M4 than the M0. So the wiring diagrams and so on may not match if you get into the Essentials section of the M0 guide.
There will soon be M4 diagrams in that section as well.
Thank you all. I will keep this in mind.
@solar whale in the SAMD21 datasheet, the corresponding section says "Pins support I2C Hs mode". In the samd51 datasheet, the first paragraph in 6.2.6 contradicts the table.
@rigid path
I believe the D4 pin is the only pin difference, aside from Aref being tied to 3.3V (there's a bug in the chip).
@rigid path Please let us know if you run into any issues. It's all new so any issues may turn out to be bugs.
Will do.
@ladyada I realize that. Its just too handy to not have.
@arturo182 Thanks for the link. That looks promising.
I can have a look at this at some point, I think we should look into incorporating some parts of Nordic's BLE SDK as that would ease development and reduce the number of bugs we introduce when writing everything from scratch.
@slender iron you removed yourself from #1011?
ya. @tulip sleet will review it
@dhalbert I fixed the comments you posted, if every thing is to your liking, please merge at your convenience :)
i totally think we should have it, just wanted to make a note that it wouldnt be as elegant as it ought to be if the BT consortium had come up with a profile :D
@stuck elbow when you get a chance....finally got around to pushing latest change:
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/pull/12
I started experimenting with this here: https://github.com/tannewt/circuitpython/tree/clang-format
Merging should be easy as long as we stick with choices that can be fixed programmatically. (This is the goal anyway so we no longer need to worry about style.)
We'll need to pick a specific version of clang-format that is available on Travis.
@stuck elbow cool. thanks!
@slender iron With audioio.RawSample am I right in thinking you change the frequency by changing the second number in length in the sine_wave generation block? As follows: python tone_volume = 0.1 # Increase this to increase the volume of the tone. frequency = 440 length = 8000 // frequency sine_wave = array.array("H", [0] * length) for i in range(length): sine_wave[i] = int((1 + math.sin(math.pi * 2 * i / 18)) * tone_volume * (2 ** 15))
Or is there some other way you're supposed to do that?
I mean it works the way I did it above, but I'm not certain it's correct.
the frequency variable should change it
ok it does, I wanted to make sure I was on the right track there. Thanks
k. why is it confusing?
It's not. But I've done things like this where I think the simple answer makes sense and it turned out to be entirely the wrong way to do it. So I figured I'd ask.
Or even where the simple answer works, but it's not the right way etc.
ok. they've ruined you then ๐
For all I know you could have built in some fancy way to do it and I missed it in RTD. ๐
You know I still assume I'm wrong. I'm getting better at not thinking that though ๐
This allows other ports to implement these shared bindings.
This is one part of #995
you are usually right ๐
@idle owl you need to trust yourself, and go with it. Even if it is the best way(no the wrong way) and it works Go with it, and if it is not the best way and you find out a better way acknowledge the learning an move on. (this is something I am still dealing with, and I fixed computers for over 30 years), trust Your gut and just do and smile and say I dit it yaa me
@idle owl the more you do this and accept it the better. Some one always knows a better way, but appreciate the learning (and journey)you have done and go with it believe in you. We all do here
Yeah, I'm still very new to a lot of this, relatively speaking, so the not trusting myself as much as I should comes from what I perceive as a lack of experience. But the fact is I learned an unbelievable amount in an extraordinarily short period of time, and I'm incredibly proud of that. Still means it's hard to not assume that the issue is me. But I'm getting better ๐
The frequency is changed by how fast the sine wave angle changes: that i / 18 is what drives that.
You know, one thing that has been quite confusing since I joined the project is figuring out what are people's positions and experience. What I mean by that is who works for Adafruit and who is just a open source helper, who has been in the project for a long time, who is just getting started. I knew that Scott was the admin and he worked for Adafruit but that was kind of it. I think it even made some discussions difficult because I don't want to step on boundaries with people's expertise, but it's hard without knowing what it is. Like I'm still unsure if hathach is part of Adafruit or just helping and how he ended up with working on the bootloader, same with microbuilder and such. Is there a page where I could read about this? ๐ ๐
@idle owl yes thats it and it comes in time, we often when we are learning things doubt, but we forget failure is an important step in learning, and realising you dont know everything a going ahead is the best way to conquire the fear
The git history will show who worked on what, but I don't think it shows why. Theoretically anyone could work on the bootloader.
When I first hopped in, I thought some people were in some positions and it turned out I was way wrong.
@indigo wedge Not exactly but we can explain if it would help ๐
I think it would, I want to help with the project so it's good who I'm working with ๐
I just generally pester people for things. ๐
I'm trying to respect people's boundaries ๐
@smoky swallow I am going through the same process. Just lurking on discord and I listened to a couple of older weekly circuitpython meeting..
slowly getting the lay of the land
don't over think it, jump in, make mistakes, learn, move adapt grow, and appreciate all that are here to help ๐
I can hop in voice chat and explain. my typing is too slow atm
I am always humbed how much people help in these groups on Adafruit
Oh no, not make mistakes ๐ฑ
@slender iron I got it.
@idle owl has provided me with some info ๐
k
@torpid goblet Welcome! Feel free to ask any questions you have, and don't feel like you have to lurk to figure it all out yourself. We were glad to have you at the last meeting!
@idle owl I am having a good time just listening and learning. My first attempted contribution is going to be 3 vargrant based build systems for circuitpython on atmel, esp8266, and nfc.
Has onyone gottern mu-betat17 to run under linux? It insatlles, but then I get ```erryneedell@Ubuntu-Macmini:~/projects/adafruit_github/ampy$ mu-editor
Traceback (most recent call last):
File "/usr/local/bin/mu-editor", line 7, in <module>
from mu.app import run
File "/usr/local/lib/python3.5/dist-packages/mu/app.py", line 29, in <module>
from PyQt5.QtCore import QTimer, Qt
ImportError: /usr/local/lib/python3.5/dist-packages/PyQt5/QtCore.so: undefined symbol: PySlice_AdjustIndices
too old or too new
@torpid goblet Nice! Well, you're welcome to lurk as long as you like. We'll be here ๐
Some of us just here more than others. Ahem, @idle owl ๐
(That came out wrong - complaining about MY lack of presence, not Kattni's, since she's pretty much always here. ๐ )
The M0 boards only support mono wave files because one output right? So the M4s support stereo? But CP now supports both.
I know the M0 is mono, but I was verifying the why.
Because CP supports stereo now, and I assume it's not because you can do stereo on a single output.
I assume it's due to the M4 having two outputs.
@tannewt hold off on this -- there's an issue with the selective errno handling that shows up when I try to use a particular toolchain on Windows.
@idle owl super delayed answer (if it can be called that), but i think your "M4 having two outputs" is correct. M0 only has one DAC output, whereas M4 has 2 DAC outputs.
It definitely has two DACs.
Basically I'm trying to make sure you can't do stereo out of a single audio output.
I think I understand it correctly, I was simply trying to verify.
@idle owl I'm interested in the answer, too. It's simple to mathematically merge the two into one, but I haven't confirmed that it operates that way.
i can't see how a single DAC channel could output a split voltage signal to accommodate stereo output. how does the left channel know what the analog level is vs the right channel? i can't seem to google an answer, and i don't have a qualified answer in my noggin. ๐
wait a second! i diverged from the actual question....
Hey guys
So I've got a program to take inputs from momentary switches (wired for normally open) to send IR commands
However, my code is continuously sending "Right", "Left", and "Up" commands in that order
I've triple checked all my wiring, and everything looks good on that end
Everything is going where it's supposed to, no shorting or anything
The IO pads used for that are A3, A4, A5
I also have A1, A2, and A6 connected, but those don't seem to be triggering for whatever reason
I've been spoiled by the fast dev cycle time of CircuitPython... working in C on the Feather HUZZAH... deploying code is so slow!
@raven canopy Within the audio frequency spectrum, it's difficult (impossible?) to accurately combine stereo analog signals into a single mono channel then separate them downstream. I'm more interested in mono compatibility when the board has a single DAC output that combines the two stereo data streams into a reasonable mono output.
Code is here: https://pastebin.com/WFr46T2k
when you say continuously, do you mean even with no input?
@mighty fiber what the A3,A4,A5 connected to? RIght now they are set as inputs, but they have no pull-up or pull-down set, so the inputs are floating until the switch or button is closed. so they'll read random values, possibly high
You beat me to it
Directly to momentary switches
What are the switches wired to?
and what's on the other side of the momentary switches, ground or +3.3v?
Ground
jaswope feel free to keep going
Sorry, to step on your toes. ๐ Go ahead. We both know the answer here. ๐
set the .pull for each pin to digitalio.Pull.UP. That will make them normally high. Then check for not switchopen.value because they are normally high, so they would normally be True, so you need to check for False.
You can also replace your .direction() calls with .switch_to_input(pull=digitalio.Pull.UP)
That will take care of the pull and the direction in one line.
right, I like that. Example code here: https://learn.adafruit.com/circuitpython-essentials/circuitpython-digital-in-out
(which sets .pull and .direction separately)
switchcw.switch_to_input(pull=digitalio.Pull.UP) = Direction.INPUT
Like this?
Sorry if I understood that wrong
switchopen = DigitalInOut(board.A1) # Opens arms
switchopen.direction = Direction.INPUT
switchopen.pull = Pull.UP
or
switchopen = DigitalInOut(board.A1) # Opens arms
switchopen.switch_to_input(pull=Pull.UP)
and then change your if from:
if switchopen.value:
IR_Command(Open) # Button A1 opens arms
to
if not switchopen.value:
IR_Command(Open) # Button A1 opens arms
Thank you so much!
It works perfectly
I knew I was missing something, and I figured it had something to do with that since I saw it in all the examples
Now to figure out why A3 isn't doing anything...
Great! and thanks @jaswope also
To demystify it a tiny bit: When you wire up a simple switch, you can do it one of two ways. Either completing the circuit between the pin and ground, or between the pin and +V (+3.3V in this case). It doesn't really matter unless you're doing something else with the circuit too, however it changes how you set up the wiring.
you have if switchcw: but you mean if not switchcw.value: (you forgot the .value just on that if)
Yep that solves that hahaha
So let's pretend you have the switch set up to connect the pin to ground when it is pressed. That means, when you press it, the pin will go "low"...as in it will read 0 volts.
But if that's all you did, when it's not pressed, you would want it to read "high" (or 3.3v). However, there's nothing in your circuit to do supply that voltage!
When working with less friendly hardware, you would need to use what's called a pull-up or pull-down resistor circuit. The job of that circuit is to "pull" the voltage high or low when nothing else is acting on it.
The microcontroller you're using is able to do this for you though, but you need to tell it how it needs to behave, hence the need for the code indicating the "pull" direction (up or down).
So the pull tells it what it should be first?
The pull tells it what the circuit should read when it is open (meaning your button isn't pressed)
When you wire a switch to ground, that means that OPEN (unpressed) should read as HIGH (or true for your uses), and CLOSED (pressed) should read as LOW (or false).
And because of that, you need to pull the circuit UP to HIGH.
If you wired the switch to 3.3v it would be the opposite.
And you would need to pull DOWN to LOW (ground)
Yep, you got it!
If you don't do it, then the pin is what is called "floating" when it is disconnected from everything (like when your switch is unpressed)
@errant grail yep. that's what i realized after i typed. helps to focus on the question being asked, instead of whatever your brain told you it thinks you should answer. ๐
It isn't being pulled to 3.3V or Ground, so it just sorta hangs out wherever the EM radiation wants it to be (please correct me on the source of the randomness EE folks)
And so that could be read as HIGH or LOW when it isn't really either.
Thanks for that ๐
No problem.
@raven canopy yeah, but I do enjoy going down tangential paths once in a while. Maybe too often... ๐
For some reason, I decided to start working adabot patching at like 12:30. But, at least it reminded me how much I enjoy the simplicity of working with REST API. Verified that the adabot/patches directory idea is workable, from a discovery standpoint at least. I should quit while I'm ahead though. ๐ช
just got my itsy bitsy m4, is it supposed to not have a main.py?
can i just make a main.py and it will run, or are there other things that need setting up?
nvm, saved the example from https://learn.adafruit.com/welcome-to-circuitpython/creating-and-editing-code#creating-code and it worked out of the box as main.py ๐
aw yiss the M4 has enough ram for my buttons and analog stick gamepad emulation! woohoo
By the way, I noticed that the learn guide for the Feather M0 Express (https://learn.adafruit.com/adafruit-feather-m0-express-designed-for-circuit-python-circuitpython) still says "Please note, CircuitPython is still in beta and we're working hard to make it awesome!" Should that be removed now?
I've logged this with Kaspersky support and they have acknowledged that this is a new bug. Apparently the developers are currently working on a fix. I'll keep this thread updated for others' information - when (or if) Kaspersky come back with a solution.
I came into possession of two more dongles, does anyone from Adafruit need some for testing? @ladyada @tannewt @hathach
@arturo182 I have some arriving in the next day or so (mouser just shipped ones that had been backordered) Be happy to test when the BSP is available.
Sweet! It's still on my TODO list, just a bit lower than other things ;) I think I'll wait for #1004 to be merged as this board doesn't have a easily accessible jlink interface.
@wraith tiger removed that ๐ thanks!
@arturo182 Thanks! A bunch of us ordered dongle samples from Symmetry; mine are out for delivery today.
unfortunately, I didn't have one.
388f554 nrf: Rewrite the DigitalInOut hal using nRFx - arturo182
e875f4e Merge pull request #1002 from arturo182/nrfx_gpio - tannewt
1163462 nrf: Remove the old time hal and replace with nRFx - arturo182
2c63fb2 nrf: Remove the random hal and module - arturo182
eab00ff nrf: Remove even more unused files - arturo182
resolve conflict with #1011
A couple of forum posts recently have asked if HID or MSC could be disabled for security or device interference reasons. We need some kind of dynamic USB descriptors to do this.
https://forums.adafruit.com/viewtopic.php?f=8&t=136248#p683158
https://forums.adafruit.com/viewtopic.php?f=60&t=137940#p682494
@hathach can you order from https://www.semiconductorstore.com/cart/pc/viewPrd.asp?idproduct=94964 ? this dongle isnt so important to support so its ok if it takes some time, i think just arturo likes it ;)
I'm wondering if there's a better way to do this, could we only include this file if we're building for 840, then we wouldn't need the macro check
Unsure why we would want to remove the capability to override the build directory? I think the ?= should stay.
Same with this define
@tannewt this is ready to review again.
It is temporarily, it is only defined in pca10056, feather52840 won't have it since it does not have jlink to begin with. I am still not sure if we should keep it hmmm
I find it easier to read :D
you got an eagle eye :D
This is very clean. I am thinking that maybe we want to make a class that lives under ble, like ble.Bluetooth, ble.Device, or ble.BLE. Better suggestions welcomed. Then we have a singleton instance that is the device. We can then use properties, which we can't do with a regular module. So
if ble.bluetooth.enabled:
...
ble.bluetooth.enabled = False
print(ble.bluetooth.address)
etc.
Later there could be other things that live under ble, maybe message classes?? ...
Yes, I wanted to use a property for enabled and address but had two hesitations: 1. would need a class, 2. would break the current API.
Regarding having a class, I think best name would be Adapter, pretty common terminology in the BT world. We could keep all other classes like Central, Peripheral, Service, Characteristic inside a bleio module as well, but that would break compatibility with bluepy.
Let me know if you want me to move the functions to a Adapter singleton.
I guess it might be ok to remove the define and just have it always on, as you say, the feather doesn't have jlink, the dongle doesn't have jlink and the PCA10056 has a separate USB connector for the nRF USB, so everyone can use the CDC.
@idle owl m0 is mono for DAC output but i2s can do stereo
And can M4 do stereo?
yup, stereo DAC and i2s
Thanks
@torpid goblet have you seen this? https://learn.adafruit.com/building-circuitpython?view=all
@tidal kiln are you up for scrutinising something for me?
sure
Can you look at the wiring diagram and make sure I covered everything in the steps next to it?
There's a lot going on and I already almost missed one.
@bronze geyser ping me when you are around and I can answer EIC questions
@slender iron @tulip sleet I recently tried installing the build toolchains under Ubuntu 18.04 and had not problems -- the guide says arm tools are not yet avaialble. Alos have you updated the latest ppa for the arm toolchains - released in June 2018
Another question @tidal kiln .. Are you seeing the embedded code after "Copy and paste the following code into code.py using your favorite editor, and save the file."? There should be two embedded code elements on the page.
gcc version 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] (GNU Tools for Arm Embedded Processors 7-2018-q3-update)
@solar whale yes, they came out two days ago - someone's post in the forums just caused me to look. I did a simple check with the new toolchain and it semed OK. I plan on doing a better check today or in a few days. It fixes the -flto-type-mismatch compile warnings, and gains maybe 100 bytes on compile, if I remember right
@slender iron I'm working on the merge from MicroPython, using the suggested commit Damien sent. Not too bad so far except for the test running script.
ok awesome!
@slender iron do you have any issue with moving to the 2018q2 toolchain if it seems OK? do you have to wait for it to show up in brew, or did you install manually anyway?
@tulip sleet I also did some test builds without incident.
@tulip sleet 2018q3 - correct?
hmmm -- mix of q2 and q3 here ```jerryneedell@Ubuntu-Macmini:~$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/lto-wrapper
Target: arm-none-eabi
Configured with: /build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/src/gcc/configure --target=arm-none-eabi --prefix=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native --libexecdir=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native/lib --infodir=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/build/gcc-arm-none-eabi-fqNcqu/gcc-arm-none-eabi-7-2018q2/install-native/arm-none-eabi --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for Arm Embedded Processors 7-2018-q3-update' --with-multilib-list=rmprofile
Thread model: single
gcc version 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] (GNU Tools for Arm Embedded Processors 7-2018-q3-update)
these say 2018q2: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads https://launchpad.net/~team-gcc-arm-embedded/+archive/ubuntu/ppa but it's the same as what you have. I think someone just messed up the version string somewhere
@tulip sleet switch is fine with me. I actually use the arch version now
Is there a library bundle for the 3.0.0 release other then then beta bundle made on july 4th?
@slender iron I got my O-Droid Go. It doesn't start up. I know it needs an SD card with particular things on it, but it's supposed to at least start up to a fail screen without it. I haven't done much troubleshooting yet. I need to reseat the LCD cable for one, but I did that twice when putting it together in the first place. I'm charging it now to see if that's the issue.
We need to change the lib bundle name. That's the correct bundle.
@idle owl Ok, thanks. Just wanted to make sure I wasn't missing something.
The bundle itself isn't beta. We name it for the CP version, we simply haven't updated it because we just released final.
Nope, you're not missing anything! @stark wolf ๐
Btw, Thank you all for your amazing work on CP. I'm really enjoying using it.
@slender iron I saw that there is a 4.0 milestone, any date on that? ๐
@stark wolf You're welcome! Thank you for using it! Everything you do helps us make it better. The community is a huge part of what makes CircuitPython great.
@indigo wedge when you finish it. ๐
๐
@slender iron @tulip sleet How do we change the name of the 3.0 bundle to remove the beta?
and
then release
ok
There could be other background service running besides usb, e.g ble task handling.
I vote to use a singleton.
We'll break compatibility with upstream due to our use of properties anyway. We'll break with bluepy because we need more APIs and their methods are non-standard camel case.
So, lets do what we think is best. Thanks!
@slender iron @tulip sleet Release done.
great!
cool! we can rerun travis for the bundle once its in pypi
ah right, sorry, I tried to get SD default by board (e.g pca10056 default is s140, feather52832 is S132) and thought it would be fixed. Just change include order a bit to get that.
Ok, but let's remove it later when CDC is tested reliably enough, we still need a easy switch to jlink for comparison for now.
Woo, let the Bluetooth overhaul begin! Expect many PRs soon :D
Ya, bleio works for me. *io is kinda lame but its consistent with our previous stuff and helps make it a unique name.
I'm even more excited for the ble changes now :)
As for the Odroid-Go: Reseated the display cable, no change. The red LED that was on when I plugged it into a charger went off, so I assume it's charged.
great!
Also, Travis doesn't archive artifacts, right? So I can't see the docs generated from my PR until the merge?
Or I guess I could build locally, need to install some packages
@idle owl does the backlight come on?
@slender iron Nope
Yes, I added some comments for the new ble module and want to see if they look nice
Ok, yeah, you can build locally if you install the right things.
I put them into a venv. I think you need sphinx, sphinx-autobuild and recommonmark. I think the other packages install with those three. autobuild might install with sphinx so install that first to make sure you still have to do autobuild separately. pip install them
@slender iron ^^
I took the back off to take the picture. It's been partially attached otherwise.
right. looks ok to me
Yeah that's what I figured. ๐
There's very little on google for troubleshooting it. Nothing about the screen not working at all that I could find.
@idle owl what's wrong with it?
It does nothing when I power it on.
does the usb device appear?
I plugged it into a charger and there was a red LED for a while and then it went off, so presumably it charged.
I did not check that.
I'd probably poke around with a multimeter to check for power
@idle owl well, on linux you would look into dmesg and/or check for /dev/ttyUSB0
Ah ok
With mac, click on the Apple symbol, then "About this Mac", then "System Report", then click on "USB".
@idle owl does the backlight come on?
then probably power problems
Literally does nothing when I power it on.
No, and I charged it for a while earlier.
charging is independent of the switch
I would say it's either the switch or the voltage regulator
lots of test points on the back. is schematic available?
Ok so the battery pins show ~4V, and the pins that I assume are connected when the switch is in the on position are also showing the same number.
If that means anything.
@tannewt superb !!! Thanks a lot, that fixes the annoying travis build failed. Somehow it is deleted by accident ~.~
@idle owl can you see a big black part with 3 wide pins close to the display connector?
Two on one side and one on the other?
Q1?
yes
Ok yes
Well...yeah I can look at it... translating it to much useful is getting outside my wheelhouse.
@idle owl voltage at TP18 = VBAT = ?
yep. do you see the test point pads? they are labeled TPx with x = some number.
yah I found TP18
So put the ground lead on TP18 then? And the other one on the + pin on the battery connector?
ground on ground, red on TP18
now measure TP14 and TP12
0.5 and 0.4 respectively
if I'm doing it right anyway. I kept going back to 18 to make sure I still had ground contact correctly
how about the pins of the power switch? is there any power on them?
Yah, same as the battery.
there is a big coil in the center of the pcb, looks like a large black cap
those voltages seem low
can you measure the voltage on its pins?
L1?
yes
Measure both leads on it? Or one on ground and one on it?
one ground