#circuitpython-dev

1 messages · Page 239 of 1

raven canopy
#

@tulip sleet i don't see any changes to that section in the commit history. 🤷

#

well, changes to the double quotes...

gilded cradle
#

There are no CPX assets at all even under releases

#

Just the ones with Crickit

tulip sleet
#

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

gilded cradle
#

Ok. It doesn't seem that the link itself is broken, just that the file isn't there.

raven canopy
tulip sleet
#

ok, missing assets added. tnx @raven canopy, I'll look - I haven't been in the loop on circuitpython.org

raven canopy
#

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?

tulip sleet
#

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?

raven canopy
#

yeah, i think that looks right.

tulip sleet
#

says something about the sloppiness of the template language that it silently converted a single value into a list

raven canopy
#

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.

solar whale
#

@tulip sleet @raven canopy FYI -when I click on the "browse github" button (on pyportal page) https://circuitpython.org/board/pyportal/ it downloads beta5

tulip sleet
#

i'l'l fix that in my PR. Was that true before?

solar whale
#

never tried it before...

raven canopy
#

oof. that...didn't work right. 😬

manic glacierBOT
#

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...
tulip sleet
#

@raven canopy, ugh

raven canopy
#

hehe. maybe we should leave it to the web-devs? 😆

pastel panther
#

I am web dev

tulip sleet
#

so much for guessing what to do

#

want to take a look at jinja code?

solar whale
#

Is that like "I am Sparticus" 😉

raven canopy
#

"why doesn't this website have an GPIOs?"

pastel panther
#

@tulip sleet sure. Can you point me to it? There's been a bunch of activity that I'm not caught up on

tulip sleet
#

we can have Adafruit's webdevs look at it too.

#

@raven canopy I'll revert that, since it's bad in several ways

orchid basinBOT
tulip sleet
#

@raven canopy or @pastel panther approve the revert and we'll be back to where we were. Travis is happy

tulip sleet
#

tnx!

pastel panther
#

np

solar whale
#

🔄

raven canopy
#

i'm off for a while, so you'll get less bad advice until i'm back. 😆 👋

tulip sleet
#

bye, tnx for everything this morning

lofty nova
#

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

pastel panther
#

@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

lofty nova
#

Hi @pastel panther , exactly. I sent a PR yesterday for a little fix but ladyada suggested to take the opportunity to move to register

pastel panther
#

ya, saw that. I'll be happy to review when you get the PR in

lofty nova
#

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 ?

pastel panther
#

Are you working on a fork?

lofty nova
pastel panther
#

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

lofty nova
#

So is it just about adding 'adafruit-circuitpython-register' in both files ?

pastel panther
#

ya, I think that should do it

#

if not, no worries, we'll fix it

lofty nova
#

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 ?

pastel panther
#

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

lofty nova
#

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

pastel panther
#

@lofty nova Sorry if my response was confusing; you shouldn't need a build system for library work

lofty nova
#

Might be overkill for such a small lib but that's still something interresting to learn for may be a future work 😉

pastel panther
#

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

lofty nova
#

Apparently pylint failed on the sample codes because of bad space

pastel panther
#

That and unused imports

lofty nova
#

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

lofty nova
#

Or is that because I from adafruit_ina219 import * ?

pastel panther
#

Ya, I think so

lofty nova
#

I'm more concerned by the names. I don't understand as I see the same naming in examples of other libs.

pastel panther
#

I think you can just from adafruit_ina219 import ADCResolution, BusVoltageRange, INA219

#

What names?

lofty nova
#

Oh, I got many naming errors on my pylint but not in travis. Good.

#

Should I remove the PR to send a new one ?

pastel panther
#

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

lofty nova
#

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.

gilded cradle
#

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.

lofty nova
#

Thanks @gilded cradle . I do now but I didn't notice that there were additional args for the examples.

gilded cradle
#

Yeah, it's about practice. I remember being just as frustrated on my first PR.

obsidian dome
#

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?

pastel panther
#

@lofty nova lemmee just finish breakfast and I'll complete my review

tulip sleet
#

@obsidian dome Please update to beta.5, which we just released this morning to fix this problem.

obsidian dome
#

I'll give it a try.

lofty nova
#

@pastel panther of course. About time for diner in France 😄 . Take all your time

manic glacierBOT
obsidian dome
#

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

meager fog
#

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
#

Win10

#

I can grab my mac and try that.

tulip sleet
#

