summaryrefslogtreecommitdiff
path: root/trunk/darwin/electronics/Arduino-Sanguino/extruder-controller/rs485_tester/rs485_tester.pde
blob: 65873b983a1cdd98ab356b7ac15d2d32e7718e23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#define RX_ENABLE_PIN 4
#define TX_ENABLE_PIN 16
#define DEBUG_PIN 13

void setup()
{
 pinMode(RX_ENABLE_PIN, OUTPUT);
 pinMode(TX_ENABLE_PIN, OUTPUT);
 pinMode(DEBUG_PIN, OUTPUT);

  digitalWrite(TX_ENABLE_PIN, HIGH); //enable tx
  digitalWrite(RX_ENABLE_PIN, LOW); //enable rx
  digitalWrite(DEBUG_PIN, LOW); //disable led

  Serial.begin(9600);
  Serial.println("hello?");
  
  if (Serial.available() > 0)
  {
    digitalWrite(DEBUG_PIN, HIGH);
    Serial.println("RS485 active.");
  }
}

void loop()
{
}