Hardware

You are currently browsing the archive for the Hardware category.

In the Arduino kit that I bought not long ago were an IR remote control and an IR receiver included. And I have found a really good library for Arduino that makes decoding the IR signals from the remote control really easy. So I have used this library and coded a short program to my Arduino card that reads the IR signals and then sends more logical signals to the computer through the USB cable.

Here is a link to the page where I found the library: http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html

Here is code that I have written for my Arduino board:

#include <IRremote.h>

int RECV_PIN = 11;
String in;
String cur = "";
String cur2 = "";

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
  if (irrecv.decode(&results)) {

    in = String(int(results.value), HEX);
    irrecv.resume(); // Receive the next value
    cur2 = "";

    if (in != "ffff") {
      if (in == "a25d") {      // ON/OFF
        cur = "11";
      }
      else if (in == "629d") { // Mode
        cur = "12";
      }
      else if (in == "e21d") { // Sound ON/OFF
        cur = "13";
      }
      else if (in == "22dd") { // Play/Pause
        cur = "21";
      }
      else if (in == "2fd") {  // Back
        cur = "22";
      }
      else if (in == "c23d") { // Forward
        cur = "23";
      }
      else if (in == "e01f") { // EQ
        cur = "31";
      }
      else if (in == "a857") { // VOL-
        cur = "32";
      }
      else if (in == "906f") { // VOL+
        cur = "33";
      }
      else if (in == "6897") { // 0
        cur = "41";
      }
      else if (in == "9867") { // RPT
        cur = "42";
      }
      else if (in == "b04f") { // U/SD
        cur = "43";
      }
      else if (in == "30cf") { // 1
        cur = "51";
      }
      else if (in == "18e7") { // 2
        cur = "52";
      }
      else if (in == "7a85") { // 3
        cur = "53";
      }
      else if (in == "10ef") { // 4
        cur = "61";
      }
      else if (in == "38c7") { // 5
        cur = "62";
      }
      else if (in == "5aa5") { // 6
        cur = "63";
      }
      else if (in == "42bd") { // 7
        cur = "71";
      }
      else if (in == "4ab5") { // 8
        cur = "72";
      }
      else if (in == "52ad") { // 9
        cur = "73";
      }
    }

    if (in == "ffff") { // Presses down a button
      Serial.println(cur + "d");
    } else if (cur.length() == 2) {
      Serial.println(cur + "0");
    }

  }

  delay(100);
}

I’m not sure if this program is so easy to understand, but I hope that it’s at least little help if you are setting up your own program for reading IR signals (and later controlling your computer).

Basically will the loop decode a signal, convert it to HEX and then check what button was pressed down. If I press a button on my remote control it will send a normal, unique signal (which in hex is something like a25d or 629d). But if I keep it pressed down it will keep on sending ffff signals, regardless of what button is kept pressed down. Therefore I have to save what button that was initially pressed down, which I do in cur.

The normal signals will result in numbers like 11, 12, 33 and 72 are saved as cur, and behind that is a really simple system. The first digit is the button row of the remote control, and the second digit is the the column. So as you may understand, I have 3 x 7 buttons on my remote control.

Before sending the number 22, 33, or something similar, to the computer, is 0 added to the end if the button was just pressed down or d if it already was pressed down in the previous loop.

So if press the button on my remote control that says 8 (row 7, column 2) the program will in the first run through send the message 720 to the computer. If I keep it pressed down will the program keep on sending 72d to the computer. If I bring up the Serial Monitor in the Arduino software will the output be:

720
72d
72d
72d
72d
72d
72d
72d

I apologize for my crappy English. ^.^

Tags: , , ,

Arduino Mega (ATmega1280)One week ago I ordered an Arduino kit from Ebay with an Arduino Mega (ATmega1280) board and some other stuff included, like a breadboard, some LED lights and a LCD display. It costed me only 62 $, so it was a really great price compared to what it would cost here in a Swedish store.

