Home Page | Language Reference (extended) | SD Reference | Libraries | Comparison | Changes
Write a HIGH or a LOW value to the defined port on the robot. the ports are exposed on the robot as TinkerKit connectors.
Robot.digitalWrite(port, value)
port: TKD0 to TKD5 (on the Control board), B_TK1 to B_TK4(on the Motor Board), or LED1 (located on the control board)
none
#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
)
;
}
You cannot call Robot.digitalWrite() on TK0 to TK7
Control Board
Motor Board
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.