Adafruit CPX (Circuit Playground Express)

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
fpp
Posts: 64
Joined: Wed Jul 20, 2016 12:08 pm

Adafruit CPX (Circuit Playground Express)

Post by fpp » Sat Oct 21, 2017 11:52 am

Dunno if anyone here has already tried this trinket, but I just received mine, and am really impressed...

It has an incredible lot of stuff built-in for a 5cm diameter round board :
two user buttons (with pullups), plus reset, a two-mode slide switch, green (power) and red (addressable) LEDs, battery connector, 10 NeoPixels, 14 pads (7 usable as capacitive touch pads), light/temp/motions sensors, speaker/mike, send/receive IR, etc.

It also manages to be even more user-friendly than the original pyboard : instant reboot, instant 2MB USB drive for user code (also detects uf2 packages with auto update and reset), and finally, Windows USB serial drivers which work without fuss :-)
It can be programmed in Arduino/C++, MakeCode/JS and CircuitPython (Adafruit fork of micropython).

Of course I tried it with CircuitPython (2.1.0 came out the same day :-).
The documentation, as always, is superb.
There is a board-specific library bundle with plenty of modules to get you started.
Most notably, there is a HID keyboard & mouse module, which is a much cleaner implementation of all the stuff I had to do from scratch last year on the pyboard (and documented on the Wiki here).
This is still a WIP at this time though, a given functionality may be available in one language but not another (e.g. IR stuff is not supported in python yet).

A favourite of mine is that low-tech slide-switch, which does strictly nothing by itself except let you read its state in code...
It means you could have a main.py that just imports main0.py or main1.py according to the switch state... so your CPX can run two totally different programs just by flipping that switch ! Simple but genius :-)

Interestingly, the CPX also manages to come out 12€ cheaper than the existing pyboard, even as bought from Pimoroni, with shipping to continental Europe and pound-to-euro conversion...

My point here is : I don't know what Damien has in mind for his oft-delayed pyboard2, but there is strong competition already !

User avatar
pythoncoder
Posts: 3844
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Adafruit CPX (Circuit Playground Express)

Post by pythoncoder » Sun Oct 22, 2017 1:41 pm

fpp wrote:
Sat Oct 21, 2017 11:52 am
...
My point here is : I don't know what Damien has in mind for his oft-delayed pyboard2, but there is strong competition already !
I'd like to think something with more than 32K RAM and running at more than 48MHz. And surely not in that breadboard-hostile (in fact hardware-hostile) circular format. What is the fashion for circular PCB's all about? It doesn't even have mounting holes so I'd struggle to incorporate one in any project I've built.

Each to his own but I'd have no use for that board.
Peter Hinch

Turbinenreiter
Posts: 288
Joined: Sun May 04, 2014 8:54 am

Re: Adafruit CPX (Circuit Playground Express)

Post by Turbinenreiter » Sun Oct 22, 2017 3:09 pm

@pythoncoder

This board isn't for you. It's not meant to be used in advanced hobby projects or even pro projects, it's a learning device. It's also meant to stray outside the typical techie circles and enable i.e. designers, fashion people etc. to play with electronics. The pinout is meant for crocodile clamps, rather than bread- or perfboard.

Also, the have multiple boards running CircuitPython: https://www.adafruit.com/?q=circuitpython
Including a Trinket and Feather form-factor. The Feather boards are my favorites right now.

The only quarrel I have is the annoying fork and incompatible API.

User avatar
fos
Posts: 43
Joined: Sat Feb 18, 2017 3:05 pm
Location: Texas and Kansas
Contact:

Re: Adafruit CPX (Circuit Playground Express)

Post by fos » Sun Oct 22, 2017 3:31 pm

Pyboard 1.1 is my favorite board and IMHO opinion has the best support for micro python. Adafruit's CPX is targeted at the educational market. It has a number of capabilities built in that are perfect for various educational objectives such as environmental science, and etc.

I would prefer a more breadboard friendly format but the circular format is easy for students with the alligator clip friendly holes. Alligator clips are nice for students that have not yet developed good hand/eye coordination. The price and capability are a good match for its target audience. Adafruit has good quality and provides comprehensive support.

fos, a retired science teacher...

User avatar
deshipu
Posts: 1353
Joined: Thu May 28, 2015 5:54 pm

Re: Adafruit CPX (Circuit Playground Express)

Post by deshipu » Sun Oct 22, 2017 5:03 pm

pythoncoder wrote:
Sun Oct 22, 2017 1:41 pm
And surely not in that breadboard-hostile (in fact hardware-hostile) circular format.
Not that the pyboard is particularly friendly for breadboards, with those extra two rows of pins running along the bottom edge.

But I agree that the microcontroller is a little bit on the weak side, especially memory-wise (speed is not that important, especially since you are already programming it with Python). I'm looking forward for the cortex-m4 CircuitPython board that is in the works now.

