Accelemario

Color:

Main
Projects
How To Guides
Friend Websites
Other Websites

My Dugg Stories: Temporarily disabled.

I hope my name doesn't get me in trouble. A fallback name is Acceledotto!

Goal: This is a relatively simple project. It uses an accelerometer to take user input. When the accelerometer is tilted to the sides, left or right, the green dot on the LED dot matrix moves to the sides, accordingly. If the player bounces the accelerometer up, the green dot "jumps."

Rules: Simultaneously, a red dot is constantly moving to the left. If the player, green dot, runs into the red dot or the red dot runs into the player, the player "dies" and respawns at the top left. If the player jumps on top of the red dot, the red dot dies and respawns at the bottom right.

Exploited "random generated features:" There is a hidden "cheat" that can allow the player to run past the red dot without dying. Of course, from what I have observed most people usually enable the cheat without knowing it, so I'll change the activation sequence later on. The story behind this one is when I was coding the behavior for the player to die, I overlooked when the player would pass by the enemy at a faster refresh time. After fixing this issue, I added a "lock" that is removed when a certain combination is done on the accelerometer.

Code porting: This is my first project that I have ported the code over to a different microcontroller. I originally wrote this code on an Motorola (now Freescale) HC12 based evaluation board. When I completed the code, I proceeded to take on the challenge to port the code to a PIC microcontroller. My choice was the PIC18F4525. I started by writing the base structure such as millisecond timer, A/D conversion function. Once these basic functions were in place. It was all a matter of copying code over from the other project aside from some minor changes here and there. At the same time, I decided to use surface mount parts to decrease the size of the overall unit and turn it into a handheld.

07/18/07: I will later add documentation on this project.

Videos:

This is the first version of my code. Moving the LED to the sides.

This is the implementation of refreshing to allow me to display single dots on the LED display. I also added the enemy that walks to the left.

This version of the code has the jumping, which wasn't perfected yet.

This version of the code has a new jumping detection, which works a lot better. The collisions were also implemented, as well as, the "cheat."

This website was developed by Elmar Palma. Last updated: 08/28/07.