Arduino

Reference Language | Libraries | Comparison | Changes

Robot

## digitalWrite()

#### Description

Write a HIGH or a LOW value to the defined 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)

value: HIGH or LOW

#### Returns

none

#### Examples

#include <ArduinoRobot.h>
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);
}
[Get Code]

#### Note

You cannot call Robot.digitalWrite() on TK0 to TK7

Control Board

Motor Board

#### See also

- digitalRead()
- analogRead()
- analogWrite()

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

### Share

### This link has expired.
Please re-subscribe to our Newsletters.

### Subscribe to our Newsletters

Email

Please enter a valid email to subscribe

Arduino Newsletter
Arduino Store Newsletter

### Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy

###### Newsletter

- ©2015 Arduino
- Copyright Notice
- Contact us
- Careers