@obsidian dome did it have circuitpython on it? Did the CIRCUITPY drive show up?

obsidian dome
#

@tulip sleet It had the Beta-4 on it

tulip sleet
#

so you double-clicked, but CPLAYBOOT did not show up, right?

#

did it show up previously?

obsidian dome
#

Got it recognized on the Mac and it rebooted.

#

Still crashing hard

tulip sleet
#

did you update to beta.5 yet?

obsidian dome
#

I did the Beta5 update

solar whale
#

FWIW -- on one occasion after many corrupted filesystems, my linux box would not recognize my board until I rebooted it.. your mileage may vary ...

obsidian dome
#

I suppose I need new libraries....

tulip sleet
#

the filesystem is probably corrupted, so do:

import storage
storage.erase_filesystem()
solar whale
#

rebooted the linux box, that is.

tulip sleet
#

in the repl. that will wipe and reformat CIRCUITPY

#

if you cannot do that at all we have some eraser UF2's

obsidian dome
#

@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?

tulip sleet
#

@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

obsidian dome
#

Working on it. Getting odd behaviour. Trying to figure it out.

manic glacierBOT
obsidian dome
#

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.

meager fog
#

thats normal

tulip sleet
#

if you do the copies while you're in the repl, it will not restart on each copy

obsidian dome
#

OK. I was getting about 8 reboots per sound file

tulip sleet
#

@obsidian dome gotta be afk for a few hours; good luck; others can help if you have trouble

obsidian dome
#

@tulip sleet Thanks a bunch. Really appreciate the help. I'm trying to get this all set up for a workshop I am teaching.

tulip sleet
#

@obsidian dome if you don't want to live on the bleeding edge, version 3.1.2 is plenty stable.

manic glacierBOT
lone sandalBOT
lone sandalBOT
shell falcon
#

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?

raven canopy
#

@shell falcon i'm 99% sure we don't have itertools available in CircuitPython. i'm not even sure if MicroPython has it.

stuck elbow
raven canopy
#

i stand corrected... 😄 thanks @stuck elbow!

stuck elbow
#

should work with cp as well, I think

#

though I didn't test it

shell falcon
#

Cool! Thanks @stuck elbow and @raven canopy I'll read more on this and see what I can do.

raven canopy
#

yeah, should work. i don't see anything in there that looks like a show stopper.

manic glacierBOT
#

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...

river quest
#
Adafruit Industries - Makers, hackers, artists, designers and engineers!

We posted about the 50+ micro satellites loaded with CircuitPython for a hackathon that Max tweeted about on Twitter. It’s part of the KickSat Sprite, 2019, running Circuitpython – GitH…

#

blinka 🚀 🌎 🌕

raven canopy
#

that is awesome! "Snakes in Space!"

river quest
#

From the street to the stratosphere ... CircuitPython brings people together

manic glacierBOT
raven canopy
#

i can't stop watching that GIF 👀

manic glacierBOT
#

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.

raven canopy
#

i'm really starting to like gdb. can finally set watchpoints...which are super handy. 😄

tulip sleet
#

those inline emojis are just too big

raven canopy
#

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?

manic glacierBOT
#

@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...

raven canopy
#

i had to update for PDM; build failures abounded with empty func()s

tulip sleet
#

@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

raven canopy
#

👍 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? 😆

tulip sleet
#

@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

raven canopy
#

well, i had only changed one value which was the size of the DMA buffer. pretty sure that caused it. 😄

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

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...

#

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)

...
manic glacierBOT
#

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...
manic glacierBOT
exotic pumice
#

is DWT CYCCOUNT a reasonable seed for a PRNG?

errant swallow
#

hi , I am new to cpy and I want to know why is it a better option than Arduino ? thanks

exotic pumice
#

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

orchid basinBOT
manic glacierBOT
slender iron
#

@exotic pumice what is your question?

manic glacierBOT
slender iron
#

<@&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

manic glacierBOT
#

@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...
exotic pumice
#

@slender iron the question was whether dwt cycle count would be a good seed for a prng

slender iron
#

¯_(ツ)_/¯

#

we use the current tick for random on the samd21 but that will vary with user code

#

💤

exotic pumice
#

Ok, I think cycle count is similar

#

Good night

manic glacierBOT
#

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 ...

manic glacierBOT
#

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...

manic glacierBOT
#

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...

manic glacierBOT
#

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...
lone sandalBOT
manic glacierBOT
manic glacierBOT
#

