intln() | Référence Du Langage Arduino En Français

  • TUTORIALS
  • HARDWARE & TOOLS
  • REFERENCES
  • FAQs
  • ABOUT US
Home References Language References
  • English
  • |
  • Deutsch
  • |
  • Português
  • |
  • 한국어
  • |
  • Français
  • |
  • Español

Sketch

  • loop()
  • setup()

Control Structure

  • break
  • continue
  • Boucle do - while
  • if / else
  • Boucle for
  • goto
  • if (condition)
  • return
  • switch / case
  • Boucle while

Further Syntax

  • // et /* */ Commentaires
  • {} Accolades
  • #define
  • #include
  • ; point virgule

Data Types

  • Tableaux de variables
  • boolean
  • byte
  • char
  • double
  • float
  • int
  • long
  • Les chaînes de caractères
  • String()
  • unsigned int
  • unsigned long
  • void
  • word

Constants

  • Les constantes Arduino prédéfinies: INPUT, INPUT_PULLUP, OUTPUT, HIGH, LOW, LED_BUILTIN, true, false.
  • Floating Point Constants
  • Les expressions numériques entières

Variable Scope & Qualifiers

  • const
  • La portée des variables
  • static
  • volatile

Digital IO

  • digitalRead()
  • digitalWrite()
  • pinMode()

Analog IO

  • analogRead()
  • analogReference(type)
  • analogWrite()

Advanced IO

  • noTone()
  • pulseIn()
  • shiftOut()
  • tone()

Serial

  • Librairie Serial pour la communication série
  • Serial.available()
  • Serial.begin()
  • Serial.find()
  • Serial.findUntil()
  • Serial.flush()
  • Serial.parseFloat()
  • Serial.parseInt()
  • Serial.peek()
  • Serial.print()
  • Serial.println()
  • Serial.read()
  • Serial.readBytes()
  • Serial.readBytesUntil()
  • Serial.setTimeout()
  • Serial.write()

Stream

  • Librairie Stream
  • Stream.available()
  • Stream.find()
  • Stream.findUntil()
  • Stream.flush()
  • Stream.parseFloat()
  • Stream.parseInt()
  • Stream.peek()
  • Stream.read()
  • Stream.readBytes()
  • Stream.readBytesUntil()
  • Stream.setTimeout()

String Functions

  • String.charAt()
  • String.compareTo()
  • String.concat()
  • String.endsWith()
  • String.equals()
  • String.equalsIgnoreCase()
  • String.getBytes()
  • String.indexOf()
  • String.lastIndexOf()
  • String.length()
  • String.replace()
  • String.setCharAt()
  • String.startsWith()
  • String.substring()
  • String.toCharArray()
  • String.toLowerCase()
  • String.toUpperCase()
  • String.trim()

String Operators

  • String opérateur +=
  • String.opérateur ==
  • String opérateur +
  • String [] (accès à un élément)

Time

  • delay()
  • delayMicroseconds()
  • micros()
  • millis()

Math

  • abs()
  • constrain()
  • map()
  • max()
  • min()
  • pow()
  • sq()
  • sqrt()

Bits and Bytes

  • bit()
  • bitClear()
  • bitRead()
  • bitSet()
  • bitWrite()
  • highByte()
  • lowByte()

Arithmetic Operators

  • + Addition
  • = opérateur d'assignement
  • / Division
  • * Multiplication
  • % (modulo)
  • - Soustraction

Bitwise Operators

  • << (Décalage des bits vers la gauche)
  • >> (Décalage des bits vers la droite)
  • & (Opérateur "bit à bit" ET)
  • ~ (Opérateur "bit à bit" NON)
  • | (Opérateur bit à bit OU)
  • ^ (Opérateur "bit à bit" OU EXCLUSIF)

Boolean Operators

  • && (ET logique)
  • ! (NON logique)
  • || ( OU logique)

Compound Operators

  • += (addition composée)
  • &= (ET bit à bit composé)
  • |= (OU bit à bit composé)
  • /= (division composée)
  • *= (multiplication composée)
  • -= (soustraction composée)
  • -- (décrément)
  • ++ (incrément)

