Serial.write()
Description
Ecrit des données binaires sur le port série. Ces données sont envoyées comme une série d'octet; pour envoyer les caractères correspondants aux chiffres d'un nombre, utiliser plutôt la fonction print().
Syntaxe
Paramètres
- val: une valeur à envoyer sous forme d'octet simple
- str: une chaîne à envoyer sous forme d'une série d'octets
- buf: un tableau pour envoyer une série d'octets
- len: la largeur du tableau
Exemple
- The result on Serial Monitor:
※ Remarque:
Serial functions are not only used for the communication between an Arduino board and Serial Monitor of Arduino IDE but also used for the communication between:
- An Arduino board and other Arduino board
- An Arduino board and other sensors/devices
- An Arduino board and computer (any Serial software on computer)
Voir Également
- Langage: Arduino - Serial
- Langage: Serial.available()
- Langage: Serial.begin()
- Langage: Serial.find()
- Langage: Serial.findUntil()
- Langage: Serial.flush()
- Langage: Serial.parseFloat()
- Langage: Serial.parseInt()
- Langage: Serial.peek()
- Langage: Serial.print()
- Langage: Serial.println()
- Langage: Serial.read()
- Langage: Serial.readBytes()
- Langage: Serial.readBytesUntil()
- Langage: Serial.setTimeout()
※ ARDUINO BUY RECOMMENDATION
Arduino UNO R3 | |
Arduino Starter Kit |