Still thinking a bit about when else to flush the cache, mayb...

solar whale
#

@tulip sleet is the PR the same as what you sent out last night or is there something new to test?

manic glacierBOT
#

@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...

orchid basinBOT
#

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...

manic glacierBOT
tulip sleet
#

@solar whale ^^ this has an additional flush. Had to push again due to make translate.

solar whale
#

OK -- Will test in a bit

tulip sleet
#

thanks a lot - your testing has been really helpful

main meteor
#

@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.

manic glacierBOT
manic glacierBOT
#

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...

ruby lake
#

hm, import board not grokking on the pi

tulip sleet
#

@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

ruby lake
#

@tulip sleet I installed adafruit-blinka

tulip sleet
#

hmm

ruby lake
#

doing it again with more sudo

#

aha there we go

tulip sleet
#

i disrecommend using pip with sudo, but, well,...

ruby lake
#

yeah I typically dont, but it apparently needed some permission

manic glacierBOT
#

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

tulip sleet
#

*ntptime.py

idle owl
#

@tulip sleet I read that as naptime.py.

tulip sleet
#
    time.sleep(10)
orchid basinBOT
main meteor
#
while not time.sleep(2):
    time.sleep(3)
wraith tiger
#

@ruby lake Did you try pip install —user? That is preferred over the use of sudo.

manic glacierBOT
#

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
wraith tiger
#

Is the meeting in Tuesday this week?

idle owl
#

@wraith tiger The meeting is in 40 minutes or so.

wraith tiger
#

Ok, thanks

#

I can’t make it this week and didn’t find the notes link. I catch up later.

idle owl
manic glacierBOT
#

@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...

solar whale
#

👋

modern wing
#

Good afternoon all you wonderful people -- lurking today [lots of background noise]

errant grail
#

👋 Hello! Text only today. Rock 'n' Roll in the studio today. Sounds like the 1980s.

modern wing
#

Transformers, GI Joe, and mullets.

stuck elbow
#

Transformers, Rectifiers and Inductors

errant grail
#

Care Bears and Cabbage Patch, too.

manic glacierBOT
tidal kiln
#

lurking

sterile bronze
#

Hello all, just lurking

umbral dagger
#

lurking

modern wing
#

👋 👍

stuck elbow
#

2-2 and 5-5 look more like snakes

gilded cradle
#

or 5 2 and 2 5

stuck elbow
#

or 2-5 and 5-2, of course

#

right

modern wing
#

6-6, like a coiled snake? blinka

stuck elbow
#

6-9

#

yin-yang day

modern wing
#

One small step for Python, one giant slither for CircuitPython....

manic glacierBOT
#

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...
stuck elbow
#

mind the gap

tidal kiln
#

🎼
it's time to read some buttons
it's time to blink some lights
it's time to make it easy
with circuitpython tonight
🎼

stuck elbow
#

snakes love frogs

modern wing
#

Happily lurking 🕵

gilded cradle
#

I may have to leave early, can I do hug reports and status update at the same time?

raven canopy
#

here be a 🚫 blame zone!

gilded cradle
#

Thanks

#

I'll probably have to leave in like 10 minutes

#

ok

inland tusk
#

I am lurking. A hug report to all on 4.0

gilded cradle
#

That was a good timelapse

idle owl
#

Thanks! First time I've ever done one.

errant grail
#

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.

modern wing
#

@idle owl which timelapse is that?

idle owl
tidal kiln
#

yah - new webpage download is awesome!

raven canopy
manic glacierBOT
idle owl
#

Nope

gilded cradle
#

I gotta go, thanks everyne

modern wing
#

Negative Yep!

manic glacierBOT
modern wing
#

@idle owl That timelapse was awesome -- and it was a marathon indeed! How long was that in real time?

#

6 hours....wow. Very nice.

tidal kiln
#

6 hours 😲

prime flower
#

(I thought the other set of hands was scott, judging by the smartwatch). Six hours, woah!

idle owl
#

@prime flower Scott is on the other side of the country.

solar whale
#

but he has a wide reach 😉

prime flower
#

That's what confused me 😃

modern wing
#

Great security testing in case the credentials get compromised down the road.

umbral dagger
#

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).

marble hornet
manic glacierBOT
prime flower
umbral dagger
#

ST:TNG inspired alarm clock in CP is nearing completion as well. Just waiting on final case design from Noe & Pedro.

prime flower
modern wing
#

@umbral dagger Make it so.

