Arduino Function: RobotControl.digitalWrite

Description

This method writes a HIGH or a LOW value in a specified port on the robot. The ports are exposed on the robot as TinkerKit connectors.

Syntax

Robot.digitalWrite(port, value)

Parameters

port: *TKD0 to TKD5 (on the Control board) *B_TK1 to B_TK4(on the Motor Board) or LED1 (located on the control board)

Returns

 HIGH or LOW

Examples

#include 
void setup(){
  Robot.begin();
}

void loop(){
  Robot.digitalWrite(TDK0, HIGH); // Turn on a Tinkerkit LED connected to TDK0
  delay(1000);
  Robot.digitalWrite(TK0, LOW); // Turn the LED off 
  delay(1000);
}


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc