Category Archives: Developer Garden

Coding the Internet of Things for creative beginners and kids

Last week I had a trip to the Droidcon Moscow where I talked about the Internet of Things, in particular smart home for creative developers and rookies. It was really exciting to see how interested and open minded the developers in the awesome Russian capital are.

Moscow State UniversityWell, the weather was not the best in front of the Moscow State University. Anyway, my personal favorite in Moscow is the weather-proofed subway: It’s soviet era charm is stunning.

I did the only English sessions and both have been packed (sorry for the parallel track ;)). Usually I get questions on privacy, security and stuff like that. But at Droidcon Moscow it was surprisingly different. The Russian developers seem to be really eager to start with the Internet of Things themselves and did ask a lot on how to do that. Especially the part on how to get technology-laggards and kids into that topic was very well received.

To make one really wanting to become a developer, it’s important rather to motivate than to teach: Teaching feels like school! But it’s more about continuous offering, playing and explaining. Especially because being a developer of new and innovative ideas does not mean you have to be a fulltime programmer. Nowadays almost everybody who is keen to get into the Internet of Things can do so thanks to various available easy toolkits.

Anyway, a basic understanding of programming does not hurt. If anything. A good starting point could be the following selection of trainings and tools. I made quite a good experience using these in the given order with my son and his classmates:

  • Hour of Code: You can choose among several themes from Minecraft to Frozen in this online programming environment where you have to fulfill easy tasks to solve the challenges.
  • Scratch: Scratch is a project of the Lifelong Kindergarten Group at the MIT Media Lab. It is both a visual programming environment and a story telling tool. So, start your interactive fairy tales and games right now. There’s also an extendable version named ScratchX, which we use for IoT prototypes connected to the real world (see here). By the way, Scratch is the prefiguration of a lot of visual programming environments like the following.
  • App Inventor: App Inventor was originally provided by Google, and is now maintained by the Massachusetts Institute of Technology (MIT). It is based on the same visual programming approach like Scratch, but suited for mobile apps one can use on a real device.
  • Minecraft and ComputerCraft: There are a few Minecraft based ways, to learn programming. Our personal favorite so far is ComputerCraft. It introduces virtual Computers and peripherals like printers in Minecraft. All programmable with Lua, one of the easier programming languages. Furthermore, you can extend it with your own API (application programming interface) to add some additional capabilities (i.e. to connect your smart home as shown here). Lua is not just a more and more popular programming language, it is also common for IoT solutions (i.e. based on the ESP8266 chip with NodeMCU firmware).

Well, as mentioned above that worked like a charm with my son. Even my daughter did great, but unfortunately she just does not like it that much until now: But I will not give up offering, playing and explaining and once I find a way, I will let you know…

Reversibles Hacken

Wie kommt man schnell zu neuen Ideen und wie prüft man diese frühzeitig auf deren Nutzen und Umsetzbarkeit? Gerade im Rahmen des digitalen Wandels (Digitale Transformation) im Zusammenhang mit dem Internet der Dinge ist dies eine essentielle Frage.

Bei vielen Projekten hat es sich bewährt, für erste Prototypen auf vorhandene Produkte zurückzugreifen und diese „nur“ anzupassen. Das ist gerade in frühen Projektphasen effizienter und günstiger, als etwas ganz von vorne zu bauen. Es geht darum, die Funktionsweise zu verstehen und für eigene Vorstellungen zu verändern. Oder wie es CCC-Gründer Wau Holland formulierte: „Ein Hacker ist jemand, der versucht einen Weg zu finden, wie man mit einer Kaffeemaschine Toast zubereiten kann“.

disassembling

Meist die größte Herausforderung und ein Garantiekiller: Das eigentliche Auseinandernehmen (hier am Beispiel einer Nespresso Pixie). Und nicht vergessen, Strom ist lebensgefährlich und ein Personenschutz-Adapter die mindeste Investition, ist einem sein Leben lieb.

Angenommen die Aufgabe besteht darin, dass eine Kaffeemaschine zum Beispiel intelligent und vernetzt sein soll (Stichwort Smart Home). Dann gibt es verschieden Wege, Ideen zu entwickleln und erlebbar zu machen. Diese unterscheiden sich jedoch ganz erheblich in den dafür notwendigen Fähigkeiten und Kosten. Zum Beispiel könnte ein Roboter die Maschine stellvertretend steuern. Es gibt zahlreiche Beispiele, wo dies erfolgreich jedoch meist nicht ganz günstig praktiziert wird. Es wäre auch einen Versuch wert, direkt in die Steuerung der Maschine über deren Programmierung einzugreifen. Einige Hersteller wie z. B. der Staubsaugerroboterhersteller iRobot oder der Dronenhersteller Parrot bieten dafür extra Programmierschnittstellen. Doch sollten diese fehlen, dann muss viel Aufwand betrieben werden wie z. B. Reverse Engineering. Oder man könnte auch die Hardware des Gerätes mit eigenen Komponenten zur Steuerung modifizieren, doch dies ist meist mit erheblichen Kosten und Risiken verbunden.

