Isme 5 x 5 ka grid plot hota h screen me, USBmouse use karke. As soon as you connect the board to PC via HID

Dependencies:   USBDevice mbed

Fork of USBMouse_HelloWorld by Samuel Mokrani

main.cpp

Committer:
samux
Date:
2012-10-14
Revision:
3:b8caa902d79e
Parent:
2:e7b766501add
Child:
5:c7ea2e0e773f

File content as of revision 3:b8caa902d79e:

#include "mbed.h"
#include "USBMouse.h"

USBMouse mouse;

int main() {
    int16_t x = 0;
    int16_t y = 0;
    int32_t radius = 10;
    int32_t angle = 0;

    while (1) {
        x = cos((double)angle*3.14/180.0)*radius;
        y = sin((double)angle*3.14/180.0)*radius;
        
        mouse.move(x, y);
        angle += 3;
        wait(0.001);
    }
}