Category Archives: Uncategorized

Attiny2313 Ultrasonic distance (HR-SR04) example

As part of my robot project I need a small microcontroller to do som basic task like measuring distance using a HR-SR04 sensor. I plan to use a raspberry pi as main controller for that robot and as is runs a linux kernel is is not realtime and might be inaccurate for this application. The goal is to have the microcontroller send the measured distance over i2c to the raspberry pi.
180px-HC-SR04

The Ultrasonic module works as explained in the following diagram:

hr-sr04 timing

Lot’s of different examples regarding the HR-SR04 and microcontrollers can be found on the internet. Unfortunately a lot¬†of them are incomplete or contain bad code. So here is yet another example ūüôā

Below you can find a very basic schema with a attiny2313, the HR-SR04, an ISP connector and a led with a resistor.

attiny2313_hr-sr04_bb

Continue reading

Fun with La Fonera

FON is the largest WiFi community in the world. FON is a Community of people making WiFi universal and free. FON’s vision is WiFi everywhere made possible by the members of the Community, Foneros. Read all about it on¬†www.fon.com.

The fun part comes where FON has developed it’s own Wifi routers that can be bought for cheap.

These routers are fairly easy to hack and allow other firmware to be put on it. However you can also download the source code of the original firmware and add your own software to it. That what’s this article is all about. Modifying your FON but keeping the FON community alive!.

Continue reading