Modifications

Sauter à la navigation Sauter à la recherche
1 020 octets ajoutés ,  17 septembre 2013 à 05:43
Page créée avec « {{Arduino-Robot-NAV}} <h4>digitalWrite()</h4> == Description == Classe RobotControl, librairie d'[[Arduino Robot-Librairie|A... »
{{Arduino-Robot-NAV}}

<h4>digitalWrite()</h4>

== Description ==
Classe [[Arduino Robot-Librairie#Classe_RobotControl|RobotControl]], librairie d'[[Arduino Robot-Librairie|Arduino Robot]].

Write a HIGH or a LOW value to the defined port on the robot. the ports are exposed on the robot as TinkerKit connectors.

== Syntaxe ==

Robot.digitalWrite(port, valeur)

== Paramètres ==

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

valeur: HIGH or LOW

== Résultat ==

aucun

== Exemple ==

<nowiki>#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);
}</nowiki>

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

== Voir aussi ==
* [[RB-ARD-ROBOT-Func-beginSpeaker|beginSpeaker()]]
* [[RB-ARD-ROBOT-Func-beginLCD|beginLCD()]]
{{Arduino-Robot-TRAILER}}
32 920

modifications

Menu de navigation