preface

Interest in the Internet of Things and open source hardware has a long history.

When I was in college, @Lao Yang and I could not accept Hegel’s belief that existence is reasonable, and we were keen to improve the unreasonable things we saw every day.

Hegel is one of my most hated philosophers, and I like Bertrand Russell’s attack on him in the history of Western philosophy, when Russell said of Hegel’s obscure and vast system:

The worse the logic, the more interesting the conclusions it leads to.

Yang and Lao Yang often went out to ride bikes together, sometimes on weekends, sometimes skipping classes. During the journey, they not only talked about David Hume and Wittgenstein, but also often brainstorms about things they saw on the ride. Are these things justified? Can we reinvent something better? When you get back from your bike ride, grab a study room and do some sketching to show off the improved model in your head.

We often get stuck in the same place. When we are trying to improve things around us, we often need to take physical parameters of the outside world, such as sound, light intensity, Angle of tilt, temperature and humidity, and we want to create devices that can automatically perform some kind of logic based on those values. At the beginning, I felt that I was not familiar with the mechanical structure, and could not use the CAM, lever and other mechanical devices to design an exquisite structure to perform the cycle function or timing function. It is not difficult to understand the principles of the ingenious mechanical structures in books, but the need for some kind of inspiration to design mechanical structures with these logical functions in mind seems strong and rare.

I like to wander aimlessly through the library, picking up whatever book I have at hand, no matter what category it belongs to. I stumbled upon the existence of something called microcontroller, which can connect sensors to obtain the parameters of the physical world, and at the same time, it can control devices such as motors by programming, to influence the reality. So that the logical structure of the brain can operate directly in the real world without mechanical structure!

Lao Yang and I read some books on microcontroller in the library. Despite our enthusiasm and patience, we were bored to death. These textbooks successfully quench all our enthusiasm. It is not fair to say that SCM books are boring, after all, most of the teaching materials are boring, in addition to stacking formulas and knowledge, do nothing else. The bar for being a mediocre textbook writer is really low. All you need is CtrL-C + CtrL-V, which I believe is strictly Ctrl-C + CtrL-V, not the copy-paste that programmers joke about themselves.

I am now an optimist in my view of the world, unlike Plato. I believe that the world as a whole is improving as the years go by, rather than becoming progressively worse as Plato imagined. But every time I go to the library and open the textbook, I sometimes think Plato was right.

When I came across the word “Internet of Things”, I felt it was exactly what @Lao Yang and I had been expecting. If we can connect devices to the Internet, we can not only solve the control problem of individual devices, but also make them work together!

The university began to mingle with the open source community, where I met admirable developers, interested in the direction of programming, and most of my love for programming came from the experience of the open source community. When I get interested in a new field, my first thought is often to look for learning materials in the open source community. After graduation, I did not engage in work related to open source hardware and Internet of Things, but I still like to make some useless inventions. I’ve been looking at open source hardware, the Internet of things.

It is particularly worth mentioning that in recent years, due to the development of children’s programming, the hardware programming ecosystem has been greatly improved. The emergence of Raspberry PI and Micro: Bit not only makes it convenient for children to create, but also makes it easy for those adults who love to create and still have childlike innocence but have not received the hardware education to transform things around.

From the micro: bit

The Micro: Bit is a tiny computer developed by the BBC and originally intended to teach teenagers how to code. Popular all over the world.

This small board integrates many components: Bluetooth, accelerometer, magnetometer, three buttons, LED dot matrix, and GPIO(pins that can be used to connect other sensors).

Programming for it is extremely easy. Even if you don’t have any programming experience, you can use blocks to create hardware projects that work in the real world in just a few minutes by dragging and dropping! Makecode is your ideal starting partner.

If you already have a foundation in Python, you can also program it in Python: Python Editor

Micro: BIT is open source hardware, from the hardware circuit to the software code is all open, there are a large number of open source projects based on micro: BIT, users around the world formed a community, there are very rich tutorials and projects for beginners to learn.

When I was in college, @Yang and I were always looking forward to something like micro: Bit. Unfortunately, it came late and added a lot of fun to the weekend.

Raspberry pie

There are plenty of projects in the open source community showing what fun things people have done with Micro: Bit, and most of the creators have no prior programming experience.

If you want to do something slightly more complicated, like automatically remind people to bring an umbrella based on the weather. You may need an Internet connection, and when you want to get more done, raspberry PI might be the ideal next step.

The Raspberry PI is only about the size of a hand, but it’s technically a computer, and the truth is, it’s far more powerful and flexible than your laptop or phone. Today’s consumer computing devices (phones, ipads, laptops) are designed as a kind of black box, which is certainly an elaborate design. As “The next Big thing” is described in a room:

