Introduction: Rapid Fire Mouse
You ever wanted a rapid fire mouse? Well me either but a lot of gamers do.
When the red button is pressed on the side of the mouse it simultaneously grounds both the left and right mouse buttons at 50 times a second.
Just as if you could press both buttons at the same time 50 times a second, which you could not do.
This Instructable screams out for a video, but don't have. For now.
The original post of the Rapid fire mouse.
Step 1: Schematic
I tried making this circuit with out transistors, Didn't work. So now we use transistors.
There is only 3 pins used plus VCC and GND.
Power and ground is taken right off of the USB connections at the mouse.
All three pins use a 1 meg pull down resistor.
PB2 is left mouse button. Pin 7
PB3 is right mouse button. Pin 2
PB4 is trigger button input. Pin 3
Pin 8 is ground.
Pin 4 in +5V.
Step 2: Parts
Minimal parts are used.
1) ATtiny85
1) 8 pin IC socket.
1) Small piece of proto board.
1) Push button, NO
2) 2N2222 Transistors, EBC
3) 1 meg resistors
Step 3: Assembly
Step 4: Push Button
Prepare the case. Drill a 9/32 hole for the push button.
Step 5: Code
Load this code with your favorite AVR programmer. I use WINAVR.
I have included the main.c and the make files in the rar download.
I used this Instructable to aid in programming.
#define F_CPU 1000000UL // frequency (20MHz)
#include <avr/io.h>
#include <util/delay.h>
void on(){
PORTB |= 1 << PB3; //led
PORTB |= 1 << PB2; //heater
}
void off(){
PORTB &= ~( 1 << PB3 );//led
PORTB &= ~( 1 << PB2 );//heater
}
void main() {
DDRB |= (1<<PB3)|(1<<PB2);
int ticks;
for (;;) { //FOREVER
while ((PINB & _BV(PB4))==0) {} // NOT PRESSED, DO NOTHING
for(ticks=0;ticks<125;ticks++) // CLICK FOR 5 seconds
{
on();_delay_ms(20);off();_delay_ms(20);
} // CLICK TAKES 1/50'th second
}
}