

There is also a resistor to limit the current and stop the LED from burning out. In the LED circuit, the pins of the arduino are set to high when the LED should turn on. Therefore, I made the program click when pins 12 or 13 read a "LOW" voltage. The foot pedals that I used have the switch normally closed, and pressing the pedal down opens the switch inside. When the switches open, the resistor pulls down the voltage of the input pins to ground. When the switches are closed, current runs from the 5V pin through the 10 kiloohm resistor to ground and the input pins detect a voltage. For other operating systems you will have to figure out where the USB Host Shield Library is stored and make the same change to the code.
ARDUINO USB HOST SHIELD LIBRARY WINDOWS
On Windows you will have to go to Documents > Arduino > libraries > USB_Host_Shield_Library_2.0 > hiduniversal.h and add "virtual" on line 60 before the BuffersIdentical function so that it reads "virtual bool BuffersIdentical". Note that applies if your scroll wheel does not seem to be working correctly: If it only works while the mouse is moved, making an edit to the USB Host Shield library will fix it. If your USB Host Shield board is not set up, you will have to bridge the 5V pad and the SPI (a communciation protocol) lines so that power and data go to the circuits. You will also need an Arduino Leonardo and a USB Host Shield board. Then load the program onto your arduino-make sure that you have the "USB Host Shield Library 2.0" installed in the menu (Tools > Manage Libraries). If you do not use input devices that normally act as closed switches, you will have to modify the program to click when a "HIGH" voltage is read (basically just change all the "LOW"s into "HIGH"s). Put together the circuit either using the Clickotron board or a breadboard. The click durations are generated based on a normal distribution so that the Clickotron will be indistinguishable from human clicking. The number of clicks per second is shown by the two seven segment displays on the Clickotron. In autoclick mode, while a foot pedal is held down the device will constantly click at a speed that is set using a potentiometer soldered to the device. This allows me to select text by holding the left foot pedal down to hold left click and dragging the mouse across the text. The left and right click indicator LEDs will also turn on while the Clickotron holds the mouse button down. In regular mode the device will simulate a click for as long as a foot pedal is held down. To switch between the modes, hold down both pedals until the autoclick LED turns on or off. In my current setup with two foot pedals, the Clickotron has two modes, regular and autoclick. Then other input devices can be soldered to the Clickotron to generate mouse clicks. This means that the mouse can be used normally as if it was plugged into the computer without the device (see footnote 1 for details). Link to the schematic: Autoclicker schematicĪ normal USB mouse plugs into the USB Host board and the mouse signals are passed through the device. I still use the autoclicker to play League of Legends with my friends, since over the Covid-19 pandemic it's the best way to stay in touch. I made the device because bad posture was causing numbness in my hands and I had trouble using a regular mouse (proper posture and exercises have fixed this!). The device can also continuously click the mouse buttons when the respective pedal is held down.

For example, I use the Clickotron with two foot pedals as left and right click. The arduino can simulate mouse clicks on the computer, so other input devices can be used to create mouse clicks.

ARDUINO USB HOST SHIELD LIBRARY CODE
The Clickotron-5000 autoclicking device uses a Leonardo, a USB Host Shield board, and the Clickotron board on top, with my code loaded on the Arduino. The Clickotron board is a shield for the Arduino Leonardo that I designed which extends the capabilities of a normal mouse.
