Earlier than we plunge into the fray with gusto and abandon (and aplomb, after all), I ought to remind you that I’m a {hardware} design engineer by commerce. I can write software program, however I’ve by no means captured any code I’d wish to present to my pricey previous mom.
Through the years, I’ve dabbled in varied flavors of meeting language, together with BASIC, FORTRAN, and Pascal. At the moment, I write a lot of the packages for my passion tasks utilizing the Arduino implementation of C/C++. As soon as once more, nonetheless, I’d be ashamed to indicate you my code (I’d quite have you ever laughing with me than at me). The purpose I want to make is that you need to take something I say about software program with a proverbial “grain of salt.”
Having mentioned all this … take a deep breath and maintain onto your hat as a result of I’m about to waffle about software program. Let’s begin with the truth that I’m at all times amazed by the variety of programming languages which are roaming wild and free. In the event you have a look at the Listing of Programming Languages on the Wikipedia, you’ll see there are 49 that begin with the letter ‘A’ alone. Amazingly sufficient, this record restricts itself to what it calls “notable programming languages in present or historic use.” I’m scared to assume what number of un-notable languages are on the market.
Moreover, I’m definitely not going to say any Esoteric Programming Languages,* as a result of even mentioning the names of those little rascals could lead on us down a rabbit gap. The very last thing we’d like is to spend hours attempting to wrap our brains round choices like Befunge (which permits the instruction pointer to roam in a number of dimensions via the code), Hen (which has simply three tokens, considered one of which is the phrase “hen”), Malbolge (through which code is self-modifying by design and the impact of an instruction is determined by its tackle in reminiscence), and Whitespace (which makes use of solely the whitespace characters: house, tab, and return). *You’re welcome.
Two languages we’ll point out which are rising in recognition amongst the embedded developer group are Rust, which was created by the Mozilla Basis and the open-source group, and Swift, which was created by Apple and the open-source group.
For causes that may develop into clear momentarily, we can be specializing in Swift for the aim of those discussions. Swift is described as an intuitive, crucial, general-purpose, multi-paradigm, compiled programming language (I do know what “intuitive,” “general-purpose,” and “compiled” imply, however the different descriptors are up for grabs so far as I’m involved).
Most individuals, in the event that they consider Swift in any respect, consider it within the context of constructing apps for issues just like the iOS and macOS working methods to run on iPhone, iPad, Apple TV, and Apple Watch units. Nevertheless, on the premise that Swift is each simple to make use of and open supply, there’s rising curiosity in utilizing it on microcontroller models (MCUs) for embedded functions.
So, the place do you go if you wish to learn to program in Swift? Nicely, by golly, I’m glad you requested. I used to be simply chatting with Andy Liu from MadMachine. Andy is the designer of the SwiftIO Micro, which includes a 32-bit Arm Cortex-M7 processor core introduced within the type of an NXP RT1062 microcontroller system working at 600 MHz. When you concentrate on it, this was the high-end clock frequency for mainstream PCs circa the 12 months 2000. Give me energy!
Meet the SwiftIO Micro.
Along with flaunting 32 MB of RAM and 16 MB of Flash (tears of pleasure are rolling down my cheeks as I pen these phrases), the SwiftIO Micro boasts 44 user-accessible pins, together with digital I/O, analog inputs, and PWM, UART, SPI, I²C, and I²S interfaces.
So, how can we go about programming this beast? Nicely, as Andy instructed me: “On the software program aspect, embedded builders have historically been obliged to make use of C or restricted C++ on bare-metal {hardware}. There haven’t been many fashionable programming languages designed particularly for microcontrollers. Lately, nonetheless, each Rust and Swift have emerged with ambitions to interchange C/C++. These languages take completely different approaches. Rust requires builders to be consultants in low-level particulars to write down their code. By comparability, Swift is each approachable for newcomers and highly effective for consultants. That is exactly why we selected Swift for our venture. We wish folks to have the ability to develop fascinating functions with out fighting the low-level particulars.”
The explanation I’m waffling on about all of this right here is that—simply a few days in the past as I pen these phrases—the blokes and gals at MadMachine launched their SwiftIO Playground venture on CrowdSupply.

Meet the SwiftIO Playground.
The SwiftIO Playground consists of the SwiftIO Micro, which is situated within the upper-middle of the Playground’s printed circuit board (PCB). The principle Playground board includes a host of smaller pre-wired modules, thereby eliminating the necessity for soldering or debugging {hardware} connections.
Along with the same old suspects within the type of LEDs, potentiometers, and pushbuttons, there are accelerometer, buzzer, speaker, LCD, and actual time clock (RTC) modules, together with… the record continues. All you want do is use a USB cable to attach your SwiftIO Playground to your host laptop, and “Bob’s your uncle,”* as they are saying (*or aunt, relying on your loved ones dynamic).

Use a USB cable to attach the SwiftIO Playground to your host laptop.
On the draw back, one factor we should always observe is that—on the time of this writing—MadMachine’s Software program Growth Package (SDK) at present helps solely the macOS and Linux working methods (unhappy face). The oldsters at MadMachine say that Swift’s Window assist is evolving typically, and that assist for Home windows is on MadMachine’s roadmap.
On the intense aspect, SwiftIO Playground is augmented with a cornucopia of detailed tutorials and a plethora of demo tasks to get you up and working (completely satisfied face).
The asking worth for this venture is a really affordable $108. This consists of free transport within the US (transport to the remainder of the world is an additional $12).
MadMachine is a small firm. It needs to be acknowledged that there’s a danger right here as a result of transitioning from a working prototype to a full manufacturing run can carry the strongest amongst our quantity to their knees. Alternatively, I like the passion of younger engineers and I really need this venture to (a) be funded and (b) succeed, not least that I now discover I’ve the urge to learn to program in Swift. I can think about chatting casually to my software program developer pals at conferences: “What? You continue to program in Rust? That’s so early twenty first Century, my pricey [chuckle]. All of the with-it of us [like me] are programming in Swift!”
How about you? Do you could have any ideas you’d care to share on something you’ve learn right here?