We’ve forgotten the most remarkable thing about computers: their plasticity. We have tacitly ceded the right to create virtual worlds to those who can afford to hire enough software engineers at great expense. The photons that hit our eyes come from perfectly replaceable pixels, but to most of us, those pixels seem immutable and carved in stone. Smartphone apps, like kitchen appliances once upon a time, are carefully designed single-purpose tools with minimal customization and interoperability. They have millions of lines of weird code that only an army of programmers can tame. Once people pay, children get magical rectangles that are as hard to understand as real magic.

The raspberry PI tried to make computers malleable, which was why hackers like Wozniak liked it, and when Jobs tried to reduce apple’s malleability, Wozniak showed the bottom line of hackers:

I’m usually a very easy-going person, but this time I told him, ‘If you only want two expansion slots, go make one. People like me will eventually come up with something to add to the computer.

The Wozniak of today may despise the apple products he helped create in his early years.

Like Micro: Bit, raspberry PI is open source. There’s GPIO, remember GPIO? Just some pins to connect the raspberry PI to your new sensor.

You can make a robot out of raspberry PI, a soul camera, an Internet of things gateway, a flying machine… All these things, there are people in the community who make them.

Raspberry PI has tens of millions of users worldwide, and like Microbit, Raspberry has a great community. You don’t have to start with a textbook circuit diagram. Join the open source community, play with people, ask questions, and the community is very user friendly. They are your kind playmates and warm-hearted teachers.

The Internet of things

One day you use raspberry PI or other open source hardware to create a gadget called the Raspberry PI Guardian. It’s simple: Raspberry sent up a ultrasonic sensor, after you put it at the door, when you secretly see highly of the song of ice and fire in the room strength, opened the door suddenly a, ultrasonic sensor sensing the door was opened, raspberry pie immediately send a signal to your computer, your computer screen instantly switch to the code of the page 432 of the book.

This thing not only you use happy, often bully you fat tiger also like it, so he threatened you quickly to do another; Shizuka, who you like, loves it, too, so she asks you to help make one.

When you stay up late on Saturday to make a new raspberry PI Guardian, knock on Static-Incense’s door on Sunday morning.

You wait outside the door for it to run smoothly, shizuka is happy and grateful, and runs out of the door to hug you. Who knows what people can do when they are happy? You’re blushing a little at the thought.

You wait and wait as slowly as the last class on a Friday afternoon.

Shizuka runs out to you, and you’re about to stretch out your arms, and Shizuka says, “How do I connect it to wifi? You only said to connect to the Internet, did not say how to connect, and millet gateway the same operation? Cool. What’s the name of your app? I’m going to download it!”

You forgot to consider this. You usually SSH into Raspberry PI and configure the network for Raspberry PI using the Vim editor. You didn’t write the app, you kind of stutter: “Well… This… I’ll send it to you next term when it’s perfect!”

You realize that it’s a lot of work to make something that ordinary users can easily use, and a working prototype is not enough. It has to be easy to use.

You’re building an Internet of things product.

Internet of Things

The English name for the Internet of Things is straightforward: Networked objects.

There are so many things you can do with connected objects: smart homes, wearables, smart logistics, smart agriculture… It was supposed to be the next decade.

If you’re doing something like Raspberry PI Guardian for c-end users, you have a lot of technical problems to solve. I described a problem with a raspberry PI programmable car.

If you’re going to start all over again, I bet Shizuka’s married, and you’re not even halfway through.

Fortunately, with the open source community, you have everything you need.

Need an MQTT server (MQTT Broker), right? Emqx, open source, well-documented, can handle connections to millions of devices right out of the box.

Not sure what MQTT is? In short, MQTT is to the Internet of Things what HTTP is to the Internet. Are you even more confused? It’s okay. There’s a lot more people in the community who can explain things better than I can.

Need a mobile app? Blynk, it can help you quickly build a releasable APP. Drag a button, a color selection box, and a chart tool to look a lot like the Apple Health app. There are tons of developers using it to create their own apps for the Internet of things.

Did you hear that Shizuka has a distant cousin who is learning programming and wants to make something fun? CodeLab has built a building block programming environment that allows you to play with the Internet of Things in building blocks. If she were more capable, the Codelab-Adapter even had an open source plug-in built in for her to run the entire MQTT server at school.

What? It doesn’t sound very believable to you that I’m advertising. There’s no compulsion in the open source community. You can ask Shizuka’s cousin to try node-Red, Physical Etoys and other open source projects. Off the record, I think she’ll eventually like what we’re doing. We’ll see.

reference

  • The Internet of things
  • Open source hardware
  • micro:bit
  • Raspberry pie
  • wwj718/iot_lab
  • wwj718/esp8266_umqtt
  • wwj718/what-mqtt
  • CodeLab ❤ ️ IoT