Home

How to create Arduino Library from Arduino Sketch

On previous article, I wrote an Arduino sketch (i.e. program) for interfacing LCD 5110 display module with Arduino. In the article I mentioned that I’d like to crate an Arduino library with a set of clearly defined APIs that I can even port it into python library for Raspberry Pi sharing the same APIs. Technically speaking the Arduino sketch that I developed is not an Arduino library yet. In this article, I will discuss on how to create an Arduino Library, or more precisely, how to convert the Arduino sketch into an Arduino library. Continue reading “How to create Arduino Library from Arduino Sketch”

How to use LCD 5110 (PCD 8544) with Arduino

When I was in Taiwan a month ago for my cycling trip, I went to the Guang Hua electronics market and bought a LCD 5110 display impulsively without any particular objective on how I’m going to use it. I figured that I will eventually used it in one of my hardware project in future, but for time being I just want to understand how it works. My goal is to understand how the LCD display works, and then write a library for it without rely on third-party library, and furthermore, with common APIs for both Arduino and Raspberry Pi. Continue reading “How to use LCD 5110 (PCD 8544) with Arduino”

DS18B20 temperature sensor data logger

DS18B20 is a temperature sensor which communicates over a 1-Wire bus that by definition requires only one data line for communication with a host controller. I like DS18B20 as compare to other popular low cost temperature sensors for its accuracy and reliability. According to the DS18B20 data sheet, DS18B20 provides a digital Celsius temperature output with an accuracy of +/-0.5°C in the range of -10°C to +85°C. Continue reading “DS18B20 temperature sensor data logger”

Secure Nginx and WordPress with Fail2ban

A few days after this self-hosted Nginx server and WordPress up and running, I started to see massive login attempts trying to gain access on SSH and WordPress login. After evaluating various solutions and plugins, I settled on using Fail2ban to block such attacks, and here are the steps on how I did it. Continue reading “Secure Nginx and WordPress with Fail2ban”