The Shell And The Microcontroller

One of the nicest amenities of interpreted programming languages is that you can test out the code that you’re developing in a shell, one line at a time, and see the results instantly. No matter how quickly your write-compile-flash cycle has gotten on the microcontroller of your choice, it’s still less fun than writing blink_led() and having it do so right then and there. Why don’t we have that experience yet?

If you’ve used any modern scripting language on your big computer, it comes with a shell, a read-eval-print loop (REPL) in which you can interactively try out your code just about as fast as you can type it. It’s great for interactive or exploratory programming, and it’s great for newbies who can test and learn things step by step. A good REPL lets you test out your ideas line by line, essentially running a little test of your code every time you hit enter.

This is your development environment

The obvious tradeoff for ease of development is speed. Compiled languages are almost always faster, and this is especially relevant in the constrained world of microcontrollers. Or maybe it used to be. I learned to program in an interpreted language — BASIC — on computers that were not much more powerful than a $5 microcontroller these days, and there’s a BASIC for most every micro out there. I write in Forth, which is faster and less resource intensive than BASIC, and has a very comprehensive REPL, but is admittedly an acquired taste. MicroPython has been ported over to a number of micros, and is probably a lot more familiar.

But still, developing MicroPython for your microcontroller isn’t developing on your microcontroller, and if you follow any of the guides out there, you’ll end up editing a file on your computer, uploading it to the microcontroller, and running it from within the REPL. This creates a flow that’s just about as awkward as the write-compile-flash cycle of C.

What’s missing? A good editor (or IDE?) running on the microcontroller that would let you do both your exploratory coding and record its history into a more permanent form. Imagine, for instance, a web-based MicroPython IDE served off of an ESP32, which provided both a shell for experiments and a way to copy the line you just typed into the shell into the file you’re working on. We’re very close to this being a viable idea, and it would reduce the introductory hurdles for newbies to almost nothing, while letting experienced programmers play.

Or has someone done this already? Why isn’t an interpreted introduction to microcontrollers the standard?

LED Art Hack Chat

Join us on Wednesday, July 1 at noon Pacific for the LED Art Hack Chat with Aaron Oppenheimer!

From the first time humans crawled into a cave with a bit of charcoal to sketch scenes from the world around them, artists have been searching for new media and new ways to express themselves. Natural products ruled for thousands of years, with pigments stolen or crafted from nature as well as wood, ivory, bone, and stone for carving. Time and experience guided our ancestors to new and better formulations and different materials, to the point that what qualifies as art and what we’d normally think of as technology have, in many cases, blended into one, with the artist often engineering projects of mammoth proportions and breathtaking beauty.

Aaron Oppenheimer co-founded color+light, a company that specializes in large-scale custom art installations for companies like Google, Nike, and Nissan. One of their projects, the “Oddwood Tree”, is displayed alongside other gigantic art pieces at Area15 on the Las Vegas strip. His most recent project, fluora, is a digital houseplant, with addressable LEDs in the leaves that can be controlled by a smartphone app or respond to stimuli in the environment.

Aaron will join us on the Hack Chat to discuss the LED as artistic medium. Join us as we learn what it takes to make enormous art that’s strong enough to interact with yet responsive enough to be engaging.

join-hack-chatOur Hack Chats are live community events in the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, July 1 at 12:00 PM Pacific time. If time zones have you down, we have a handy time zone converter.

Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io. You don’t have to wait until Wednesday; join whenever you want and you can see what the community is talking about.

Continue reading “LED Art Hack Chat”

How Much Is That Plotter In The Window?

We live in a strange time indeed. People who once eschewed direct interactions with fellow humans now crave it, but to limited avail. Almost every cashier at the few stores deigned essential enough to maintain operations are sealed away behind plastic shields, with the implication that the less time one spends lingering, the better. It’s enough to turn an introvert into an extrovert, at least until the barriers are gone.

We get the idea that the need to reach out and touch someone is behind [Niklas Roy]’s “Please Leave a Message”, an interactive art installation he set up in the front window of his Berlin shop. Conveniently located on a downtown street, his shop is perfectly positioned to attract foot traffic, and his display is designed to catch the eye and perhaps crack a smile. The device consists of a large wooden easel holding the guts from an old X-Y pen plotter, an Arduino and an ESP-8266, and a couple of drivers for the plotter’s steppers. Passers-by are encouraged to scan a QR code that accesses a web page served up by the ESP-8266, where they can type in a brief message. The plotter dutifully spells it out on a scroll of paper for all to see, using a very nice font that [Niklas] designed to be both readable and easily plotted. The video below shows it in action with real people; it seems to be a crowd-pleaser.

[Niklas] has been incredibly prolific, and we’ve covered many of his interactive art installations. Just search for his name and you’ll find everything from a pressure-washer dancing waters display to a plus-sized pinball machine.

Continue reading “How Much Is That Plotter In The Window?”

Gear Up Your Gear Knowledge With Gears

