CircuitPython for Tufty

Currently there is no support for CircuitPython for Tufty. I can find a CP-fork with Tufty support, but this fork is now 800+ commits behind main.

I followed the open issue on that, but there has not been any progress for a long time. Do you think it is possible to create a pull-request for mainline CP? This would mean that the CP uf2 is built automatically and allows more people to play with it and maybe this will help with fixing the open issues.

BTW: Adafruit also has some board in the main-tree which are by no means stable or feature complete.

I’m thinking you’re going to have to ask this request of Adafruit. I don’t think Pimoroni has much control over what happens Circuit Python wise.
Just curious what you want to do, Circuit Python wise on your Tufty? I have one and have had a lot of fun with it. Micro Python here though.

No. Board specific code in CP is maintained by the manufactures. The fork I am referring to is from Pimoroni.

CP has many, many libs which you can just install using “circup”. As simple as with pip. With MP, I have to hunt all over the internet to find libs, and many of them don’t “just work”. And even if they work, they have to be manually installed and maintained.

An example: I would use a cheap ESP-01S as a wifi coprocessor for the tufty. With CP, this is a matter of a addding a few lines of code. circup would then detect the missing libs and update everything. Same with sensors and so on.

MP does have a number of advantages compared to CP, but I decide on a per project basis what to use. And often I do prototyping using CP and then switch to C++.

We had some issues getting the Tufty screen working properly in CircuitPython that we’ve been unable to resolve so far :( The details are in this issue if you want a look: Issues with bringing up the new Pimoroni Tufty LCD board · Issue #6505 · adafruit/circuitpython · GitHub

Yes, I have read this issue. But it does not help anybody if you keep your current work in a fork which is now almost 900 commits behind mainline. As far as I can see we are talking about five tufty-specific files, so it should be no problem pushing these to mainline. It would give hackers a chance to play with it and maybe solve the problem. But nobody wants to work on a fork that is so old…

Chris has updated the fork to be inline with mainline, so it should be easier to build now. He’s reluctant to raise it as a PR though until the issue is resolved.

Thanks! I will give it a try and report back

1 Like

I created an unofficial release for CircuitPython 8.0.0-beta.1: Release bb_tufty2040_8.0.0-beta.1.uf2 · bablokb/circuitpython · GitHub.

The display-driver is not perfect yet and produces artifacts, but I have tested the release with various programs and it works sufficiently fine (for me at least).

Note that this release is not in any way official, so don’t expect support. But feedback is welcome.

1 Like

Any updates on getting CircuitPython on Tufty? I’d bought it (quite some time ago, actually) because of the promised CP-support-soon.

The state of the code hasn’t changed since last October. I could create a current 8.2.x tufty-version if this helps. Artifacts are still there, but similar artifacts are also visible with MicroPython. So I think this is a hardware problem (firmware of display controller), rather then a CircuitPython issue. The workaround is to keep away from plain-white (or nearly plain-white) colors.

To make it official, Pimoroni must provide an USB_ID and create a pull-request for circuitpython.org (download site). I could create the pull request for CircuitPython code.

Thanks, I would appreciate it if you created a current version.

Do you have any language preferences?

English would be perfect, thanks.

I uploaded a version to: Release CircuitPython 8.2.1 for Pimoroni's Tufty2040 · bablokb/circuitpython · GitHub

You can find a test-program here (check the directory tufty2040): GitHub - bablokb/circuitpython-examples: Collection of circuitpython programs, examples, templates

This is the bouncing-ball example. It works perfect with a pure white ball on black background. But as soon as you flip the colors, this fails. The workaround is to keep away from pure white. Note that I have other working programs that do use a pure white background, but not for the whole display.

Buttons, light-sensor and so on are accessible using the board-module, but you have to create the relevant objects (e.g. DigitalInOut) yourself.

If you need to add WLAN, I recommend the ESP-01S. My repo above also has a few examples for this cheap co-processor. I even have a PCB which allows you to plug this behind the tufty: GitHub - bablokb/pcb-badger2040-wlan: Small PCB for an ESP-01S and PCF8523-RTC

2 Likes