Tag Archives: Raspberry PI

Switching to Raspberry Pi 3

As my server was running on A20-OLinuXino-LIME board, it started to freeze. I thought it is software issue and after some update it will be fixed, but that didn’t happen. When freezes even blinking LED stops blink.

So I decided to try Raspberry PI and installed Raspbian OS. No SSD disk as before, all running on micro SD card.

I am playing wit Pis for a long time (my first one is Rpi 1 Model B still running my weather station on the balcony).

Here I am – my blog on Pi, so far so good, will see. read more

Measuring Temperature and Humidity with Raspberry Pi

After I played with OLED display with Raspberry PI, the next logical step is to display more useful information on it.


I bought a sensor DHT22_AM2302 which is a Digital Temperature Humidity Sensor with serial interface.

The device measures both temperature and humidity and you get the values in single poll.

Connected GND to Rpi’s GND,

Vcc to Rpi GPIO- pin 2 and finally

Data to GPIO pin 8 (GPIO 14)


Little bit of coding in Python and using nice libraries written by Tony DiCola for Adafruit Industries and here is the result. read more

OLED display to Raspberry Pi

Today I played with an OLED Display. I bought it from Amazon for $14 which is 0.96 Inch I2C and SPI Serial 128 x 64. It needs only 4 wires to connect to Raspberry Pi. This display is a monochrome (blue) – hence the price.

 i2cdetect -y 1

Showed the display detected on the I2C bus

Couple of lines of code from GitHUB – show IP address and the time. Graphics also can be drawn – lines, circles, rectangles, ellipses etc. even displaying .png files.


#!/usr/bin/env python # # !!! Needs psutil (+ dependencies) installing: # $ sudo apt-get install python-dev # $ sudo pip install psutil # import os import sys if os.name != 'posix': sys.exit('platform not supported') import psutil from datetime import datetime from oled.device import ssd1306, sh1106 from oled.render import canvas from PIL import ImageDraw, ImageFont f = os.popen('/sbin/ifconfig wlan0 | grep "inet\ addr" | cut -d: -f2 | cut -d" " -f1') your_ip=f.read() from time import gmtime,localtime, strftime t = strftime("%Y-%m-%d %H:%M:%S", localtime()) def stats(oled): font = ImageFont.load_default() font3 = ImageFont.truetype('/root/oled/fonts/C&C Red Alert [INET].ttf', 18) font4 = ImageFont.truetype('/root/oled/fonts/C&C Red Alert [INET].ttf', 22) with canvas(oled) as draw: draw.text((0, 26), your_ip, font=font4, fill=255) draw.text((0, 48), t, font=font3, fill=255) def main(): oled = ssd1306(port=1, address=0x3C) stats(oled) if __name__ == "__main__": main() read more

Time-Lapse Video with Raspberry PI

I created time-lapse video with my Raspberry Pi. I used the Raspberry PI 5MP Camera Board Module (mine is NoIR version without IR filter). OS of choice is Raspbian. To avoid limits with SD card size, I mounted a share on my NFS server and generated the pictures there.
First testing the camera in single shot mode:

raspistill -o testimage.jpg

All was good, Then next step was to get picture every 16 seconds for 3hrs period and auto name them. read more