Gears are fairly straightforward way to couple rotational motion, and the physics topics required to understand them are encountered in an entry level physics classroom, not a university degree. But to really dig down to the root of how gears transfer motion may be somewhat more complex than it seems. [Bartosz Ciechanowski] put together an astonishingly good interactive teaching tool on gears, covering the fundamentals of motion up through multi-stage gear trains.

Illustrating the distance traveled at different points on the disc

The post starts at the beginning – not “how to calculate a gear ratio” – but how does rotational motion work at all. The illustrations help give the reader an intuitive sense for how the rate of rotation is measured and what that measurement actually represents in the real world. From there [Bartosz] builds up to describing how two discs touching edge to edge transfer motion and the relationship of their size on that process. After explaining torque he has the fundamentals in place to describe why gears have teeth, and why they work at all.

Well written explanatory copy aside, the real joy in this post is the interactivity. Each concept is illustrated, and each illustration is interactive. Images are accompanied by a slider which lets you adjust what’s shown, either changing the speed of a rotating gear or advancing the motion of two teeth interlocking. We found that being able to move through time this way really helped form an intuitive understanding of the concepts being discussed. This feels like the dream of interactive multimedia textbooks come to life.

Punch The World With A Raspberry Pi

Robots have certainly made the world a better place. Virtually everything from automobile assembly to food production uses a robot at some point in the process, not to mention those robots that can clean your house or make your morning coffee. But not every robot needs such a productive purpose. This one allows you to punch the world, which while not producing as much physical value as a welding robot in an assembly line might, certainly seems to have some therapeutic effects at least.

The IoT Planet Puncher comes to us from [8BitsAndAByte] who build lots of different things of equally dubious function. This one allows us to release our frustration on the world by punching it (or rather, a small model of it). A small painted sphere sits in front of a 3D-printed boxing glove mounted on a linear actuator. The linear actuator is driven by a Raspberry Pi. The Pi’s job doesn’t end there, though, as the project also uses a Pi camera to take video of the globe and serve it on a webpage through which anyone can control the punching glove.

While not immediately useful, we certainly had fun punching it a few times, and once a mysterious hand entered the shot to make adjustments to the system as well. Projects like this are good fun, and sometimes you just need to build something, even if it’s goofy, because the urge strikes you. Continue reading “Punch The World With A Raspberry Pi”

A Fleet Of Pressure Washers Powers This Interactive Public Fountain

Public art installations can be cool. Adding in audience interactivity bumps up the coolness factor a bit. Throw civic pride, dancing jets of water, music, and lights into the project, and you get this very cool pressure washer powered musical fountain.

The exhibit that [Niklas Roy] came up with is called Wasserorgel, or “water organ”, an apt name for the creation. Built as part of a celebration of industry in Germany, the display was built in the small town of Winnenden, home to Kärcher, a cleaning equipment company best known for their line of pressure washers in the distinctive yellow cases. Eight of the company’s electric pressure washers were featured in the Wasserorgel, which shot streams of water and played notes in response to passersby tickling the sturdy and waterproof 3D-printed keyboard. The show was managed by an Arduino with a MIDI shield, which controlled the pressure washers via solid state relays and even accepted input from an anemometer to shut down the show if it got too windy, lest the nearby [Frau Dimitrakudi] be dampened.

The video below shows how engaging the Wasserorgel was during its weeks-long run in the town market square; there’s also one in German with build details. And while we can’t recall seeing pressure washers in public art before, we do remember one being used as the basis of a DIY water-jet cutter.

Continue reading “A Fleet Of Pressure Washers Powers This Interactive Public Fountain”

Magic Mirror Tirelessly Indulges Children’s Curiousity

[pepelepoisson]’s Miroir Magique (“Magic Mirror”) is an interesting take on the smart mirror concept; it’s intended to be a playful, interactive learning tool for kids who are at an age where language and interactivity are deeply interesting to them, but whose ceaseless demands for examples of spelling and writing can be equally exhausting. Inspiration came from his own five-year-old, who can neither read nor write but nevertheless has a bottomless fascination with the writing and spelling of words, phrases, and numbers.

Magic Mirror is listening

The magic is all in the simple interface. Magic Mirror waits for activation (a simple pass of the hand over a sensor) then shows that it is listening. Anything it hears, it then displays on the screen and reads back to the user. From an application perspective it’s fairly simple, but what’s interesting is the use of speech-to-text and text-to-speech functions not as a means to an end, but as an end in themselves. A mirror in more ways than one, it listens and repeats back, while writing out what it hears at the same time. For its intended audience of curious children fascinated by the written and spoken aspects of language, it’s part interactive toy and part learning tool.

Like most smart mirror projects the technological elements are all hidden; the screen is behind a one-way mirror, speakers are out of sight, and the only inputs are a gesture sensor and a microphone embedded into the frame. Thus equipped, the mirror can tirelessly humor even the most demanding of curious children.

[pepelepoisson] explains some of the technical aspects on the project page (English translation link here) and all the code and build details are available (in French) on the project’s GitHub repository. Embedded below is a demonstration of the Magic Mirror, first in French then switching to English.

Continue reading “Magic Mirror Tirelessly Indulges Children’s Curiousity”