CrazyTB's blog

Subscribe to RSS feed

Posts tagged with "usb"

USB HID absolute pointing device using ATmega8 and a magnetometer

, , , ...

During November I finally finished my college! Now I got a Bachelor's Degree in Computer Science by UFRJ (Universidade Federal do Rio de Janeiro).

And for my senior project (or final graduating project, or TCC - Trabalho de Conclusão de Curso, or PFC - Projeto Final de Curso) I chose to build a USB device that could control the mouse pointer, using an AVR ATmega8 microcontroller and a magnetometer.

A magnetometer is a digital compass, something that can measure the magnetic field (in three dimensions). The idea is that the user holds the magnetometer and moves it around (actually, only the rotation is considered). When the magnetometer orientation changes, the measured 3D vector of the magnetic field also changes. Based on this vector, the microcontroller applies some math and moves the mouse pointer to some position at the screen.

In a nutshell, the device behaves like a Wiimote, but using a completely different technology. You just point the device to some direction, and the mouse pointer is moved to that position.

Since the microcontroller implements the USB HID class (using V-USB firmware-only USB implementation, by OBJECTIVE DEVELOPMENT Software GmbH), it works straight away on any operating system without requiring any special driver. It has been successfully tested on Linux, Mac OS X and Windows. It was also tested on one Android device, but it did not support an absolute pointing device.

Links



Videos

Dispositivo apontador com interface USB usando magnetômetro (English subtitles available)


Moving the mouse pointer using head movements


USB Absolute Pointing Device implemented in ATmega8 using Magnetometer (work-in-progress video)


This project was challenging and very rewarding. It feels good to see it working after so many weeks staying awake during the night developing and debugging it.

Trivia: the idea for this project was inspired by Marcin Wichary speak/demonstration at Google I/O 2011: The Secrets of Google Pac-Man: A Game Show

Linux 2.6.25.2; Encore ENUWI-G2 Wi-Fi USB - the end...?

, , , ...

This post is a sequel to my previous post from last week. In case you don't remember, I described my steps as I was trying to configure an Encore ENUWI-G2 802.11g Wi-Fi USB adapter on my Gentoo/Linux system.

In this post, I will give you the results. In case you don't want to read too much, here is a summary: It does not work, or at least does not work well.

First of all, my kernel update to the brand-new 2.6.25.2 was not painless. With no reason and with no explanation, my system suddenly rebooted, just after 3 days of uptime. I was browsing on web and then... back to the BIOS screen. Nothing on logs (there has been no time to let the kernel save anything to disk).

Apart of that, all I can say is that Encore ENUWI-G2 almost works with NdisWrapper. I mean, when using NdisWrapper, the device LED blinks, and the device itself heats up (by the way, I found on web that some users complained about this device getting hot), but it does nothing more beyond that.

I've configured an ad-hoc network with it. At first it didn't work (the laptop could not ping the desktop, and vice-versa). After a minute or so, it suddenly started pinging. That was nice. Then I tried some "stress-test". I've tried to download something as fast as possible from the desktop to the laptop. I got around 100~190 KB/s (kilobytes per second), which isn't a good speed. Then, a couple of seconds later, it stopped. The machines could not ping each other anymore. Looking at the device, I can see that the LED has stopped blinking (but is still lit). I suppose its firmware has frozen or crashed.

Oh, well. That's the end of this story. I'm giving up on this device for now and I'm probably going to buy a PCI Wi-Fi card or a dedicated AP.

See you next time! (hopefully with a working wi-fi)

Linux USB 2.0 (ehci_hcd); Encore ENUWI-G2 Wi-Fi USB; rtl8187

, , , ...

Last friday I've bought an Encore ENUWI-G2 802.11g Wi-Fi USB adapter. I've choosen it because it was one of the cheapest available (R$ 33.00, about US$ 20.00).

My objective with this device is to add wi-fi support to my desktop, which already works as a personal (wired) router and as a web server. Actually, I want to transform my desktop into a wireless access point, but if I fail for some reason, a basic ad-hoc network will be enough for my needs.

Read more...

Isn't it nice when things work?

, , , ...

I've updated my kernel to latest (2.6.14.2) and also disabled in-kernel alsa drivers to install external alsa drivers (from alsa-driver package). This solved my problem with deadlock. (just in case someone wanna look at bug report: 115333)

Now I have alsa, alsa works, I can have full 5.1 surround.

I also have CUPS working. Configure my USB printer in CUPS was a piece of cake. I had no problems.

Scanner is also working. And I did nothing to make it work, just plugged it to USB and started vuescan. It was the first real plug-and-play device I used.

My USB multi-card reader also works fine. Whenever a card is not recognized, I should just unplug and plug it again to USB, then it works.

The only two pieces of hardware that still don't work are camera (using gphoto2) and nVidia GeForce 5500FX.
May 2013
S M T W T F S
April 2013June 2013
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31