solar whale
#

😃

errant grail
#

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.

inland tusk
#

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.

raven canopy
#

@stuck elbow nice! i started working on one for the MGC3030. would love to peek at how you did it.

stuck elbow
#

@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

errant grail
#

@idle owl PCB designs! 🥇

idle owl
#

@errant grail First board I did from start to finish - didn't use a current design to do the board.

errant grail
#

Second to soldering, PCB layout is my therapy.

idle owl
#

😄

#

@errant grail It is that.

raven canopy
#

@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.

stuck elbow
#

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

errant grail
#

It's not a standard inteval any more. May need an external UART.

raven canopy
#

yeah, i was going non-battery to start with. this would be my first "finished" PCB...assuming i finished it. 😄

errant grail
#

Classic DIN midi to USB adapters can be found for < $20

tulip sleet
manic glacierBOT
#

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

marble hornet
#

Cough cough pmod ?

modern wing
#

Thanks!

umbral dagger
#

later

marble hornet
#

The roots ?

errant grail
#

I'm testing a STEMMA Classic MIDI interface design this week.

marble hornet
#

Five is right out ?

#

😉

errant grail
#

Thanks all!

marble hornet
#

Nothing pertinent

#

See you later

tulip sleet
#

in the swamp, in the desert, in orbit, on the moon, halfway to Alpha Centauri

marble hornet
#

Swamp castle ?

marble hornet
#

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?

slender iron
#

not recently

#

and it's been complicated when I have

main meteor
#

I'll be fighting that dragon soon, trying to install nextpnr or symbiflow.

gilded cradle
#

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.

main meteor
#

Also hoping Arduino comes out with the "FPGA for everybody" software support they alluded to when they came out with the MKR 4000.

gilded cradle
#

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.

main meteor
#

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.

old smelt
#

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.)

manic glacierBOT
marble hornet
#

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

gilded cradle
#

@old smelt, CircuitPython 4.0.0 Beta 5 was the latest release.

old smelt
#

Ah, okay.. So, still in Beta?

gilded cradle
#

Yes

old smelt
#

Ok. Thanks!

gilded cradle
#

Yw

tidal kiln
#

@slender iron ping

slender iron
#

@tidal kiln around now

#

how do you want to chat?

tidal kiln
#

live?

marble hornet
#

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 "

exotic pumice
#

typically, an include path is specified in a makefile

marble hornet
#

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?

gilded cradle
river quest
slender iron
#

@river quest theres or adafruit/circuitpython

river quest
#

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

manic glacierBOT
slender iron
#

@river quest ya, that'd be very cool

river quest
#

maybe /blinka

#

and that would be rendered we are managing on github

manic glacierBOT
slender iron
#

@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

manic glacierBOT
river quest
#

@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

slender iron
#

@river quest ok, that makes sense

slender iron
#

@solar whale new bundle is out

#

was just credentials

umbral dagger
#

@gilded cradle Thanks for doing the logger release!

gilded cradle
#

You’re welcome @umbral dagger

umbral dagger
#

Guide is live and the library is in the latest bundle: logging in CircuitPython.

slender iron
#

updated the auth token for the circuitpython repo too

umbral dagger
#

I.e debug/info/error logging, not data logging... though you could use it for that.

river quest
#

NEWS we can now talk about this, blinka runs on this, released today

slender iron
#

ooooh, nice!

umbral dagger
#

Very nice.

#

Snakes on a brain.

slender iron
#

$120 for one isn't too bad

manic glacierBOT
slender iron
#

oh, $100 from nvidia

#

wants bare metal circuitpython on it

#

heh

#

🌮

river quest
#

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/

Adafruit Industries - Makers, hackers, artists, designers and engineers!

Coral | Products. The Coral Dev Board is a single-board-computer that contains an Edge TPU coprocessor. It’s ideal for prototyping new projects that demand fast on-device inferencing for mach…

slender iron
#

yup! thanks for the pics!

river quest
#

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

slender iron
#

👍

modern wing
#

This looks awesome

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
raven canopy
#

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." 😆

manic glacierBOT
#

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...
#

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.

vocal vault
#

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)

gilded cradle
#

@vocal vault, yep. I submit PRs almost every day. I just submitted one 20 minutes ago.

vocal vault
#

@gilded cradle sweet!

manic glacierBOT
manic glacierBOT
#

@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)
#...
manic glacierBOT
manic glacierBOT
manic glacierBOT
plucky flint
#

