printer.wake(); // MUST call wake() before printing again, even if reset
printer.setDefault(); // Restore printer to defaults
}
else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}
Basically what I'm trying to do is for someone to press a button (read by arduino) and print something on a thermal printer and play a piece of music on the computer at the same time. So far it works for the 1st time, but when I press the button a second time, the serial prints, but Processing doesn't play the file again. I'm not sure which part of the code is going wrong. Would be super grateful for some help here!