Serial.write(some_byte) writes a byte on the serial output. The Arduino serial monitor tries to interpret the bytes it receives as text:

  • 0x11 is a control character, displayed as “□”
  • 0x22 is the ASCII code for the double quote (")
  • 0x33 is the ASCII code for the digit 3.
  • 0x44 is the ASCII code for the uppercase letter “D”
  • etc.
Answer from Edgar Bonet on Stack Exchange
🌐
Arduino Forum
forum.arduino.cc › projects › programming
How to Serial.print() an Array? - Programming - Arduino Forum
January 13, 2020 - i'm trying to print on Serial monitor my array which contains datas capted by a sensor. but an error occured. in the Arduino console i can read something as "invalid conversion from int to int". i tryed to print other va…
Discussions

arrays - ARDUINO: Serial.print a multiple-character element - Stack Overflow
I need to print 4-bit long numbers, these numbers are Binary numbers frome 0 to 16 (0000, 0001, 0010, ...). PROBLEMS: Considering this code: char array[] = {'0000', '0001', '0010', '0011'}; int i; ... More on stackoverflow.com
🌐 stackoverflow.com
print array serial print row by row
Hi i am trying to print 16 Analog inputs to serial monitor. if possible i would like all 16 readings in one row so i can log them into a csv file. the error i get is that i was not declared in the scope. volatile int16… More on forum.arduino.cc
🌐 forum.arduino.cc
17
0
February 8, 2019
Serial print of arrays
Hello guys, I am experiencing one really weird problem. I have variable Theta which is declared as a array of floats, and just for test, I want to print on serial port first 10 values. My code goes like this, trivial ex… More on forum.arduino.cc
🌐 forum.arduino.cc
19
0
March 19, 2012
Print Byte Array in Serial monitor screen of Arduino IDE - Arduino Stack Exchange
I need to print mentioned below byte array on the serial monitor screen of Arduino IDE char b[]= {'0x7E', '0x00', '0x1C','0x90', '0x00', '0x13', '0XA2', '0x00', '0x41', '0x58', '0x1C', '0xCB', '0x... More on arduino.stackexchange.com
🌐 arduino.stackexchange.com
🌐
Arduino Forum
forum.arduino.cc › projects › programming
print array serial print row by row - Programming - Arduino Forum
February 8, 2019 - Hi i am trying to print 16 Analog inputs to serial monitor. if possible i would like all 16 readings in one row so i can log them into a csv file. the error i get is that i was not declared in the scope. volatile int16_t data[16]; void setup() { Serial.begin(9600); } void loop() { for( int i = 0; i
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Serial print of arrays - Programming - Arduino Forum
March 19, 2012 - Hello guys, I am experiencing one really weird problem. I have variable Theta which is declared as a array of floats, and just for test, I want to print on serial port first 10 values. My code goes like this, trivial example: void setup() { float Theta[1001] = {-1.454425, 0.002870, -0.060573...
Find elsewhere
🌐
Arduino Getting Started
arduinogetstarted.com › reference › arduino-array
array | Arduino Reference - Arduino Getting Started
2 weeks ago - For example, to print the elements of an array over the serial port, you could do something like this: ... char message[7] = "Arduino"; void setup() { Serial.begin(9600); for (int i = 0; i < 7; i++) { Serial.print(message[i]); } Serial.println(); ...
🌐
TutorialsPoint
tutorialspoint.com › arduino › arduino_arrays.htm
Arduino - Arrays
The program uses an initializer list to initialize an integer array with 10 values (line a) and prints the array in tabular format (lines bc). ... // n is an array of 10 integers int n[ 10 ] = { 32, 27, 64, 18, 95, 14, 90, 70, 60, 37 } ; void setup () { } void loop () { for ( int i = 0; i < 10; ++i ) { Serial.print (i) ; Serial.print (\r) ; } for ( int j = 0; j < 10; ++j ) // output each array element's value { Serial.print (n[j]) ; Serial.print (\r) ; } }
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Serial print an array using sprintf - Programming - Arduino Forum
August 21, 2023 - I would like to print an array of positions to the serial monitor using sprintf. But I am getting a string that prints the first element correctly, then a zero where the second element should be, and the second element where the third should be. void setup() { Serial.begin(9600); long POS[3] = {123, 456, 789}; char DEBUG_STRING[50]; sprintf(DEBUG_STRING, "Position: ], ], ]", POS[0], POS[1], POS[2]); Serial.println(DEBUG_STRING); } Serial Monitor Result: Position: 123, ...
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Serial.print a character array - Programming - Arduino Forum
May 20, 2018 - The following won't compile (even if I include the size in the 'print' line) Message "call of overloaded 'print(uint8_t [3])' is ambiguous" void setup() { // put your setup code here, to run once: uint8_t C[] = "AT"; …
🌐
Delft Stack
delftstack.com › home › howto › arduino › arduino print char array
How to Print Char Array in Arduino | Delft Stack
March 4, 2025 - In this code snippet, we first define a char array named myArray containing the text “Hello, Arduino!”. In the setup() function, we initialize the Serial communication at a baud rate of 9600. The for loop iterates over each character in myArray, printing each character to the Serial Monitor until it encounters the null terminator ('\0').
🌐
Programming Electronics Academy
programmingelectronics.com › home › sprintf() with arduino | print multiple variables to the serial monitor
sprintf() with Arduino | Print multiple variables to the serial monitor
November 13, 2023 - Finally, you’ll tell Serial.print() to display the formatted string. Let’s take a closer look at each line of code. ... The character array needs to be as large, or larger than the final output string.
🌐
Arduino Forum
forum.arduino.cc › projects › programming
printing an array - Programming - Arduino Forum
March 7, 2012 - I have what is probably a very simple question. How do I print out an array as a whole? What I mean is that I have 8 inputs and I want to print out all 8 together at the end of the while loop? Here is what I got. int r0 = 0; //value select pin at the 4051 (s0) int r1 = 0; //value select pin at the 4051 (s1) int r2 = 0; //value select pin at the 4051 (s2) int row = 0; // storeing the bin code int count = 0; // just a count int bin [] = {000, 001, 10, 11, 100, 101, 110, 111}; int a1=0; i...
🌐
Starting Electronics
startingelectronics.org › software › arduino › learn-to-program-course › 17-arrays
Arrays in Arduino Sketches
my_array[2] = 9; my_array[3] = 1234; my_array[4] = 987; // display each number from the array in the serial monitor window for (i = 0; i < 5; i++) { Serial.println(my_array[i]); } } void loop() { }
🌐
Reddit
reddit.com › r/arduino › arduino serial printing of 2d const char* array
r/arduino on Reddit: Arduino Serial printing of 2D const char* array
December 4, 2020 - void setup(){ Serial.begin(9600); } void loop(){ const char *lightLvlTxt[5][12] = {"Dark","Dim","Light","Bright","Very bright"}; Serial.print("\nLight variables: in - out: "); for(int i=0 ; i < 4 ; i++){ Serial.print(lightLvlTxt[0][i]); } Serial.print(" - "); for(int i=0 ; i < 3 ; i++) { Serial.print(lightLvlTxt[0][i]); } delay(1000); }
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Printing or Sending an Integer array - Programming - Arduino Forum
July 7, 2020 - Hi, Looks simple, but how to print an integer array let say X = [1 55 33 4 9] if you don't want to use a loop? I am looking for something like Serial.print(X) without using indices. I don't want to have the following u…
🌐
GitHub
gist.github.com › 94327
Simple updated examples of arduino serial communications · GitHub
void setup() { Serial.begin(38400); Serial1.begin(38400); } void loop () { Serial1.write (0x01); Serial1.write (0x03); Serial1.write (0x00); Serial1.write (0x0F); Serial1.write (0x00); Serial1.write (0x02); Serial1.write (0x0F); Serial1.write (0x08);