@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. 😃

manic glacierBOT
manic glacierBOT
#

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...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

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 ...
#

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)
...
manic glacierBOT
#

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...

manic glacierBOT
prime flower
#

@umbral dagger The logging guide is sweet - just got around to reading it

#

great work on it

marble hornet
#

okay, i got the fpga working!

#

i'm gonna see if cp compiles w/out periferals

umbral dagger
#

@prime flower Thanks.

marble hornet
#

my pleasure

#

it compiled for literally hours...

manic glacierBOT
marble hornet
#

Q: where is the toolchain used for compiling the c specified? i looked as CROSS but that seemed to be just for arm

stuck elbow
#

in each port's makefiles, I guess?

marble hornet
#

sorry, i should have specified. where in the makefile.

#

@slender iron ?

manic glacierBOT
onyx hinge
#

Hi all, it's been toooooo long since I've dropped in.

idle owl
#

@onyx hinge Hey! Welcome back 😃

onyx hinge
#

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.

idle owl
#

Looks neat!

onyx hinge
#

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?

idle owl
#

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.

stuck elbow
#

displayio, but updating the whole screen is going to be slow

onyx hinge
#

the display only goes around twice a day, so it'll be more about wanting to prevent obvious tearing than about getting 60fps

stuck elbow
#

I want to do tetris for the hallowing at some point, using the teeth as touch buttons

onyx hinge
#

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.

gilded cradle
#

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.

onyx hinge
#

@gilded cradle I'll keep that in mind. I know simplicity is highly valued in the CP community!

gilded cradle
#

Yeah, but so is contribution.

#

😃

raven canopy
#

👋 @onyx hinge

onyx hinge
#

hi @raven canopy

marble hornet
#

what's up?

onyx hinge
#

I live in Nebraska, where we are currently having some problems with flooding. However, my city is not affected very much.

marble hornet
#

@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...

gilded cradle
#

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”.

onyx hinge
#

@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)

gilded cradle
#

Yeah, it’s something along those lines.

#

So some color encoding changes may be required too.

onyx hinge
#

I think that the mode I want is "7-1-3-4 Buffer Scroll (Layer 2 is used as Scroll Buffer)"

idle owl
#

Who has CPXs handy and a couple of minutes?

#

I need data!

stuck elbow
#

all the data

tulip sleet
#

i got lotso data

idle owl
#

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])

stuck elbow
#
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
>>> 
tulip sleet
#
>>> 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

idle owl
#

You're running 2.0 @stuck elbow

stuck elbow
#

@idle owl that's because it's an old edition and the newer releases have wrong pins for it

idle owl
#

@tulip sleet Fishy how?

tulip sleet
#

I think that string is meant to be human-readable?

idle owl
#

@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.

tulip sleet
#
>>> import microcontroller
>>> microcontroller.cpu.uid
bytearray(b'\xfd\xea\xd9y02MP 1.9\x12\x14\x0e\xff')
idle owl
#

bytearray(b'=\x9b\x1c\xdeWRMP 1.5\x1c*\r\xff')

tulip sleet
#

from a Metro M0

idle owl
#

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.

tulip sleet
#

Trinket M0:

>>> microcontroller.cpu.uid
bytearray(b"+6h832KP 1.8A'\x12\xff")
idle owl
#

Shorty!

tulip sleet
#

you could just add up the bytes

