Tag Archives: Library

JoystickShield Library for Arduino

I recently bought the JoystickShield for Arduino from Sparkfun and after playing around with it for a while, I realized that we don’t have a good Arduino library to interface with the JoystickShield. As it always happens with me, I ended up creating one πŸ™‚

Features

The library supports the following events

  • All 8 directions of Joystick. (Up, RightUp, Right, RightDown, Down, LeftDown, Left and LeftUp)
  • Joystick button press
  • All 4 button press (Up, Right, Down, Left)

JavaScript influence

While designing the interface for the library, my JavaScript skills influenced me and I have added callback function support for all the events, in addition to the normal mode.

If you are wondering how I added support for callbacks in C/C++, then the answer is that I implemented them using function pointers. I would probably write an article explaining about it when I find some time. Meanwhile you can check the source code or check out the callback example sketch to find out how to use them.

More details and Download

You can find more details about the library at its homepage and can download it from github account. There are also examples in the /examples directory from which you can find out how to use the library in both the modes.

Try it out and let me know if you have any feedback/comments.

PS: BTW this is my first Arduino based library πŸ™‚

Posted in Arduino | Tagged , , , | Leave a comment

AJAX Library

Regular readers of my blog would have noticed that off late, I am not updating the blog much. The reason for that is, first work is taking most of my time, second I am working on a small pet project, more on it later πŸ˜‰ so as to get my hands dirty with AJAX.

I was googling around to find out a good library for AJAX, so that I can start with it. And I came across Backbase. It looked very promising, so I downloaded the community edition and started working with it. But I felt it is very complex and I am not sure whether it is worth the effort and moreover I am worried about the lincening too.

So people I need some help from you. Can you suggest/recommend or point me to some good library for implementing AJAX into web applications. I am particularly interested in libraries which work (at least decently) across platforms. So guys I am waiting for your replies.

PS: I have already written a small wrapper function for XMLHttp object, which works in the latest version of both IE and Firefox. I will post it once I finish testing it. Meanwhile if any of you want to have a look at it, just leave a comment or mail me.

Posted in JavaScript/jQuery | Tagged , , | 5 Comments