Using CH340 devices with OSX

I have several low-cost development boards that use the CH340/CH341 usb-to-serial chip for usb communication. Unfortunately, with OSX Sierra, the official CH340 driver cause a Kernel Panic (freeze + reboot) of the Mac when a device is connected. The reason is that the drivers are not signed correctly. I’ve found an alternative driver ($8) that was really worth the money.

Continue reading →

Advertisements

The MicroPython Lego Bot

In the quest for getting my kids interested in coding, I’ve decided to make them a message controlled bot car with Lego bricks and an ESP8266 board. The idea is to have an environment where we can jointly program a sequence of actions that can be sent via WiFi to the bot for execution. With this setup we can make challenges like creating the optimal sequence for navigating through a maze or simply try out crazy movements & mayhem just for the fun of it. Hopefully, having an assignment were you need to connect an abstraction like a sequence of symbols with a physical object will ignite a spark of interest for electronics and the basics of programming.

This post describes the first part of this project. I will use Lego bricks and some servos to build a car bot and mount an ESP8266 board loaded with MicroPython. To begin with, the bot will be controlled via WiFi through MicroPython’s WebREPL.

Continue reading →

A sensor monitor with OLED in MicroPython

I have different sensor nodes at home that publish measurements at regular intervals to a Raspberry Pi. The data is stored on the RPi and in a cloud service and can be viewed with various applications. As my most common use case is to view the latest value of a particular sensor, I would like to have a mounted low-powered display in the kitchen to show the latest values from my sensors.

In this post I will show how I have used an Adafruit Feather Huzzah and a FeatherWing OLED that monitors the latest messages from my sensors. To get out of my normal comfort zone (Arduino IDE with C/C++), I will use MicroPython for the implementation.

Continue reading →

MicroPython and ESP8266

During the past 6 months  I have grown into a big fan of the Python programming language. I have also found a new passion in tinkering with the versatile and inexpensive ESP8266 microcontroller boards. For the embedded programming I usually stick with Arduino IDE and C/C++, but as there now is a Python implementation for ESP8266 available, I have to try it out and see if I can combine my two latest passions. In this post I will describe my first experiments with MicroPython on an ESP8266 board (an Adafruit Feather Huzzah).

Continue reading →

A self-hosted MQTT environment for Internet of Things – Part 2

In the second post in this series, I will setup two ESP8266 microcontrollers with MQTT publishing through a Raspberry Pi-hosted Mosquitto broker. The idea is that the microcontrollers will send sensor data (like temperatures or other events) that one or several MQTT subscribers can act on.

Continue reading →

Exploring Adafruit IO

Adafruit hosts a cloud service, io.adafruit.com, where you can upload data from your devices and also subscribe to data from other devices. The service is currently in beta, but you can sign up for a free account to test it. The data is stored in “feeds” and you can configure your own dashboards for viewing the data. There are two API:s available. One is REST-based and the other follows the publish/subscribe pattern of MQTT. In this post I will try both alternatives.

Continue reading →