idle owl
#

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```
tulip sleet
#

are you trying to get a random seed?

idle owl
#

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.

tulip sleet
#

you could just do sum(uid) % n, where n is how many alternatives you want

idle owl
#

interesting.

idle owl
#

@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.

stuck elbow
#

found it

#

@idle owl [83, 71, 10, 142, 51, 50, 75, 80, 32, 49, 46, 55, 22, 44, 2, 255]

idle owl
#

@stuck elbow Thanks! Can you do sum(buf) % 3 and tell me what you get?

stuck elbow
#

2

idle owl
#

Ok thank you!

tulip sleet
#

@idle owl my CPX uid gets 0

#

so looks good. I was hoping the sum wasn't always even or something like that

idle owl
#

@tulip sleet ok.. OH... right, it'll never return 3. starts at 0. 🤦

#

Ok. Good!

tulip sleet
#

it's a pretty minimal number of characters of program code

idle owl
#

Yep

onyx hinge
#

@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

idle owl
#

@onyx hinge Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported type for __hash__: 'bytearray'

stuck elbow
#

@slender iron is there any way to load a Bitmap (not OnDiskBitmap) from a BMP file?

gilded cradle
#

@idle owl try hash(str(buf)) % 3

idle owl
#

Oh nice.

gilded cradle
#

my result was still 1

idle owl
#

Returned the same thing though.

#

Yeah, I'll stick with sum I think.

gilded cradle
#

😃

#

Or you could do something like buf[0] % 3 since that byte varies quite a bit

#

It up to you either way though.

manic glacierBOT
slender iron
manic glacierBOT
#

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...
tulip sleet
#

@timber mango I think you hit a bug in Bitmap that caused a hang.

manic glacierBOT
stuck elbow
#

@slender iron thanks!

#

@slender iron there is no longer a Sprite?

#

@tulip sleet oops

slender iron
#

its been renamed to TileGrid

#

and made more powerful

stuck elbow
#

so a sprite is just a 1x1 grid?

slender iron
#

exactly

#

which is default

stuck elbow
#

one more question, how do I use the palette? I don't see anything taking it as an argument

slender iron
#

its a pixel_shader

#

kwarg on TileGrid

stuck elbow
#

I see

stuck elbow
#

@tulip sleet sorry for a false alarm

tulip sleet
#

@timber mango - np, finding bugs one way or another is great. It's just a different something making smoke

stuck elbow
#

by the way, is there a way to force safe mode? because I can't delete that code now...

slender iron
#

@stuck elbow if you do a slow reset double tap you should be able to get into safe mode

tulip sleet
#

the second click will be when the RGB led is yellow

slender iron
#

(on startup, not blinking)

stuck elbow
#

excellent, that worked, thanks

slender iron
#

👍 glad I fixed that

stuck elbow
#

@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

slender iron
#

ya, you could add it

stuck elbow
#

ok, I will try

wraith tiger
#

I got a cheap signal analyzer from Amazon and some and some e-z-hooks from Digi-Key.

stuck elbow
#

@wraith tiger those are pretty useful

#

though I prefer the probes with hooks

wraith tiger
#

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.

manic glacierBOT
manic glacierBOT
#

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.

wraith tiger
#

@stuck elbow What do you use for probes?

stuck elbow
#

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

slender iron
#

@stuck elbow give it 24 bit color

#

it'll 565 it for you

stuck elbow
#

aaah

#

ok

wraith tiger
#

OK, I saw those on Digi-Key also, the same company makes both.

tidal kiln
#

@tulip sleet what is the bug in Bitmap? i'm running into filesystem issues also. scanning scrollback, but don't know full history/story.

tulip sleet
#

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

tidal kiln
#

ok. sounds like something known?

tulip sleet
tidal kiln
#

cool. thanks. i'll take a look and add if i have anything useful.

#

this might just be new-to-me(c)

tulip sleet
#

it's Bitmap, but not OnDiskBitmap

manic glacierBOT
river quest
slender iron
#

shoot!

river quest
#

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

slender iron
#

template clone will fix it

river quest
#

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

slender iron
#

yup, that should work

river quest
#

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

slender iron
#

totally

river quest
#

okee dokke

slender iron
#

@river quest no Adafruit in the name section

river quest
#

oh, feel free to remove

#

TOO MUCH ADAFRUIT 😃

slender iron
#

it'll be "PyBadge by Adafruit"

river quest
#

hehe

#

that's fine

manic glacierBOT
#

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...
slender iron
#

k, I can fix it

river quest
#

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?

slender iron
#

it's fast once it's merged

#

the test is waiting for circuitpython

river quest
#

got it, ok - i'll check back later and then start doing some text and board-making between things, etc

slender iron
tidal kiln
#

@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
>>> 
slender iron
#

@tidal kiln yup, 255

#

looks like it needs an arg check

#

I can't quite remember the details

manic glacierBOT
tidal kiln
slender iron
#

looks like it hasn't been updated for subscript access

tidal kiln
#

worth an issue?

slender iron
#

definitely

#

it's not so simple that I can do it immediately

tidal kiln
#

np. i'll create one.

slender iron
#

thanks!

manic glacierBOT
#

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

tidal kiln
#

do you want one for the Palette range check also?

slender iron
#

sure, that'd be good to improve

manic glacierBOT
#

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
>>> 
meager fog
#

@gilded cradle hiya

#

i can make your guide live

gilded cradle
#

Hiya. Thanks!

meager fog
#

good work, the fab print isnt quite right, did @idle owl give you a hand with it?

gilded cradle
#

No, I did it by looking at other guides.

#

I think I took what was linked in the product, but I can fix it.

meager fog
#

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

gilded cradle
#

Ah. ok. I'll ask her. Thanks

meager fog
#

nice!

gilded cradle
#

Thanks again @meager fog.

meager fog
#

thank you

gilded cradle
#

😃

meager fog
#

you did great- and its a lovely guide - its one that slipped thru

gilded cradle
#

Thanks. It took a while because I wanted to make it good, plus was dealing with a move.

slender iron
#

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". 😃

meager fog
#

@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!

gilded cradle
#

Ok, I will. Thanks

marble hornet
#

@slender iron yay!

#

that's really awesome

river quest
#

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.

slender iron
#

yup, cool. the trinket one read well

river quest
#

yah, i'll chip away at these between meetings, etc. good 15 min projects for me to do

slender iron
#

keep an eye out for arduino specific stuff too

river quest
#

yep

slender iron
#

cool cool. thank you for all of your help!

river quest
#

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

slender iron
#

😃 🌻

river quest
#

github blinka 🥕 🌽 🍠

manic glacierBOT
river quest
#

welp, that's more like farming with those emojis

raven canopy
#

"This week, Martha Stewart shows you unique ideas for gardening with Markdown". 😆

river quest
#

it's a good thing

raven canopy
#

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."

river quest
#

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.

marble hornet
#

@river quest as a guide or as simplified website?

river quest
#

@marble hornet oh, prolly both

marble hornet
#

@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?

marble hornet
#

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.

manic glacierBOT
manic glacierBOT
tough flax
#

Hi folks, does anyone have the command-line for ImageMagick to make PyPortal-compatible BMPs?

#

never mind: ```
convert somefile.png BMP3:somefile.bmp