I installed the Arduino software from the AUR (Arch User Repository), but the version of avr-gcc that was included was 4.6.0. If I have understood it correctly, is avr-gcc a compiler that is designed for AVR microcontrollers. However, apparently there is a bug in the versions 4.4 – 4.6.0 of the compiler, which makes programs on the Arduino Mega board unable to send and receive signals through the USB cable. So the Serial Monitor in the Arduino software won’t work.

On Arduino’s website they recommend that you use version 4.3.x of avr-gcc instead, therefore I thought it would be a good idea to install it. And that have I been messing with since Friday. But I finally got it to work just a moment ago, thanks to madworm on the Arduino forums. I’m not here going to describe every step that I took, but if you are having the same problem that I described above, check out the thread and see if you can get it sorted out:

Tags: , , , , , ,

I have finally bought a new graphics card to my computer, a Asus Radeon HD 6870 DirectCU. It was a bit longer than my old card, a PowerColor 4870, so it was tough to fit in the computer chassis. But I made it at last. :) The reason why I purchased a new card, was because my old one was half broken and wasn’t able to run with the default clock speeds without getting artifacts everywhere on my monitors.

When I first started Linux Mint with my new card plugged in, I was welcomed by a black screen, which wasn’t very fun. So I booted up Linux Mint in Recovery Mode and tried to install working graphics driver. The driver I had from earlier was ATI/AMD proprietary FGLRX graphics driver from the Additional Drivers window in Linux Mint (and Ubuntu). This graphics driver didn’t work after a clean install of Linux Mint either.

I also found these two guides: https://help.ubuntu.com/community/BinaryDriverHowto/ATI and http://wiki.cchtml.com/index.php/Ubuntu_Maverick_Installation_Guide, which describes how to install ATI driver. But the terminal command aticonfig never worked for me, so I didn’t manage to complete the installation.

However, if you simply download the proper driver from AMD’s website, and then run it like a normal program, it works just as it should. So I can’t really see the reason why you would build the graphics driver into packages and install them and so on in 20+ steps. Maybe it’s easier to uninstall the driver in the future. But how often do you change video card or update your graphics driver on Linux?

Anyway, it works great now and I’m happy.

Tags: , , , , , ,

I have two 22″ monitors hooked up to my computer through DVI. But the other day I wanted to try out if it would work with three monitors too. However, my ATI/AMD PowerColor 4870 graphic card has only two DVI video outputs, so I borrowed my brother’s video card, which is an ATI 3650. After plugging it in to a PCI-E bus, I realised that it hasn’t even a Crossfire connector. I did some searching and found out that a Crossfire bridge is only needed when you want to take advantage of the extra video card in games and such, which I wasn’t interested of. Then I hooked up my brother’s 17″ monitor to the 3650 card. The monitor had only a VGA input tho, while the card only had DVI outputs, so I had to use a DVI-to-VGA adapter.

I started with booting up Windows 7, and it worked fine with 3 monitors. However, I didn’t test it for too long. Then I rebooted the computer and started up Ubuntu 10.10 instead, to see if it would work. I had to do some configurations in the ATI Catalyst Control Center, but then it worked there too. However, it worked a bit strangely, almost like its own desktop. The 17″ monitor had the standard panel configuration for a single monitor, and I wasn’t able to drag windows between it and the other two monitors. I didn’t have much time tho, and my brother wanted his card and monitor back, so I never solved that odd problem. Maybe I had to adjust something in CCC, or somewhere else, I don’t know.

To summarize this post: You can use three monitors by plugging in a second (AMD/ATI) graphic card. The card must not be of the same model, or even of the same generation (ATI 4870 and ATI 3650). You don’t need a crossfire bridge. Though, I can’t say if this applies on Nvidia cards too.

Tags: , , , , , ,

Kinect was recently released, and I guess all of you people that will stumble upon this text are already familiar with it. I can’t say that I have read very much about it, but at least some. And I have watched some videos where it have been showed, and some gameplay videos.

