summaryrefslogtreecommitdiff
path: root/tags/firmware/gen3/1.1/ArduinoSlaveExtruder/RS485.h
blob: 163f3af5045c12a5f72768fbd49e1c4925370a34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void rs485_tx(byte b)
{
  Serial.print(b, BYTE);

  //read for our own byte.
  long now = millis();
  long end = now + 10;
  int tmp = Serial.read();
  while (tmp != b)
  {
    tmp = Serial.read();
	if (millis() > tmp)
		break;
  }
}