- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Print new line and tab in Arduino
In order to print a newline, you can either introduce the '
' character in your text, or use Serial.println() instead of Serial.print()
An example code is given below −
Example
void setup() { // put your setup code here, to run once: Serial.begin(9600); Serial.println(); Serial.print("This is line1
This is line2
"); Serial.println("This is line3"); Serial.println("This is line4"); } void loop() { // put your main code here, to run repeatedly: }
The Serial Monitor output for the above code is −
Output
In order to add a tab space, you can introduce '\t' in your code.
An example code is given below −
Example
void setup() { // put your setup code here, to run once: Serial.begin(9600); Serial.println(); Serial.print("This is left half\tThis is right half
"); } void loop() { // put your main code here, to run repeatedly: }
The corresponding Serial Monitor output is −
Output
- Related Articles
- How to print new line in Java?
- Open New Browser Tab in Selenuim
- Defining new functions in Arduino
- Print plain text in Arduino
- Print hexadecimal values in Arduino
- Print binary values in Arduino
- WhatsApp’s new ‘Status’ tab feature to share Images and Videos
- Add a new board in Arduino
- Traditional C formatting in Arduino print
- Download a new library in Arduino IDE
- Add new header files in Arduino IDE
- How to open new tab in same browser and switch between them using Selenium?
- How to open a new tab using Selenium WebDriver?
- Installing a new library in Arduino IDE 2.0
- How to open a link in new tab using Selenium WebDriver?

Advertisements