electronic_contacts

Ob man nun die Sensoren und Schalter direkt am Bauteil oder an der Platine abgreift, ist eher eine praktische Frage. Bei der Nespresso Pixie lässt sich das glücklicherweise alles schön zentral machen. A und B sind die Tasten, C ist ist die Status LED und D für die Erdung.

Eine effiziente und kostengünstige Vorgehensweise ist das „Reversible Hacken“. Diese einfache Form des „Hacken“ nutze ich erfolgreich im Rahmen von Value Innovation Workshops bei denen neben der Ideenfindung auch Geschäftsmodelle entwickelt und mögliche Innovationen und deren technische Umsetzbarkeit überprüft werden (ein Artikel ist geplant).

Beim Reversible Hacken hier wird zwar auch in die Hardware des Gerätes eingegriffen, doch dies beschränkt sich auf das Abgreifen der vorhandenen Sensoren und Überbrücken der Aktoren wie Schalter. Die Funktionsweise der Sensoren und Schalter lässt sich in der Regel einfach ermitteln und die meist kostengünstigen Bauteile wie Optokoppler und Relais lassen sich normalerweise leicht wieder entfernen – zumal die grundsätzliche Funktionsweise des Gerätes ja eh weiterhin erhalten bleibt und zusätzliche Möglichkeiten nur drangeflanscht werden.

arduino

Sieht schlimmer aus, als es ist: Die hinzugefügten Bauteile müssen nur noch mit einem Rechner verbunden und programmiert werden. Hier kommt das Arduino kompatible „Platinchen“ von blueIOT auf einem Steckbrett zur fliegenden Verdrahtung zum Einsatz.

Die zusätzlichen Bauteile müssen nun nur noch mit einem Einplatinenrechner wie Raspberry Pi und/oder Arduino verbunden werden. Schon stehen einem alle Möglichkeiten in Software zur Verfügung. Das geht in der Regel zügig von der Hand, wenn man einen Baukasten aus den notwendigen Bibliotheken und Codemustern parat hat. Meist ist es ja nicht mehr als ein paar REST-Aufrufe kombiniert mit Sensorwert/Ereignis lesen, Bedingung prüfen und Wert setzen. Zumindest für einen Prototypen reicht das häufig.

Falls Sie nun selber loslegen und eigene Ideen probieren möchten, dann sind Spielzeuge ein guter Startpunkt für eigene Experimente. Selbst vermeintlich defekte Geräte können so zu neuem Leben erweckt werden.

Why Industry 4.0 might stumble

Hardware and Software is getting more and more available and usable for everyone: Both in terms of price and complexity. Thanks to that, a growing crowd of enthusiast is building electronic gizmos. It’s getting even more interesting if you connect sensors and apps through the almost everywhere available Internet.

Classic industries seem to understand that this is important. So, they gave it a name: Industry 4.0! This fourth phase of industrialization is about cyber physical systems (which implies connectivity). Although they understand the importance, they often do not know how to deal with it. Saying that I am not criticizing their business or their competence!

Nevertheless, Industry 4.0, Machine-to-Machine (M2M), Internet of Things (IoT) or whatever you like to call it (indeed, there are differences)… It’s not  just about generating business value, it’s not about saving or earning money in the first place! It’s much more about creativity and finding (or creating) new needs! It’s about innovating. Well, even innovations must proof themselves based on revenue, but if you turn around the motivation, your subject reduces to a replaceable vehicle for sales.

image

EtherNet/IP Sequence for I/O Data Transfer is public, but the protocol details cost a fortune (Source: ODVA – Open DeviceNet Vendor Association, Inc.)

One of the most important aspects about the Internet of Things movement is accessibility (in terms of availability and usability). Exactly that is missing talking about classic industries. For example, I wanted to use a specific sensor for the automation industry but finally gave up. I spend a decent amount of time, to get a specific sensor and even spend more time to use it. Well, it seemed so simple, because it’s just a basic socket connection. Unfortunately, it turned out the protocol itself isn’t that easy. Furthermore, you (in addition to the vendor) have to buy the specification or a library for a significant amount of money, too (which costs more than the sensor).  It’s even worth, because some people did start open source libraries, but according to their websites had to stop for the sake of license issues.

The standards organizations and license owners have their arguments, like compatibility, security etc., but I simply don’t think that’s true: Security is literally a lame excuse for complex and obfuscated legacy systems. I think it’s just because of revenue! These people think, if a system performs just closed and/or complex enough, one might be willing to pay for it – and it’s even better if every party has to pay (the vendor and the customer). This is too shortsighted and only true as long as you do not have alternatives!

Anyway restricting the access to these technologies impedes innovation. If the opportunity costs are just too high, “innovators” will ignore these. Otherwise it takes frustrating long to experience and prove an idea! From my experience, this is even true doing workshops and prototypes together with these industries. This makes me sad, because it would be so easy for them, to implement interfaces for that, instead of remaining in stagnation…