// allows for simultaneous connection of a NC tool offset length probe
// and the basic NO 3 axis touch plate probe with the Blackbox X32 CNC controller.
// Wire Arduino output 4 to probe input on the X32. Power the Arduino using 5v from
// the X32 probe connection. Ground the Arduino to the X32 Probe ground connection.
// Do not apply any other power source to the Arduino or Arduino input circuitry.
// The 5v supply to the LED is for demonstration purposes only; the LED represents X32 touch input.
void setup() {
//configure input pins and enable the internal pull-up resistor
pinMode(2, INPUT_PULLUP); //TLO Probe NC
pinMode(3, INPUT_PULLUP); //3 Axis Touch Plate Probe NO
//configure output pins
pinMode(4, OUTPUT); //TLO & Probe NO - Connect to X32 Probe Input
}
void loop() {
//read the input values into variables
int TLO = digitalRead(2);
int Probe = digitalRead(3);
// The pull-up resistor means the input logic is inverted. It goes
// HIGH when the input is open, and LOW when the input is closed.
// If the Probe is closed or the TLO is opened the Probe Output is closed.
if (TLO == HIGH || Probe == LOW) {
digitalWrite(4, LOW);
} else {
digitalWrite(4, HIGH);
}
}