accelerometer-based computer mouse

Im currently developing an accelerometer-based computer mouse.. I use arduino mega board and MMA7361 as accelerometer.. right now, im stuck about programming to move the computer cursor..
can somebody help me about instruction to move the cursor using arduino 1.0 ?
btw, tq in advance :slight_smile:

Do you have a USB host shield?

If you do, then you can set it up so that your Arduino appears as a class-compliant HID device. Then its just a matter of sending the appropriate mouse commands. The USB Host libraries have examples for that.

I'm not sure how you could do it otherwise, maybe write something to run on the PC to get commands from serial and translate that to pointer movement, although I don't know how to do that.

You can use java.robot class to move the cursor. Use processing to read the serial data and use function mouseMove(int x, int y) in robot class to move the cursor.

We are doing the same project.
Done with the mouse control part , now doing it wireless.

you could use this lib: Arduino | Elektronica Voor Jou

it can work as a HID usb computer mouse and has a very simple programming level

Something like this?

Or this?

Gotten from here at the V-USB site mouse, keyboard, joystick example projects:

Really, your end product doesn't need your development board or a shield.