Dejan Levec


Compiling programs for OpenWRT

When I was trying to compile my first OpenWRT program I searched around the web, but didn’t found any useful (at least to me) tutorials/guides that would help me. After spending a few hours behind a computer and figuring out how to do this I found the easiest way to do it. The are two […]

DS18S20 and MSP430

Couple of weeks ago, when I was thinking about what temperature sensors to use with my heating controller, I remembered DS18S20 and instantly order samples from Maxim. Today I finished programming software for main controller – MSP430 chip and I want to show you, how I got those sensors working by bitbanging data pin. Sensors […]

Central & water heating controller

About a year ago I decided to replace analog heating controller at home with something a bit more advanced. I have designed circuit and PCB at that time, but haven’t made until recently. It consisted of ATmega328 microcontroller, 4 relays and ENC28J60 breakout board for network connection. When I was writing source code, I thought […]

STM32F4 Discovery board

I bought STM32F4 Discovery board from Farnell two months ago, but I got to it only two days ago. After testing some examples and trying to interface with ENC28J60 Ethernet Controller, I quiclky found out, that free versions of development tools cannot build executables bigger than 32KB. So I decided to install toolchain on Ubuntu […]

PHP: file_get_contents timeout

How to set timeout when fetching content from web site with file_get_contents? <?php $context = stream_context_create(array(‘http’ => array(‘timeout’ > 1))); echo file_get_contents(\"\", 0, $context); ?> It’s a good idea to use it with timeout, because otherwise default timeout from php.ini will be used.

RFID Reader

Code Latest source code is available at Hex file is available only for ATmega8 at 16MHz. Host executable is available only for Intel Macs with latest software update. Currently you need to request ID from a device. Example: ./set-led status Receiving ID when tag is scanned is still in progress. (I have some problems […]

AC Switching By Computer

Project I’m building a device for switching AC devices by computer program through USB. It could be used for light show, home automation system, etc. I’ll be using 8 triacs with 8 opto-triacs (to protect microcontroller and computer from direct contact with AC line). I haven’t build it yet because I don’t have every part […]