![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
This is a USB mouse(Device). The mouse positions can be changed with the potentiometers on the MBD
Dependencies: C12832_lcd DebounceInterrupts USBDevice mbed
Fork of USBAbsoluteMouse by
You are viewing an older revision! See the latest version
Homepage
USB Mouse¶
Goal¶
To build a USB Mouse (Host and device) using two MBEDs and test the communication between them.
Details¶
This is a device part of the USB mouse Project. The USB mouse project uses two MBED boards.
- one as Device (This part)
- one as the USB Host programmed as USB mouse (http://mbed.org/users/bhakti08/code/USB_Project_Host/)
There is a bubble on the LCD of the Host MBED. The position of this bubble can be controlled using the potentiometers on the device MBED.
Pin Mappings¶
- Pot1 is used to control Y position of the bubble
- Pot2 is used to control X position of the bubble
- Right button on joystick is used to emulate the right click
- Left button on joystick is used to emulate the left click
- Center button of joystick is used to emulate the pressing of the wheel
Block Diagram/Connection diagram¶
Design Constraints¶
The output of the USB mouse(device) is adjusted according to the limits of the LCD on the other MBED board(the host). Due to this this mouse positions may be incorrect for any other sizes of the LCD or the Host computer.
Complete Testing(For both device and host)¶
Case Description | Output Expected | Actual Output | Status |
---|---|---|---|
Connection | The USB device should be properly enumerated when connected to the host | Connection recognized by the host | PASS |
If the device is disconnected from the host, there should be some error message | When the device is disconnected, the LED4 on Host turns OFF and "Connect the USB mouse" is displayed on the LCD | Pass | |
Move Pot1 on the device and check the position of bubble on the Host. | The pot should be able to control the bubble for the entire range of the LCD. | Using Pot1 the Y position is controlled and the bubble moves from topmost position to bottom most position | PASS |
Move Pot2 on the device and check the position of bubble on the Host. | The pot should be able to control the bubble for the entire range of the LCD. | Using Pot2 the X position is controlled and the bubble moves from leftmost position to the rightmost position | PASS |
Press the left switch of the joystick on the device | The left click should be detected and the LED on the host should turn ON | LED2 on the host turns ON. Thus, a left click on the device is detected by the host. | PASS |
Press the right switch of the joystick on the device | The right click should be detected and the LED on the host should turn ON | LED1 on the host turns ON. Thus, a right click on the device is detected by the host. | PASS |
Press the center switch of the joystick on the device | The click of the wheel should be detected and the LED on the host should turn ON | LED3 on the host turns ON. Thus, a wheel the wheel being clicked the device is detected by the host. | PASS |
Disconnect the host from the device | The LED4 on the host should turn OFF | The LED4 turns OFF along with the message on the LCD "Connect the USB mouse". | PASS |
Testing Device Specific¶
Power Consumption | The power consumed by the USB Device should be less than the specified value | The power consumed by the device is approximately 700mW which satisfies the specifications. | PASS |
Operation when connected to the Hub | The device operation should not be altered. | The device works as expected even if it is connected to the host through a USB Hub | PASS |
Compatibitity with other OS | Test the device with various OS | The device is being tested on windows 8. The device works but the cursor movement is not as expected. This is because the resolution of the LCD on MBED does not match with the screen. The buttons work as expected. This error can be resolved by using the absolute mouse instead of relative. | Not tested with all OS. |
Working on heavy traffic | Load the USB bus with various devices. | The device should be working properly. | Not tested |