hello, i'm rather new to arduino but not to programming, and i've been having some issues with my code.
The project im working on is making a fightpad (arcade cabinet board thing).
I determined that none of the hardware or my PC are at fault as when I move the joystick the TX light blinks.
here's the code
Code: --- |
---|
``` #include <Keyboard.h> |
void setupcolor=#000000[/color] {
pinModecolor=#000000[/color]; // sets pin 8 to input up
pinModecolor=#000000[/color]; // sets pin 9 to input right
pinModecolor=#000000[/color]; // sets pin 10 to input down
pinModecolor=#000000[/color]; // sets pin 11 to input left
Keyboard.begincolor=#000000[/color];
}
void loopcolor=#000000[/color] {
if (digitalReadcolor=#000000[/color] == 0)
{
Keyboard.writecolor=#000000[/color]; //up
}
else if (digitalReadcolor=#000000[/color] == 0){
Keyboard.writecolor=#000000[/color]; //right
}
else if (digitalReadcolor=#000000[/color] == 0){
Keyboard.writecolor=#000000[/color]; //down
}
else if (digitalReadcolor=#000000[/color] == 0){
Keyboard.writecolor=#000000[/color]; //left
}
}
```
|
thank you in advance
p.s. i'm using a Arduino Leonardo