meager fog
exotic pumice
#

ah, C++

#

I was trying to do it in in circuitpython at one point

manic glacierBOT
clear halo
#

Just wanted to say that the CircuitPython Downloads page is looking awesome!

manic glacierBOT
river quest
#

thanks @clear halo !

slender iron
stuck elbow
#

looks like unreliable connections

manic glacierBOT
#

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 ...

manic glacierBOT
umbral dagger
#

@slender iron approved

manic glacierBOT
#

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
slender iron
#

@umbral dagger just invited you to circuitpython librarians

umbral dagger
#

@slender iron Most excellent. Thanks.

manic glacierBOT
marble hornet
#

@meager fog is there a difference in the beta hardware that is here vs the production black ones?

slender iron
#

of the pyportal @marble hornet ?

marble hornet
#

sorry, yes.

slender iron
#

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

marble hornet
#

I was under the same impression. it wiped itself again after uploading beta 5.

slender iron
#

there have been reports of issues still

marble hornet
#

okay... and has turning off the auto-reset fixed it for everyone too?

slender iron
#

I don't know of a fix

#

dan has a PR to flush every second or so

marble hornet
#

flush?

manic glacierBOT
slender iron
#

write out the cached version of the filesystem to the spi flash

#
  • cached in ram
marble hornet
#

oh, thnx.

tulip sleet
#

@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

slender iron
#

I'm ok making it m4 only

tulip sleet
#

thanks, I'll see what fits

tough flax
#

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?

tulip sleet
#

@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.

tough flax
#

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

marble hornet
#

@slender iron has a bootloader problem been ruled out?

slender iron
#

I don't know why it'd be the bootloader. It doesn't do anything with the spi flash

tulip sleet
#

@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).

marble hornet
#

it booted once, like could see serial with mu, then promptly crashed. no safemode. just renamed as NO NAME and empty

tulip sleet
#

what beta was it running before that?

manic glacierBOT
marble hornet
tulip sleet
#

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.

manic glacierBOT
marble hornet
#

@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"

tulip sleet
#

I mean after you reset the filessytem, with import storage; storage.erase_filesystem()

manic glacierBOT
tulip sleet
#

that will get a fresh CIRCUITPY; then try with your beta.5

marble hornet
#

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)

tough flax
#

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?

tulip sleet
tidal kiln
#

yes. need to assign... ^^ that

#

so make it not None

marble hornet
#

i compiled with a stripped down board.c.

tough flax
#

Great - that's very helpful @tulip sleet and @tidal kiln

#

Trying to get this done by 7:30 😃

marble hornet
#

@tulip sleet I find that normally makes the drive corruption go away.

tough flax
#