I don’t believe Kinect will replace the regular controller, like they say in the advertisements. It will be a nice extra type of controller that will work in some kinds of games, like Dance Central. But then there is a flood of games that are being pumped out with Kinect support, that would be played much better with a regular controller.

Besides that there are a lot of games that works better with a regular controller. The Kinect’s performance isn’t either very good. I have heard many people and critics complain about the high response time, that really becomes a problem in fast phased games. For an example boxing games, where you have to act very fast.

Even if the Kinect works well with some types of games, I believe some of  them are totally stupid. For an example you have Kinect Sports, which is a Wii Sports clone. Why would anyone pay money for an Xbox, a Kinect and for this game to be able to throw imaginary spears and discuses in front of the TV? I would rather go out and throw real sticks.

But I guess that only the future can tell if this piece of new technology will bring us any new, fun games.

Here is a really fun review of Sonic Free Riders, by Angry Joe:

Here is another video, where Kinect Sports is reviewed by Angry Joe:

And lastly a video where he reviews the actual hardware:

Tags: , , , , ,

LG 42LD420

LG 42LD420 My mum and dad did just agree about buying a new TV from this generation! We have had an old, fat 20″ (or something) CRT TV until now.

The TV that will replace our current one is a LG 42LD420, that you can see in the name is 42″ large. With that size, full HD and LCD technology, it is a pretty big jump from our CRT TV. Now we will be able to use the HDMI-port on our DVD-player too. We will also be able to plug in a Playstation 3, that my brother is planning on buying. Even if it is possible to somehow connect a Playstation 3 to a CRT monitor by using a SCART-cable, the gaming experience wouldn’t be nearly as good as with a modern TV. I’m also looking forward to watch some Ergo Proxy on this beast, (beast compared to our current TV).

I have read a lot of good comments about this TV. The only two negative things, seem to be that you need a special remote control to unlock the ability to play videos from USB-devices, and that you need to calibrate the TV to get the right contrast, colors, brightness and stuff (which isn’t strange). I assume that there are a lot of better TVs out there, but this one seems to be one of the best for the price of 650 €.

Tags: , , , , ,

Windows - Size on DiskLast week I got an USB memory from my school, to use at the web design classes, and now after putting a lot of stuff on it I realised that the allocation unit size was way to high. The content took up 930 MB, and on my internal hard disk it had the size of 964 MB (because of the allocation unit size). So that wasn’t a huge loss. But on my USB memory it took up 1,28 GB! And that’s because of the default allocation unit size of the memory stick that was 32 kB!

To change this I formated the USB memory to the FAT32 file system and picked the default allocation unit size of 4096 bytes. Now does the stuff on my USB memory only use up 972 MB. :)

Tags: , , , , , ,

FlashApparently changes Adobe Flash Player 10.1 my graphic card’s clock speed to the default clock when I start watching a YouTube-video. The graphic card that I have is a ATI Radeon PowerColor 4870 and the reason why this is a problem is because my card is kinda broken and I need to down clock it to not get strange dots all over the screen. I guess I have to download Flash Player 9 if I can’t find an alternative or a solution to my problem. I could buy a new graphic card, but I don’t know if I want to do that since this is working just fine when it’s down clocked a bit.

EDIT:
This version of Flash Player (10.0.45.2) works for me:

Tags: , , , ,

MemOKYesterday I was over at my friend’s house for approximately 9 hours and helped him out with putting his new computer together, and installing Windows, some drivers and softwares. We built the computer and that process went pretty fine, but it didn’t want to start. The fans were spinning, the red MemOK-light blinked on the motherboard and the monitor said something like “No VGA detected”.

We tried to start the computer by pushing down the MemOK-button for a few seconds, but that process didn’t work. We started to google and see if we could find any solutions. But a bit later we went to check in the computer case again and then we saw that one of the RAM-sticks wasn’t plugged in correctly. So, my friend pushed it a bit further in until we heard a clicking noice, and then the computer started just fine.

Tags: , , ,