File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
examples/softwareserial_debug/softwareserial_debug Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -31,19 +31,26 @@ void setup() {
3131
3232
3333 canHacker = new CanHacker (interfaceStream, debugStream, SPI_CS_PIN);
34- canHacker->enableLoopback ();
34+ canHacker->enableLoopback (); // remove to disable loopback test mode
3535 lineReader = new CanHackerLineReader (canHacker);
3636
3737 pinMode (INT_PIN, INPUT);
3838}
3939
4040void loop () {
41+ CanHacker::ERROR error;
42+
4143 if (digitalRead (INT_PIN) == LOW) {
42- CanHacker::ERROR error = canHacker->processInterrupt ();
44+ error = canHacker->processInterrupt ();
4345 handleError (error);
4446 }
47+
48+ // uncomment that lines for Leonardo, Pro Micro or Esplora
49+ // error = lineReader->process();
50+ // handleError(error);
4551}
4652
53+ // serialEvent handler not supported by Leonardo, Pro Micro and Esplora
4754void serialEvent () {
4855 CanHacker::ERROR error = lineReader->process ();
4956 handleError (error);
You can’t perform that action at this time.
0 commit comments