“It was a cold and windy night, but the breeze of ill omen blowing across the ‘net was colder. The regular trickle of login attempts suddenly became a torrent of IP addresses, all trying to break into the back-end of the Joomla site I host. I poured another cup of joe, it was gonna be a long night.”
Tech noir aside, there was something odd going on. I get an email from that web-site each time there is a failed login. The occasional login attempt isn’t surprising, but this was multiple attempts per minute, all from different IP addresses. Looking at the logs, I got the feeling they were pulling usernames and passwords from one of the various database dumps, probably also randomly seeding information from the Whois database on my domain.
The ages-old dream of home automation has never been nearer to reality. Creating an Internet of Things device or even a building-wide collection of networked embedded devices is “easy” thanks to cheap building blocks like the ESP8266 WiFi-enabled microcontroller. Yet for any sizable project, it really helps to have a plan before getting started. But even more importantly, if your plan is subject to change as you work along, it is important to plan for flexibility. Practically, this is going to mean expansion headers and over-the-air (OTA) firmware upgrades are a must.
I’d like to illustrate this using a project I got involved in a few years ago, called BMaC, which grew in complexity and scope practically every month. This had us scrambling to keep up with the changes, while teaching us valuable lessons about how to save time and money by having an adaptable system architecture.
Blacksmiths were the high technologists of fabrication up until the industrial revolution gained momentum. At its core, this is the art and science of making any needed tool or mechanism out of metal. Are you using the correct metal? Is the tool strong where it needs to be? And how can you finish a project quickly, efficiently, and beautifully? These are lessons Blacksmiths feel in their bones and it’s well worth exploring the field yourself to appreciate the knowledge base that exists at any well-used forge.
I had an unexpected experience a few days ago at the Hacker Hotel weekend hacker camp in the Netherlands. At the side of the hotel our friends at RevSpace in The Hague had set up a portable forge. There was the evocative coal fire smell of burning coke from the hearth, an anvil, and the sound of hammering. This is intensely familiar to me, because I grew up around it. He may be retired now, but my dad is a blacksmith whose work lay mostly in high-end architectural ironwork.
The trouble is, despite all that upbringing, I don’t consider myself to be a blacksmith. Sure, I am very familiar with forge work and can bash metal with the best of them, but I know blacksmiths. I can’t do everything my dad could, and there are people we’d encounter who are artists with metal. They can bend and shape it to their will in the way I can mould words or casually solder a tiny surface-mount component, and produce beautiful things in doing so. My enthusiastic metal-bashing may bear the mark of some experience at the anvil but I am not one of them.
It was a bit of a surprise then to see the RevSpace forge, and I found myself borrowing a blacksmith’s apron to protect my smart officewear and grabbing a bit of rebar. I set to and made a pretty simple standard of the dilletante blacksmith, a poker with a ring on one end. Hammer one end of the rebar down to a point, square off the other end for just over 3 times the diameter of the ring, then bend a right angle and form the ring on the pointy end of the anvil. Ten minutes or so of fun in the Dutch sunshine. Working a forge unexpectedly brought with it a bit of a revelation. I may not be a smith of a high standard, but I have a set of skills by virtue of my upbringing that I had to some extent ignored.
Where others might have put effort into learning them, they’re things I just know. It had perhaps never occurred to me that maybe all my friends in this community didn’t learn how to do this by hanging round the forge next to the house they grew up in. If I have this knowledge merely by virtue of my upbringing, perhaps I should share some of it in a series of articles for those in our community who’ve always fancied a go at a forge but have no idea where to start.
Last year, we saw quite a bit of media attention paid to blockchain startups. They raised money from the public, then most of them vanished without a trace (or product). Ethics and legality of their fundraising model aside, a few of the ideas they presented might be worth revisiting one day.
One idea in particular that I’ve struggled with is the synthesis of IoT and blockchain technology. Usually when presented with a product or technology, I can comprehend how and/or why someone would use it – in this case I understand neither, and it’s been nagging at me from some quiet but irrepressible corner of my mind.
The typical IoT networks I’ve seen collect data using cheap and low-power devices, and transmit it to a central service without more effort spent on security than needed (and sometimes much less). On the other hand, blockchains tend to be an expensive way to store data, require a fair amount of local storage and processing power to fully interact with them, and generally involve the careful use of public-private key encryption.
We can make our 3D-printed parts even more capable when we start mixing them with some essential “mechanical vitamins.” By combining prints with screws, nuts, fasteners, and pins, we get a rich ecosystem for mechanism-making with capabilities beyond what we could simply print alone.
Today I’d like to share some tips on one of my favorite functional 3D-printing techniques: adding heat-set inserts. As someone who’s been installing them into plastic parts for years manually, I think many guides overlook some process details crucial to getting consistent results.
Make no mistake; there are a handful of insert guides already out there [1, 2]. (In fact, I encourage you to look there first for a good jump-start.) Over the years though, I’ve added my own finishing move (nothing exotic or difficult) which I call the Plate-Press Technique that gives me a major boost in consistency.
Join me below as I fill in the knowledge gaps (and some literal ones too) to send you back to the lab equipped with a technique that will give you perfectly-seated inserts every time.
Our digital world is so much more interactive than the paper one it has been replacing. That becomes very obvious in the features of Jupyter Notebooks. The point is to make your data beautiful, organized, interactive, and shareable. And you can do all of this with just a bit of simple coding.
We already leveraged computer power by moving from paper spreadsheets to digital spreadsheets, but they are limited. One thing I’ve seen over and over again — and occasionally been guilty of myself — is spreadsheet abuse. That is, using a spreadsheet program to do something I probably ought to write a program to do. For those times that you want something quick but want something more than a spreadsheet, you should check out Jupyter Notebooks. The system is most commonly associated with Python, but it isn’t Python-specific. There are over 100 languages supported — many community-developed. You can even install a C++ interpreter backend for it. Because of the client/server architecture, it is very simple to share notebooks with other users.
You can — in theory — use Jupyter for anything you could use Python for. In practice, it seems to get a lot of workout with people analyzing large data sets, doing machine learning, and similar tasks.
The Good: Simple, Powerful, Extensible
The idea is simple. Think of a Markdown-enabled web page that can connect to a backend (a kernel, in Jupyter-speak). The backend can run on your machine or remotely and will support some kind of language — often Python. The document has cells that line up vertically (like a single wide spreadsheet column). For example, here’s a simple notebook I created to explain how a bunch of sine waves add up to a square wave:
It’s no secret that I rather enjoy connecting things to the Internet for fun and profit. One of the tricks I’ve learned along the way is to spin up simple APIs that can be used when prototyping a project. It’s easy to do, and simple to understand so I’m happy to share what has worked for me, using Web2Py as the example (with guest appearances from ESP8266 and NodeMCU).
Barring the times I’m just being silly, there are two reasons I might do this. Most commonly I’ll need to collect data from a device, typically to be stored for later analysis but occasionally to trigger some action on a server in the cloud. Less commonly, I’ll need a device to change its behavior based on instructions received via the Internet.
In the former case, my first option has always been to use IoT frameworks like Thingsboard or Ubidots to receive and display data. They have the advantage of being easy to use, and have rich features. They can even react to data and send instruction back to devices. In the latter case, I usually find myself using an application programming interface (API) – some service open on the Internet that my device can easily request data from, for example the weather, blockchain transactions, or new email notifications.
Occasionally, I end up with a type of data that requires processing or is not well structured for storage on these services, or else I need a device to request data that is private or that no one is presently offering. Most commonly, I need to change some parameter in a few connected devices without the trouble of finding them, opening all the cases, and reprogramming them all.
At these times it’s useful to be able to build simple, short-lived services that fill in these gaps during prototyping. Far from being a secure or consumer-ready product, we just need something we can try out to see if an idea is worth developing further. There are many valid ways to do this, but my first choice is Web2Py, a relatively easy to use open-source framework for developing web applications in Python. It supports both Python 2.7 and 3.0, although we’ll be using Python 3 today.