Then again, that chip is available in a TQFP-32 package at about $3 at quantity one, only needs a voltage regulator and a bunch of capacitors to work, and you can extend the available flash memory with an external chip. Perfect for putting on your own board, I already have two projects that use it. Re-creating a pyboard in that manner would be a considerably larger effort.

fpp
Posts: 64
Joined: Wed Jul 20, 2016 12:08 pm

Re: Adafruit CPX (Circuit Playground Express)

Post by fpp » Sun Oct 22, 2017 7:52 pm

Hi everyone, and thanks for chiming in... I really understand the various points of view here and where they're coming from.

Yes, the form factor is sort of "hipster"-like and makes it look like a toy. I usually don't go for "flashy" but this one's abilities were just irresistible.

I'm not bothered by the "addon-friendly-or-not" issue because there's already more stuff built-in than I need.
The only thing I ever painstakingly soldered on my pyboard was a matrix keypad, to make it *do* things.
Here I have seven pads that can act as touch buttons, which is actually better.
And when python support for the IR arrives, the point will be moot anyway.

The CPU is indeed weaker than the pyboard's, but nevertheless it feels really snappy overall (haven't tried mining Bitcoin :-) ).

I concur with the RAM limitation though: I've hit it by just "porting" the pyboard HID stuff I did last year, and had to resort to the tips & tricks I'd read about but never had to use before.
As deshipu mentioned, the next hardware iteration will "Moore" that one :-).

So it's a toy, yes, but it already does the same thing my pyboard's been doing for over a year, and is capable of a lot more the pyboard alone couldn't.

In particular, I wouldn't underestimate the value of that simple but astute slide-switch trick, and the added versatility it brings to the game.
My trusty pyboard is a one-pony trick : I use it intensively each and every day at work, for one specific function.
If I was not at work and wanted to use it for something completely different for a while, I'd have to mount it on a PC to edit/copy/rename code files, try not to mess up, and then again afterwards to revert the changes.
This is not something you would want to do casually, or often, or on the road/train/plane etc. Better to have another board :-).

With the CPX and its switch, it's trivial to use it for two unrelated functions, instantly and without any fuss.
But actually you could make it more like a Swiss knife :
* in the default mode it runs the currently active app
* in the secondary mode it runs a special "switcher" app:
this one lets you choose among up to 9 different apps (7 tactile pads + 2 buttons), makes the necessary changes to file names or config file or whatever, a soft reset, and there you go...

[ Note to Damien: please steal that idea for the pyboard2 :-) ]

Turbinenreiter
Posts: 288
Joined: Sun May 04, 2014 8:54 am

Re: Adafruit CPX (Circuit Playground Express)

Post by Turbinenreiter » Sun Oct 22, 2017 8:43 pm

The pyboard can be extremely flexible when you have a couple of microsd cards flying around - use them like Gameboy cartridges :mrgreen:

User avatar
deshipu
Posts: 1353
Joined: Thu May 28, 2015 5:54 pm

Re: Adafruit CPX (Circuit Playground Express)

Post by deshipu » Sun Oct 22, 2017 8:45 pm

fpp wrote:
Sun Oct 22, 2017 7:52 pm
So it's a toy, yes, but it already does the same thing my pyboard's been doing for over a year, and is capable of a lot more the pyboard alone couldn't.
It's really no surprise at all. While the MicroPython team is busy developing the platform, making it stable, fixing the bugs and preparing for new features, CircuitPython can just take all that and build on top of it. That's the power of open source — the work doesn't have to be repeated, it can be done once and then expanded upon. Of course it's not like CircuitPython didn't do anything — porting to the SAMD platform was and still is a lot of work. But of course it does all that MicroPython does — it's built on top of it, after all.

User avatar
pythoncoder
Posts: 3844
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Adafruit CPX (Circuit Playground Express)

Post by pythoncoder » Mon Oct 23, 2017 12:09 pm

deshipu wrote:
Sun Oct 22, 2017 5:03 pm
...speed is not that important, especially since you are already programming it with Python)...
That rather depends on what you're doing. For my current project - an electrical measurement instrument - the Pyboard is fast enough, but not by a wide margin. While the maths could be optimised with assembler, I'm quite glad I don't have to. Its lcd160cr GUI needs to be frozen owing to RAM limitations.

Most of my applications push the Pyboard close to one limit or another ;)
Peter Hinch

fpp
Posts: 64
Joined: Wed Jul 20, 2016 12:08 pm

Re: Adafruit CPX (Circuit Playground Express)

Post by fpp » Mon Oct 23, 2017 5:14 pm

Turbinenreiter wrote:
Sun Oct 22, 2017 8:43 pm
The pyboard can be extremely flexible when you have a couple of microsd cards flying around - use them like Gameboy cartridges :mrgreen:
It would work, yes...
But *nine* "cartidges" would cost more that the board,
swapping them would be only slightly less painful than the "change main.py" method,
...and if I had to lug them with me all the time, I'd be bound to lose them soon :-)

Post Reply