#circuitpython-dev
1 messages · Page 239 of 1
yeah, working on uploading those; one of the travis subjobs failed (it was supposed to send a PR to circuitpython-org). Downloading them from S3 and will add to the assets on github
Ok. It doesn't seem that the link itself is broken, just that the file isn't there.
@tulip sleet i made a local test adding the double quotes. doesn't fix it. i haven't kept up with HTML for years, but the button link seems to be hardcoded. could it be this jinja loop is only looking for en_US? https://github.com/adafruit/circuitpython-org/blob/b58984316e2ba6266a12c677896c8302e3bda791/_layouts/download.html#L67
ok, missing assets added. tnx @raven canopy, I'll look - I haven't been in the loop on circuitpython.org
yeah, i understand that its still a WIP. takes time to get these things working right, only to change them again. #ProgrammersDelight
want me to put up an issue?
no, I think I'll just submit a PR; I think you're right about the template code being wrong
that was a good spot; lines 38 and 67 should be the same, hunh?
yeah, i think that looks right.
says something about the sloppiness of the template language that it silently converted a single value into a list
hehe. jinja isn't perfect... i mean, its python underneath, but it has to handle loops on its own so they can get a little funky.
@tulip sleet @raven canopy FYI -when I click on the "browse github" button (on pyportal page) https://circuitpython.org/board/pyportal/ it downloads beta5
This board hasn’t been fully documented yet. Please make a pull request adding more info to this file.The description should be written to inform a CircuitPy...
i'l'l fix that in my PR. Was that true before?
never tried it before...
oof. that...didn't work right. 😬
The first Travis subjob is failing trying to make a release PR for circuitpython.org:
https://travis-ci.com/adafruit/circuitpython/jobs/185484652. I heard second-hand a credential got changed?
$ (! var_search "${TRAVIS_TESTS-}" website || (cd tools && python3 build_board_info.py && cd ..))
Not logged in
{"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}
Traceback (most recent call last):
File "build_board_info.py", line 265, in <module>
gener...
@raven canopy, ugh
hehe. maybe we should leave it to the web-devs? 😆
I am web dev
Is that like "I am Sparticus" 😉
"why doesn't this website have an GPIOs?"
@tulip sleet sure. Can you point me to it? There's been a bunch of activity that I'm not caught up on
https://github.com/adafruit/circuitpython-org/blob/master/_layouts/download.html The language selection dropdown didn't change the .uf2 link when the user changed the language. I changed line 67 from {% for file in version.files['en_US'] %} to {% for file in version.files %} without thinking too hard about it, and that generated multiple buttons instead of having the dropdown change the link.
we can have Adafruit's webdevs look at it too.
@raven canopy I'll revert that, since it's bad in several ways
Reverts adafruit/circuitpython-org#48
@raven canopy or @pastel panther approve the revert and we'll be back to where we were. Travis is happy
tnx!
np
🔄
i'm off for a while, so you'll get less bad advice until i'm back. 😆 👋
bye, tnx for everything this morning
Good day,
I'm about to send a pull request (my 1st) on Adafruit_CircuitPython_INA219 but I have added some imports :
from adafruit_register.i2c_struct import ROUnaryStruct, UnaryStruct from adafruit_register.i2c_bits import ROBits, RWBits from adafruit_register.i2c_bit import ROBit
Apart from the code, is there any other files I should udpate ? requirements.txt ?
Thanks
@lofty nova you're register-ifying INA219? Neat! I think that's it but let me double check
setup.py will likely need it as well
Hi @pastel panther , exactly. I sent a PR yesterday for a little fix but ladyada suggested to take the opportunity to move to register
ya, saw that. I'll be happy to review when you get the PR in
Do you suggest I send the PR as-is ? Or should I update requirements.txt and setup.py before ?
Not sure how to do this? Is that in the guide ?
Are you working on a fork?
Yes, in my account : https://github.com/barbudor/Adafruit_CircuitPython_INA219
Perfect. Ya, I believe the guide should cover this but I would push the changes to your fork and test before the PR. It's not a big deal since the PR will update with any changes to make but you'll have to wait for travis every time you push so you might as well get the changes in before the PR
So is it just about adding 'adafruit-circuitpython-register' in both files ?
Ok I'll do this and send the PR. I don't have the full build environment so can't check this. May be there a guide on building I haven't read ?
fair warning there is a good chance you'll have some pylint errors when travis runs. It's a right of passage 😃
There are instructions on the CP INA219 repo on building the docs which you might try. Other than that the main thing is pylint which my IDE automagically does for me (VS Code)
I'm not sure if the guides cover pylint but I'll check
I didn't see anything so go ahead and PR when you're ready and we'll deal with anything that comes up
Done. Crossing fingers. I will read the build procedure and install what is missing.
I'm using Visual Studio 2017 on Windows 7.
Many thanks
@lofty nova Sorry if my response was confusing; you shouldn't need a build system for library work
Might be overkill for such a small lib but that's still something interresting to learn for may be a future work 😉
you only need to setup for CP builds if you want to do custom builds of CP or help with core work
I don't know what you would setup for libs since they're python unless you wanted to replicate what travis does
have fun either way and let us know if you have any other questions. I'll keep an eye out for the PR
Apparently pylint failed on the sample codes because of bad space
That and unused imports
Yes but I don't understand the unused imports
They are not in the test code, but in the lib code and I use them
Or is that because I from adafruit_ina219 import * ?
Ya, I think so
I'm more concerned by the names. I don't understand as I see the same naming in examples of other libs.
I think you can just from adafruit_ina219 import ADCResolution, BusVoltageRange, INA219
What names?
Oh, I got many naming errors on my pylint but not in travis. Good.
Should I remove the PR to send a new one ?
No, just fix on your fork and re-push
It'll update with your changes
If you're getting different pylint errors locally than travis gives, you might want to make sure you're running it locally with the .pylintrc from the repo
I was using the .pylintrc but I just noticed that the pylint on the samples is adding --disable=missing-docstring,invalid-name
all ok now.
Good job @lofty nova. Pylinting definitely gets easier. I usually run it locally on my computer to weed out the easy ones before pushing to Travis.
Thanks @gilded cradle . I do now but I didn't notice that there were additional args for the examples.
Yeah, it's about practice. I remember being just as frustrated on my first PR.
Anyone else seeing this 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. with the 2019-03-15 build of 4.0.0-beta.4?
@lofty nova lemmee just finish breakfast and I'll complete my review
@obsidian dome Please update to beta.5, which we just released this morning to fix this problem.
I'll give it a try.
@pastel panther of course. About time for diner in France 😄 . Take all your time
The TC's are not double-buffered like the TCC's, so changing the duty cycle can cause these glitches. There's some discussion of a workaround here: https://medium.com/@nebsp/smoothly-changing-a-timers-frequency-on-the-arduino-zero-1f6cd285369a, though I have to study this a bit.
Having trouble getting the board to show up in windows when I double-click the rest. Any Ideas?
I get the right audio from windows to indicate attachment
Got all green neopixels on the CPX
iray, windows sometimes gets super confused - but if you double click and get green LEDs the CPX is in bootloader mode. you could try another computer or USB port - are you on win7
win7 is egregious
@obsidian dome did it have circuitpython on it? Did the CIRCUITPY drive show up?
@tulip sleet It had the Beta-4 on it
so you double-clicked, but CPLAYBOOT did not show up, right?
did it show up previously?
did you update to beta.5 yet?
I did the Beta5 update
FWIW -- on one occasion after many corrupted filesystems, my linux box would not recognize my board until I rebooted it.. your mileage may vary ...
I suppose I need new libraries....
the filesystem is probably corrupted, so do:
import storage
storage.erase_filesystem()
rebooted the linux box, that is.
in the repl. that will wipe and reformat CIRCUITPY
if you cannot do that at all we have some eraser UF2's
@tulip sleet got it to reformat, now I need to somehow get the files back on it. Can I get the files / folders from someplace online?
@obsidian dome most of the libraries you want are built in to the CPX build, so you don't need to load them explicitly. Do you want a demo program? If not, then just start programming.
eg from adafruit_circuitplayground.express import cpx is built in
Working on it. Getting odd behaviour. Trying to figure it out.
@gvcp Please try again with the beta.5 release (new this morning), and let us know here if that fixed it.
beta.5 to fix this is now out.
OK. seems to work now. Looks like I upgraded about 8 hours too soon. Should have waited for this morning 😃
Hmmm. Copying my audio clips onto the board I am getting lots of reboots during the process.
thats normal
if you do the copies while you're in the repl, it will not restart on each copy
OK. I was getting about 8 reboots per sound file
@obsidian dome gotta be afk for a few hours; good luck; others can help if you have trouble
@tulip sleet Thanks a bunch. Really appreciate the help. I'm trying to get this all set up for a workshop I am teaching.
@obsidian dome if you don't want to live on the bleeding edge, version 3.1.2 is plenty stable.
Thanks for looking at this. I'm still surprised these are so noticeable when the pwm is used for sound, I only found this because I heard the audio being a bit clicky.
Doesn't appear any more with blink application, seems to behave stable in this respect like CP3.x.
Just wondering about the connection with BLE stated in #1643 as I don´t have any BLE hardware connected to Feather M4 express.
Hi, I was wanting to try this QR Code generator on the pyportal: https://www.nayuki.io/page/qr-code-generator-library#python
So I grabbed the the zip file from pypi (https://pypi.org/project/qrcodegen/#files) and copied qrcodegen.py to my lib folder. I tried the "hello world" example (from the first link) and I get the ImportError "no module named 'itertools'". when I try to run it. I checked qrcodegen.py, and I see
import collections, itertools, re, sys
So it looks like it needs itertools, which is built into python. If I went through the steps to convert the script into a .mpy frozen module using mpy-cross , would itertools come with it?
@shell falcon i'm 99% sure we don't have itertools available in CircuitPython. i'm not even sure if MicroPython has it.
@shell falcon i will follow up with this possible solution though: https://github.com/adafruit/Adafruit_CircuitPython_miniQR
i stand corrected... 😄 thanks @stuck elbow!
Cool! Thanks @stuck elbow and @raven canopy I'll read more on this and see what I can do.
yeah, should work. i don't see anything in there that looks like a show stopper.
It appears to be impossible to build an atmel-samd target with either CIRCUITPY_PULSEIO = 0 or CIRCUITPY_ROTARYIO = 0 due to hard-coded references to functions in samd-peripherals/samd/external_interrupts.c (causing link errors).
To replicate, add CIRCUITPY_PULSEIO = 0 or CIRCUITPY_ROTARYIO = 0 to ports/atmel-samd/boards/trinket_m0, then try to build for trinket_m0.
I was able to build using the following modification to external_interrupt_handler to elide references t...
we'll have even more about this later, however - here is a preview, python in space! https://blog.adafruit.com/2019/03/17/circuitpython-in-space-pythonaut-circuitpython-adafruit-maholli404-zacinaction-smallsat-kicksat/
🚀 🌎 🌕
that is awesome! "Snakes in Space!"
From the street to the stratosphere ... CircuitPython brings people together
When import 'ntptime' package, appear message below and board reset:
Fatal exception 3(LoadStoreErrorCause):
...
test board: ESP8266 module
circuitpython version: adafruit-circuitpython-feather_huzzah-3.1.2.bin
i can't stop watching that GIF 👀
I did a little research on this board. There have been USB problems in the past, though they seem to be related to USB 3.0. Have you tried the USB 3.0 ports, or the USB-C port with an adapter?
I'm suspecting there's something marginal about the USB driver or ports. If you could get some USB traces with wireshark (if that works) or a Beagle USB tracer, then we'd have a starting point for what's going on. Otherwise, I'm not sure we have anything to offer - sorry about that.
i'm really starting to like gdb. can finally set watchpoints...which are super handy. 😄
those inline emojis are just too big
helping me through these DMA register things. PDMIn is still required to handle when using the driver. and the driver doesn't make it dummy-proof, which is giving me fits.
@tulip sleet i meant to ask/follow-up on my previous comment about nrfx release disparity. i saw that you brought the fork up to date, but CP is still behind. have you done any regression testing with it? and does it possibly "fix" any of the issues with nrf?
@uhrheber comments copied from #1643:
That didn't do it.
I merged your pull request [ #1649 ], compiled and flashed it to a pca10059, then I copied my BLE colourpicker code + libs to the drive.
The code started to run, but stopped by itself after about 20 seconds, without me doing anything.
After unplugging and replugging, the drive was wiped.
I tested the pca10059 with a simple main.py, that doesn't use any external libs.
It runs stable. I can even torture the dri...
i had to update for PDM; build failures abounded with empty func()s
@raven canopy it was too close to beta.4, so I didn' try. I don't think the updated nrfx it necessarily fixes anything that matters to us, at least according to the release notes. I can try with pca10059.
just getting set up to test on pca10059
👍 i can help with some; when i'm in between pdm-hair-pulling breaks. assuming i have the hw.
HardFault! that's when you know you're doing something right. isn't it? 😆
@raven canopy you can set at breakpoint on HardFault_Handler, which can be helpful to track down what's wrong; maybe you are doing this already
well, i had only changed one value which was the size of the DMA buffer. pretty sure that caused it. 😄
Just made a new clone the repository and got an error. I can still make boards on an version a few months older.
make: *** No rule to make target 'common-hal/analogio/init.c', needed by 'build-trinket_m0/genhdr/qstr.i.last'. Stop.
I think your clone is incomplete somehow. Does the file circuitpython/ports/atmel-samd/common-hal/analogio/__init__.c exist? It's part of the source tree. Is this is a clone from adafruit/circuitpython or your own repo?
i am working on a fix for this.
I’m using the feather_nrf52840_express-en_US-4.0.0-beta.5.uf2. I’m trying to use the displayio library with an external ST7735 LCD display. I’m using the code from https://github.com/adafruit/Adafruit_CircuitPython_ST7735
The feather is hard crashing with the error: “MicroPython NLR jump failed. Likely memory corruption.”
I confirmed the display is OK and is correctly wired by using the Circuitpython Bundle [RGB Display library](https://github.com/adafruit/Adafruit_CircuitPython_RGB_Dis...
Just out of curiosity, which external ST7735 LCD display are you using? Apparently there are different versions of this display and I'm wondering if you have one of the ones I'm working on adding support to.
Also, I just hooked up a ST7735 display to an nRF52840 running the same version you described above and it's not crashing. The one I'm using is one I bought off of Aliexpress. Oh, also what code are you using to test it. Here's a script I wrote that's working for me:
"""
This test will initialize the display using displayio
and draw a solid red background
"""
import board
import displayio
import adafruit_st7735
spi = board.SPI()
tft_cs = board.D5
tft_dc = board.D6
displa...
My trying to get my Hallowing to run the slideshow code found here: https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees/slideshows
import board
from adafruit_slideshow import PlayBackOrder, SlideShow
import pulseio
# Create the slideshow object that plays through once alphabetically.
slideshow = SlideShow(board.DISPLAY, pulseio.PWMOut(board.TFT_BACKLIGHT),
folder="/images", loop=True,
order=PlayBackOrder.ALPHABETICAL, dwell=2.5)
...
Updating the code to what I have below gets past the ValueError: TFT_BACKLIGHT in use error and gives RuntimeError: All timers in use which I believe is on the pulseio.PWMOut() call.
import board
from adafruit_slideshow import PlayBackOrder, SlideShow
import pulseio
import displayio
displayio.release_displays()
# Create the slideshow object that plays through once alphabetically.
slideshow = SlideShow(board.DISPLAY, pulseio.PWMOut(board.TFT_BACKLIGHT),
folder="/ima...
@jerryneedell @uhrheber I have a test uf2 for you to try. This fixes a whole bunch of problems with using the internal flash as CIRCUITPY: there was more than one underlying issue.
My test was to run the ble_uart_echo_test.py example in Adafruit_CircuitPython_BLE, connect to the peripheral from the Bluefruit app, and then copy files (as large as 3.7kB file) to CIRCUITPY. It used to crash,...
is DWT CYCCOUNT a reasonable seed for a PRNG?
hi , I am new to cpy and I want to know why is it a better option than Arduino ? thanks
☝ (answered in #help-with-circuitpython )
but, expanding on my question, I'm trying to help the guy building a feather m0 dice calculator in rust, and was hoping someone with more low-level ARM programming experience (@slender iron ?) could advise. He was trying to use the rtc and it doesn't look like even you guys have that set up, so I'm looking for something easier.
I've read adc noise is a good option but we're not quite there yet in terms of HAL
I may have broken the credentials when I deleted a token I showed on my livestream on Friday. Will look tomorrow. Thanks!
Ya, I removed one set of adabot creds I showed on my stream. Will update them tomorrow. Thanks for handling it!
@exotic pumice what is your question?
Hi hi, this "BACKLIGHT in use" error is due to us moving control of the backlight into the display object itself (so it can adjust the backlight when user code isn't running).
I believe the latest slideshow library has been updated for this and you should just remove the pulseio.PWMOut(board.TFT_BACKLIGHT), parameter from code.py.
<@&356864093652516868> Excited to chat with you all in the meeting tomorrow at 11am Pacific. Sounds like a lot happened this weekend. All are welcome to join us in the voice channel tomorrow. Notes doc is here: https://docs.google.com/document/d/11J6ARiRVqRigbPG6HNxeuAv96XJfkM_Xfi4gPRVGqHM/edit?usp=sharing
CircuitPython Weekly March 18th, 2019 Video is available here on YouTube and on diode.zone Thanks to @kattni for taking notes! Join here for the chat all week: http://adafru.it/discord The weekly happens normally at 2pm ET/11am PT on Mondays. Check the #circuitpyth...
@makermelissa I'm using the HiLetgo 1.8" inch ST7735R. Which nrf52840 board are you using? By same version, did you mean the same U2F? Are you getting graphics on the display?
Here's my test code:
import adafruit_st7735
import board
import busio
import displayio
import time
displayio.release_displays()
spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI)
bus = displayio.FourWire(spi, chip_select=board.D9, command=board.D10, reset=board.D11)
display = adafruit_st7735.ST7735(b...
@slender iron the question was whether dwt cycle count would be a good seed for a prng
¯_(ツ)_/¯
we use the current tick for random on the samd21 but that will vary with user code
💤
The Feather nRF52840 Express (which is what the binary you mentioned was for) and the same binary. Yes I'm getting a little Blinka icon in the corner and text with that. Do you happen to remember if the plastic that came on the display had a red tab, green tab, or some other color? If not, that's ok. I'm trying to determine if it is one of those alternate boards that the driver hasn't been implemented for meaning it's giving the wrong init sequence. You can take a look at the Arduino version ...
@dhalbert Unfortunately, I forgot the boards with UF2 bootloaders at home, and don't have a JLink at work. I only have boards with the Nordic DFU bootloader at hand. Would you mind sending me the .hex file?
If you're reading this after waking up, then I'm most likely already at home, and have access to boards with UF2.
I don't recall the tab color but the display works great with the ST7735R class in the RGB Display library provided in the CircuitPython bundle.
Can I please see your full code to display the Blinka bitmap.
Are you using the MO and SCK pins on the feather for MOSI and clock respectively?
Are you using an unmodified version of adafruit_st7735.py from https://github.com/adafruit/Adafruit_CircuitPython_ST7735? If not, can you please upload your version.
You're using a slightly d...
I think the tab color was meaningful only for the displays sourced by Adafruit, if you get them from anywhere else, that color is pretty much random and doesn't correspond to the display version.
There are two versions of those displays (originally designated as "red tab" and "green tab"), which differ in how the actual LCD lines are connected to the ST7725 chip inside — one starts at the upper left corner and has no interleave, and the other starts 32 pixels shifted (it's centered) and ha...
I tried this on a pca10059.
With Beta5 I did not consistently have the issue with the FS getting wiped, but it was having problems.
ran ble_uart_echo_test - connected from desktop
copied ~5K byte file to CIRCUITPY
system kept running but when I did a soft reboot and tried to restart ble_uart_echo_test
it could not properly read the script from the FS. The ble_uart test script file was damaged, but the FS was still functional. Note: this is not the file I copied over.
loaded new .uf2 ...
ah good -- repeated the test with Beta 5 and after file copy and soft reboot - the FS was corrupted!
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.5 on 2019-03-17; PCA10059 nRF52840 Dongle with nRF52840
>>>
>>> import ble_uart
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'ble_uart'
>>> import os
>>> os.listdir()
['\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x0...
@jerryneedell I thought of another possible issue with flushing the filesystem properly which might explain the missing file, and I'll check on that this morning.
- Logic to wait for softdevice flash operation events was wrong.
- Trying to write a full 4096-byte flash page causes BLE timeouts in the softdevice. This was discovered several months ago by @hathach while doing bootloader work. See https://devzone.nordicsemi.com/f/nordic-q-a/40088/sd_flash_write-cause-nrf_fault_id_sd_assert/. To fix, we write only half a page at a time.
- Reads from flash did not flush the write cache first.
Still thinking a bit about when else to flush the cache, mayb...
@tulip sleet is the PR the same as what you sent out last night or is there something new to test?
@dhalbert You're the best. Did you even sleep last night?
The new firmware is much more stable, but still has some quirks.
While my bluetooth colourpicker code was running (without bluetooth connection), I copied various libs to the libs folder on the virtual drive.
When there was less than 50kB free, the drive vanished, and CP entered safe mode.
When I then unplugged and replugged the stick, the program came up again, and the drive letter appeared, but I couldn't delete any of the libs...
After @jerryneedell pointed out that the download link actually changes for the Past Releases button, I think I see the issue. (I said that yesterday too, but maybe this time the result is better? 😄)
The Past Releases class name is download-button, whereas the current unstable release class name is download-buttons.
There is a JS that handles updating the link based on the language selection, and it appears to be pointing to the incorrect class: [`document.querySelector(".down...
@jerryneedell @uhreber This PR has an additional filesystem flush beyond the .uf2's I gave you. @jerryneedell, this may fix the "missing file" you mentioned at the end of this comment.
@solar whale ^^ this has an additional flush. Had to push again due to make translate.
OK -- Will test in a bit
thanks a lot - your testing has been really helpful
@exotic pumice I'm fond of combining a couple of things for a PRNG seed. In that environment, I'd probably multiply (or add) the cycle counter with a read from an unconnected analog pin and use that.
downloaded and tested on PCA10059 -- ran same sequence as before:
erased FS
reloaded libs
reloaded ble_uart_echo_test
this time all files were present
ran ble_uart_echo_test
copied 5Kbyte file to CIRCUITPY a few times
no issues
@uhreber I do sleep a regular amount. :sleeping: :smiley: I work from home so it's easy to work late and check on things in the morning.
The "running out of space" bug is probably separate. It may be a flaw in the FAT filesystem code.
Based on this testing, I'll merge these changes for now, and make sure we have an issue for "filling up the filesystem". Thank you both.
Fixed at least partially by #1661.
Thanks for the input @deshipu. That wasn't explained very clearly anywhere I could find.
@rdagger, I'm not loading a full bitmap. It's only displaying the REPL output onto my screen with my code. The board I'm using is a 1.44" 128x128 screen that is very similar to the screen this driver was written for, so I'm not surprised mine is working. I went ahead and ordered the screen you mentioned off amazon and will test it. It should arrive in a couple days. Also yes, I do have access to an osc...
Closing for now. Good places for this support are in https://adafru.it/discord, #help-with-circuitpython channel, or https://forums.adafruit.com.
On which board(s) are you having trouble?
hm, import board not grokking on the pi
@ruby lake did you install a library that has adafruit-blinka has a dependency? That should make import board available
or install adafruit-blink explicitly
@tulip sleet I installed adafruit-blinka
hmm
i disrecommend using pip with sudo, but, well,...
yeah I typically dont, but it apparently needed some permission
Thanks for this. Filed an issue in the other repo as well: https://github.com/adafruit/samd-peripherals/issues/19
Should be fixed by #1604 and/or #1649.
This is probably fixed by the filesystem flush fixes.
There seems to be something wrong with the frozen-in version of ntptime. As a workaround for now, try copying the file below,ntptime.py, to the root directory and importing it. I did that and it didn't crash. This is the exactly the file that is supposed to be built in:
https://github.com/adafruit/circuitpython/blob/3.x/ports/esp8266/modules/ntptime.py
Link to raw version (for direct download):
https://github.com/adafruit/circuitpython/raw/3.x/ports/esp8266/modules/ntptime.py
Whoops, forgot to say. This is on the Itsy Bitsy M4 express so far that I have tested.
It appears that all of the frozen python modules files are broken, so if you need others, copy those too, from the modules directory above.
This is broken all the way back to 3.0.0. Alternatively, try the 2.3.1 release for esp8266, which was well-tested: https://github.com/adafruit/circuitpython/releases/tag/2.3.1
ESP8266 support was dropped for CircuitPython 4.0.
this is strange because I know I have used many of those modules in the past and I think I was using them well beyond 3.0.0
I was wrong, only ntpsetup.py and port_diag.py cause a crash. The other frozen modules are fine.
*ntptime.py
@tulip sleet I read that as naptime.py.
time.sleep(10)
Search based on name, and not id.
while not time.sleep(2):
time.sleep(3)
@ruby lake Did you try pip install —user? That is preferred over the use of sudo.
I compiled the latest master for pca10059.
Ran some bluetooth test code, and used f3 to test the drive.
Result:
SECTORS ok/corrupted/changed/overwritten
Validating file 1.h2w ... 405/ 1/ 2/ 0
Data OK: 202.50 KB (405 sectors)
Data LOST: 1.50 KB (3 sectors)
Corrupted: 512.00 Byte (1 sectors)
Slightly changed: 1.00 KB (2 sectors)
Overwritten: 0.00 Byte (0 sectors)
Average reading speed: 330.73 KB/s
Is the meeting in Tuesday this week?
@wraith tiger The meeting is in 40 minutes or so.
Ok, thanks
I can’t make it this week and didn’t find the notes link. I catch up later.
@wraith tiger https://docs.google.com/document/d/11J6ARiRVqRigbPG6HNxeuAv96XJfkM_Xfi4gPRVGqHM/edit# If you want to add your notes, we can read them off. No worries either way.
CircuitPython Weekly March 18th, 2019 Video is available here on YouTube and on diode.zone Thanks to @kattni for taking notes! Join here for the chat all week: http://adafru.it/discord The weekly happens normally at 2pm ET/11am PT on Mondays. Check the #circuitpyth...
@dhalbert thanks for the trace file, I saw control endpoint didn't response after request to get input report from HID with report ID = 0x05. Can you help me to dumb HID report on your pc as follow command.
sudo usbhid-dump -d 0x239a -i3 | grep -v : | xxd -r -p | hidrd-convert -o spec
You may need to install hidrd, on linux it is simply sudo apt install hidrd
this is not important, but the interface number of your descriptor is a bit o...
👋
Good afternoon all you wonderful people -- lurking today [lots of background noise]
👋 Hello! Text only today. Rock 'n' Roll in the studio today. Sounds like the 1980s.
Transformers, GI Joe, and mullets.
Transformers, Rectifiers and Inductors
Care Bears and Cabbage Patch, too.
@hathach The traces are from the chromebook. I'm not sure I can run usbhid-dump or equivalent on it -- maybe if I switch to developer mode -- (have to wipe it to do that) . Or did you want it from just any Linux host?
lurking
Hello all, just lurking
lurking
👋 👍
2-2 and 5-5 look more like snakes
or 5 2 and 2 5
6-6, like a coiled snake? 
One small step for Python, one giant slither for CircuitPython....
I did further testing this morning. I was wrong about the SPI data. The command and data are transmitted. There’s a delay between the command and data that threw off my scope. This delay was not present in the RGB Display library initialization.
I’m still not getting anything on the screen. Could someone please post a simple demo to draw anything using displayio.
Here's my current code that does nothing:
import board
import displayio
import adafruit_st7735
from time import...
mind the gap
🎼
it's time to read some buttons
it's time to blink some lights
it's time to make it easy
with circuitpython tonight
🎼
snakes love frogs
Happily lurking 🕵
I may have to leave early, can I do hug reports and status update at the same time?
here be a 🚫 blame zone!
I am lurking. A hug report to all on 4.0
That was a good timelapse
Thanks! First time I've ever done one.
Group hug to the team and community. Been on the receiving end of a lot of helpful advice, guidance, and patience this past week. Also, thanks to @meager fog for challenging me to create a classic MIDI UART library (borrowed almost completely from her MIDI USB library) – and for the accompanying and steep GitHub learning curve. Whew.
@idle owl which timelapse is that?
Soldering marathon time lapse. https://youtu.be/SqYOC_pNouY
This weekend we had a soldering marathon to prepare for the CircuitPython sprints at PyCon in May 2019. We soldered over 160 boards over the course of nearly...
yah - new webpage download is awesome!
just had an idea for circuitpython.org: eventually put up compiled mpy-cross
You can dump while attaching to your main pc. I just want to know which report ID host is trying ro get
Nope
I gotta go, thanks everyne
Negative Yep!
Btw, did the issue happen with other mcu such as m4 or nrf5x ??
@idle owl That timelapse was awesome -- and it was a marathon indeed! How long was that in real time?
6 hours....wow. Very nice.
6 hours 😲
(I thought the other set of hands was scott, judging by the smartwatch). Six hours, woah!
@prime flower Scott is on the other side of the country.
but he has a wide reach 😉
That's what confused me 😃
Great security testing in case the credentials get compromised down the road.
I wrote a logging library for CP based on CPython's (much simpler). Like CPython's it uses pluggable message handlers for publishing. Guide should be live soon with sample handlers for uart, file, and Adafruit IO (on the PyPortal).
@hathac Interestingly, seems to be SAMD-related. M0 and M4 boards don't show up as /dev/ttyACM0, but nrf52480 boards (Feather and PCA10059) are showing up.
NEW Guide: https://learn.adafruit.com/pyportal-email-display/
This project turns your PyPortal into an interactive display. Send emails to a Zapier inbound inbox and have them appear on the PyPortal's display using Circuit python code.
ST:TNG inspired alarm clock in CP is nearing completion as well. Just waiting on final case design from Noe & Pedro.
@umbral dagger Make it so.
😃
Finished the “classic” MIDI UART library. @split ocean successfully tested it on a couple of his unique DIY MIDI controllers. Coupled it with my Range_Slicer library to quantize potentiometer settings into MIDI control and note codes. Was completely distracted by PyPortal projects this week. Customized the Weather Station project and used it as an excuse to dive deeper into CircuitPython coding. Of course, not I have a lot more questions to ask. Thanks again to everyone for their patience.
Over the next week I’ll be moving most of my development project archives into GitHub now that I’m dangerously quasi-knowledgeable. I’ll continue to wrap up the test of non-linear Range_Slicer library algorithms and will finally send the PCB off to OSH Park. If PyPortal doesn’t call to me. My weather station needs to play some wave files of our local weatherperson’s glib remarks at appropriate intervals.
I would like to join in the weeds . I am trying to use the busio-uart. For uart midi on the pi and it does not work for the midi baud rate.
@stuck elbow nice! i started working on one for the MGC3030. would love to peek at how you did it.
@raven canopy my design is here: https://oshpark.com/shared_projects/LTa9tc15
@pulsar ferry the plan is to mount the two parts one on top of the other with a small gap, to get the required 3 layers of the antenna
(and the weird layout is to trick the fab that this is a single pcb)
and to fit it in 10x10cm
@idle owl PCB designs! 🥇
@errant grail First board I did from start to finish - didn't use a current design to do the board.
Second to soldering, PCB layout is my therapy.
@stuck elbow looks good. i was going without the 5th "button" electrode, and 2-layer only. hopefully 10x10cm works for you. sheet mentioned a minimum of 20x20, i thought. based on that, i had the wing similar to the size of the TFT wing.
my sheet says the minimum is 5x5cm and that's what I'm doing
it also said the ground is obligatory for battery-powered devices that are not grounded
It's not a standard inteval any more. May need an external UART.
yeah, i was going non-battery to start with. this would be my first "finished" PCB...assuming i finished it. 😄
Classic DIN midi to USB adapters can be found for < $20
I can also see, that CP4 is much slower when writing the flash than CP3.
On an ItsyBitsy M4 Express (yeah, I now have one, just arrived) I get (using f3write):
CP3: Average writing speed: 104.00 KB/s Average reading speed: 875.80 KB/s
CP4: Average writing speed: 48.73 KB/s Average reading speed: 947.08 KB/s
pca10056:
CP4: Average writing speed: 17.39 KB/s Average reading speed: 486.17 KB/s
pca10059:
CP4: Writing speed not available Average reading speed: 412.01 KB/s
Cough cough pmod ?
Thanks!
later
The roots ?
@inland tusk Here's a Classic MIDI FeatherWing PCB I designed: https://oshpark.com/shared_projects/DqUWbRo5
... and a Trinket M0 version: https://oshpark.com/shared_projects/r2q6OPWz
I'm testing a STEMMA Classic MIDI interface design this week.
Thanks all!
in the swamp, in the desert, in orbit, on the moon, halfway to Alpha Centauri
Swamp castle ?
anyone know how to install arachne-pnr on mac? i'm having issues: ```
Jonahs-MacBook-Pro:arachne-pnr jonahym$ make && sudo make install
make: *** No rule to make target /usr/local/share/icebox/chipdb-384.txt', needed by share/arachne-pnr/chipdb-384.bin'. Stop.
@slender iron you've messed with fpga right?
I'll be fighting that dragon soon, trying to install nextpnr or symbiflow.
I’ve done a little with FPGA when I took a workshop at the Hackaday SuperCon last November. Otherwise, it’s been on my todo list and I already have 4 FPGA boards.
Also hoping Arduino comes out with the "FPGA for everybody" software support they alluded to when they came out with the MKR 4000.
Yeah, me too. I thought Verilog was fun and more straightforward than I imagined. It’s kind of like wiring up a circuit, but in software.
I played with it a while back, when PAL and GALs were current, and I quite liked the idea that I could essentially wire up a circuit by describing what I wanted it to do.
Did I see that 4.0 was released? I couldn't make the call today, but I thought I saw a message flash by in the chat. I've been busy removing water from my basement and other related homeowner tasks most of the last week. (On a related note, I did put my Particle Photon powered remote power switch to work controlling a submersible pump to "relocate" water from our landscaping rock to the backyard. Thinking of converting that to an Argon and using CP. But there was no time last week. Rising water has little patience for nerdy tinkering.)
This was a fork from your repo and the files existed. Since you thought the clone was incomplete then I decided to delete all and redo the clone to make sure. It works fine now. Not sure what I did wrong but thanks for the quick reply.
okay Arachne-pnr needs to be installed after icestorm
but i'm getting this error: cc -MD -O2 -Wall -std=c99 -I/usr/local/include -c -o mpsse.o mpsse.c mpsse.c:26:10: fatal error: 'ftdi.h' file not found #include <ftdi.h> when running from this site (http://www.clifford.at/icestorm/) in my /Documents folder
@old smelt, CircuitPython 4.0.0 Beta 5 was the latest release.
Ah, okay.. So, still in Beta?
Yes
Ok. Thanks!
Yw
@slender iron ping
live?
okay installed by using brew install libftdi0
now when installing yosys i get: [ 11%] Building frontends/ast/dpicall.o frontends/ast/dpicall.cc:25:10: fatal error: 'ffi.h' file not found #include <ffi.h> ^~~~~~~ 1 error generated. make: *** [frontends/ast/dpicall.o] Error 1
working through it, but if it jumps out as familiar i'd love the hand
can i specify a specific file to include in a .cc? line #include /usr/local/Cellar/libffi/3.2.1/lib/libffi-3.2.1/include/ffi.h? does it need quotes or?
Ah it is "
typically, an include path is specified in a makefile
it specified it, but could not find it.
i'm just pointing it directly to it
frontends/verilog/verilog_parser.y:99.14-34: syntax error, unexpected string, expecting =
make: *** [frontends/verilog/verilog_parser.tab.cc] Error 1```
different issue
what is a .y file?
Learn about .Y files and view a list of programs that open them.
@slender iron do we want the requests like "add 4-h board" and "add pycon 2018 gemma" in issues for .org? https://github.com/adafruit/circuitpython-org/issues
@river quest theres or adafruit/circuitpython
yah, it might be better in adafruit/circuitpython since it would be coming from the builds and then it would automatically get to .org
i'll put in adafruit/circuitpython
at some point i'd like to have a way to show all the linux boards that support blinka, i'm thinking it would be another section and pull in to .org
It's confusing in displayio.
@river quest ya, that'd be very cool
Add gmtime() to support foundational timekeeping in UTC to permit conversion to localtime() or when needed to calculate an offset to convert a UTC time value to the local timezone. See discussion: adafruit/Adafruit_CircuitPython_PyPortal/issues #16
for circuitpython boards with different silk' on the board, let's add it as a build so it shows up on: https://circuitpython.org/downloads
pycon 2018 gemma info is here:
https://github.com/adafruit/CircuitPython_Badge_README/tree/master/final_versions/PYCON_2018
(photos, etc).
for circuitpython boards with different silk' on the board, let's add it as a build so it shows up on: https://circuitpython.org/downloads
4-h board info here (photos, etc):
https://www.adafruit.com/4h
@river quest we could also add the concept of an alias to the website so that we don't need to build an identical board
for circuitpython boards with different silk' on the board, let's add it as a build so it shows up on: https://circuitpython.org/downloads
add Digi-Key + Adafruit PyCon 2019 board to builds, can be a placeholder - images to follow soon and we'll also link to:
https://github.com/adafruit/PyCon2019
@slender iron that works as long as we can have a different photo which seems like that would always work
i think we'd just change the photo and the text and point to resources that go along with that specific board that has different silk' but nothing else different
@river quest ok, that makes sense
@solar whale new bundle is out
was just credentials
<@&356864093652516868> updated state of circuitpython is here: https://adafruit-circuit-python.s3.amazonaws.com/adabot/bin/adabot/circuitpython_library_report_20190318.txt
@gilded cradle Thanks for doing the logger release!
You’re welcome @umbral dagger
Guide is live and the library is in the latest bundle: logging in CircuitPython.
updated the auth token for the circuitpython repo too
I.e debug/info/error logging, not data logging... though you could use it for that.
NEWS we can now talk about this, blinka runs on this, released today
ooooh, nice!
$120 for one isn't too bad
@dhalbert hmm, I guess it could be setup packet handling code specifically with samd port. Give me a bit of time, I will check and try to come up with a patch for you to test again.
we will know soon about google coral and blinka (just need a few hours) https://blog.adafruit.com/2019/03/06/google-coral-edge-tpu-products-tensorflow-tfdevsummit-tensorflow/
@slender iron https://circuitpython.org/downloads lookin good
CircuitPython Organization
yup! thanks for the pics!
yep, more soon - some one the ones that are blank we can decide what to do
i'll get to some of the text soon too
👍
This looks awesome
Actually, ntptime.settime() also can't work, it dependent utime module, Adafruit circuitpython has n't utime module.
@hathach here is the hidrd output from a Metro M4:
cpy-hidrd.txt
As noted above, if we remove the GAMEPAD, /dev/ttyACM0 shows up.
One thing I am thinking of in the long run is making the keyboard be a boot device, in an unshared endpoint. A few people have asked for that so they can use a board as a boot keyboard.
Thanks @dhalbert, though I think it is most likely usb port issue now, since the stack handles it just fine with nrf port.
I did an hidrd report with the Feather nRF52480, and it's identical.
For boot keyboard, tinyusb should be able to handle that now. Though there may be a bit of gotcach, can you open an issue for boot device and assign me there. I will do a PR for that
Here is a Beagle trace of the Feather nRF52840, which is reporting a descriptor that should be identical non-working trinket M0 from the 4.0.0 trace above.
circuitpython-4.0.0-beta.5-feather-nrf52840-samsung-chromebook-usb2.tdc.zip
Though there may be a bit of gotcach, can you open an issue for boot device and assign me there. I will do a PR for that
Hi, do you mean a tinyusb issue or a CircuitPython issue? No problem for us doing it for CPy.
@water5 - Aha, you've figured out the problem! Try just replacing utime with time.
I'm not sure what the problem is with port_diag.py, but actually calling esp.check_fw() calls a crash. However, I don't think that should cause the import to crash.
@dhalbert most likely tinyusb port issue ☺☺ but could be both, need to give it a few try to be sure :)
`import ntptime
import time as utime
ntptime.settime()`
also appear :
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "ntptime.py", line 32, in settime
ImportError: no module named 'utime'
oh joy! The CircuitPython heap was corrupted because the stack was to small. first time i've gotten that one.
clearly i subscribe to Mark Watney's philosophy: "If you solve enough problems, you get to come home." 😆
I wasn't having any luck so I wrote an init sequence for the SSD1351 OLED display:
"""
SSD1351
"""
import displayio
_INIT_SEQUENCE = (
b"\xFD\x01\x12" # COMMAND_LOCK Unlock IC MCU
b"\xFD\x01\xB1" # COMMAND_LOCK
b"\xAE\x00" # DISPLAY_OFF
b"\xB2\x03\xA4\x00\x00" # DISPLAY_ENHANCEMENT
b"\xB3\x01\xF0" # CLOCK_DIV
b"\xCA\x01\x7F" # MUX_RATIO
b"\xA0\x01\x74" # SET_REMAP
b"\xA1\x01\x00" # START_LINE
b"\xA2\x01\x00" # DISPLAY_OFFSET...
You have to use your own copy of ntptime.py, and change the import utime that's further down in the program. You can't use the built-in frozen copy.
Very nice @rdagger! I've requested for a couple display repos to be created. Once that's complete, would you like to package that driver up into a PR? I can help you out if you would like.
Regarding the displayio sample code, I think it's probably outdated. I recently wrote some sample code for the ILI9341 CP driver that could be minimally repurposed for the other displays. It just basically initializes the display and fills the screen red.
Does Adafruit take pull requests for their Libraries? I've found doing a check to make sure self._uart.in_waiting is at least 64 before calling _uart.readline() on line 145 in adafruit_gps.py really speeds up calls to gps.update()
I think before it would call readline() and wait until there is some data before returning
(I also must admit I'm new to CircuitPython and the GPS Module so I could be doing something stupid)
@vocal vault, yep. I submit PRs almost every day. I just submitted one 20 minutes ago.
@gilded cradle sweet!
@makermelissa Please feel free to use the driver in a PR. I would really appreciate if you could post your sample code for the ILI9341. Thanks.
@makermelissa Thanks, I didn't notice that you had created the sample code in the repo. I did try something very close but got nothing on the display other than snow which occurs regardless after initialization.
import board
import displayio
from ssd1351dio import SSD1351
spi = board.SPI()
displayio.release_displays()
display_bus = displayio.FourWire(spi, command=board.D10,
chip_select=board.D11, reset=board.D9)
display = SSD1351(display_bus)
#...
Ok, well I plan on knocking out some of these display drivers this week. I just got the 160x80 Mini TFT working tonight and am getting the rest of the init commands plugged into the ST7735 driver right now. Hopefully I can get something for you on Wednesday.
I updated the creds for adafruit/circuitpython and adafruit/adabot so they should be good to go.
I just had a wiped drive again on a pca10059, running the latest master firmware.
I had a program and libs on the drive, copied over the main.py with a different one, and the program didn't start. After unplugging and replugging, the drive was wiped clean.
Although the latest Beta 5 is more stable than Beta 4, Ive had 2-3 instances where the NeoPixel Went Red and the File System locked up. Resetting it brought it to Safe Mode and it notified me that a Hard Fault had occurred. In one instance, I had several folders replaced with zero-byte files.
@river quest the Coral board looks really interesting. And CircuitPython would be really interesting to a whole bunch of PyData folks I know who'd be in that crossover area between machine learning and Python. Gosh... I'm sitting here with a large grin on my face just thinking about what they'd make of it. 😃
When time.localtime() appear "RuntimeError: RTC is not supported on this board".
But actually, machine.RTC().datetime() works fine.
Which operating system are you using, and how long did you wait after it didn't restart? It sounds like you caught it in the middle before the write was complete.
I do have further ideas about making the caching safer and will get you some test UF2's later.
Could you also show how you set up and ran the f3 test, just for reference? Thanks.
In this case, the operating system was Windows 10 Enterprise 1709, because this is what I have at work.
At home, I mostly use Linux Mint 19.1.
After copying over the main.py, I waited quite a while, because when it didn't run, I first started mu to check what was going on, but couldn't get a serial connection, so I decided to replug it.
After that, the drive was wiped clean, but I could get a serial connection.
About f3: It's a Linux tool, that most distributions should have in their...
I freshly flashed a pca10059, put some libs and example code on it, and let it run for some time, replacing the main.py occasionally.
So far I couldn't reproduce the error.
I tried the following code:
from time import sleep
from adafruit_hid.mouse import Mouse
mouse = Mouse()
while True:
mouse.move(x=15)
sleep(0.07)
mouse.move(y=15)
sleep(0.07)
mouse.move(x=-15)
sleep(0.07)
mouse.move(y=-15)
sleep(0.07)
Just a simple test, to move the mouse cursor around in squares.
The code runs perfectly when:
- started by ^D
- started by file system interrupt when the file containing the code (here: main.py) is ...
Do you get any errors or other message in the console?
Should there be any errors, they're long gone when I connect a terminal.
I only get a REPL prompt after pressing enter.
But the LED blink code should give a hint, I guess?
I don't suppose you have a PyPortal or Hallowing to try and get the messages displayed on the screen? I tried with a Hallowing just now, but I couldn't reproduce your problem — it works for me.
By the way, which version of the firmware are you using?
That's the same I tried. I suppose this is something specific to Windows.
You could try adding some delay at the beginning of the program...
Maybe. I'll try it with Linux when I'm home.
I already tried a 5 seconds delay at the beginning. No dice.
I now added a 0.5 seconds delay before and after instantiating mouse, and now it works.
This should maybe be added to the documentation/examples.
The working code is now:
from time import sleep
import analogio
import board
import digitalio
from adafruit_hid.mouse import Mouse
sleep(0.5)
mouse = Mouse()
sleep(0.5)
while True:
mouse.move(x=15)
sleep(0.07)
mouse.move(y=15)
sleep(0.07)
mouse.move(x=-15)
sleep(0.07)
mouse.move(y=-15)
...
Your experience two comments up is familiar. Windows in particular, and Linux to a lesser extent, do not write all the data and metadata to the drive immediately when you write a file. For Windows, this can take up to 90 seconds, for Linux, it's 10-20 seconds or so. Windows has a long delay only with FAT12 filesystems. See https://superuser.com/questions/1197897/windows-delays-writing-fat-table-on-small-usb-drive-despite-quick-removal/ for more information.
If you copied main.py to CIRCUIT...
The Mouse code actually does this already, but it sounds like you need a bit more: https://github.com/adafruit/Adafruit_CircuitPython_HID/blob/master/adafruit_hid/mouse.py#L60
a50ee4f Add frozen stage module to ugame10 board - deshipu
d81db3b Merge branch 'master' of github.com:adafruit/ci... - deshipu
8543695 Merge pull request #1653 from python-ugame/master - tannewt
@umbral dagger The logging guide is sweet - just got around to reading it
great work on it
okay, i got the fpga working!
i'm gonna see if cp compiles w/out periferals
and put the toolchain for macos (compiled in 10.14) along with the "stock tinyfpga_bx picosco" file on drive here: https://drive.google.com/file/d/1qJ1d-On3G-b2UbYn3N0lG_ItegmkT_vZ/view?usp=sharing
@prime flower Thanks.
I did eject the stick before unplugging it. And the code didn't run when I copied the new main.py over the older, so I guess the error happened at the moment of writing.
On Linux, I disabled all write caching for circuitpython drives.
Q: where is the toolchain used for compiling the c specified? i looked as CROSS but that seemed to be just for arm
in each port's makefiles, I guess?
What were your doing (or what was happening) at the time? If I can reproduce this I can catch the hard fault and debug.
I was working on writing the displayio driver for the Mini 160x80 driver. I think it happened immediately after I saved changes to a CP script, but most of the time it was fine.
I’ll let you know if I find something more specific that causes it.
Hi all, it's been toooooo long since I've dropped in.
@onyx hinge Hey! Welcome back 😃
hi @idle owl and thanks
I reallly hope I have a chance to work on a CP project this weekend. It'll be a clock with an unusual analog dial style.
Looks neat!
I haven't done graphics with CP yet, so it'll be new to me. I think there are some enhancements in CP4 for that?
displayio has a ton of stuff in it. However, at the moment, we can't do GIFs so you'd have to figure out another method.
displayio, but updating the whole screen is going to be slow
the display only goes around twice a day, so it'll be more about wanting to prevent obvious tearing than about getting 60fps
I want to do tetris for the hallowing at some point, using the teeth as touch buttons
I think that at least at the register level, RA8875 with the 480x272 screen can do double buffering, but I don't think that adafruit_ra8875 supports it yet based on the documentation.
No it doesn’t. @onyx hinge. Neither does the CP library that I wrote. For that it was a matter of striking a balance between having a huge library with every feature and making it easy to use. If you’d like to give adding it to either library a shot, go ahead and submit a PR.
@gilded cradle I'll keep that in mind. I know simplicity is highly valued in the CP community!
👋 @onyx hinge
hi @raven canopy
what's up?
I live in Nebraska, where we are currently having some problems with flooding. However, my city is not affected very much.
@gilded cradle could a separate lib subclass it to add the double buffer?
jelper: good to hear your'e safe, must be never racking tho...
I think it’s a matter of modifying the initialization of the display and adding some functions to switch between layers. I think it only works in low res mode though. Don’t remember for sure. It’s in the data “sheet”.
@gilded cradle Yeah, there's not enough RAM in the RA8875 to do double buffering with the 800x480 screens, except maybe if you work in 8bpp mode instead of 16bpp mode
(so far I've only got the datasheet to read, not the hardware)
Yeah, it’s something along those lines.
So some color encoding changes may be required too.
I think that the mode I want is "7-1-3-4 Buffer Scroll (Layer 2 is used as Scroll Buffer)"
all the data
i got lotso data
If you have one (or several), please pull up the REPL and run the following, and then paste me the results. import microcontroller buf = microcontroller.cpu.uid print ([int(i) for i in buf])
Adafruit CircuitPython 2.1.0 on 2017-10-17; Adafruit CircuitPlayground Express with samd21g18
>>> import microcontroller
>>> buf = microcontroller.cpu.uid
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Processor' object has no attribute 'uid'
>>> print ([int(i) for i in buf])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'buf' is not defined
>>>
>>> print ([int(i) for i in buf])
[176, 46, 169, 39, 87, 82, 77, 80, 32, 49, 46, 53, 17, 49, 15, 255]
>>> buf
bytearray(b"\xb0.\xa9'WRMP 1.5\x111\x0f\xff")
WRMP 1.5 is fishy
You're running 2.0 @stuck elbow
@idle owl that's because it's an old edition and the newer releases have wrong pins for it
@tulip sleet Fishy how?
I think that string is meant to be human-readable?
@stuck elbow ah ok. Thanks for trying it! I didn't realise it was added later.
@tulip sleet I got the same thing on mine.
>>> import microcontroller
>>> microcontroller.cpu.uid
bytearray(b'\xfd\xea\xd9y02MP 1.9\x12\x14\x0e\xff')
bytearray(b'=\x9b\x1c\xdeWRMP 1.5\x1c*\r\xff')
from a Metro M0
bytearray(b'\xf2\x84\x83\xb22C7S 1J\x1c\x10\xff') Feather M4.
That's why I converted it to int. FIgured I'd get something out of it. Middle value is 32 and end value is 255 seems to be static for the CPXs.
I wanted to figure out if converting to int and then using the first value or something would work.
but needed more than a few data points to determine that.
Trinket M0:
>>> microcontroller.cpu.uid
bytearray(b"+6h832KP 1.8A'\x12\xff")
Shorty!
you could just add up the bytes
How would I do that? I don't know how to work with bytearrays except to be told they're not good to work with, so convert them to something else.
Owait.
1310```
are you trying to get a random seed?
Yah I think so.
I'm trying to use the uid to determine an action on startup. So I was looking for something unique about it to work with. Clearly they're all unique, but I was trying to get away from working with the entire bytearray
Adding it up gets away from that. But I still need more data samples to know what ranges or whatever to set the actions to.
you could just do sum(uid) % n, where n is how many alternatives you want
interesting.
@tulip sleet Thanks! Now I need to try it on a bunch of boards, but the three I have hooked up returned 1 and 2 for % 3.
found it
@idle owl [83, 71, 10, 142, 51, 50, 75, 80, 32, 49, 46, 55, 22, 44, 2, 255]
@stuck elbow Thanks! Can you do sum(buf) % 3 and tell me what you get?
2
Ok thank you!
@idle owl my CPX uid gets 0
so looks good. I was hoping the sum wasn't always even or something like that
it's a pretty minimal number of characters of program code
Yep
@idle owl I think you could also try hash(uid)%3
it will combine the bytes of uid in a slightly more complicated way than sum() will, reducing any patterns that might exist in the uids
@onyx hinge Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported type for __hash__: 'bytearray'
@slender iron is there any way to load a Bitmap (not OnDiskBitmap) from a BMP file?
@idle owl try hash(str(buf)) % 3
Oh nice.
my result was still 1
😃
Or you could do something like buf[0] % 3 since that byte varies quite a bit
It up to you either way though.
shared-bindings/displayio/Bitmap.c:
STATIC mp_obj_t displayio_bitmap_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
mp_arg_check_num(n_args, kw_args, 3, 3, false);
uint32_t width = mp_obj_get_int(pos_args[0]);
uint32_t height = mp_obj_get_int(pos_args[1]);
uint32_t value_count = mp_obj_get_int(pos_args[2]);
uint32_t power_of_two = 1;
while (value_count > (1U << power_of_two)) {
power_of_two <<= 1...
@timber mango I think you hit a bug in Bitmap that caused a hang.
I think it's supposed to be +=1. The idea is to find the lowest power of two that is greater than the value_count.
@slender iron thanks!
@slender iron there is no longer a Sprite?
@tulip sleet oops
so a sprite is just a 1x1 grid?
one more question, how do I use the palette? I don't see anything taking it as an argument
I see
I just tried the main.py from the original post on 4.0.0 Beta 5 and it worked just fine. It also works after CTRL-D. I think this is fixed.
@Rathmore did my response above get you going on this? I don't think it's a bug.
@tulip sleet sorry for a false alarm
@timber mango - np, finding bugs one way or another is great. It's just a different something making smoke
by the way, is there a way to force safe mode? because I can't delete that code now...
@stuck elbow if you do a slow reset double tap you should be able to get into safe mode
the second click will be when the RGB led is yellow
(on startup, not blinking)
excellent, that worked, thanks
👍 glad I fixed that
@slender iron it would be nice if I could pass to the Bitmap and Palette constructors an initial buffer
because I could use a frozen bytestring there
ya, you could add it
ok, I will try
I got a cheap signal analyzer from Amazon and some and some e-z-hooks from Digi-Key.
I’m going to play around with pulseview.
I also have a db9 breakout on order to attempt to analyze the communication from my DMM.
tried to use the W5500 feather wing with a Feather M4 Express (great combination, pin compatible and allow piggypacking) with CP4 beta 5 but only with partial success:
connected, ifconfig(), socket.socket, connect seems to work, get a connection to a server socket, but when I try to send something it results in I/O errors, close doesn´t result in an error but socket isn´t really closed.
@stuck elbow What do you use for probes?
those
they have a small hook at the end
I find they have surer grip than those e-z thingies
@slender iron there is something wrong with the palette, when I specify color 0x001f, which should be 100% red, it's black
OK, I saw those on Digi-Key also, the same company makes both.
@tulip sleet what is the bug in Bitmap? i'm running into filesystem issues also. scanning scrollback, but don't know full history/story.
it infinite-loops, so it will hang (and not do anything, like maybe not write to the filesystem)
i'll be afk for a couple of hours
ok. sounds like something known?
if you can characterize your filesystem problems, that's be great, even if they are intermittent. issue filed for Bitmap: https://github.com/adafruit/circuitpython/issues/1669
cool. thanks. i'll take a look and add if i have anything useful.
this might just be new-to-me(c)
it's Bitmap, but not OnDiskBitmap
It was confusing in displayio.
Fixes #1662
@slender iron if you are around i hada' question about https://circuitpython.org/downloads works
CircuitPython Organization
shoot!
when one of them like pybadge links to unknown https://circuitpython.org/board/unknown/ ...
Oops! Looks like we don’t know anything about this board. This means it’s likely very new.
can i do board template clone and name it pybadge to start what will be there?
-or-
do we need to wait until there is a real build and that automagically makes a non-unknown page?
same for meowmeow, it links to unknown
etc
template clone will fix it
ok, i think i understand. i'll try to clone one with the named id, like meowmeow and see what happens after the PR is merged
yup, that should work
this way i can get some of the photos and/or text in some of them
even if it's just a better place holder
totally
okee dokke
@river quest no Adafruit in the name section
it'll be "PyBadge by Adafruit"
I removed the parameter and now get:
code.py output:
Traceback (most recent call last):
File "code.py", line 9, in <module>
File "adafruit_slideshow.py", line 200, in __init__
File "adafruit_slideshow.py", line 316, in advance
TypeError: extra keyword arguments given
I updated my libraries to the version that dropped today (3/19), and I still get the same output. I am still on beta 5.
My slideshow line reads
slideshow = SlideShow(board.DISPLAY, folder="/images...
k, I can fix it
it can just be PyBadge
i see the format now in the other ones, all good
@slender iron ok, i see the PR - how long does it take for it to update there so pybadge links to the new board page?
got it, ok - i'll check back later and then start doing some text and board-making between things, etc
@tulip sleet https://github.com/micropython/micropython/pull/4589
I had a similar problem (which I gave up on): https://github.com/adafruit/circuitpython/issues/1500#issuecomment-463825158
@slender iron is there a max for color_count in Palette?
Adafruit CircuitPython 4.0.0-beta.5 on 2019-03-17; Adafruit PyPortal with samd51j20
>>> from displayio import Palette
>>> p1 = Palette(2)
>>> p2 = Palette(256)
>>> p1[0] = 0xff0000
>>> p2[0] = 0xff0000
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: Palette index out of range
>>>
>>> p3 = Palette(255)
>>> p3[0] = 0xff0000
>>>
@tidal kiln yup, 255
looks like it needs an arg check
I can't quite remember the details
thanks. got past that by knocking the number of colors down in the BMP.
now hitting this:
AttributeError: 'Bitmap' object has no attribute '_load_row'
looks like it hasn't been updated for subscript access
worth an issue?
np. i'll create one.
thanks!
On Wed, 20 Mar 2019, at 10:57, Noralf Trønnes wrote:
I had a similar problem (which I gave up on): #1500 (comment) https://github.com/adafruit/circuitpython/issues/1500#issuecomment-463825158
Hmmm, I've tried a couple of times to replicate these ones but somehow my module is cursed to work. I'll go through the reports again and see if I can find some common element, perhaps my hardware is slightly differently configured.
-----Nick
do you want one for the Palette range check also?
sure, that'd be good to improve
Can instantiate a Palette with a color_count that exceeds max (255?) without getting any errors. But then it errors out later.
Adafruit CircuitPython 4.0.0-beta.5 on 2019-03-17; Adafruit PyPortal with samd51j20
>>> from displayio import Palette
>>> p1 = Palette(255)
>>> p2 = Palette(256)
>>> p1[0] = 0xFF0000
>>> p2[0] = 0xFF0000
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: Palette index out of range
>>>
Hiya. Thanks!
good work, the fab print isnt quite right, did @idle owl give you a hand with it?
No, I did it by looking at other guides.
I think I took what was linked in the product, but I can fix it.
ooh ok - yeah the fab print should have dimensions on it
its close
but rather than having he part names, should have arrows in mm or inches to show mounting dims and sizes n stuff
people use the fab print for drill templates n stuff
@idle owl can give you a hand if you've neve done it
ill make the guide live and y'all can fix at your convenience
Ah. ok. I'll ask her. Thanks
nice!
Thanks again @meager fog.
thank you
😃
you did great- and its a lovely guide - its one that slipped thru
Thanks. It took a while because I wanted to make it good, plus was dealing with a move.
I pointed damien to our downloads page and his reaction was "I need to do that". I said "let us know if we can help". 😃
@gilded cradle the care shows 😃 mike barela will blog it up when he's around next
let me know if you want any more displays or drivers to play with!
Ok, I will. Thanks
oh @slender iron as i add text to the circuitpython.org boards, i'll back and edit the text on the ones that are there too, i'll remove "we" "our" etc. and make it stand-alone text so it makes sense on a non-adafruit site.
yup, cool. the trinket one read well
yah, i'll chip away at these between meetings, etc. good 15 min projects for me to do
keep an eye out for arduino specific stuff too
yep
cool cool. thank you for all of your help!
i'll prolly have mike b or someone do an edit too once we're all done for other things i missed
all good, this is fun, like gardening
in markdown
😃 🌻
🥕 🌽 🍠
@Rathmore Progress! Looks like @jerryneedell has already fixed the lib and it just needed a release. So, grab 1.0.4 here and give it a try. It'll be in the bundle sometime tomorrow.
Closing this because it's a library issue and has been fixed.
welp, that's more like farming with those emojis
"This week, Martha Stewart shows you unique ideas for gardening with Markdown". 😆
it's a good thing
indeed! and invasive. i find myself trying to Markdown all over the place. "MS Office, why are you not with the times!? ctrl+i is so 1998."
on a related note for those here, the plan is do a "github for kids" type resource, which is just really github for everyone who is not using it now (beginners). i'll put out the call for help as we get further on it.
@river quest as a guide or as simplified website?
@marble hornet oh, prolly both
@river quest I am planning on writing an ezgit bash script, so I can be lazier with the fingers later and type less to commit and push, along with some other simplifing stuff if that sounds useful for beginners. And any place for spitballing or here good?
Also slapped a battery and powerboost on the pyp and it's still so cool! Wanted to reiterate a thank you for the beta-ing opportunity to you and @meager fog.
Hi folks, does anyone have the command-line for ImageMagick to make PyPortal-compatible BMPs?
never mind: ```
convert somefile.png BMP3:somefile.bmp
i have an animated gif guide up for people who want to try it out: https://learn.adafruit.com/pyportal-animated-gif-display/
Just wanted to say that the CircuitPython Downloads page is looking awesome!
thanks @clear halo !
anyone want to help with the ht16k33? https://forums.adafruit.com/viewtopic.php?f=60&t=149054
looks like unreliable connections
@umbral dagger can you review https://github.com/adafruit/circuitpython-org/pull/61 ?
This PR adds timing code to flush the flash filesystem once a second (if needed). The interval can be varied by a compile constant.
I think this would solve any remaining file-flushing issues. But there may be other issues causing a hard crash that will corrupt the filesystem if they occur during a write, and this won't fix those.
I have done limited testing. I saw one safe-mode reboot on PyPortal that may have been unrelated to the filesystem.
Tagging @makermelissa and @uhrheber on ...
@uhrherber I installed f3, and it talks about writing gigabyte-sized files. There don't seem to be parameters to write smaller files. Do you just run it and have it fill up the filesystem (and presumably fails in some way when it reaches the limit)?
@dhalbert Just start f3, it'll write until the drive is full, but it seems to have a fixed block size, because it usually leaves some few kB free.
Sounds like the init sequence is parsed just fine. Please find us on the forums or Discord if you need further help with getting displays going.
Please remember to add a milestone.
For what it's worth, just noticed this occurs with 4.0.0 beta 5 too. Only about 1 in 20 of my errors does this, there's something data (or timing?) dependent about this.
@wallarug Any update on this?
Do we have room to enable COMPAT on more builds for 4.0.0?
Yes, now we do. I'll try it and do a PR.
@slender iron approved
FYI, In my case the data will pop out if you tap return (i.e. send some data in oppposite direction). The terminal session is not disconnected.
We have two special versions of CPX coming and we'd like separate downloads and download pages on the website for them. We don't need them to be unique builds though. So, we can copy the original version with a different name. It does need to work with build board info too.
We need to do this for:
- [ ] PyCon Gemma 2018
- [ ] DigiKey + Adafruit PyCon 2019 CircuitPlayground
- [ ] 4-H Green CircuitPlayground
Closing in favor of #1673 which is one issue for the tooling and can include initial boards to do.
Closing in favor of #1673 which is one issue for the tooling and can include initial boards to do.
Closing in favor of #1673 which is one issue for the tooling and can include initial boards to do.
@umbral dagger just invited you to circuitpython librarians
@slender iron Most excellent. Thanks.
Sorry about that. We could also add milestones to some PR's, though I'm not sure about the status of a number of them.
np, the main issue is that I won't see it if it's only assigned to me. When I'm looking at what to do next I start from the milestone issue list.
@dhalbert it wasn't. I just tried beta5 on my pyp and it crashed and reappeared as NO NAME.
the bootout.txt reads:
Adafruit CircuitPython 4.0.0-beta.5 on 2019-03-17; Adafruit PyPortal with samd51j20
I updated the firmware and then connected to the repl, using mu, and ctrl-c ed then ctrl-d ed.
@TG-Techie is it reproducible? If you can do it again, what was the main.py you were running? Thanks.
I would love to do that for the PewPew 10.3 (the big one) as well, if possible.
@meager fog is there a difference in the beta hardware that is here vs the production black ones?
of the pyportal @marble hornet ?
sorry, yes.
I don't thiiink so of the rev you have
My green one did have some pins swap
but I think yours is from the last test batch
I was under the same impression. it wiped itself again after uploading beta 5.
there have been reports of issues still
okay... and has turning off the auto-reset fixed it for everyone too?
flush?
By the way, how about renaming the power_of_two to bits or even bpp — this way there won't be a confusion whether the number says which power of two this is, or the value of that power of two.
oh, thnx.
@slender iron if I remove i2cslave I can do CPYTHON_COMPAT. Do you think i2cslave shoul be standard on any M0 boards? Might fit on metro and feather because no frozen libs
I'm ok making it m4 only
thanks, I'll see what fits
So... I'm trying to use the touchscreen on the PyPortal and I'm using @meager fog's SoundBoard example. It works (yay). But I want to use the web to fetch data. The PyPortal initializes the ESP32 and I see that I can use the wget() method. But can I get the underlying connection?
Short version is: I want to fetch things at startup and on certain user actions, but not periodically and I don't want the Portal doing the JSON parsing.
It looks like the wget will get a file and save it... but it writes to the screen which sucks - and I'd rather just get the string (I'm going to parse it anyway).
Is anyone working on something like this?
@tough flax you can use the requests library, which is what wget() uses. It would probably make sense to start with PyPortal and remove all the periodic stuff. Ideally it should be rewritten to factor out the general stuff from the specific use case, but nobody's done that yet.
I think I could change adafruit_pyportal.py to take in an optional ESP_SPIcontrol object and not re-init it if it is passed in? The assumption being if you
Sorry, cut off my thought
@slender iron has a bootloader problem been ruled out?
I don't know why it'd be the bootloader. It doesn't do anything with the spi flash
@marble hornet so you say it wiped the filesystem immediately after you loaded the new beta.5 UF2, or after you used it for a while? I saw something similar: I loaded a new UF2, and it came up in safe mode (but it didn't wipe the filesystem).
it booted once, like could see serial with mu, then promptly crashed. no safemode. just renamed as NO NAME and empty
@kdb424 Thanks for the report. It should still be working. I plan on fixing it today.
@kdb424 A quick test with Beta 5 on a different M4 worked just fine. Is there more to your code than the three lines you posted?
Remove a few other things to allow it to fit on boards with frozen modules.
Clean up a few other feature settings.
Starting with a draft PR to see that everything builds.
OK, bleah, draft PR's don't run travis, so I'll make it not a draft.
it was running beta 4 right b4 before i uploaded beta5 from circuitpython.org
beta 4 was very touchy about the filesystem. The filesystem could have already been corrupted. Could you try beta 5 for a while and see if it replicates? Thanks.
Hmm, in that case, the original code was correct up to 8 bits, be just need a special case for multiples of 8.
We probably should also have a check for a maximum value — what that would be?
@tulip sleet i tried it for a little and i couldn't save code or reload w/ ctrl-d. the status led would go read and it would freeze. then boot into "HARDCRASH"
I mean after you reset the filessytem, with import storage; storage.erase_filesystem()
I haven't had an issue since I reported this. It's possible that it was corrupted from Beta 4. I'll be doing some more stuff tonight and will see if it happens again then.
that will get a fresh CIRCUITPY; then try with your beta.5
sure i'll give it a shot, let me push my project to git first and switch back to stock beta5 (i made a dispio less one in the interim)
Ok, I'm going to just add the methods that I need to a copy of the PyPortal class. On a related note, is there a way to disable sending console output to the screen?
if you add any group to the display with .show(group), https://circuitpython.readthedocs.io/en/latest/shared-bindings/displayio/Display.html?highlight=terminal#displayio.Display.show it will not show the terminal. I don't think there's another way to turn it off, but @slender iron might have a comment here.
yes. need to assign... ^^ that
When group is None, the default CircuitPython terminal will be shown.
so make it not None
i compiled with a stripped down board.c.
Great - that's very helpful @tulip sleet and @tidal kiln
Trying to get this done by 7:30 😃
@tulip sleet I find that normally makes the drive corruption go away.
@meager fog any chance you've got a version of this that has the changes to match the latest libraries? https://github.com/ladyada/Adafruit_CircuitPython_Display_Button/blob/master/adafruit_button.py
Missing display stuff
@tulip sleet it did it again. with a fresh erase and the stock beta5 build.
hrmmm
** i should specify hard crash not wipe
@marble hornet so the sequence was: storage.erase_filesystem(), then load new uf2, then hard crash on startup?
was there anything on the filesystem when it hard-crashed?
how did you write gui.py? what os and what editor, or was it a command-line copy or drag-n-drop?
the crash may not be filesystem-related
Actually we don't need to check for max value, because 2ⁿ is always going to be larger than n, so we can't get a number so large that we can't handle, now that we increase bits slower.
I backed out to the previous library
@tough flax Adafruit IO CircuitPython also requires a wifi object init, I've ran into the same sort of thing as you while doing projects. To get around it, I didn't use the pyportal class and wrote a "helper" file for the displayio graphics
I like your idea, though.
This is strange, because I don't see anything that would limit the size of the palette — uint32_t is used as the index type everywhere.
Yeah, This is a prototype so I'm going to just adjust the PyPortal class to add what I need - I'll help refactor when folks are ready though 😃
Promising idea. I'll gladly be the first one to test.
@tulip sleet i am on macosx 10.14 using mu
Ah, I see, color_count is uint8_t in the displayio_palette_t struct.
@marble hornet could you post gui.py and any files it uses? If you want to keep it private, that's fine.
sure
i have a repo for the project. should run on any pyp in spi mode
@tulip sleet
this is the whole project: https://github.com/TG-Techie/pyportal_gui
but this needs to be cloned into lib: https://github.com/TG-Techie/tg_gui
ok great, I'll try to reproduce the crashses.
Heheheh... well I just killed any chance of completing today... Any way to edit boot.py once I've screwed up and made it mount read only?
pyp?
@tulip sleet didnt you have a rescue UF2 or something?
error: Server does not allow request for unadvertised object 3d268263be2390ab760f75a3da72689ef13031a4
Fetched in submodule path '../nrf/nrfx', but it did not contain 3d268263be2390ab760f75a3da72689ef13031a4. Direct fetching of that commit failed.
when doing git submodule init
@tough flax copy it back, and then erase the filesystem:
import storage
storage.erase_filesystem()
@timber mango try git submodule update --init --recursive
I have this alias, which does even more:
alias gitsubupdate='git submodule sync --quiet && git submodule update --init --recursive'
Thank you
painfully slow to write all those libs back.
but it's working
was very unhappy
Looks to me like it's resetting every file? Every directory? (Super Slow)
Don't care - I'm happy
How about this one?
FileNotFoundError: [Errno 2] No such file or directory: '../../tools/Tecate-bitmap-fonts/bitmap/terminus-font-4.39/ter-u12n.bdf'
While I wait for this to complete, is the SD card mounted read-write by default on the Portal?
@tough flax yes, because it's not exposed via USB
Makes sense - got "timeout waiting for v2 card" - too big? Wrong format?
only a FAT formatted card will work. how big is it? 32gb might be too big
It is a 32G - I have a 16GB that's older, but the only options I have are NTFS, FAT32, and exFAT
fat32
Formatting from the command line as fat - it was already fat32
No SD card found: [Errno 19] Unsupported operation - OK, I'll go hunting for an old card
Thank you - that's working ... on to the next issue
I am of the unfortunate opinion that the current button code (sound board) cannot work with the latest PyPortal code. And I can't fix it before tonight 😕
Not yet, anyways, but at least it now raises an exception about it.
The implementation caps at 8 bit color: https://github.com/adafruit/circuitpython/blob/master/shared-module/displayio/Bitmap.c#L48
I think this implementation may still infinite loop for value counts > 0x80000000 because the minimum value based on bits will wrap around. Do we want to support 32 bit color in the future or is 24 enough? We can cap the number for the API here and leave the above check for the implementation.
Yup! Totally. Thanks for the fix!
I haven't been able to reproduce this on an Itsy Bitsy M4 either. @kdb424 please reopen/comment if you can still trigger it with Beta 5 or newer. Thanks!
@slender iron are we going to clean up the libraries and remove the try-imports on ga release?
ya, that was my plan
k, i can add an issue for that in this lib
k, thanks
I haven't been able to reproduce this. @labishrestha please comment if you are able to cause this problem with 4.0.0 Beta 5 or newer. An Itsy Bitsy M4 I have here has 3.0.0-beta.0 on it which is quite old.
Fixed by #1675. Thanks @dhalbert !
@makermelissa do you have a debugger available to you? It might be worth having it breaking on the HardFault_Handler while you do other things just in case it is a random occurrence.
Yeah. Is there a guide to using it for debugging?
I’ve only used it for bootloader flashing.
@makermelissa https://learn.adafruit.com/debugging-the-samd21-with-gdb/overview should get you debugging.
My serial breakout arrived a few days earlier than expected.
Now I just need some m/f jumpers to connect it to my logic analyzer.
I'd like to find the equivalent for USB A m/f, but I haven't seen one yet.
Thanks @sommersoft. I'll take a look at that guide.
Very brief instructions:
- Building with debug symbols is helpful:
make -j4 BOARD=feather_nrf52840_express SD=s140 DEBUG=1 - Connect the jlink and start the JLinkGDBServer in another terminal window:
JLinkGDBServer -device nRF52840_xxAA -if SWD - Start debugging with the .elf file:
arm-none-eabi-gdb build-feather_nrf52840_express-s140/firmware.elf
Sounds like a USB extender, those are common enough.
Yeah, but I need somewhere to attach hooks/probes to.
I guess I could strip the wires in the middle of an extender cable.
@gilded cradle I hit "Comment" prematurely, so look again at the github issue thread for more steps. I edited the comment.
Ok, thanks for the heads up
I'll go through those steps when I have a moment just so I can get more familiar with the process.
i'll be out most of the evening (ET)
thanks!
Or somebody else might be around too
Most likely though, I'll figure it out I usually do.
you may or may not grow to like gdb 😃
We'll see
i have. display '<file>'::variable is my new fav command. never got things like that to work in Atmel Studio. 😄
I haven't used Atmel Studio much. I've mostly used debuggers for other languages than C.
it has its usefullness. it was nice to have a quick visual representation of registers and their values. having a project linked to the ELF as well; still haven't been able to figure that out on SEGGER Embedded Studio. I did read in the segger forums that they (segger) have heard that Microchip is not going to maintain AS going forward... 😑
Then it sounds like GDB is the way to go
I use gdb myself
Is anyone aware of an issue using the OLED FeatherWing and the GPS FeatherWing together in CP 4-beta.5?
Here's my code: https://gist.github.com/tjpeden/095b415ec8942060feee0d892cf2da89
Displaying GPS FeatherWing data on and OLED FeatherWing - code.py
It doesn't refresh if I leave line 28 uncommented, it will update without that line, but of course it becomes a series of white boxes lol
Oh, you mean the 1U << bits will wrap around with bits >= 32?
I wonder if we could do value_counts >> bits instead...
Should an underlying flush reset the counter? This approach is probably simpler.
That's a good idea. I'll add that.
Hey Scott,
I gave up on this particular flash chip. The manufacturer could not provide the correct timings to make it work with CircuitPython either.
Maybe if I have a lifetime of spare time I could fix it. But for now, this can be closed as a won't fix.
I suppose we now need to add a check that value_counts > 0...
I'm pulling my hair out over here lol what is this thing doing?
@solar basin The live streams are happening, so it might be a bit before anyone responds.
Oh duh! lol
@solar basin what do you mean by "won't update" exactly? Any errors?
The screen does not change
do you get any messages in the console?
I posted the issue to the Adafruit CircuitPython forum:
https://forums.adafruit.com/viewtopic.php?f=60&t=149282
what if you draw a smaller rect?
I'm trying to clear the screen
I can draw to the screen, but the GPS data is not updating
If I turn on debugging in the GPS module, it stops printing data after the first second
maybe you can try with a simpler program first? try to write the minimal program that demonstrates the problem?
keep removing lines until it works?
and then add back the line at which it stops working
Yeah, I've been doing that for hours