.remoteDigitalWrite()

Description

Write a HIGH or a LOW value to a digital pin on a remote I/O board. The function automatically sets the pinMode() of the target pin to output.

Compare with Arduino digitalWrite()

Syntax

remoteDigitalWrite(pin, value);

Parameters

pin: the target PIN number, INTEGER

value: HIGH or LOW

Returns

none

Example:

All examples require two NODES to operate. For simplicity, one NODE should run the following while another NODE is running the listener example.

Attach an LED to digital PIN 11 of the listener NODE.

#include 

StonesThrow st;

#define myID 2
#define pairWithID 1

void setup(){
  st.begin(myID, pairWithID);
}

void loop(){

  st.remoteDigitalWrite(11,HIGH);
  delay(1000);
  st.remoteDigitalWrite(11,LOW);
  delay(1000);

}

[index]