CH375B module. It is usually supplied with a 2 way jumper mounted on TXD and RXD pin. The TXD RXD pins are located next to the female USB receptacle. Please unmount the jumper before use. |
- Get the following components:
- Arduino Nano
- Male to female jumper wires - 4 pieces
- USB Mouse
- CH375B module
- Download MeUsb.cpp and MeUsb.h from https://github.com/xeecos/Me-USB-Host
- On your Windows computer which already has arduino installed, go to your documents folder. There you will find a folder called arduino and within that another folder called libraries. Inside this libraries folder create a new folder called "MeUsb"
- Place MeUsb.cpp and MeUsb.h in this folder
- In the arduino\libraries folder, create another folder called "SoftwareSerial_fix"
- And in this folder download and place SoftwareSerial_fix.cpp and SoftwareSerial_fix.h from the same link as above.
- Assemble the circuit on the bread board as follows:
- +5V of Arduino Nano to +5V of CH375B
- GND of Arduino Nano to GND of CH375B
- D10 of Arduino Nano to TXD of CH375B
- D9 of Arduino Nano to RXD of CH375B
Connecting the CH375B to Arduino Nano Connecting the CH375B to Arduino Nano - Start arduino and open a new sketch. Copy the source code into it and download it into the arduino nano.
- Once the code is downloaded successfully, start serial monitor on your PC with baud rate set to 115200 and observe the pattern of 4 bytes that are being received.
You will observe that there are 4 bytes being printed on the serial monitor. Here are what those 4 bytes mean:Every time you move the mouse, 4 bytes are sent to the Arduino Nano.
![]() |
Deciphering the 4 bytes received from CH375B when a mouse is connected to it |
You can CH375B module in India from www.vishaworld.com
To interface a USB Joystick, have a look at Me-USB-Host.ino available at https://github.com/xeecos/Me-USB-Host
Source Code to interface USB Mouse.To interface a USB Joystick, have a look at Me-USB-Host.ino available at https://github.com/xeecos/Me-USB-Host
#include <Arduino.h>
#include "SoftwareSerial_fix.h"
#include "MeUsb.h"
MeUsbusb(10,9);
voidsetup()
{
Serial.begin(115200);
usb.init(USB1_0);
}
voidloop()
{
if(!usb.device_online)
{
usb.probeDevice();
delay(100);
}
else
{
intlen=usb.host_recv();
if(len==4){
Serial.print(usb.RECV_BUFFER[0],DEC);
Serial.print(',');
Serial.print(usb.RECV_BUFFER[1],DEC);
Serial.print(',');
Serial.print(usb.RECV_BUFFER[2],DEC);
Serial.print(',');
Serial.print(usb.RECV_BUFFER[3],DEC);
Serial.print('\n');
}
}
}