Sunday, April 25, 2010

Teensy 2!


This little thing is damn cool!

I have now been diving into micro-controllers, registers, timers, interrupts... all that to make the multicolored LED dim! Turning the LED on or off is easy. It's hell of a lot more complicated to make it work between on and off. To turn it on or off, I just have to activate some pins. To dim, timers and interrupts are used to create a PWM (Pulse-Width Modulation)!

I'm waiting for the sensor to arrive, but the wait is good, because I can use the time to learn more about this electronic stuff. I just love how it all works with the Teensy. Hook it up with USB to power it, and be able to flash it. You flash with a simple program by just pushing the button on the Teensy! You do the code in C (or assembler if you want). The compiler creates a .hex file, which is used to be flashed onto the device. It's all quite simple, thankfully! This means you can put more effort in how to actually use it, which takes time if you haven't been doing much of this before. But, with my background, and ease of learning, I will figure it out eventually. Also, there is Internet you can use for resources...

I also love how the thing can pretend to be any kind of USB device! It's all up to what you program the microprocessor to tell what it is when the handshake is taking place between the HOST (your computer) and this device. This will solve the driver issues and mouse issues explained before.

Tuesday, April 13, 2010

Digital to Analog

Currently, the usage of the treadmill sends keystrokes. This means digital, on or off, 0 or 1. Now I'm trying to figure out how I can create an even natural experience by mapping the analog mouse events to the game as most games supports this. Just by connecting a XBOX 360 controller, you can play games with the analog sticks, and thus change speed of movement continuously. Now I want to do that with my treadmill.

By the way, current game of interest is Just Cause 2!

Sunday, July 5, 2009

No, it's not vaporware!

No, this is not vaporware! I'm actually able to walk and run in Far Cry 2 now using my treadmill. Actually, most of the time now have been with hacking with the Wii Remote! I'm currently tweaking around with a GlovePIE script, so I can use the Wiimote to be able to turn and change direction. Remember, walking on the treadmill only takes me back and forth. I want a cool way changing direction as well! And with the Wiimote I also get bonuses as the IR, the accelerometers build in and a few extra buttons. I also happen to have a gun holder, so I can transform the Wiimote into a "gun" which suits the game I'm testing this with perfectly. The Wiimote can also rumble, which it now does when shooting... The Nunchuck adds even more extra goodness!

One extra little thing that adds to the experience is that the game takes place in Africa, and since it's hot here now because of summer, it feels even more that I'm actually there. You sweat and get tired fast, hehe. Also, swinging the Nunchuck throws a grenade in the game...

Sunday, May 24, 2009

I'm Back!

Yes, it's true, I'm back home again and will now continue with this lovely project!

Wednesday, March 18, 2009

Put on hold for a moment

Yea, I will go away for a month in a few days, so this project will be on hold until then. So far I've managed to set up a project and combined libusb and the KernelHotkey Driver and figured out how to handle the raw data from libusb! So, now I get lovely 0 (zero) standing still, increasing or decreasing in value depending on which way and how fast it goes!

More to come...

Tuesday, March 10, 2009

And We Have the Key to the Key Events!

Well, well. Thanks to a guy named Jorick Jester and his wonderful KernelHotKey driver, I've now managed to send keyboard events to games! And everything else for that matter since it's on a super low level. You actually intercept the event just after the key press. And, if you want, you can do whatever you want with the event, before it even reaches anything else...

You start by pressing a key on the keyboard you want to send from. That is, you identify the keyboard first. When that is done, I get, and keep a reference to that keyboard in my application. And then, I can send events as if I pressed on the keyboard using that reference! Pretty nifty! Games are none the wiser!

Usually, games have protection against these kind of things, because of cheaters. But, since this is on such a low level, they can't tell if I pressed a key physically or not. Also, I will naturally not use this to cheat in games. This is for a good cause.

Sunday, March 8, 2009

The Next Step


Phidgets package arrived. While still investigating the "send key events to games" issue, I have been thinking about what the next step would be when it is solved. The image to the left is the Phidget 3 Axis Accelerometer. With this I may use it to control the direction you are looking in the game.

Below you can see what some did with a mouse and a accelerometer. Quite neat and may very well be something I do too.


( Project URL )



Well, this will not work with the treadmill, but since it is a classic I included it here: