Display Arduino output (e.g. sensor data) on your computer monitor with this simple function: Part 1

preview_player
Показать описание
🤩 FREE Arduino Crash Course 👇👇

We designed this circuit board for beginners!

SHOP OUR FAVORITE STUFF! (affiliate links)
---------------------------------------------------

Get your Free Trial of Altium PCB design Software
We use Rev Captions for our subtitles

Arduino UNO R3:

Budget Arduino Kits:

Multimeter Options:

Helping Hands:

Soldering Stations:

AFFILIATES & REFERRALS
---------------------------------------------------

FOLLOW US ELSEWHERE
---------------------------------------------------

*Click Below to Read About This Topic on Our Website*

*Description:*
In many cases while using an Arduino, you will want to see the data being generated by the Arduino. One common method of doing this is using the print() function from the Serial library to display information to your computer’s monitor.

In this week’s episode we will talk about the intricacies of the print() function.

This is the first part, of a two part series on the print() function. Here are the specific topics we will cover in this lesson:

Why would you want to use the print() function?

A brief overview of the Serial library

The basic use of the print() function

*Why would you want to use the print() function?*

You may know that a function is a programming tool - it performs a specific task for you. The print() function’s task is to send information from your Arduino to your computer so you can see the value displayed on your computer’s monitor.

There are an endless number of reasons you may want to send information from the Arduino to a computer display, but two reasons really stand out to me:

The first is being able to see information that you are generating with your Arduino.

For example, if you have a temperature sensor hooked up to your Arduino, and you want to see the value that the temperature sensor is recording - you can use the print() function to send the data to a computer monitor via the USB cable. If you open up the serial monitor window (Tools - Serial Monitor), you will see the values streaming in from the Arduino.

The other big reason is for developing and debugging Arduino sketches.

Very often, when you are developing an Arduino sketch, what you end up coding does something differently than what you expected it to. Maybe you have a variable that gets incremented every so often and blinks an LED when it reaches a threshold. When you upload the code to the Arduino you notice that the LED is blinking more often than it should be.

You can look at the code until your eyes bleed, but actually visualizing the variable being incremented [via the print() function], to see its values every time through the loop() can help explain what is happening very quickly.

*Read More...*

*About Us:*
This Arduino tutorial was created by Programming Electronics Academy. We are an education company who seek to help people learn about electronics and programming through the ubiquitous Arduino development board.
Рекомендации по теме
Комментарии
Автор

The way you explained it, telling us why you have to write 'serial.print' is priceless. Nobody ever does that. Now I know why all of that needs to be done, b/c it's stating what library it's from, etc. Please keep up the good work and thank you.

johnlatza
Автор

Hello, thank you very much for this excellent tutorial. It is indeed pleasant to follow and really very educational despite the fact that I am a Frenchy who doesn't master your language perfectly.

zikermu
Автор

Thanks for the tutorial. It would be awesome to include the sample program in the description so I can copy and paste.

yakx
Автор

HOW DID YOU GET THE POPUP SCREEN WHEN YOU UPLOAD IT? PLEASE HELP?

KooKKoZ
Автор

I tried connecting LM35 temperature sensor to my arduino Yun and running the sketch, I however had my serial monitor not being able to connect. I however upload the sketch for blinking the LED and it worked perfectly well. I wish to know if I am to use the bridge library and if I do, will i be able to read my data on the serial monitor or have to connect an SD card? Thanks.

opeyemiolalere
Автор

hi boss, is there a way to read real time data by matlab?

howard_yin
Автор

I want to build a game controller that acts as a helicopter collective for use in sims. Can I do that with an Arduino Uno clone and a rotary encoder?

Scott.Farkus
Автор

Can I run the arduino code output on my pc like a C++ code without connecting an arduino board? if possible how?

danielworkneh
Автор

Hi Open Source Hardware Group  ! I am a complete beginner at Arduino. I want some help. Can i obtain frequency from real time accelerometer data ? i want to use ADXL345 ! :(
Please help.

akshayd
welcome to shbcf.ru