if you use glovepie you will want to map out buttons with both a key and a enter press.
*example
when the wiimote's "a" button is pressed keyboard "a" and keyboard "enter" are emulated. key.enter is a part of the code, because the arduino software requires it to send data.
*note look over golepie's syntax. It is VERY easy to code in but its a bit different from wiring.
GLOVEPIE
key.a + key.enter = wiimote.a
key.b + key.enter = wiimote.b
arduino code
// wiimote led on off control
#define led 13
char cin(){
while(true){
if(Serial.available() > 0){
return Serial.read();
}}}
void setup(){
Serial.begin(115200); //this is the baud I typically use
pinMode(led,OUTPUT);
}
void loop(){
char command = cin();
if(command == 'a') digitalWrite(led,HIGH);
else if(command == 'b') digitalWrite(led,LOW);
}