Modifications

Sauter à la navigation Sauter à la recherche
Ligne 10 : Ligne 10 :  
Si vous désirez utiliser la broche '''ARef''' pour une référence analogique différente de 3.3V, le code à utiliser est {{fname|analogReference(AR_EXTERNAL)}} (avec un '''AR_EXTERNAL''' et non EXTERNAL)
 
Si vous désirez utiliser la broche '''ARef''' pour une référence analogique différente de 3.3V, le code à utiliser est {{fname|analogReference(AR_EXTERNAL)}} (avec un '''AR_EXTERNAL''' et non EXTERNAL)
   −
== Pin Outputs & Pullups ==
+
== Broches et pull-up ==
The old-style way of turning on a pin as an input with a pullup is to use
+
L'ancienne façon d'activer une broche en entrée avec un avec résistance pullup etait:
   −
<code>pinMode(pin, INPUT)<br></code><code>digitalWrite(pin, HIGH)</code>
+
<syntaxhighlight lang="c">
 +
pinMode(pin, INPUT)
 +
digitalWrite(pin, HIGH)
 +
</syntaxhighlight>
   −
This is because the pullup-selection register is the same as the output-selection register.
+
Parce que le registre de selection-pullup (''pullup-selection'') est le même que le registre de sélection-des-sortie (''output-selection'').
   −
For the M0, you can't do this anymore! Instead, use
+
Vous ne pouvez plus utiliser cette approche avec le M0! Il faut utiliser:
 +
<syntaxhighlight lang="c">
 +
pinMode(pin, INPUT_PULLUP)
 +
</syntaxhighlight>
   −
<code>pinMode(pin, INPUT_PULLUP)</code>
+
Approche qui à au moins le bénéfice d'être rétro-compatible avec AVR.
 
  −
which has the benefit of being backwards compatible with AVR.
      
== Serial vs SerialUSB ==
 
== Serial vs SerialUSB ==
29 917

modifications

Menu de navigation