User Tools

Site Tools


arduino:dev-notes-en

Arduino Developer Notes

Serial

SerialEvent

The SerialEvent is not really usable because of its very slow reaction. It seems only be called if the UART buffer is full.
Better is to use a function which is periodically called from the main loop which check if bytes are available.

void loop() {
  delay(10);
  doSerial();
}
 
 
void doSerial() {
  while (Serial.available()) {
    // get the new byte:
    char c = (char)Serial.read();
  }
}


PC Connection

After opening the serial port with a host program a wait of 2..3 seconds is needed before the UNO is ready to receive data.


macOS Crash

If the macOS crashes after plugging in the Arduino into the USB, the following update driver could help:

This is not an official Apple patch.


MCP2515 Library

arduino/dev-notes-en.txt · Last modified: 2018/11/12 08:56 (external edit)