admin

admin

Tuesday, 29 September 2015 17:22

L298N Motor Driver Controller Board

L298N Motor Driver Controller Board

A guide on how to use the L298N Motor Driver Controller Board, this is a dual motor controller board that allow you to control the direction & speed of two DC motors or one stepper motor.

The L298N Motor Driver Controller Board is a very low cost module, there are several design variants available on the market, mine get from GEARBEST.

2 wheel motor library for Lua running on wireless route

This is a motor library for Lua running on wireless router which flashed with OpenWrt firmware. It allows a wireless router control the motors without using micro-controller. This library works on any dual-full-bridge driver such as L298.

Each motor require two GPIOs for controlling, therefore 2 motors will use up 4 GPIOs. Most of the wireless router may not have enough GPIO to control the motors, but you can use other pin on the router such as the LED pin, this require to unload the leds_gpio module.

Sunday, 20 September 2015 22:15

Compiling OpenWrt from source

Compiling OpenWrt from source

To compile OpenWrt from source, you need a computer running Linux such as Ubuntu. If you are like me and don't have a Linux computer, you can still use your Windows computer to compile OpenWrt.

In order to run Linux on a Windows, you must install virtual machine on you computer. Virtual machines allow you to run any operating system in a window on your desktop, I'm using the free VirtualBox for my case, please read here for details.

Wednesday, 16 September 2015 21:37

Running Ubuntu On Windows

Running Ubuntu On Windows

I'm a Windows user and I always play with Linux on embedded system. Therefore I need a computer which is effective exchange of information between Windows OS & Linux OS.

This article provides information on how to install Ubuntu on Oracle VirtualBox with the following features:

  1. Run both Linux(Ubuntu) and Windows together.
  2. Sharing clipboard content between OS
  3. File sharing between OS
  4. Internet connection sharing

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.

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

Setting up 3G network on Openwrt Barrier Breaker

opkg update
opkg install comgt kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan usb-modeswitch
opkg install luci-proto-3g #optional, this is for 3G device configuration support in Luci
/etc/init.d/usbmode enable

Insert 3G dongle and restart router.

Append to following line to /etc/config/network configuration file. Here is the settings for setup Maxis 3G network.

config interface 'wan'
option proto '3g'
option apn 'unet'
option username 'maxis'
option password 'wap'
option device '/dev/ttyUSB0'
option service 'utms'

Restart the router.

Ubidots real time data monitoring

In my projects I needed a tool to monitor data in real time, the data is captured by a microcontroller and uploaded to the web using a wireless router. Initially I was trying to use yeelink since it is in chinese langguage and yet I'm a Malaysian Chinese.

One month ago, I have tried with Ubidots, there were a few things that caught my eye.

Sunday, 17 May 2015 10:53

BASH Dropbox Uploader on OpenWRT

BASH Dropbox uploader on OpenWRT

This guide is to provide detailed information on how install BASH Dropbox Uploader to a wireless router flashed with OpenWRT. Dropbox Uploader is a BASH script written by Andred Fabriz that allows you to upload, download, delete files (and more) from Dropbox.

Monday, 04 May 2015 20:00

Recover bricked TL-MR3020

If your TL-MR3020 router is bricked with the following symptoms, most likely you can use this method to recover it.

  1. Ping the router without problem
  2. Telnet connection failed
  3. SSH connection failed

 

Solution:

  1. Put the router switch to AP mode
  2. Turn on the router power
  3. Push and hold the "WPS" button
  4. When the WPS Led flash slowly, switch on AP mode to 3G mode. The LED should flash quicky.

Now, you can Telnet to router

 

Erase the root data

Login to the router via telnet and enter the following command. Most likely your router is now recovered. 

mtd -r erase rootfs_data

Continue following procedures if it is still not working.

 

Copy firmware to router

  • Login to router via telnet and change the password in order to enable SSH
passwd
  • Copy the OpenWRT firmware to the router /tmp folder. I personally like and use WinSCP.

 

Upload the firmware to router

SSH to router and write the firmware to router. Where code.bin is your OpenWRT firmware file. 

mtd -r write code.bin firmware

Reboot the router and your router should be working now. If all the above methods is not working for you, then you should go for Serial Console method to recover the bricked router.

Back to Top