c

Kernel module for a push button on the OMNIFlash

During the maze embedded ARM robot project we needed an encoder to be able to calculate the distance the robot moved in order to generate a map that could be navigated properly.

Unfortunately we couldnt place a sensor near the wheels so we had to rely instead in a hacked solution using a push button. With this module we could calculate the distance by counting the amount
of times the button was pushed. We attached the button near the axis of the wheel and whenever it passed over it clicked it.

Maze misfortunes

After working, on and off, for months I finally took the robot for a spin. I have heard the phrase,
"If you want things done properly you got to do them yourself". Never gave much credit to it, but
I guess I should've heed. It only took a few minutes of testing before the pulse button attached to
the wheel made enough effort and generated enough heat up the H-Bridge to the point of no return.
This wouldn't matter much but as it turns out this design was not using an opto coupler to isolate the

The maze adventures

I write about this because I tend to forget about code I write, so in order to keep it fresh on memory
I’ve decided to keep a record of it and maybe someone else can make use of it. Even though it is still
mostly theoretical, at least in part, because the actual robot has not been completely built, the new
version, as the last version was a total disaster due to a problematic deadline and some not so
co-operating human subjects. Basically testing proved impossible and I had to carry on with school.

Some code I just found. Simple matching algorithms. I love going nuts with pointers in C

uncommon.c

#include

int main( int argc , char ** argv , char ** env )
{
if (argc != 3)
{
fprintf(stdout, "Usage: %s \n\r", argv[0]);
return -1;
}

/* find out the size for the registry */
char * registry = NULL;
registry = (char*)malloc( strlen(argv[1]) * sizeof(char) + 1);
memset(registry, 0, sizeof(registry) + 1);

char * wordX = argv[1], *wordY = argv[2], *startY = wordY;

Tags:

Audio Player DLL

Well this project involves a lot of things that definitely are
entertaining. It started as a Audio Playing DLL. Vague? You bet.
Anyway, this DLL is nothing more than an MP3 player or was. I started
writing and got more excited everytime and eventually I decided to make
it compatible with XPCOM, and use it to play audio through mozilla.
I actually wrote that piece of code and its stashed somewhere!

Tags:

Subscribe to RSS - c