Member-only story

MicroPython Mussings

Mark Lucking
5 min readAug 1, 2019

I landed a gig to teach coding and robotics and I wanted to use Swift. You know that programming language that Apple created a few years back.

The place I was teaching was a green field site, it couldn’t be better. I looked into robots and of course found myself recommending Lego EV3 units. Ok it was expensive, but it ticked all the boxes for STEM project. Sure you can now get a lot of other robots. But for the most part they lack “e” as engineering. Engineering a field that is Lego’s lifeblood.

Back to Swift and I planed to use playgrounds with an EV3 extension. Playgrounds are after all what Apple was to pushing for learning to code. It was all fitting together rather well.

I got an Lego EV3, installed the playground and extension and started testing. It all looked good. Although Lego had their own environment on iPads, it was a cut-down version of their PC app. A version missing the math module among others. A module required for most exercises I would want to try with my classes potentially. The playground had a full implementation of Swift behind it, what could go wrong.

It was the line following exercise that de-railed plan. I managed to create one. But it didn’t work. I struggled for an hour or more to figure out what was happening. It was the sensor, the feedback from it seemed to be coming thru polling. Polling that was…

--

--

Mark Lucking
Mark Lucking

Written by Mark Lucking

Coding for 35+ years, enjoying using and learning Swift/iOS development. Writer @ Better Programming, @The StartUp, @Mac O’Clock, Level Up Coding & More

No responses yet