Read smartphone accelerometer data on a website

Almost everybody has one nowadays: A smartphone. But how often did you come across a website that used the phone’s tilt sensor? More than often enough a website only changes the layout if tilt your phone. How cool would it be, if the background would move around slightly when you tilt the phone? This short article will show you how to read the phone sensors and how to process the data with JavaScript!

Continue reading Read smartphone accelerometer data on a website
Advertisements

C sockets – A hello world introduction

While sockets are no new concept for me, I recently had to write an application in C that uses sockets to communicate. And while trying to figure out, what the best way of doing so is, I came across a lot of tutorials. But most of them either completely missed the point, were too complicated or used obsolete functions in the code. In this article, I want to try to give you a simple and short overview of sockets and an up to date ‘hello world’ example for a client and a server application. Continue reading C sockets – A hello world introduction

USB volume knob for Windows, Mac OS and Linux – Part 1

In this article I want to take a look at the Atmel ATmega32U4 8-Bit microcontroller, which has a USB 2.0 controller built-in and therefore should enable anybody to make their own USB compatible HID devices. I’ll try to show the process by building a USB volume knob, which will allow the end-user to change the volume or completely mute all sounds on the device it is connected to. Continue reading USB volume knob for Windows, Mac OS and Linux – Part 1

DIY electronic riddle advent calendar

Oh yes, Christmas! It’s almost that season of the year again. And to shorten the time between the 1st of December and Christmas Eve’, I thought about a bit more interesting advent calendar than one, that only has chocolate in it. This electronic advent calendar offers a riddle that you can create for a loved one or a friend and give it to them so they can try to solve it before Christmas arrives. It offers a clue every day and it presents all unlocked clues on a website that runs on the device itself. The only two things it needs to work is a power supply and a WiFi network it can connect to. And the best thing is: It is really simple to build and it can be re-used every year and it can also be used for other occasions (for example Valentine’s Day)! Continue reading DIY electronic riddle advent calendar

Regular expressions in Java

Introduction

You might remember that one article I wrote about Lambda expressions in Java last year. In that article I took a quick look at what Lambda expressions are and how you can use them in Java. This article was quite popular and I thought it’s about time that I write something about regular expressions here on nerdhut. However I only wanted to give you an introduction about regular expressions and how you can use them in your Java code to detect patterns in a text or to search for something. Continue reading Regular expressions in Java

Homemade DIY word clock – Low cost variant

In this article I want to cover an alternative I’ve come across while building the “real” word clock project. This version will not feature a 12×12 LED-Matrix display. Instead it’s made with LED strips and only the significant words on the clock can light up. With this method you can’t display custom messages, but the whole build won’t cost you as much either. Read all about this build in this article or watch this video:

Continue reading Homemade DIY word clock – Low cost variant

How to design your own CPU from scratch – Part 3

In this part of the series I’ll show you the necessary components for storing and executing programs on our micro processor! I’ll try to keep this part quite short, because I already explained in detail what a micro-instruction is and what it consists of on this CPU in part 2! So, let’s get the ball rolling. Continue reading How to design your own CPU from scratch – Part 3