Diferencia entre revisiones de «INPUT / OUTPUT / INPUT PULLUP»

De ArduWiki
Saltar a: navegación, buscar
(Parámetros)
(Ejemplos)
Línea 14: Línea 14:
  
 
== Ejemplos ==
 
== Ejemplos ==
<pre>
+
<syntaxhighlight lang="c++">
</pre>
+
pinMode(2, INPUT);
 +
pinMode(3, OUTPUT);
 +
pinMode(4, INPUT_PULLUP);
 +
</syntaxhighlight>
  
 
== Vea también ==
 
== Vea también ==

Revisión del 15:13 2 jul 2018

Descripción

Sintaxis

pinMode[pin, tipo];

Parámetros

pin
numero del pin digital (0~13 + 14~19). Puedes definir el numero de pin como const byte.
tipo
puede ser INPUT / OUTPUT / INPUT_PULLUP

Advertencias

  • Nota que INPUT, OUTPUT y INPUT_PULLUP se deben escribir en mayusculas.

Ejemplos

pinMode(2, INPUT);
pinMode(3, OUTPUT);
pinMode(4, INPUT_PULLUP);

Vea también

Referencias externas