Conversion

  • byte()
  • char()
  • float()
  • int()
  • long()

Random Numbers

  • random()
  • randomSeed()

Trigonometry

  • cos()
  • sin()
  • tan()

External Interrupts

  • attachInterrupt (interruption, fonction, mode)
  • detachInterrupt(interruption)

Interrupts

  • interrupts()
  • noInterrupts()

Utilities

  • PROGMEM
  • sizeof

Pointer Access Operators

  • Les pointeurs : & (référence) et * (déréférence)
Serial.println()

Description

Affiche les données sur le port série suivi d'un caractère de "retour de chariot" (ASCII 13, or '\r') et un caractère de "nouvelle ligne" (ASCII 10, or '\n'). Cette instruction a par ailleurs la même forme que l'instruction Serial.print():

  • Serial.println(b) affiche b en tant que nombre décimal sous la forme d'une chaîne de caractères ASCII suivi d'un retour de chariot et d'un saut de ligne.
  • Serial.println(b, DEC) affiche b en tant que nombre décimal sous la forme d'une chaîne de caractères ASCII suivi d'un retour de chariot et d'un saut de ligne.
  • Serial.println(b, HEX) affiche b en tant que nombre hexadécimal sous la forme d'une chaîne de caractères ASCII suivi d'un retour de chariot et d'un saut de ligne.
  • Serial.println(b, OCT) affiche b en tant que nombre octal sous la forme d'une chaîne de caractères ASCII suivi d'un retour de chariot et d'un saut de ligne.
  • Serial.println(b, BIN) affiche b en tant que nombre binaire sous la forme d'une chaîne de caractères ASCII suivi d'un retour de chariot et d'un saut de ligne.
  • Serial.print(b, BYTE) affiche b en tant qu'octet simple suivi d'un retour de chariot et d'un saut de ligne.
  • Serial.println(str) si str est une chaîne de caractère ou un tableau de caractère, affiche la chaîne de caractère suivie d'un retour de chariot et d'un saut de ligne.
  • Serial.println() affiche un retour de chariot et un saut de ligne.

Paramètres

  • data: tous types de données entières incluant les char, chaînes de caractères et floats (nombre à virgule).

Les floats sont supportés avec une précision de 2 à plusieurs décimales.

Valeurs Renvoyées

  • Aucune

Exemple

void setup() { // open the serial port at 9600 bps: Serial.begin(9600); // print a character Serial.println('N'); // print a string Serial.println(); // affichage un autre retour de chariot Serial.println("ArduinoGetStarted.com"); // print a float number float a = 1.23456; Serial.println(); // affichage un autre retour de chariot Serial.println(a); // 2 decimal places by default Serial.println(a, 4); // 4 decimal places Serial.println(a, 5); // 5 decimal places Serial.println(a, 6); // 6 decimal places // print an interger number out in many formats: int x = 77; Serial.println(); // affichage un autre retour de chariot Serial.println(x); // affichage décimal Serial.println(x, DEC); // affichage décimal Serial.println(x, HEX); // affichage hexadécimal Serial.println(x, OCT); // affichage octal Serial.println(x, BIN); // affichage binaire } void loop() { }

The result on Serial Monitor:

COM6 Send N ArduinoGetStarted.com 1.23 1.2346 1.23456 1.234560 77 77 4D 115 1001101 Autoscroll Show timestamp Clear output 9600 baud   Newline  

ARDUINO BUY RECOMMENDATION

Arduino UNO R3
Arduino Starter Kit
Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.Additionally, some links direct to products from our own brand, DIYables .

※ OUR MESSAGES

  • We are AVAILABLE for HIRE. See how to hire us to build your project
PREVIOUS NEXT DISCLOSURE ArduinoGetStarted.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com, Amazon.it, Amazon.fr, Amazon.co.uk, Amazon.ca, Amazon.de, Amazon.es, Amazon.nl, Amazon.pl and Amazon.se The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License. The content is modified based on Official Arduino References by: adding more example codes and output, adding more notes and warning, rewriting some parts, and re-formating Email: [email protected] ×

Tag » Arduino Serial Print R N