When you uncomment RELEASE_MODE in debug.h to remove all the Serial.print() debugging stuff, the adapter does not work.
The issue is in the setup() function in RFUSB_to_DB15.ino:
void setup() {
#ifndef RELEASE_MODE
Serial.begin(115200);
while (!Serial);
byte i, j;
if (Usb.Init() == -1) {
Serial.print(F("\r\nOSC did not start"));
while (1);
}
#endif // <----------------------------------------------
pinMode(LED_PIN, OUTPUT);
}
The #endif statement, placed here, prevents Usb.Init() from being executed, and thus the USB is not initialized.
Instead, it should be:
void setup() {
#ifndef RELEASE_MODE
Serial.begin(115200);
while (!Serial);
#endif
byte i, j;
if (Usb.Init() == -1) {
Serial.print(F("\r\nOSC did not start"));
while (1);
}
pinMode(LED_PIN, OUTPUT);
}
(You can also wrap the "OSC did not start" error with an #ifdef)
if (Usb.Init() == -1) {
#ifndef RELEASE_MODE
Serial.print(F("\r\nOSC did not start"));
#endif
while (1);
}
When you uncomment RELEASE_MODE in
debug.hto remove all theSerial.print()debugging stuff, the adapter does not work.The issue is in the
setup()function inRFUSB_to_DB15.ino:The
#endifstatement, placed here, preventsUsb.Init()from being executed, and thus the USB is not initialized.Instead, it should be:
(You can also wrap the "OSC did not start" error with an #ifdef)