Category Archives: GPIO

Using the ESP8266 module for the Internet of Things

About two years ago, a cheap five dollar microcontroller has been entering the maker scene, featuring b/g/n wireless LAN.  The ESP8266 is manufactured by a Chinese company, called Espressif Systems and became soon very popular as a building-block for home-automation and IoT projects.These modules were distributed on  Ebay, the Amazon Marketplace or AliExpress for a few dollars. However, communication with most of the ESP8266 modules requires an external USB-to-Serial-Adapter and a special procedure to bring the device into “flash-mode”, which can be cumbersome in some cases, especially for beginners. With the brand-new WeMos D1 Mini, the setup was significantly simplified, so that it is as easy to use as an Arduino UNO.

esp8266-12-e1452522744313-300x231

Continue reading Using the ESP8266 module for the Internet of Things

Connecting a DS18S20 temperature sensor to RasPi

I’ve been a little reluctant to connect a DS18S20 temperature sensor to my RasPi, since there were rumors that the w1_gpio.ko kernel module exclusively requires a connection to GPIO #4, because of being hard coded. At least that’s what Lady Ada’s tutorial says about it and what one can read in several user forums. Unfortunately GPIO #4 was already occupied on my Pi. Therefore I searched through several Blogs for advice how to change the hard-coded GPIO in the kernel module. It turned out that I wasn’t the only one – so here’s the good news: In Raspbian Wheezy with Kernel 3.10.25+ it is possible to pass the desired GPIO in /boot/cmdline.txt to the kernel using the option:

bcm2708.w1_gpio_pin=<GPIO#>

To be able to read temperatures from the sensor, modprobe the wire, w1_gpio and w1_therm kernel modules. The temperature can be read from /sys/bus/w1/devices/<device_serial_number>/w1_slave.

I’m using the the sensor for outdoor temperature measurement. I soldered about 1 m wire to the sensor (TO92 housing), insulated the solder joints with heat shrink tube and embedded the sensor into an old metal ballpoint cap using epoxy glue.