Adafruit's Circuit Playground Express simulated Visual Studio Code's Device Simulator Express
I'm an unabashed Adafruit fan and I often talking about them because I'm always making cool stuff with their hardware and excellent tutorials. You should check out the YouTube video we made when I visited Adafruit Industries in New York with my nephew. They're just a lovely company.
While you're at it, go sign up for the Adabox Subscription and get amazing hardware projects mailed to you in a mystery box regularly!
One of the devices I keep coming back to is the extremely versatile Circuit Playground Express. It's under $25 and does a LOT.
It's got 10 NeoPixels, a motion sensor, temp sensor, light sensor, sound sensor, buttons, a slide, and a speaker. It even can receive and transmit IR for any remote control. It's great for younger kids because you can use alligator clips for the input output pins which means no soldering for easy projects.
You can also mount the Circuit Playground Express onto a Crickit which is the "Creative Robotics & Interactive Construction Kit. It's an add-on lets you #MakeRobotFriend using CircuitPython, MakeCode, or Arduino." The Crickit makes it easy to control motors and adds additional power options to drive them! Great for creating small bots or battlebots as my kids do.
The most significant - and technically impressive, in my opinion - aspect of the Circuit Playground Express is that it doesn't dictate the tech you use! There's 3 great ways to start.
- Then, you can use the same board to try CircuitPython, with the Python interpreter running right on the Express.
- As you progress, you can advance to using Arduino IDE, which has full support of all the hardware down to the low level, so you can make powerful projects.
Start by exploring MakeCode for Circuit Playground Express by just visiting https://makecode.adafruit.com/ and running in the browser!
Device Simulator Express for Adafruit Circuit Playground Express
Next, check out the Device Simulator Express extension for Visual Studio Code! This was made over the summer by Christella Cidolit, Fatou Mounezo, Jonathan Wang, Lea Akkari, Luke Slevinsky, Michelle Yao, and Rachel Phinnemore, the interns at the Microsoft Garage Vancouver!
This great extension lets YOU, Dear Reader, code for a Circuit Playground Express without the physical hardware! And when you've got one in your hards, it makes development even easier. That means:
- Device simulation for those without hardware
- Code deployment to devices
- Auto-completion and error flagging
- Debugging with the simulator
You'll need these things:
- Visual Studio Code
- Python 3.7.4: Make sure you've added python and pip to your PATH in your environment variables. (1)
- Python VS Code extension: This will be installed automatically from the marketplace when you install...
- Device Simulator Express
Fire up Visual Studio Code with the Device Simulator Express extension installed and then select "Device Simulator Express: New File" in the command palette (
CTRL+SHIFT+P to open the palette).
There's a lot of potential here! You've got the simulated device on the right and the Python code on the left. There's step by step debugging in this virtual device. There's a few cool things I can think of to make this extension easier to set up and get started that would be it a killer experience for an intermediate developer who is graduating from MakeCode into a Code editor like VS Code.
It's early days and the interns are back in school but I'm hoping to see this project move forward and get improved. I'll blog more details as I have them!
Sponsor: Like C#? We do too! That’s why we've developed a fast, smart, cross-platform .NET IDE which gives you even more coding power. Clever code analysis, rich code completion, instant search and navigation, an advanced debugger... With JetBrains Rider, everything you need is at your fingertips. Code C# at the speed of thought on Linux, Mac, or Windows. Try JetBrains Rider today!