Missing display stuff

marble hornet
#

@tulip sleet it did it again. with a fresh erase and the stock beta5 build.

#

hrmmm

#

** i should specify hard crash not wipe

tulip sleet
#

@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?

marble hornet
#

but gui.py was corrupted. insert " saving file " bewtween load uf2 and hard crash

tulip sleet
#

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

manic glacierBOT
tough flax
#

I backed out to the previous library

prime flower
#

@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.

manic glacierBOT
tough flax
#

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 😃

prime flower
#

Promising idea. I'll gladly be the first one to test.

marble hornet
#

@tulip sleet i am on macosx 10.14 using mu

manic glacierBOT
tulip sleet
#

@marble hornet could you post gui.py and any files it uses? If you want to keep it private, that's fine.

marble hornet
#

sure

#

i have a repo for the project. should run on any pyp in spi mode

tulip sleet
#

ok great, I'll try to reproduce the crashses.

marble hornet
#

please do

#

or that too 😃

tough flax
#

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?

marble hornet
#

pyp?

tough flax
#

@tulip sleet didnt you have a rescue UF2 or something?

stuck elbow
#
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

tulip sleet
#

@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'

stuck elbow
#

@tulip sleet that's actually what I tried

#

ah, sync did it, thanks

tough flax
#

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

stuck elbow
#

How about this one?

#
FileNotFoundError: [Errno 2] No such file or directory: '../../tools/Tecate-bitmap-fonts/bitmap/terminus-font-4.39/ter-u12n.bdf'
tulip sleet
#

@timber mango that's a new rsubmodule repo

#

it should be in .gitmodules

tough flax
#

While I wait for this to complete, is the SD card mounted read-write by default on the Portal?

tulip sleet
#

@tough flax yes, because it's not exposed via USB

tough flax
#

Makes sense - got "timeout waiting for v2 card" - too big? Wrong format?

tulip sleet
#

only a FAT formatted card will work. how big is it? 32gb might be too big

tough flax
#

It is a 32G - I have a 16GB that's older, but the only options I have are NTFS, FAT32, and exFAT

tulip sleet
#

fat32

tough flax
#

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

tough flax
#

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 😕

manic glacierBOT
#

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.

slender iron
#

this too please

tulip sleet
#

@slender iron are we going to clean up the libraries and remove the try-imports on ga release?

slender iron
#

ya, that was my plan

tulip sleet
#

k, i can add an issue for that in this lib

slender iron
#

k, thanks

manic glacierBOT
wraith tiger
#

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.

manic glacierBOT
main meteor
#

Sounds like a USB extender, those are common enough.

wraith tiger
#

Yeah, but I need somewhere to attach hooks/probes to.

wraith tiger
#

I guess I could strip the wires in the middle of an extender cable.

tulip sleet
#

@gilded cradle I hit "Comment" prematurely, so look again at the github issue thread for more steps. I edited the comment.

gilded cradle
#

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.

tulip sleet
#

i'll be out most of the evening (ET)

gilded cradle
#

Ok, I can always just leave you a message if I have a question.

#

😃

tulip sleet
#

thanks!

gilded cradle
#

Or somebody else might be around too

#

Most likely though, I'll figure it out I usually do.

tulip sleet
#

you may or may not grow to like gdb 😃

gilded cradle
#

We'll see

raven canopy
#

i have. display '<file>'::variable is my new fav command. never got things like that to work in Atmel Studio. 😄

gilded cradle
#

I haven't used Atmel Studio much. I've mostly used debuggers for other languages than C.

raven canopy
#

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... 😑

gilded cradle
#

Then it sounds like GDB is the way to go

slender iron
#

I use gdb myself

solar basin
#

Is anyone aware of an issue using the OLED FeatherWing and the GPS FeatherWing together in CP 4-beta.5?

#

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

manic glacierBOT
manic glacierBOT
solar basin
#

I'm pulling my hair out over here lol what is this thing doing?

idle owl
#

@solar basin The live streams are happening, so it might be a bit before anyone responds.

solar basin
#

Oh duh! lol

stuck elbow
#

@solar basin what do you mean by "won't update" exactly? Any errors?

solar basin
#

The screen does not change

stuck elbow
#

do you get any messages in the console?

solar basin
#

No

#

It prints just fine

stuck elbow
#

what if you draw a smaller rect?

solar basin
#

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

stuck elbow
#

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

solar basin
#

Yeah, I've been doing that for hours