Lua ShiftOut A 74HC595 Shift Register Library for Lua

I want to built a wifi car without using micro contoller, due to the limited GPIO availability on the wireless router, a 74HC595 Shift Register is needed to expand its outputs.

This is a 74HC595 Shift Register library for Lua running on wireless router flashed with OpenWRT, it may run in any linux-based embedded system. It can be used to shift out data from either the most (i.e. the leftmost) or least (rightmost) significant bit.

Published in Blog

GPIO Read Write Functions for Lua

This is a very simple GPIO read/write functions for Lua running on linux-based embedded system, it is based on Arduino digital input/output syntax.

Only four functions are available: pinMode, digitalWrite, digitalRead & delay

Update: Added pin_direction_status() function on 16 Oct 2015

Published in Blog
Thursday, 05 March 2015 23:29

Arduino based Electronic Queuing System

Queue calling system

This is a Queuing System project requested by a clinic asistant which allows the doctor enter number from a keyboard and display it on a 32x16 LED panel.

This project uses two Arduino, the first Arduino functioned as a SENDER which included a PS2 keyboard and a mini LCD for number input. While the other Arduino is functioned as a RECEIVER which will trigger a "ding-dong" tone and display number on the 32x16 LED panel.

The SENDER uses a PS2 keyboard instead of USB keyboard, USB keyboard will cost higher since it require a USB host shield. You should get a Matrix keypad (please use google translate) in case the PS2 keyboard is not available in the market.

These two Arduino (SENDER & RECEIVER) is connected via a CAT5e network cable, the CAT5e cable provide power to the RECEIVER and also transfer data between two Arduino.

Published in Projects

This project provides step by step approach to driving a Dot Matrix Display (DMD) Panel with an Arduino. The DMD is a 512 pixels single colour LED display arranged in 32x16 layout, a 16 pin (2x8) IDC connector is used to interface with Arduino.

In order to drive the 32x16 Dot Matrix Display Panel from Arduino, the DMD library for Arduino is required. You can download it from Freetronics GitHub.

The Freetronics DMD library is able to write letter and text on the display board with limited function, variable string and text centering is not supported. Yeah! now you can use my code to write variable string on the display board and centering it horizontally.

Updated: DMD2 library is released, this library is currently in BETA release.

Published in Blog
Sunday, 08 February 2015 21:09



发送器连接了一个PS2键盘来完成输入,当然也可以使用USB键盘,不过必须添加一个USB Host Shield,这样将会增加成本。如果没办法取得PS2键盘,建议使用矩阵键盘。发送器也应用了一个小型LCD,用于显示编号,当然还能显示更多的相关资料。


Published in 电子与电脑
Sunday, 12 October 2014 15:12

Using HEF4094 Shift Registers with Arduino

I have many seven segment modules in my hand. Each module consists of 5 digits and each digit is controlling by individual HEF4094 shift register. As shown in figure above is the seven segment module.

HEF4094 is an 8-stage serial shift register. Data is shifted on the LOW-to-HIGH transitions of the CP (Clock) input. The product data sheet is available here.

HEF4094 operates over a recommended VDD power supply range of 3 V to 15 V referenced to VSS (usually ground). There is also 74HC4094 available which operates at 2V to 6V.

Published in Blog
Friday, 04 July 2014 13:54

Arduino based RGB Matrix LED tester

Arduino based RGB Matrix LED tester

This is a very simple Arduino project which control the 16x32 RGB LED Matrix Panel via an 16pin IDC cable. The Arduino will continuously sending 5 set colours (Red, Green, Blue, White, Black)  to the LED Matrix Panel that allow the technician to find out which part of the LED Matrix Panel is malfunction.

Published in Projects
Tuesday, 10 June 2014 14:52

Raspberry Pi Digital Signage

Raspberry Pi (Model B) is a single-board computer that uses an ARM 11 (ARM1176JZF-S core) processor running at 700MHz (it can overclock up to 1GHz) with 512MB RAM.
This article shows you how to turn your Raspberry Pi into a cheap, browser based digital signage solution. It covers setting up a mini webserver on using the lighttpd+PHP web server and also how to start a web browser without a desktop environment.
I will use Midori as the web browser since it is a default browser that is found in Raspbian (a free operating system based on Debian optimized for the Raspberry Pi).
Published in Projects

Midori is a lightweight browser using the WebKit rendering engine and it is a default browser that is found in Raspbian. This is a quick quide to start the Midori browser from the command line without a desktop manager.

To start the Midori in full screen mode, use the following command:
xinit /usr/bin/midori -e Fullscreen -a http://domain/homepage.html
However it is not in full screen mode, it just fill up about quarter size of the screen. To fix this problem, Midori must run on a windows manager. Here is the solution:
Published in Blog
Sunday, 04 May 2014 20:43

Setup a Raspberry Pi PHP web server

Lighttpd is a lightweight web server, with all the essential functions of a web server, PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. This is a quide on how to install Lighttpd and PHP on a Raspberry Pi.
Published in Blog
Page 2 of 5