#circuitpython-dev
1 messages ยท Page 251 of 1
You're welcome ๐
La palabras reservadas deberรญamos dejarlas en ingles algunas que he visto son como allocation o que no tienen una buena traduccion al espaรฑol tambien
Speeds up FourWire and makes it easy to set the baudrate of it.
@raven canopy @idle owl I'd like to make a beta release of the BLE library soon, but not update the lb in the bundle. Do you know if I mark the release as a pre-release that the auto-bundling stuff will distinguish it from a regular release and not add it to the bundle?
@tulip sleet Sommersoft would know better than I would.
@tulip sleet i don't think it will...let me check real quick.
if it's just checking for the latest tag that might be an issue. If it's using the github api it should be able to tell. If it's just checking a tag we should skip it if it's *.*.*-<some-suffix>
"git submodule foreach 'git checkout -q `git rev-list --tags --max-count=1`'"
so, yeah, it'll likely pull in a pre-release. ๐ฆ
hmm, maybe have to stash a hand-built release elsewhere. I could build it in a non-master branch and not tag the branch
we can filter the foreach above too
Disculpa tantos errores @sabas1080, trabaje con un PR que se habรญa quedado huerfano y no lo revise a fondo, corregรญ los errores que me seรฑalaste.
@tulip sleet +[0-9]\.[0-9]\.[0-9]?
did it work? I was having trouble with extglob stuff. I am trying with --exclude instead
but could be 22.33.44
@tulip sleet could just add another conditional, using regex...
just look for an alpha, and ignore if found.
$ git rev-list --tags --max-count=1
6d388a34eb909e27acd508dc001ae1fe94a530de
git rev-list --exclude='**-*' --tags --max-count=1
32b0f1c78ee26ddb8d689d30d6d95241f69ae838
or...that. ๐
i was trying to get git describe to show me the tag for the commit - not succeeding, but those commits line up with 4.1.0-beta.whatever and 4.0.1
i was just trying to verify the commits were right, not to use git describe in your script
yeah. and excluding handles new_stable->new_beta better, so that the new stable isn't skipped.
so any tag with a "-" is not found. maybe should use **-**
๐คท 3 minutes ago is the first time i heard of glob patterns. hehe
i'm not sure why **-* works
cause the beta.1 should not match
no, I'm wrong. * just stops matching on /, not .. What am I thinking?
so git rev-list --exclude='*-*' --tags --max-count=1
will skip any tag with a -
--exclude=<glob-pattern>
Do not include refs matching <glob-pattern> that the next --all, --branches, --tags, --remotes, or
--glob would otherwise consider. Repetitions of this option accumulate exclusion patterns up to the
next --all, --branches, --tags, --remotes, or --glob option (other options or arguments do not clear
accumulated patterns).
The patterns given should not begin with refs/heads, refs/tags, or refs/remotes when applied to
--branches, --tags, or --remotes, respectively, and they must begin with refs/ when applied to --glob
or --all. If a trailing /* is intended, it must be given explicitly.
isn't that wonderful gibberish?
its so close to regex...that's the confusing part. but i understand why they used glob vs regex, since its "guaranteed" with a OS's file system.
it means something, it just takes a while to figure it out
so, in general, does it sound like a good idea to skip alpha and beta releases in the bundle? Alternatively, you could query github for the latest release, instead of using git rev-list
where is this code anyway?
switching to API would take some time...and add some overhead. git introspection seems much quicker. here's the code: https://github.com/adafruit/adabot/blob/master/adabot/circuitpython_bundle.py#L144
_note: that's Scott's handywork. not mine. ๐ _
but yes, i agree that skipping non-stable releases is a good idea. its just never come up with the libraries since i've been around. or that i remember.
this is a new case - a library that's dependent on a changed native module
yeah. moving the "breaking changes" to the lib is a solid plan here, imo. i couldn't speak up in the meeting...
this is not so bad -- we are already importing github_requests: https://developer.github.com/v3/repos/releases/#get-the-latest-release
its doable, definitely. just 150+ api calls & processing...
yes, maybe I'll just submit a PR with the --exclude
๐ Interested in Python or programming microcontrollers with Python ๐?
If you can spare a few minutes, the interns at @MSFTGarage in Vancouver need your input for a user testing a โจnewโจ @adafruit #PythonHardware VS @code plugin.
Fill out the survey ๐https://t...
since moving the bulk of library API calls to cirpy.org, adabot has about 3400 rate limit requests remaining at the end of her cron. plenty of space there.
@tulip sleet if you want to test one real quick, do a release on the lib, i'll add your change local, and run it without having it commit changes.
I'm not ready yet :(, just planning ahead. But I can ping you later about this. Tomorrow or the next day, I think.
doesn't need to be a meaningful tag... but later is fine. ๐
i'll let you know, but thanks for working on this with me
happy to. it was a fun one to think about.
if you like LOGO and i know you do - check out beginnings of a displayio turtle port https://github.com/ladyada/Adafruit_CircuitPython_turtle/
๐ข 
more to come
@meager fog this is wonderful to see. Many congratulations to all involved in making this happen. Python's turtle module is really useful in the classroom and sticking it on a small device just makes it all the more compelling. Stonking work.... genuinely grinning like the Cheshire cat at this.... ๐
I'll bring my pygamer to Europython and will show ๐ข
I love what you can learn to someone with it
Oh man... YES! I remember LOGO. Thanks @meager fog for the blast from the past. Suddenly, I'm having flashbacks sitting in the library at Pedersen Elementary, in front of an Apple II, programming graphics. Great work!
Instead of using a while True: loop, I would like to use Timer(,,,callback) to periodically trigger a callback function. The reason is, I want to reduce the power consumption as much as possible so that I can deploy, for example, a temperature sensor that can run on a CR2032 coin cell for months.
Is there any way to realise this?
Thanks!
Closed in favor of #696.
We have no way currently to do this. Low-power sleep and the like are on our long-term feature list, but we are not.
(Closed in favor of #696.)
w0rd. thanks. want me to bump+release?
yes please
done!
Sorry, there is something broken with my repository, I need to make a new PR: #1955
@dhalbert That's fine. I commented it as the maximum speed of the bus (display + wires) to imply that it may be slower.
@tulip sleet @slender iron I commented yesterday about the sluggishness of the tft (ili9341) on a feather_nrf52840 -- is that possibly due to the 8Mhz max speed of the SPI that Dan just referenced re pr 1953
@solar whale ya, that and the default baudrate being very slow
the two prs above should improve things a bunch
Ok -- good to know -- I'll try to check them out -- may not be until tomorrow.
#1953 fixed a 3ms tax on each rendered area which is very significant
Wow -- yeah ms are a "long time"
may be handy for palette cycling/swapping. currently can set palette entries but not get em!
TypeError: 'Palette' object is not subscriptable
Makes me think about the way Grace Hopper used to describe nanosec microsec and ms with pieces of wire!
The whole purpose of those delays was to give us room to improve ๐
https://www.youtube.com/watch?v=JEpsKnWZrJ8 only covers nano and microsec ๐
Grace Hopper explains Nanoseconds. Please Subscribe! :) Thanks!
neat!
nano = 11.8 inches
micro = 984 feet
milli = 186 miles
if i mathed right
>>> (11.8*1000)/12
983.333
>>> (983.333*1000)/5280
186.237
>>>
maybe the milli spool is out in the parking lot?
also explains why tran-oceanic cables are preferred to satellite relays - cables are a few thousand miles long -- Geosync satellites are 24000 miles away....
Yup, and while the speed of light is going to be a litter slower in the cable, it's not nearly slower enough to make up for the there and back again nature of geosync sat comms.
REMINDER! please fill this out!
"Hello there, we're a group of interns at Microsoft Vancouver, working in The Garage! We're looking for insights into your experience around physical computing projects. As well as your interest in trying out a new method of development for your project - say goodbye to waiting for your code to build and compile inside Arduino IDE with C/C++, Python is here to help! This survey will only take 3 - 5 minutes and your insights are very valuable to us!"
https://twitter.com/nnja/status/1140807884474732544
https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbRx50AHoXr3BImxtzTGKK4edUMEJNUUFTUUdGRFhOVUg0N0RBN0paOFJBRy4u
๐ Interested in Python or programming microcontrollers with Python ๐?
If you can spare a few minutes, the interns at @MSFTGarage in Vancouver need your input for a user testing a โจnewโจ @adafruit #PythonHardware VS @code plugin.
Fill out the survey ๐https://t...
By the numbers: CircuitPython has over 60+ boards supported, adding more each week: https://circuitpython.org/downloads & has 14+ SBC Linux boards supported, adding more each day: https://circuitpython.org/blinka & over 158+ Libraries, adding more every week: https://circuitpython.org/libraries
i think it would just cause the group to 'skip' that layer instead?
Fixes #1921 and other documentation errors.
Also forced the locale when sorting the translations to ensure consistent sort order.
I'm coming to this late too but I guess I don't understand the cons to asyncio; for me it's simple, well documented, well supported and used widely for Python. It requires few language additions and the implementation is available as a python module. Asyncio, like the message queue example, is also synchronous - it provides concurrency but not parallelism - so is relatively straightforward to reason through when issues arise.
I use it in many of my MicroPython applications and I'm yet to ...
turtle on: pygamer, pybadge, pyportal, and not-out-yet-smaller-version-of-pyportal
final rev shuffles some of the ADC pins (to route nicer) but this is the version that anyone's got now
Is turtle like Logo?
yes its a pythony logo
@mattytrentini When you say asyncio, do you mean asyncio, or uasyncio? My impression from talking to Paul Sokolovsky a bit is that they have substantially different APIs, and in fact he strongly disagreed with a lot of choices that asyncio made. Also, the main asyncio devs say that they think Trio generally did things better and their goal is to incrementally convert asyncio into trio... (of course there are a lot of complications here so no-one knows yet how it will all play out).
Regardi...
From my perspective: yes you have that nice little @when.interval which works well enough โ except when it doesn't: after you learn how to do a simple blinkenlight, the next idea is to vary the blink frequency. Boom you're back at the start line and need to figure out how to do it manually anyway.
The point about async-anything is that you can open-code your state machines, which is much easier to understand than random global (or, if you're good, instance) state variables. Plus, you d...
Very cool! I didn't have a computer powerful enough to run Logo when I was growing up, and my kids were never interested.
I feel like I missed out on it.
I thought that there was a version of logo even on zx spectrum
I don't remember having Logo on my Speccy. I had to wait Thomson MO5 at school to discover it, then AtariST but it was later
Hurray, I finally got a Feather M4 Express so I can test my FeatherWing properly ๐
Came preloaded with CP 3.1.1 and it took like 30 seconds to download and update to 4.0.1 โค
@stuck elbow I learned Logo at school on a BBC micro (32k ram, 6502 CPU)
@plucky flint well, of course
I learned it from some magazines by trying to translate the example programs to BASIC2, never actually used a logo interpreter
sigh -- you are really making me feel old -- computers in school ๐ฎ
Heh, I am old, but we had (dialup) computer access at school.
I finished high school in 1970 -- I think the only dial-up access was when the principal wanted to talk to my parents ๐
@indigo wedge Please try 4.1.0-beta.0: it will be much faster. https://circuitpython.org/board/feather_m4_express/
Nice, what made the difference?
two things: partial display updates done by Scott, and a VM opcode dispatch flag ("COMPUTED_GOTO") that we had turned off for space reasons and didn't know it made a 5x difference (!)
I was just reading about an interesting method of implementing computed goto, but I doubt I could get CircuitPython running on an 1802 CPU 
Thanks Dan, I will try it out for sure, I noticed when I used a label that the whole screen was redrawn when I changed the text so I guess partial updates should solve that
this is what graphics engines tend to do. we can have a C-optimized triangle or trapezoid drawing program and everything else uses it (polygons/lines/shapes). outline and fill.
maybe also a circle helper at some point but this is more...primitive! ha.
@stuck elbow can you tag a 1.0.3 for stage?
I'm updating frozen modules with a script and its reverting back to 1.0.2
This fixes HID mouse on CPX in particular
@slender iron I was planning to do that once the patch that reverses joystick x and y is released
ah...
โ does that
OK, I will make a pull request to bump stage again then
just tag it and I'll snag it in my frozen update
pewpew-game:pyagmer-stage-2 is up to date with all commits from adafruit:master
I don't get it
it's tagged
1.0.3?
yes
thanks
I thought the HID mouse fix was already in due to #1909 and then #1938 (merge from 4.0.x). But they could all use updating.
Weird, #1938 doesn't show the module updates but it does show the commit for it. Maybe the merge commit doesn't respect the new submodule commits? Did you do it with a local branch or just through github?
d852d0f Explicitly set the locale when sorting translat... - cpforbes
db74b92 Fix displayio.Display docstring type for displa... - cpforbes
0bb92d4 Fix references to cpython in builtins documenta... - cpforbes
e442efb Fix docs in digitalio. - cpforbes
09e7f4d Fix reference to Bitmap in fontio.Glyph docs. - cpforbes
That is really weird. I did it with a local branch. I basically never do commits through the github web interface.
I have a vague memory of having this problem before. Like you said, something about the merge commit not picking up the submodules.
Paul is quite opinionated ;) - but in any case the uasyncio API follows asyncio reasonably closely. Certainly to most users of the API it will feel similar if not the same.
I also agree that you Trio folks have made some excellent decisions and some significant improvements. But I'd rather wait for it to be accepted through a PEP process before having people build on it (and the interface possibly changing as it goes through review). Asyncio is what we have, and it's still reasonabl...
@main meteor @solar whale According to Hollywood and one of the finest films ever made, US schools had remote dial-in in 1983: https://www.youtube.com/watch?v=U2_h-EFlztY
WarGames movie clips: http://j.mp/1bGFr39 BUY THE MOVIE: http://j.mp/16TMcaG Don't miss the HOTTEST NEW TRAILERS: http://bit.ly/1u2y6pr CLIP DESCRIPTION: Dav...
Mine was before that. The school system had an HP2000 we could dial in to in the late 1970s. Our school had a few ASR-33 teletypes with modems, and a couple of nice HP video terminals that could zip quietly along at 300bps.
Mr Broderick is in a play in London at the moment. If I bump into him I'll quiz him on that acoustic coupler. Doesn't sound like V21 / Bell 103 to me...
is anyone working on a Blinka port for Jetson Nano?
Edit: The Jetson Nano is not listed on the CircuitPython Blinka page. https://circuitpython.org/blinka but is a part of the Blinka repository as of 3 months ago.
CircuitPython Organization
There's a survey about Python use on microcontrollers mentioned on: https://twitter.com/nnja/status/1140807884474732544 . I've mentioned the FAT12 bug on there. I'm not sure if it'll have any effect but I'll try any angle on offer to try to get MSFT to fix this tedious problem.
"Hello there, we're a group of interns at Microsoft Vancouver, working in The Garage! We're looking for insights into your experience around physical computing projects. As well as your interest in trying out a ne...
@simple pulsar @main meteor I used dialup from ASR33's to an PDP-10 in a high school in 1971. This was a very early such system: BOCES LIRICS (Long Island Regional Instructional Computer Service).
@craggy galleon pinging @gilded cradle who is our resident Blinka expert
Hi, Jetson Nano is going to be improved soon. I believe SPI isn't currently working on it. At the moment we're adding boards to the Blinka page after we have a guide.
@tulip sleet @slender iron just an FYI - Finally ran some "side by side" tests of a slideshow (from sd card) with a 2.4inch TFT (ILI9341) on a feather_m4_express and a feather_nrf52840_express. Same code and images - the nrf52840 took about 5 seconds to load a new image where the m4 took only about 3 seconds ... REPL response is much improved on both. This is with current master (4.1 beta as of this morning) Will try more tests later.
all images 320x240
@solar whale that's an interesting comparison. nrf is 64MHz clock, SAMD51 is 120MHz. and nRF is limiteed by the SPI speed
hmm -- interesting to see where the bottlenecks are -- some due to clock some to the SPI ....
and my 3 vs 5 secs are not very accurate -- just counting "1 mississippi ..."
@kevinjwalters No need to keep bugging Microsoft about the FAT12 bug. They've gotten the message and the wheels are turning. Just need to have patience now.
@solar whale Have you tried the built-in storage vs the sd card? (Assuming there's enough room)
Finally I true portable power unleashed! ๐
Dan you were right, partial updates make all the difference!
@simple pulsar not yet, but it's next on my list
Write speeds looked a lot different when I played with this on PyPortal and there's a fair number of mentions in guides about QSPI (flash) being faster
@simple pulsar @tulip sleet With the internal FS M4 is blazing ( <1sec) nrf52840 is much faster thatn via SD , but still more than 2 seconds. The slow down ratio is probably lager now than before. I need to put in some more accurate timing markers....
I was surprised to see overlclocking mentioned in an article. It pops up in https://learn.adafruit.com/pyportal-animated-gif-display/set-up-arduino and it turns out that in the parallel dimension of Arduino-land one can go above 120MHz up to 200MHz. The article doesn't discuss any implications of doing this though. Is there a way to do this in CircuitPython? And is China Syndrome a possibility?
@slender iron I'm trying to get QR going, started by trying to use the example, which is out of date, but thereโs one line I have no idea how to fix. https://github.com/adafruit/Adafruit_CircuitPython_miniQR/blob/e17b62b3a51700b3e0605d98b02798018a0a0eb7/examples/miniqr_displaytest.py#L42 AttributeError: 'Bitmap' object has no attribute '_load_row'is the error. And looking at displayio, I donโt see what it is trying to reference, or what it could be changed to. Thereโs no reference to _load_row. Do you have any idea what it was referencing and what it might have been changed to?
@idle owl it changed to individual pixel access through []
ya, the conversion is a bit hairy. the pixel level access is actually simpler though
no need for line
Is there an example anywhere that uses the [] thing? Because I have literally no idea where to start. Not that I even understand this code to begin with.
just listening to the latest Talk Python To Me. CircuitPython mentioned, once again! Its in a good segment on "coding on hardware helps to keep beginners interested", and is compared to the same effect as VB6 (of all things). 
Hi all,
I am working on porting circuitpython to a badge project i was involved in (https://github.com/urish/aramcon-badge).
When i try using the Neopixel library it seems to crash when i set the strip length to more than 1 (we have 4 on the actual board).
Has anyone seen this behavior before? Any tips on debugging circuitpython on an nrf52840?
I have a jlink available but I am not sure on what software works best for debugging circuitpython.
what do you mean by crash?
this is my workflow: https://learn.adafruit.com/debugging-the-samd21-with-gdb
I use the same for nrf
The board restarts
i can try a neopixel strip on one of our '840 boards, if you don't have one to test against
USB disconnects and reconnects
are you building master?
does it start back up in safe mode?
@tulip sleet that would be great although i think that it is our hardware that is the problem
drop your test program here. you can upload it as a file
weird
Power glitch?
i am on the 4.0.1 tag
is BOD-> safe mode working on nrf? or better yet, do we have BOD on nrf? ๐
we do have BOD on nRF, though I can' say we've tested it carefully
@main meteor maybe. I do know that the zephyr firmware we have used previously worked very well with all 4 neopixels
@tidal kiln I'm even trying to add it to a lib, so this is perfect. I'll test it now. Thank you!!
Ill try debugging using the guide @slender iron posted. Thanks!
how are you powering the strip: 3.3V or 5V?
Hi folks, - I'm using a BNO055 as a head-mouse (or XBox controller as seen here: https://www.youtube.com/watch?v=in6kaP3cNG8 )
When it starts up, I'm all good. After a few seconds, my "center" adjusts and I have to readjust my calibration (not the chip calibration - my idea of what "straight ahead" means).
I know that it is related to the chip calibration_status property, and I have started tracking that. It seems like when the first calibration status value (sys) switches to 3, I go wonky. When it changes back to 0, I go wonky again.
My guess is that I'm switching between relative and absolute positioning. But I've set the mode to ACCMAG which should stay relative and I'm not sure what else to do to make it stop trying to calibrate (honestly, I'm very happy with it when it's all zeros on the calibration status)
Any thoughts?
We were thrilled to make a capacitive touch switch for Magic Wheelchair's executive director, Christine Getmer at the bar at the Nation of Makers' Conference...
@subtle sun it crashes for me too, but it does NOT crash if the data line is not connected (!?). Reducing the brightness to 0.1 doesn't help. Powering the strip via 5V instead of 3.3v doesn't help either
@tulip sleet @bm that code crashes my nerf52840 with neopixel strip on A1
i was using D6
went to safe mode
@tough flax are you sure about the mode? there's an auto cal in the sensor fusion modes, but ACCMAG isn't one of them.
You are running in safe mode which means something unanticipated happened.
Looks like our core CircuitPython code crashed hard. Whoops!
Please file an issue at https://github.com/adafruit/circuitpython/issues
with the contents of your CIRCUITPY drive and this message:
Crash into the HardFault_Handler.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.1.0-beta.0-31-g3863a6ab8 on 2019-06-20; Adafruit Feather nRF52840 Express with nRF52840
>>>
@subtle sun @solar whale crashes when num_pixels = 2 but not num_pixels = 1
mine crashed with all 4 pixels RED
yes, same, so then I reduced brightness to 0.1 and tried varying the # of pixels
@tidal kiln here's what I'm doing on the mode:
sensor.mode = adafruit_bno055.AMG_MODE
Doesn't seem too complicated
I've tried ACCMAG_MODE too
and COMPASS
@indigo wedge Hello! I may have something for your blackberry feather
FYI myy statndard "ring" test woks OK on the nrf52840 ```from digitalio import *
from board import *
import neopixel
import time
pixpin = A1
numpix = 16
#led = DigitalInOut(D13)
#led.direction = Direction.OUTPUT
strip = neopixel.NeoPixel(pixpin, numpix, brightness=0.2,auto_write=False)
def wheel(pos):
# Input a value 0 to 255 to get a color value.
# The colours are a transition r - g - b - back to r.
if (pos < 0):
return (0, 0, 0)
if (pos > 255):
return (0, 0, 0)
if (pos < 85):
return (int(pos * 3), int(255 - (pos3)), 0)
elif (pos < 170):
pos -= 85
return (int(255 - pos3), 0, int(pos3))
else:
pos -= 170
return (0, int(pos3), int(255 - pos*3))
def rainbow_cycle(wait):
for j in range(255):
for i in range(len(strip)):
idx = int ((i * 256 / len(strip)) + j)
strip[i] = wheel(idx & 255)
strip.show()
time.sleep(wait)
try:
while True:
rainbow_cycle(0.001)
except:
pass
finally:
for i in range(len(strip)):
strip[i] = (0,0,0)
strip.show()
@prime flower do tell
@tough flax can you link to full code?
๐ gimmie a sec for this gif to convert
just doing pixels.fill((255,0,0,)) from REPL crashes it
I don't think the mode property is doing anything
@indigo wedge https://youtu.be/eBbCYrVxPPI I'm finishing up for a PR and release later
I set it to MAGONLY which shouldn't even register up/down changes and it does
but that's on the D pad, I'm sure it can be adapted to the keyboard buttons
@tulip sleet even pixels.fill(0) crashes it
don't know that I have used pixels.fill recently....
Yeah, it's staying in mode=12 (NDOF)
Perhaps we should add a check to make sure the mode change happened and retry?
@mode.setter
def mode(self, new_mode):
self._write_register(_MODE_REGISTER, CONFIG_MODE) # Empirically necessary
time.sleep(0.02) # Datasheet table 3.6
if new_mode != CONFIG_MODE:
self._write_register(_MODE_REGISTER, new_mode)
time.sleep(0.01) # Table 3.6
@solar whale @subtle sun It works with num_pixels = 6 and above, crashes on 2-5. !
@subtle sun please file an issue
very interesting!
The neopixel impl on the '840 is complicated. It generates a bit pattern and sends it out with the PWM pattern generator stuff
my "ring" test also fails with 4 pixel...
Ah
this is because we can't do extended low-level delays in the cpu, because it causes timing issues with the BLE stack
@tough flax it's acting like the mode change isn't working?
@subtle sun I'll file an issue, due to the complexity
Itsy M4
@tidal kiln I'll file an issue
Thanks for jumping in - is this driver yours?
no, but easy enough to test
@tulip sleet just for sanity check I ran the code (ring and neopixel_test) with 4 pixels on an M4 -- works fine
@tidal kiln - can't enter an issue until I have my phone w/me (stupid 2-factor auth & I left my phone at home)
quick check looks OK
Adafruit CircuitPython 4.0.1 on 2019-05-22; Adafruit ItsyBitsy M4 Express with samd51g19
>>> import board, busio, adafruit_bno055
>>> i2c = busio.I2C(board.SCL, board.SDA)
>>> sensor = adafruit_bno055.BNO055(i2c)
>>> sensor.mode
12
>>> sensor.mode = adafruit_bno055.ACCMAG_MODE
>>> sensor.mode
4
>>>
also ran it with numpix=16 on the nrf52840 (brightness=.1) and it works OK
Found by @bm (bmeisels) in #circuitpython discord. Reduced to simple test case:
>>> import neopixel,board
>>> px = neopixel.NeoPixel(board.D6, 1)
>>> px[0] = (5,5,5)
>>> px.deinit()
>>> px = neopixel.NeoPixel(board.D6, 2)
>>> px[0] = (5,5,5)
[hard crash]
In general, it fails for neopixel.NeoPixel(board.D6, <n>) for n = 2 through 5, then it works for 6 and above.
@dhalbert I ran examples discussed in discord on a feather_m4 express with no problems so this is an nrf52840 issue
@tulip sleet Thanks!
thanks for discovering this, probably not too hard to fix
never-mind -- I see the nrf tag
OH SWEEEET
But I had to modify the code, generate_cursor uses displayio but the file doesn't import it.
@indigo wedge yeah, I mistakenly removed it, it's getting added back in the next commit
๐
Surprised you got it working that quickly
@tough flax i can change modes OK. keep in mind the euler angles are only available in fusion modes.
but that's good
last time I checked in on CP was just as displayio work was starting and now it looks pretty darn mature
need to read up on the API
very nice work all ๐
yes I have it open ready for a read-through ๐
I'm trying to think of cool demos for my FeatherWing, any suggestions anyone?
@tidal kiln time to check versions
>>> import board, busio, adafruit_bno055
>>> i2c = busio.I2C(board.SCL, board.SDA)
>>> sensor = adafruit_bno055.BNO055(i2c)
>>> sensor.mode
12
>>> sensor.mode = adafruit_bno055.ACCMAG_MODE
>>> sensor.mode
12
a wireless chat would be neat but need a esp32 lift or something like that
Adafruit CircuitPython 4.1.0-beta.0 on 2019-06-13; Adafruit ItsyBitsy M4 Express with samd51g19
Display demos are neat. Emulating "BB-OS" with displayio would be RAD
Latest bundle
@indigo wedge like any system-tool that was on a blackberry would be cool. im thinking of text editors, games, utilities
BBM would be awesome, CPY doesnt yet have MQTT though so it'd be a constant poll
heh now with that cursor it's just begging for drop-down menus
ok, let me sync up to that. "latest bundle" = June 20?
@indigo wedge does it have a RTC?
a lockscreen-like demo with a modifiable display timeout might be cool as a starting point, and also useful since one would bump the btns around in the pocket
@tidal kiln - yup
@prime flower It has whatever the Feather that you put into it has ๐
LoRa might be neat for the range and "no setup" reqd
idk if you have 2 of them and 2 shields
@tidal kiln, I added a force to config mode and back with a .5sec wait and that seems to set it:
sensor.mode = adafruit_bno055.CONFIG_MODE
sleep(.5)
sensor.mode = adafruit_bno055.NDOF_FMC_OFF_MODE
print("Initial Mode", sensor.mode)
And that mode (FMC_OFF) seems to be working welel for me
well
I don't know what FMC_OFF does it but it seems to not recalibrate the sys field
Yes, this is working quite well - I can use this as a mouse ๐
@tidal kiln I think the answer is to increase the delay after setting CONFIG_MODE - it might be different per chip
beta/latest checks to:
Adafruit CircuitPython 4.1.0-beta.0 on 2019-06-13; Adafruit ItsyBitsy M4 Express with samd51g19
>>> import board, busio, adafruit_bno055
>>> i2c = busio.I2C(board.SCL, board.SDA)
>>> sensor = adafruit_bno055.BNO055(i2c)
>>> sensor.mode
12
>>> sensor.mode = adafruit_bno055.ACCMAG_MODE
>>> sensor.mode
4
>>>
interesting with the timing...the kind of thing that works in REPL but not in code...hmmmm....
>>> def foo(mode):
... sensor.mode = mode
... return sensor.mode
...
>>> foo(12)
12
>>> foo(4)
4
>>>
@tough flax i can't recreate it. if you try the above, does it not change mode for you?
@tidal kiln even in the repl mine didn't work.
weird
hey @tulip sleet can one adjust the size of the CIRCUITPY drive for a board that is using CIRCUITPY_INTERNAL_FLASH?
It's like the delay after the mode property changes to CONFIG isn't long enough
If I'm already in CONFIG I'm good
I can change that delay and see if it fixes it
ok. really weird though. i think we are running same hardware and firmware? itsy m4 / bno055 / 4.1.0 beta 1 / june 20 bundle
@pastel panther yes, but it's not easy. Several settings have to be changed in a .ld file (linker instructions) and maybe elsewhere to change the size
ok, thought that might be the case. Thanks
Yes, I bumped it to .2 (instead of .02) and it ran fine
@tidal kiln - yep - sand hardware - not sure on the BNO055 rev
are you using non-GMO artisanal shade grown organic electrons? maybe that's it?
total mystery. maybe it's the red zip ties? well, at least you have a work around.
PFFFT
So, I changed it to .03 and it worked. Changed it back to .02 and it STILL works
Since I have to give this to a user, I'm going to add these lines in - I see no risk:
sensor.mode = adafruit_bno055.CONFIG_MODE
sleep(.5)
sensor.mode = adafruit_bno055.NDOF_FMC_OFF_MODE
print("Initial Mode", sensor.mode)
really weird, the driver should be doing that for you:
https://github.com/adafruit/Adafruit_CircuitPython_BNO055/blob/master/adafruit_bno055.py#L202
Right, to test, I grabbed the latest .py file and changed it to .5, then .1, then .3, then .2
And they ALL worked.
Put back the original .mpy and it STILL works
Just to P$$ me off
it probably heard that cater's was working, and it didn't want to get voted off the island.
And to make things worse, the chip DOES eventually calibrate the 'sys' bit, just much slower. So it changes less often, but it does change.
I think I can do this in the simpler modes - I will try - at least I can change modes now - thank you!
Input by gravity https://twitter.com/arturo182/status/1141817732859666432?s=19
@indigo wedge love it!
I was shaking the pybadge to scale up the cursor like how macOS does the mouse shake earlier
Hah that's cool!
PT's idea, cant take credit, but it does work.
I was thinking of putting together a typing game demo, but i fear it would take quite some time, i never really could get into game dev ๐
something like
that makes me think of that slither io game from a year ago
@subtle sun ^^
@gilded cradle and anyone else interested, for PyBadger: I'm thinking of adding the same audio functionality as the CPX lib - play_tone, start_tone, stop_tone, and play_file. Thoughts?
@gilded cradle Also, I'll be adding functionality to display an image (of your face, or company logo or whatever) and your email address. Thinking that I'll make the helper have kwargs for the file name (or None if you don't want an image) and for adding email address as a string, and then what button you want to press to make it happen.
Ok
Debating on the button thing, whether to leave that separate or include it in the helper.
Not sure what else you'd use to trigger it so maybe having a default button, and then you can change it will be good.
The audio library idea sounds fine. That should make it easy.
You mean a button to display the image?
Yes
It would be easy enough to add to code.py something like ```
if pybadge.buttons.start = True:
pybadge.displayimage()
or whatever you named the functions
Right, easy enough, but it would be even easier if it was included in the helper.
Maybe use start as the default button?
Wondering if that's a bad idea because then if people call it as default, and then try to use the same button, it won't work right.
I think it would be better to not have a default button. However, providing an example might work well.
Ok, sounds good. Thanks.
๐
-
fixing showing rst tags
-
Update README.rst
-
correct USB PIDs for several boards
-
Auto-build pygamer
-
Enable MICROPY_PY_BUILTINS_ROUND_INT; make round() work beter when it's disabled as well
-
Make pinyin fit on cpx
-
Rework the pixel computation to use areas
This changes the displayio pixel computation from per-pixel to
per-area. This is precursor work to updating portions of the screen
(#1169). It should provide mild speedups because bounds checks are
done once ...
Tested on feather_nrf52840 with the original neopixel_test.py and 4 pixels that failed -- works now
just for fun also verified that this PR works on a makerdiary_nrf52840_mdk_usb_dongle - wanted to try
a non_express nrf52840 and also need something to try on this board ;-)
Hi, I did a naive attempt to add I2S support on nrf52 devices, I noticed there is a couple of 'APIs' for it, the Hal (functions start with nrf_) and the drivers (start with nrfx_), is there any preference on what APIs should be used? I think @tulip sleet can give me a helping hand here ๐
you can use nrfx and nrf, that's fine. We don't use the Nordic SDK, for licensing reasons. Does that help? nrf and nrfx don't really overlap in functionality
the nrfx generally call the nrf HAL. but yeah, you can skip the nrfx layer if needed.
i had the same question before, iirc
yes, when I said overlap, it was really wrong. I meant more as layers, but yes, there's nrf_i2s.c and nrfx_i2s.c. In general, we use the nrfx interface for convenience. The drivers are fairly straightforward to use.
That's great help to get started, I was getting a little overwhelmed by both APIs, I will check the Nordic samples and try to port them
i'd also say that looking at how we use the other drivers (SPI, etc.) may help to some exttent.
Yep, I was taking a look at the spi driver, but got a lot to do on my day job and haven't been able to pick up again
Where can I find which version of Python that CircuitPython implements? I've seen references elsewhere to Python 3.4, but I can't seem to find any official record of this.
Also, I assume CircuitPython will implement newer versions over time, in which case it will become important to know which versions of CircuitPython implement which Python versions.
Thanks!
CircuitPython is forked from MicroPython, and takes its core language interpreter essentially intact. MicroPython has stated that it is currently based on core features in CPython 3.4. Some features are omitted or are slightly different frp, C{utujpm to save time or space. There's now discussion of what to add to MicroPython for the next major release. For background see these MicroPython issues:
https://github.com/micropython/micropython/issues/1329
https://github.com/micropython/micropy...
Thank you @dhalbert , that's exactly what I wanted to know!
GitHub Appified RosiePi results! Now, to figure out how to test the actual app-triggering...
https://gist.github.com/sommersoft/6a103a23b8052797dc14ee9cd9854bdf
Thanks @C47D, I tested 4.1.0-beta.0 last night with an 80kHz sample and this now appears to work fine: https://www.youtube.com/watch?v=WME0PRTvCk8
This is still worth looking at, because the I2C implementation should not hang up the RTC if there's something wrong. https://forums.adafruit.com/viewtopic.php?f=60&t=151839
In what way? Could you attach a test program and describe a setup so I can listen for the issues? That would save me from trying changes without testing.
@tulip sleet Sure, I need to make a shorter piece of code whcih demonstrates this but it's essentially a fast (say 5Hz) and smoothly varying duty_cycle that does it, got a few things on the go at the moment, will look at doing a capture too
FWIW - I have reproduced this with a I2C soil sensor on a pyportal -- time.time() stop incrementing. time.monotonic() continues incrementing.
Just connecting the I2C device stops time.tim() from incrementing - it does not have to be accessed.
@jerryneedell Which sensor? And are you applying 5v or 3.3v via the connector?
@idle owl Email address and personal info could be loaded from secrets.py
https://www.adafruit.com/product/4026
with he jumper in the default 5V position
Also not that the sensor does not work properly. the temperature values are wrong. I don't want to repeat this test!
at 3V it works fine as reported
I hav e the jumper set to 3V for portals I use with I2C -- I have one at 5V still so I used it to check.
I may have damaged the sensor
hmm -- looking at the schematic for the pyportal -- it looks like with the jumper at 5V, it puts 5V on the I2C VCC -- SDA/SCL are pulled up to 3.3 V on the pyporta for its adt7410 temperature sensor, but the I2C device (the soil sensor) will pull them to 5V -- not sure what this does. In any case, my soil sensor temperature values are not working properly any more. I think I'll stop testing this.
@tulip sleet I really don't like that 5V default! good for neopixels, but not for I2C
The pullup resistors are fairly large, so that has been given as a reason not to worry. But it sounds like it's still problematic.
I'm still not sure what is going on with the soil sensor temperature -- the sesnor should be OK with 3-5V but something is not working right. There have been several reports of I2C issue with the PyPortal that were resolved by going to 3V.
What is really odd is that the soil moisture measurement is OK - just the temperature measurement is bad. So the seesaw is working.
maybe the sensor got hot with the higher voltage?
it is not recovering -- reading 16383 constantly 0x3fff -- suspicious
Learning how to code collision detection. Six balls bouncing on the screen of @deshipu's uGame 10. Also: upcoming version 4.1 of @CircuitPython gives significant speed boost. https://t.co/ozSjo38pJE
Something that didn't occur to me before โ speeding up CircuitPython in 4.1.0 is going to speed up the ยตGames significantly as well!
not feeling so safe
I feel like it's probably something I'm doing, but it's definitely repro'able.
I never feel like it's worth filing an issue because it's probably something in my code.
@gilded cradle Ping me when you're up and about.
@stuck elbow It'll be interesting to see what's affected across the board with this performance boost. I left a harmless example of this programming error in my last guide https://learn.adafruit.com/cpx-midi-controller/midi-controller and commented upon it Perhaps more importantly, inside the while loop there are two for loops which ramp the brightness of pix[pos] up and then down. These are not constrained by time but happen to execute at a desirable rate on the CPX board. This means the flashing rate of the NeoPixel is subject to the performance of the CircuitPython interpreter, the neopixel library and the processor - changes to any of those could alter the flash rate. A board using the faster M4 processor will inevitably make this flash much faster.
@slender iron I have a piece of code that goes with PyBadger lib, that consistently causes safe mode. I'm not sure why. I'm pretty sure it's probably something in my code, but you always seem to want an issue filed. Worth filing an issue? Or assume it's me and move on. It's weird because the code works in one order, but in another order, safe mode.
Crash into the HardFault_Handler.
is the reported message.
PyGamer just crashed again in the way it did before, where it restarts, and then code.py is empty.
Gave me an Output error, and then restarted to empty code.py. There is a tmp file that was created, but I looked at it and it's four days old. Same tmp file as the last time it crashed like this. Maybe PyCharm is doing something odd.
Yes.
No content, 0 bytes.
I think the board is coincidentally crashing in the middle of a Safe Write from PyCharm, and somehow it's clearing code.py and creating the tmp file. But what I don't get is why the tmp file would be the same tmp file as last time, so a few days old.
Are you/PyCharm intentionally writing to the CIRCUITPY filesystem?
@simple pulsar I believe so? I wasn't paying enough attention when it happened. I changed the file I believe, saved it, it restarted, which ended my screen session, I could see on the display part of the error (Output error), and then restarted again on its own, and 0byte-code.py.
I think I've had a 0 byte code.py once but I don't recall how I got that. I tend to use windows explorer drag and drop as my sole update method and very occasionally dabble with mu. I am about paranoid about file system corruption/integrity and use chkdsk on Windows now to see if all is ok when things appear to be misbehaving. BTW, there's some past discussion on the general issue of finding out what caused a reboot/reset or a reload after the event, you may wish to add to this if you think there's another angle on this: https://forums.adafruit.com/viewtopic.php?f=60&t=151877
I'm on a Mac, fwiw. I've been periodically copying the working files to my local machine to have working copies. It's a terrible way to do it, but eh.
Oh, you're fortunate in many ways then (wrt Mac)!
I've caused unexpected restarts on a PyPortal without a case. Took me two restarts to realise that some versions of it have a (white) button that has much lower pressure to depress than what I'm used to on the CPX/Gemma. Tilting the board back on a desk can do that.
@simple pulsar Interesting, I hadn't considered that. I was also resetting it repeatedly on my desk without a case. Ended up putting on a case without legs to fix that.
@stuck elbow If you have a minute, I could use some help on PyBadger re: reading button presses. Melissa pointed me in a direction, but I'm unclear on how to adapt it.
@idle owl please file an issue. A HardFault_Handler crash is almost certainly a bug
@tulip sleet Ok, noted.
@idle owl sure!
with the recent fix, you should be able to just read them as fast as you want
Right, but I'm referring to creating functions for them in the lib. Right now, they're all separate functions that look like this:
@property
def button_b(self):
return self.buttons & BUTTON_B```
Melissa showed me the miniTFT FeatherWing lib, where you use button masking, but it uses seesaw, so I have no idea how to adapt it, if I even can.
Right now there are what... 8? yeah 8 separate properties, one for each button.
Is there a better way to do it?
I also have buttons which returns get_pressed()
BUTTON_B is a const() at the top of the class.
well, I suppose masking may be a bit hard to explain
though it's a great opportunity to teach binary operations
another alternative is to return a set
then you can do if BUTTON_B in self.pressed_buttons or something like that
in the lib, or in the code?
the problem with having a separate property for every button is that each time you call self.buttons, it clears the buffer
Ok
so you lose any remembered button presses then
Ah alright
do you have a link to that library MakerMelissa showed you?
You apparently helped with it, that's why I pinged you.
yeah
you can basically use the last line exactly as it is
except without the not
because gamepad does the negation for you
Ok, but what about the button_values line that reads the mask using seesaw?
replace that with get_pressed()
heisenbug
yay, it reared its ugly head, now its days are counted
@tulip sleet So there's another layer to the safe mode issue. I restore the code to the state that was not causing safe mode, save it, wait, hit the reset button. It resets, and I can see OSError 5: Input/Output error (or whatever it is exactly), then it auto reloads (with no input from me), and on reload, there is no longer any data in code.py, and there is a code.py__jb_tmp__ file that contains, in theory, the contents of code.py that I had restored it to.
this is pycharm on a mac? Could you try it with some other editor, like mu?
i want to know if it's something weird about pycharm
That was my thought earlier.
Do you have "Safe Write" turned on in PyCharm Settings->System Settings->Synchronization ?
Yes.
๐คท
do macs have strace?
updating Mu.
they have dtrace or something like that, right?
dtruss, it appears
so you can actually see the system calls it makes
dtruss won't work, I have some safety thing enabled.
Bryan tried to get a dtruss output from me the other day and it failed.
Then had me check some status and it was enabled and he said it wouldn't work.
Mu's not seeing the PyGamer. I wonder if it's because I renamed it?
if you renamed the drive, yes
Oh, bugger. We need to mention that on the page where we talk about renaming drives.
That's not good.
I didn't know Mu would fail.
try some other editor, vim -n,
Ok safe mode achieved.
Nah, I renamed it to CIRCUITPY.
No failure following hard reset.
so include the source code in an issue. It's possible it's crashing right after the write on restart, thought that seems weird to me on a mac.
in Mu.
try storage.erase_filesystem() and a fresh copy of everything if you haven't already
Bleh I have not tried that. Ok.
Code's not working quite right... button should turn on LEDs only when pressed, they're staying on for no apparent reason.
ยฏ_(ใ)_/ยฏ
can you show me the code?
Tempted to ask obvious questions, but you've been around the block before.
of course
This is adafruit_pybadger.py in the state that it is in when I can cause the safe mode crash.
safe mode code.py version
Functional code.py version
Obviously there's a lot of dependencies.
@tulip sleet Ok, so I guess it seems like the wiping code.py issue is PyCharm related, at first glance. So I won't include that in the issue.
Oh, code.py got truncated somehow, that's why the LEDs weren't turning off.
pybadger.pixels.fill(0) was missing (0). Solved that at least.
woaaah, recompiled the pybadge to 4.1. latest and it's really fast
So I tested on 3 micro SD cards:
| SD Card | class | type | size | Read speed | Access time | Results |
|---|---|---|---|---|---|---|
| Sandisk | 4 | SDHC | 8GB | 46.8 MB/s | 0.53ms | Failed |
| Team | 4 | SDHC | 8GB | 22.5MB/s | 1.48ms | Success |
| Sandisk ultra | 10 | SDHx | 128 GB | 86.2 MB/s | 0.45ms | Failed |
| Sandisk ultra | 10 | SDHC | 8GB | 45.9MB/s | 0.69ms... |
@idle owl ok, I think this is a bug that I introduced trying to make that fix in gamepad
Oh.
I didn't test it too well :(
That's why we work together ๐
I'm a bit too tired to work on this right now, I will fix it tomorrow
@stuck elbow Ok. I tried to adapt the code like you suggested and it doesn't work quite right. I'll keep trying to mess with it to see if I can figure out why.
The button code I mean.
I fixed it!
the soil sensor that I was giving me bad readings after using 5V I2C on the pyportal still will not work with Circuitpython, but it does work under Arduino!! I'm confused, but relieved.
Still have no idea what it's doing, but it works.
84% of my code. ^^ ๐
For reference I did some performance tests between the pygamer (120MHz) and my STM32 based board running MicroPython at 84MHz:
| method | size | time ms | time in ms (reference) |
|---|---|---|---|
| readinto | 10 | 0.250244 | 0.02592 |
| readinto | 100 | 1.15051 | 0.08985001 |
| readinto | 1000 | 10.0525 | 0.749 |
| readinto | 10000 | 76.3 | 1.94809 |
| readinto | 10240 ... |
@raven canopy is this pylint issue caused due to a missing __init__.py? https://travis-ci.com/adafruit/Adafruit_CircuitPython_CursorControl/builds/116493892#L288
yeah, that seems along the right track. change the pylint directive in .travis.yml:
script:
- pylint adafruit_cursorcontrol/*.py
adafruit_cursorcontrol.py doesn't exist in the root folder.
@idle owl are you still getting the buttons stuck?
@stuck elbow I don't quite understand what you're asking.
you said "Code's not working quite right... button should turn on LEDs only when pressed, they're staying on for no apparent reason."
@raven canopy Ok, change it, but a fail in the example pylint is kinda weird
do you still have that?
The path wouldnt change in /examples right?
@stuck elbow Oh! That. No, that was related to code.py getting truncated. I figured it out. It had pybadger.pixels.fill at the end with no (0) after it. So it wasn't turning them off.
Buttons are behaving at the moment, if slow to respond, but I imagine with the lib has something to do with that.
@prime flower the import statement in the examples is incomplete as well. needs to be:
from adafruit_cursorcontrol.adafruit_cursorcontrol import Cursor
<folder>/<file>/<class>
@stuck elbow I didn't realise you thought that was your bug, I Would have tagged you earlier when I posted about figuring it out. Sorry about that!
@raven canopy got it + aded to my notes
@prime flower also, you could drop the adafruit_ from the file names. they're already in the package folder..
i imagine it started as a single file, then got packageized. i've done that a few times. ๐
programming is an exercise in fluidity. ๐
Thanks @tulip sleet for all your help with the AAC Devices! We have a post up with an interview w/the folks who ran it: http://atmakers.org/2019/06/low-cost-aac-devices/
BW, I was asked if I could make "one with a Bigger screen"... I think the only way that can be done is to use the 40-pin driver board, right? So, I think I'd need to start from scratch and combine a feather, Airlift, MusicMaker, Driver board, and display. Basically $150 in parts
Or go to a rPi + Display (but we have the same operating system issues we have in Android). Perhaps we could run without X11 and use PyGame? It feels like the wrong approach.
I can also just tell them no ๐
When I flash the latest build (either my own build of master, or your provided one on an erased nrf52840-mdk (non-dongle version), the chip produces no serial output. This happens whether I flash with the makefile (via pyOCD), DAPLINK, or gdb.
Debugging in gdb, the code seems to begin in cpu_get_regs_and_sp, which it runs through, until th...
(My only deviation from the https://learn.adafruit.com/circuitpython-on-the-nrf52/ guide was that I didn't run the ./bluetooth/download_ble_stack.sh script, since it appears not to exist...)
If I recall correctly - the bluetooth stack no longer needs to be downloaded separately.
FWIW - I have been able to build/ load CP for the makerdary nrf52840 usb dongle, but one difference is tat I installed the UF2 Bootloader to stand use that to load CP.
Hmm it looks like the UF2 bootloader isn't supported on the non-dongle (since it comes with its own programming hardware)
After convincing myself that the soil sensor was not damaged by the 5V I2C I have resumed testing this.
I am now finding that the issue is intermittent.
Here is an example where time.time() does increment wit the I2C sensor connected
I am unable to reproduce the issue now but I have reproduced it on other occasions.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.1.0-beta.0-31-g3863a6ab8 on 2019-06-20; Adafruit PyPortal with samd51j20
>>>
>...
I created a dummy I2C device with just 10K resistors pulled to VCC. Runnig this code
import time
i = 0
while True:
i = i + 1
print("time: {0}, counter: {1}".format(time.time(), i))
time.sleep(1)
connecting the "device" to the Pyportal with the 5V I2C you can see that the rime increment stops
time: 946685538, counter: 391
time: 946685539, counter: 392
time: 946685540, counter: 393
time: 946685541, counter: 394
time: 946685542, counter: 395
time:...
There's a sine wave function somewhere that's blowing up due to 65536 going into an "H" array.array. Is this in the same vein as what @dhalbert was commenting on.
Discussed in: https://forums.adafruit.com/viewtopic.php?f=60&t=153174
@tulip sleet I made a dummy I2C device that just pulls SDA/SCL to VCC with 10K resistors. This triggers the RTC issue on the PyPortal(5V) -- no need to plug in a real sensor. I've been digging through the code for time.time() but not coming up with antyhing,...yet...
@solar whale I would have said it's a busy-wait loop in the I2C code, but you're not even calling it. I wonder if pulling any one or two pins to 5V with weak pullups would cauase the problem, or whether it's specific to those pins.
@tulip sleet i'm working on an Ansible playbook for RosiePi, and obviously need to include one for maintaining the toolchain for circuitpython. any interest in including it with the core/build guide?
using it in "pull" mode; not "push". i realize its a slippery slope of "what about Puppet? Chef?" etc...
@tulip sleet after I do some errands Iโll try it on a feather M4. Easier access than PyPortal
hey @tulip sleet I at your suggestion in response to me asking about JLink issues talking to an M4 board I tested again with the gdb server and had a similar but different error trying to connect to the chip. Let me do it again to get more specific output
@pastel panther i did some reading when you posted before, but couldn't come to any conclusions. i was thinking that it may be the IP protection got turned on somehow. a chip erase (12.7 in the sheet) may be worthwhile. ๐คท
of course, not being able to connect with the j-link might make chip erase difficult. ๐
Yea.... that's the conclusion I came to on both counts :\
All I did was flash the itsybitsy m4 bootloader ๐คท I've done the same on other boards I've made (re-using a bootloader from a board with the same chip before making a custom definition) and had no issue
@tulip sleet
Bryans-MBP:atmel-samd bs$ JLinkGDBServer -device ATSAMD51G19 -if SWD
SEGGER J-Link GDB Server V6.44g Command Line Version
JLinkARM.dll V6.44g (DLL compiled Apr 18 2019 17:16:31)
Command line: -device ATSAMD51G19 -if SWD
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: yes
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: off
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: ATSAMD51G19
Target interface: SWD
Target interface speed: 4000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V10 compiled Mar 21 2019 15:43:57
Hardware: V10.10
S/N: 50123625
Feature(s): GDB
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...ERROR: Could not connect to target.
Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
Shutting down...
Could not connect to target.
I was able to get a build of CP going that sidestepped my issue so it's not totally blocking me anymore, but it would be nice to be able to use my jlink to talk to these boards. It seems reproducible as the same thing happened to both boards I brought up, but until I can de-"brick" them I don't really want to throw more chips onto the debugging fire.
@pastel panther what pins on the SWD do you have connected?
jlink will throw a hissy fit if it's not
SEGGER J-Link GDB Server V6.44h Command Line Version
JLinkARM.dll V6.44h (DLL compiled May 3 2019 17:40:32)
Command line: -device ATSAMD51G19 -if SWD
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: yes
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: off
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: ATSAMD51G19
Target interface: SWD
Target interface speed: 4000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V10 compiled Mar 21 2019 15:43:57
Hardware: V10.10
S/N: 260101649
OEM: SEGGER-EDU
Feature(s): FlashBP, GDB
Checking target voltage...
Target voltage: 3.33 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...
``` on a metro_m4_arilift
Yup, that looks about right. Saw the same with my metro m4 as a sanity check
@tulip sleet hmmm -- can't reproduce it on a feather_M4 ๐ฆ
@solar whale you mean my issue? I would hope not!
No -- different issue --
ah, nm
I was not able to reduce this on a feather_m4_express.
I tried both with just the Dummy device with its VCC connected to VUSB
and with th dummy device and an ADT7410 connected (like it is on the Py Portal.
The time.time() kept incrementing and the adt7410 works normally.
hmmm -- if I connect my "dummy" device to the PyPortal -- it takes it along time to boot -- much longer than normal
~10 sec or more
and another observation:
releasing either SDA or SCL starts the time.time() incrementing again. It only stops if both are pulled up.
make sure the i2c pins are pulled up to 3V not 5V
Right -- this only happens if you connect an I2C device to a "default" PyPortal where I2C VCC is set to 5V on the JST connector
yeah thats a known issue with the samd51 - it does not like pullups to 5V
A more prominent warning may be needed for PyPortal -- this comes up a lot.
sure, where do you think it should go?
I guess here https://learn.adafruit.com/adafruit-pyportal/pinouts#i2c-connector-2-18 it says you can set the jumper -- may want say you "should" set the jumper for I2C devices
@ladyada Maybe next board rev should change the jumper to default 3.3V.
the next board rev will have a level shifter (its in the mini version already)
Glad it worked, it does look beautiful, great music too. Is your project documented somewhere i would like to know more about it!
@tulip sleet or @idle owl do either of you know if the CP neopixel driver supports 400khz neopixels?
No idea.
I seem to recall it once did
I think it's been restructured a few times though
I think the ifdef is called NEO_KHZ400 and it's only showing up in the esp port when I ripgrep
ok, thanks
there's also a chance I mixed up arduino and circuitpython and circuitpython never supported 400khz
@dissacious we have no support for 400 kHz in neopixel_write (the low level C module). @exotic pumice , yes, it's in Arduino
thanks @tulip sleet
Should we close this? Just say "don't do that" ;-)
Yes, it's "solved". "If it hurts, don't do that." Since the guide has been updated, this is enough. But thanks for testing.
AttributeError: 'TileGrid' object has no attribute 'flip_x'
What am I doing wrong?
The docs at https://circuitpython.readthedocs.io/en/latest/shared-bindings/displayio/TileGrid.html say it should be there?
was it removed?
@stuck elbow Appears to be there: https://github.com/adafruit/circuitpython/blob/3863a6ab8cffcc684ecb52adb361363503dcfdbf/shared-bindings/displayio/TileGrid.c#L199
If I'm reading it right anyway. Which is dubious.
yeah, should be there
oh, looks like it has been removed in 4.x? https://github.com/adafruit/circuitpython/blob/4.x/shared-bindings/displayio/TileGrid.c
this is confusing
@slender iron do you know how to flip/rotate the TileGrid in recent versions of displayio?
If anybody's interested, I ported the Jumper Wire game to displayio for the pygamer: https://github.com/deshipu/jumper-wire-displayio-pygamer
I can't help but notice that while displayio is considerably faster now with partial updates, it's still slower from the stage, so I think it still makes sense to keep stage
yep future boards don't have this issue - e.g. the pygamer/pybadge have proper level shifting. things get learned! :D
<@&356864093652516868> Here's the notes doc for Monday's CircuitPython Weekly at 11amPT/2pmET. Everyone is welcome! Please add your hug reports and status updates even if you'll be present in the meeting. It's super helpful! If you're unable to attend but would like to have your hug reports or status updates read off during the meeting, feel free to add them to the notes with "(missing meeting)" after your name, and we'll include them in the meeting. Thanks! https://docs.google.com/document/d/11nzKQBgn_H1LiFNvzeUmnqAbKrdLpDy4u3r8JAYOH-w/edit?usp=sharing
CircuitPython Weekly for 24 June 2019 Video is available here on YouTube. Join here for the chat all week: https://adafru.it/discord The weekly happens normally at 2pm ET/11am PT on Mondays. Check the #circuitpython channel on Discord for notices of change in time and...
@stuck elbow master is latest. 4.x is only there for readthedocs
I thought that pewpew was an included module in 4.1 but I could not find it on my M4 express.
@stuck elbow do I have to get pew library from https://github.com/pewpew-game/pewpew/releases ?
I see versions for 2xx and 3xx, is it compatible with 4.x ?
I took content from https://raw.githubusercontent.com/pewpew-game/pewpew/master/libs/PewPewLite4.0/pew.py
and it works for what I was doing, but I'd like to have the proper way to use pew (and being able to explain it to people at Europython ๐ )
displayio is freaking ๐ฅ
Anyone started on writing a widget library yet? I know Button and Label exists, I use Label and Shape here
I'll update but my roboface port is working.
https://github.com/titimoby/pewpew-experiments
I sometimes play and have a lot of fun with https://github.com/pewpew-game/pewpew - titimoby/pewpew-experiments
Built this with like 100 lines in my code.py, did I mention I really like displayio? :D
Also, any ideas on how to speed up text render times?
Published a new video on YouTube: "Handheld FeatherWing - Portable Terminal Demo".
I'm still debugging and cleaning code up but will let you know when it's out on t'Internet.
@indigo wedge are you using a TileGrid for the console or Label? TileGrid will be faster since it is a single object. scrolling is still slow though because it causes the whole area to update
I just use 10 Labels and replace their text
@indigo wedge take a look at terminalio.Terminal
it's one TileGrid under the hood and can do some basic ANSI stuff
it's used outside the VM for the console view
i see, that documentation needs a bit of work though ๐
i'll test it out when i get some time
ya, I think you just .write to it and it lays everything out for you
That should be good, although word-wrap in Label would be useful too, might look into it at some point. I'm really happy how easy it was to create a simple TextInput "Widget" with Shape and Label ๐
๐
Oh you can use the Feather ESP32 as a co-processor same way that pyportal does? Sweet!
Then I see some WiFi Keyboard demo in my future ๐
I think the connections needs to be different than just plugging it in
it might be worthwile to make an adapter
Yeah I would still use the D51 Feather for CP and connect the ESP32 Feather with some jumper wires. Good enough for demo.
hmm, any reason I get an InvalidPin when I try SPI on PA17/PA18 on the SAMD21? The datasheet claims they are SPI-capable
@indigo wedge widgets were going to be the merging of a bitmap+button. i was waiting for speedups before attempting
i see, so speedups are planned? ๐
i mean.. the ones that just happened
like, last week ๐
i wrote button back in january
great work on the featherberry
@umbral dagger p1ngp0ng
@umbral dagger lemm know if/when yr around
thank you ๐
@meager fog Just about to feed the cat and make coffee. ~10 minutes.
@meager fog back. Cat has food and I have coffee.
nice
ok we'll return to pypercard later
for this week, we'll do a guide on my turtle port
I made those final tweaks to the font location in PYOA this morning, and did another release
ya, its in good shape now!
The spiral demo ?
brent's out for a couple days, when he's back we'll add cursor support
well thats just hte demo, the underlying code is a turtle port
have you used LOGO b4?
ok gr8
my code's here
ill move it to adafruit
it needs travis'in
and also there's some things missing
for example dot
and variable line thickness, which we have to do with just drawing a square of pixels rather than 1 pixel
you can use turtle within mu which is good for checking expectations
ok. you want it as a bundled lib, or a self-contained project?
its a library for sure
and then it should have some fun examples
but i think, if you can start with getting it travis'd and in the bundle, thats a great start!
after that, please add notimplementederror for all the stuff we dont 'match' with the CPython turtle
and then we'll go thru and implement whatever we can
Sounds good.
check https://blog.adafruit.com/2019/01/04/modern-turtle-graphics-the-descendants-of-logo-in-python-python-logo-thepsf/ for some neat history/refs
Looking forward to the chat today
๐
<@&356864093652516868> CircuitPython Weekly meeting in about an hour. Everyone is welcome! Notes doc is here - please add your hug reports and status updates! Talk to you soon! https://docs.google.com/document/d/11nzKQBgn_H1LiFNvzeUmnqAbKrdLpDy4u3r8JAYOH-w/edit#
CircuitPython Weekly for 24 June 2019 Video is available here on YouTube. Join here for the chat all week: https://adafru.it/discord The weekly happens normally at 2pm ET/11am PT on Mondays. Check the #circuitpython channel on Discord for notices of change in time and...
I'll be lurking/text only for the weekly meeting. Multitasking...
@minor plume Lurking enough that I should skip over you for hug reports/status updates?
@idle owl Yeah, sadly. ๐ฆ I don't have anything to report this week in any case.
No worries! Simply wanted to make sure I understood.
Hey all, I'm new here! I'll Just be listening in today ๐ ๐ต
@round lintel Welcome!
Hi eveyone ! Also from Vancouver, thank you for having us!
WA or CA?
no mike today
CA๐จ๐ฆ
No audio today
Just lurking
lurking ๐
Just lurking ๐
YAY! Higher quality audio on Discord, thanks for the boostsโ
Lurking
General hug to all
Teardown was over the weekend, links, news, hardware running CircuitPython, thanks Melissa and folks who tweeted all the fun & more, we have a round up in the newsletter, preview here:
https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2019-06-25-draft.md
Yw
REMINDER: Programming microcontrollers with Python! TAKE THIS SURVEY:
https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbRx50AHoXr3BImxtzTGKK4edUMEJNUUFTUUdGRFhOVUg0N0RBN0paOFJBRy4u
Raspberry Pi 4 Model B is here, BLINKA'ing it now ๐ Will be here later!
https://circuitpython.org/blinka
CircuitPython Organization
CircuitPython Choose Your Own Adventure, make one and share with us!
https://learn.adafruit.com/circuit-python-choose-you-own-adventure?view=all
CircuitPython snakes its way to HackSpace Issue 20! Congrats to all the folks in the community who were featured and/or wrote articles! Ben Everard in HackSpace Magazine writes about using CircuitPython to easily turn an Adafruit Circuit Playground Express educational/multifunction board into a USB-connected game controller:
https://magazines-static.raspberrypi.org/issues/full_pdfs/000/000/087/original/HackSpacemagazine20.pdf
CircuitPython - a HUB of... USB things, now live on Crowd Supply:
https://www.crowdsupply.com/capable-robot-components/programmable-usb-hub
8/8/2019 is CircuitPython day, 2 events listed so far!
CircuitPython Day with the India Linux Users Group Delhi (ILUGD) at the Delhi Technical University for Women - August 4, 2019.
https://www.eventbrite.com/e/circuitpython-day-tickets-63844092399
Getting started programming microcontrollers with CircuitPython by NYC Resistor - August 3, 2019.
https://www.eventbrite.com/e/getting-started-programming-microcontrollers-with-circuitpython-tickets-63905511104
CircuitPython is a programming language designed to simplify experimenting and learning to program on low-cost microcontroller boards. And this year we are dedicating a whole day to it.
Tentative Schedule11:00 - 13:00: Getting Started with Circuit Python [Workshop] by Ayan Pa...
This week on the shows' Naomi from PSF, and also Nina from Microsoft, stay tuned!
Lurking
lurking
lurking
@tidal kiln are you lurking?
not this week ๐
@timber mango do you have hug reports or status updates?
lurking, thanks!
I found a typo in the draft of this week's CircuitPython newsletter. What's the right process for fixing it?
Got my breathe controller integrated with the helm software synth. I am trying to create a demo song.
Just a thought to capture on the Debug - perhaps we could modify mpy-cross to strip out debug w/a flag? Then the frozen libs could mpy-cross with the flag and the external libs could leave them in?
(Just thinking out loud)
@minor plume submit a PR or an issue - thanks! It's actively being edited now
๐บ
@tulip sleet where can I get the earliest access to the BLE code?
5.x?
We really need this badly in AT
IN THE WEEDS
kind of a PSA - I2C repeated start on linux, everyone know about this?
@tough flax there'll be a 5.0 alpha or beta with BLE Scanner and Central I hope pretty soon. I could also point you to my fork and the branch; it's not working well enough yet
If using a battery w/power going IN the STEMMA port on the PyPortal, will it work if you switch to 3.3V?
Does that only change the i2c port? Or the 3pins as well?
i think it's both
Ok... probably should make a note somewhere
All the JST Vcc pins are common in the PyPortal
yep
if you see this:
i2c.write(buf_out, stop=False)
i2c.readinto(buf_in)
probably need to change to:
i2c.write_then_readinto(buf_out, buf_in, stop=False)
heya folks, special early notice - we have Pi 4's in stock now https://www.adafruit.com/product/4292
only 2GB version right now - others comin' soon but no ETA (its whenever we get em ๐
hi jean luc! ๐บ
@tough flax is UART mainly what you need for BLE or do you need to talk to non-CPy BLE peripherals? As long as they don't need pairing it should be ok
we will sell out of the pi4's in under 15 mins so if u want one, please check out now ๐
@@pastel panther I think hash/dict is the best way. Maybe place a "polled" timestamp so that each one can be state checked based on new vs old?
Got some questions want to discuss๐ I'll type it down here
(1) Have you ever used โdevice simulatorโ for your project? (Like the ones on MakeCode) And how you find it helpful for your project?
(2) If you can have a tool with the features of the followings, how would you rank them?
<1> Debugger
<2> A device simulator supports lots of sensors for your board
<3> Deploy to Device: have a better experience for deploying your circuitPython code to your board: without having to install the library and configure the board all manually yourself, hit a โsave to boardโ btn and it will install for you!
https://makecode.adafruit.com/#editor Here's an example for "simulator"
A Blocks / JavaScript code editor for the Adafruit Circuit Playground Express.
(2)<3> sounds good
@grizzled hull My preference would be in descending order
3 (deploy to device
1 (debugger)
2 Device simulator
- sparsely. 2) <3> as well.
@tulip sleet we need HID (both peripheral and central)
I've used Android device simulators - fairly helpful For three steps I would rank 2,1,3
@tough flax HID is more work - bonding and pairing, but it's still high prio
@grizzled hull I have novels worth of other thoughts about what could be done with the serial console integration with VSCode. Feel free to DM me to follow up if you're interested
Cool, thanks so much! Currently we don't have a survey yet
@tulip sleet - I have lots of use cases & will gladly test it to death
Yesss
@grizzled hull : For simulation with sensors, integration with Spice would be handy.
๐
Oh and, welcome @grizzled hull. ๐ looking forward to what you all come up with. no pressure.
I love the smell of feature creep in the morning ๐
sorry "requirements gathering " ;p
"brainstorming"
Thanks everyone!
Thanks!!
Thanks for your open format!!
Yea thanks Kattni!
@timber mango it's what we do! thanks for participating ๐
๐
๐
Hey! I just got an ATMakers skills badge on my order! GO FIGURE! ๐
the ordering system is omniscient
the badge selection is actually handled by a very smart hamster
And thank you, @meager fog for the heads up
@tulip sleet any desire to go to Pitt in Sept?
CircuitPyhon Storage:
is it possible to mount a (sub)folder as writeable for CP?
ok ! Thanks
Is there any smart way to disable the sound and picture loading when using PyPortal?
delete files
Working on Adafruit_CircuitPython_PyBadger. At that state of the lib, if I moved the order of things in code.py, it would:
- Reboot the board.
- Returns
OSError 5: Input/Output(not sure past this, it flashes onto the display, so I'm only seeing what fits on to the display) - Reboots again into safe mode with
Hardfault_Handler.
If the pybadger.badge line is inside the while True: loop, the code runs fine. If I move it above the loop, safe mode.
Including zip containing t...
@tough flax Regarding mpy-cross stripping the debug stuff, this is a better way to debug it anyway. So there's no reason to try to figure out getting things stripped in the frozen builds when we can debug smarter in the first place.
ok
Removed the Bus_Device layer from the debugging, debugs from the core.
I'm running into a build error I haven't encountyered before: AttributeError: module 'board' has no attribute 'DISPLAY'
Running on the board (pyportal in my case) board.DISPLAY is there (well, the code using it works, so...)
And I dir shows it there.
The trace: autodoc: failed to import module 'adafruit_turtle'; the following exception was raised: Traceback (most recent call last): File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/sphinx/ext/autodoc/importer.py", line 36, in import_module __import__(modname) File "/home/travis/build/adafruit/Adafruit_CircuitPython_turtle/adafruit_turtle.py", line 131, in <module> class turtle: File "/home/travis/build/adafruit/Adafruit_CircuitPython_turtle/adafruit_turtle.py", line 134, in turtle def __init__(self, display=board.DISPLAY): AttributeError: module 'board' has no attribute 'DISPLAY'
you have to mock it right?
Yay! I just got out of a meeting with my company's Chief Legal Officer, and he's going to confirm in writing that the company has no IP issues with me getting involved with the Circuit Python project. (We're a software company, so I wanted that clearance first to avoid problems down the road.)
Better safe than sorry where the lawyers are concerned. ๐
@minor plume thats gr8!
Now to figure out where/how I can help...
whereever you like!
@minor plume maybe good place to start? 86 open issues await!
https://github.com/adafruit/circuitpython/issues/1246
@tidal kiln I'll take a look!
@meager fog @pastel panther Ah. Ok. Hadn't run into having to do that with such a fundamental module before.
@minor plume great! thank you for double checking with your employer. I've added you to the circuitpythonistas role (thanks for the nitro boost too!). Let us know where you'd like to help (c, python, docs, newsletter) and we can help you pick something to get started with.
@slender iron Thanks! Python, docs, newsletter are all good roles. C isn't my strongest skill. ๐
not your strongest skill is a good reason to practice ๐
Reading kattni's GitHub guide presently. ๐
perfect! let me know how we can help get going
And true. But I want to start with something comfortable. I'll circle back with you in the next day or so and we can chat about where I can help.
sounds perfect @minor plume thanks!
here is the page to make a pr to merge 4.0.x into master: https://github.com/adafruit/circuitpython/compare/master...adafruit:4.0.x?expand=1
@solar whale ๐
Thanks -- I tested it when Dan put it out -- should I retest with 4.1.0 before approving?
It'll just take a few minutes
tested and approved -- Thanks
@slender iron Q!
what do you think about removing end=False to force the other function for repeated start?
we could remove it in 5.x
remove it from which function?
@slender iron My old training won't let me skip the testing ๐
i2c write I think
I don't know of a reason to not send an end otherwise
@solar whale np, that instinct is helpful
oh, i see what you mean. to make it to where that's the only option for repeated start?
right now there are sort of two ways
i guess that would work
was there originally only write and readinto? so that's how repeated start was originally done?
yup but linux requires to know a repeated start is needed up front
right. so all that was added as things evolved to include blinka.
ya, the extra function was
we'd add writeto_then_readfrom to bus.I2C
ah. ok. to the core.
Adafruit CircuitPython 4.0.1 on 2019-05-22; Adafruit PyGamer with samd51j19
>>> from busio import I2C
>>> dir(I2C)
['__class__', '__enter__', '__exit__', '__name__', 'deinit', 'readfrom_into', 'scan', 'try_lock', 'unlock', 'writeto']
>>>
@meager fog OK... turtle is passing travis checks. Ready for review/merge then bundling.
yup, just looked at the source too. we could add it in 5.x with the end= removal
yup, and then we can simplify once folks are off 4.x and lower
yep. blinka is sort of forcing that simplification right now. for the cases where RS is needed.
ya, np
I noticed this while looking at all the Blinka boards.
@meager fog I've never been able to get it reporting the same thing. Worth a bit of time to get it working I suppose.
Sorry @turbid radish that I "code like a C programmer" ๐ Is there any easy way to run pyLint? Is it the same as the lint in Mu?
So, this i2c voltage problem just went from theoretical to practical for me ๐
Iโm using the 3pin port for input power from the battery and powerboost
I think that means I canโt use the seesaw board for additional GPIOs and ADC?
Anyone have any thoughts? External level shifter? Cut a trace?
hm, I think someone stole my adabox delivery from my front doorstep.
@ruby lake Oh no! I hope it just got misplaced. I've had delivery people mark things as delivered only to have them show up the next day.
hey
The code snippets in the Design Guide article reference time without the import time statement.
๐ we are going to be talking about CircuitPython at our monthly meetup in Louisville, KY Thursday.
https://www.meetup.com/derbypy/events/jgtjnpyzjbkc/
Presentation contents are up here:
https://gitlab.com/AlexanderHagerman/python_for_embedded_systems
If anybody has feedback or additional ideas let me know and if you're in the area would love to see you there. I'm not an embedded professional, but CircuitPython has been awesome and I'm learning a ton so I wanted to share and encourage others to check it out.
@cyan rune Awesome! It's always great to see community members helping grow the community further :)
The only minor thing I saw to add to your presentation is mentioning that CircuitPython is a fork of MicroPython. Over all it looks good ๐
Thanks! I'll get that added to make sure it's explicit.
@tulip sleet - I noticed back on May 29th, you were able to create and add a .uf2 for erasing the flash on the Feather M4. Can you point me to an example of how you did it so I can create an "Erase Flash" uf2 for the Mini SAM M4?
@dawn rampart you can now do that from the REPL
Yeah - and that's how I do it, but I'm looking for a method that doesn't require the user to know how to use REPL.
@dawn rampart https://github.com/adafruit/circuitpython/blob/master/main.c#L408
change
filesystem_init(safe_mode == NO_SAFE_MODE, false);
to
filesystem_init(safe_mode == NO_SAFE_MODE, true);
Make sure you label the UF2 as something like "CIRCUITPY-ERASE-DANGER" to avoid support issues.
@tulip sleet -Thanks!
I didn't want to complain, and I refrained from saying anything for several months, but I will just briefly mention this: that CircuitPython newsletter could use some accessibility/readability improvements. Here is how it looks for me:
is click tracking really THAT important?
hi hi @stuck elbow
we do not purposefully add any tracking
we take the newsletter from github, add to wordpress, then mailchimp sends it out
we have the full version(s) on github ... https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2019-06-25-draft.md
@umbral dagger hihi let me know hwen yr around โ and we'll 'plot' our turtle adventure (ha!)
is the github version "good" for reading, it's just plain text and markdown
@river quest thanks, that works for me
all good, we'll always have a text only version and version on github
i do not see any settings in mailchimp to change the urls, we do not track anything by default, it just makes those urls so when clicked, we get a report that says what was the most clicked
yes, that's what tracking is for
@meager fog ok..
hii! ๐ฑ fed? ๐
๐
ok so you got turtle running?
next steps are to stub all the fucntions we dont implement from CPython turtle
Right. A lot are done already, so take care of the rest.
@umbral dagger indeed! after that, lets do line thickness
or you can do dot
either one
dot might be easier, i have some circle-drawing code
Sounds good
@umbral dagger ping me b4 you start either and we can plan the attack
files a claim with UPS over the missing adabox
@ruby lake we have replacements, email support@adafruit.com to get a new one
you can screenshot this msg as the 'RMA auth' ๐
TIL: NACK on the last byte of an I2C read is expected and signifies that the master reading the data is done reading. See page 5 of this invaluable document:
on the write in response to a read? I know the slave will NAK when it can't/won't respond
right, slave responds to writes, master responds to reads
@meager fog ok thanks will do
but a NAK from a slave represents and error case, and a NAK from the master after the given number of bytes represents success, right?
if by some chance the missing box is found I'll return it
wait, if Limor has a separate account then who is @river quest ๐
In response to the adabox mention above, should all those have shipped by now? Hadn't paid attention as other projects have kept me busy, and I got curious. I also know things take time so not in a rush or trying to rush things if shipments are still processing.
@cyan rune I don't think they are quite all shipped but will be in the next few days
@tough flax sorry I was grousing at you last night, a long day. If you compare your code with the code in GitHub, you can see the changes https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/CircuitPython_AT_Hand_Raiser/code.py
We use pylint 1.9.2, I'm not sure if you can do a local install of that version
Some notes: Keep lines <78 chars, no parens on if statements, time import is usually first, it throws an error if the var in a def is named the same as a var in your program
No spaces after a statement and no spaces in blank lines
You can. pip --force-reinstall pylint==1.9.2 iirc.
Thanks @eternal carbonmmersoft
I must run, I have two more guides to write - Limor has the AT guide to review in her schedule.
Hey folks, I was trying to get the build working locally yesterday on Mac OS, but ran into issues. I narrowed it down to a problem with building mpy-cross. If anyone has seen this error before or has ideas on troubleshooting, I'm all ears. I didn't turn up anything about this particular issue on google.
Log:
> pwd
/Users/nina/projects/adafruit/Adafruit_CircuitPython_PyPortal/build_deps/circuitpython/mpy-cross
> make
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
../py/nlrx64.c:44:9: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if NLR_OS_WINDOWS
^
../py/nlrx64.c:37:25: note: expanded from macro 'NLR_OS_WINDOWS'
#define NLR_OS_WINDOWS (defined(_WIN32) || defined(__CYGWIN__))
^
../py/nlrx64.c:44:9: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
../py/nlrx64.c:37:44: note: expanded from macro 'NLR_OS_WINDOWS'
#define NLR_OS_WINDOWS (defined(_WIN32) || defined(__CYGWIN__))
^
../py/nlrx64.c:112:9: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if NLR_OS_WINDOWS
^
../py/nlrx64.c:37:25: note: expanded from macro 'NLR_OS_WINDOWS'
#define NLR_OS_WINDOWS (defined(_WIN32) || defined(__CYGWIN__))
^
../py/nlrx64.c:112:9: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
../py/nlrx64.c:37:44: note: expanded from macro 'NLR_OS_WINDOWS'
#define NLR_OS_WINDOWS (defined(_WIN32) || defined(__CYGWIN__))
^
4 errors generated.
make: *** [build/py/nlrx64.o] Error 1
@fathom trellis huh do you know what v of gcc you're running
Thanks @slender iron
@cyan rune we will be done shipping this week - hold tight. if you dont get a notice by friday, please email us
and we'll see whats up
we're still a couple days from finishing ๐
@meager fog Could be a bit out of date?
> gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Sounds good, I figured that everything was still processing, but I've had a couple mail issues lately (ended up on my neighbors porch instead of mine) so wanted to ask. Can't wait to build the PyGame ๐
@fathom trellis are you trying to build an mpy?
typically we rely on travis to do it
@fathom trellis gcc has a -Wexpansion-to-defined but that looks like a warning not an error so perhaps you are using a compiler that has a different point of view on the severity of this? (Oh, actually I've Ignored the obvious here, -Werror is in use, promoting the warnings into errors.)