Intro: Arduino Graph Tutorial
This tutorial was made to help you read analog values from the arduino in a graph.
Sometimes, for better understanding of what the Arduino is reading, a graph could really help ease the process.
Whilst programming Arduino boards, it was handy to be able to see the results in a graph. Although there are many options, some are paid, others are too heavy and this one fits my needs.
Step 1: Materials and Tools
No special tools were required for this project.
The materials used in this project are the following:
1 - Arduino board, I used a Nano V3
1 - Breadboard
1 - 100kOhm potentiometer
Some wires to put it all together
Step 2: Assembly
Connect the potentiometer to the Arduino.
This is as simple as it gets.
Step 3: Download and Install
Now the interesting part starts. The program that we'll be using is called Drone Tech Serial Visualizer.
It's very simple to use and has a few handy functionalities.
Go over to this link, download and install their software.
Step 4: Programming the Arduino
The sketch can be simple as one can be or a much elaborate one.
The way to send your data to the computer is by printing the values the Arduino reads.
In order to do this, I've connected my Arduino board to my computer via USB and in the sketch, I read the values with "analogRead()" and I print the values with the function "Serial.println()".
I chose pin A3 just beacuse and the baud rate because it is a common one.
Save the (.ino) file and try it.
Step 5: Setup and Using the Software
In here you have to configure the info of your Arduino to set up the aquisition of data in the program.
Port - The port in which your Arduino board is connected.
Baud - The baud rate you defined in your sketch. I defined "9600" baud in mine.
Format - The data has to be CSV formatted. in this case, there is only one value. "0|Potentiometer" The number "0" is the position in the CSV string and the name is of your choice, in this case, "Potentiometer".
MaxY - Since the max analog voltage that the Arduino reads is 5V, it correlates to an integer of 1024.
MinY - Since the min analog voltage that the Arduino reads is 0V, it correlates to an integer of 0.
ScaleX - Choose what suits you better, I always leave it in default
Now press start and start to analyze your printed values!
You can save the image of the graph at any given moment.
Hope this tutorial helped you in your quest in the Arduino world.
Feel free to ask anything about the project. =)