Arduino Tutorial 56: How to Graph Live Data Using the Serial Plotter

  Рет қаралды 71,329

Paul McWhorter

Paul McWhorter

Күн бұрын

Пікірлер: 89
@Experts_top_5
@Experts_top_5 4 жыл бұрын
Sir, take care and stay safe from Corona. by the way I have learned a lot from this series, thank you
@Hino_55
@Hino_55 4 жыл бұрын
Thank you for the tip on the auto-scaling tendency of the serial plotter, Sir Paul. The plotting of additional data, i.e. the constants, acts as if we have a lower boundary and an upper boundary. While it is true that the plotter still auto-scales when data is beyond the boundaries, the graph remains neat and tidy. This tip is great for when visualizing if a data exceeds a certain limit. And we can see that when the data plot crosses the lower or the upper boundary, i.e. when the data plot crosses the lower horizontal line graph or the upper horizontal line graph. We are saved from being surprised with constantly varying scales / constantly varying lower and upper boundaries. Thank you for this lesson Sir Paul!
@keyboardlearning7552
@keyboardlearning7552 2 жыл бұрын
This Plotter looks really useful! Finding Sin and Cos as functions in the IDE was a good surprise too. I used the Serial Printer first to check that I was getting the results that I was expecting. Finding that the Cos and Sin functions needed the angle in Radians took me a moment to unravel when I looked at the results, but I now have scrolling Sin and Cos waves. Many thanks
@hughpatterson1480
@hughpatterson1480 3 жыл бұрын
Another great lesson. The serial plotter is an Arduino tool that most people either don't use or don't realize is there. The Arduino IDE is a great piece of software and, while I don't know why they don't give you a few more options regarding the plotter, it's still great. I love that I can use my ESP32 boards as well as other boards with it. Thanks again for a great lesson!
@matthewcollins1858
@matthewcollins1858 Жыл бұрын
Present. I do have a tendency to kind of wonder off and play around a bit. And I have saved a copy of every code and taken pictures of every wiring set up, so that I can go back and reference them. when I have finished your tutorials i plan on using this for personal projects.
@norbertvachtler3850
@norbertvachtler3850 4 жыл бұрын
Thank you so much for this lesson, and It was the first tie, when I use the serial plotter 😋. Pls Sir Stay at home, because you are one of the best teacher 😄😄🤗
@frang342
@frang342 Жыл бұрын
Hey Paul, I struggled with the math on this one.However I wrote it all down in my notebook I use for coding and future reference. It's been a rewarding experience, I've learned a lot on how to write to the Arduino ide and understanding the other libraries more. Thankyou.
@MohammadMomin
@MohammadMomin 4 жыл бұрын
Sir, your style of teaching is my favorite.💖You make concepts easier to understand and interesting. Thanks, a lot.
@paulmcwhorter
@paulmcwhorter 4 жыл бұрын
Glad to hear that
@DesertVox
@DesertVox 4 жыл бұрын
It's simpler than I thought. Although the feature has been around for a while, I haven't tried it because I thought I had to do a proper research. After watching how simple it is, I'll give it a try. Thanks for the video.
@alexsterling5186
@alexsterling5186 4 жыл бұрын
Hi Paul. I just finished up your first video series that goes along with your website tutorials. While I didn't have a lot of the hardware, I still went through every lesson and got the code where it will compile. Today I ordered the kit linked in the description and can't wait to try this new series with all the new components. I also ordered the GPS and a few other components from the first series so I can go back and try them. Thanks again for what you do!
@opalprestonshirley1700
@opalprestonshirley1700 4 жыл бұрын
Well that worked, nice to see something other than numbers passing you by. Onward to the homework. Have a great week Paul.
@tobygibbes2111
@tobygibbes2111 3 жыл бұрын
you deserve at least 5 million subs
@doverivermedia3937
@doverivermedia3937 Жыл бұрын
COOL ! Love the plotter functionality. Played around with the 'delay' and it looked like a cardio monitor hehe. On with the HWrk ..
@pokerface68
@pokerface68 3 жыл бұрын
Fun to learn about the Serial Plotter, thank you.
@wayneandrews1738
@wayneandrews1738 Жыл бұрын
Plotting Sine and Cosine was easy. Declare the values as floats and do angle increments in 0.1 . I used the expression: angle+=angle+0.1; in for expression. The Sine and Cosine are 90 degrees out of phase with each other. Note: the EEPROM is guaranteed for 100,000 writes Wayne
@nikhileshbhaskar5163
@nikhileshbhaskar5163 4 жыл бұрын
sir I became your big fan for your teaching ❤
@sssagc
@sssagc 3 жыл бұрын
Okay, sir I've done the homework. Used a "For" loop to read out the angle from 0 to 360 degrees and the sine and cos functions of the Arduino to work out the values. However I could not come up with a method to separate the 2 waves like in an oscilloscope and they were overlapping each other. Finally decided to increase the amplitude of the sine wave by doubling its value( value of the cosine wave remains the same ). Thankfully the plotter has various colors(colours) and the waveforms can be differentiated visually though they overlap . Now to check out Tutorial 57 and see if all went accordingly here or if I have goofed up.
@paulmcwhorter
@paulmcwhorter 3 жыл бұрын
Most Excellent! Keep up the good work.
@Chupria
@Chupria 3 жыл бұрын
Awesome. Dimensional analysis is easier than I thought, now that I know it.
@dplighting
@dplighting 4 жыл бұрын
Another great lesson thank Paul!! I'm going to play with sine and cosines now!! Be back soon 👍
@haris1415
@haris1415 4 жыл бұрын
Thanks a lot for this lesson sir....... It's a new lesson I learned today.
@michaelcostello6991
@michaelcostello6991 4 жыл бұрын
I used if statements to ignore values above 10 and less than 0 for the variable distanceToTarget to keep plot between 0 and 10. It gives better plot.
@tiberiumihaescu7348
@tiberiumihaescu7348 4 жыл бұрын
Wow, didn't even know that exists. Awesome! I'll think of ways to use it in my projects :D. Thank you and stay safe!
@Rinayadaav.77-s1e
@Rinayadaav.77-s1e 4 жыл бұрын
Sir please start the series of Raspberry Pi tutorials this will help to improve the skills regrading for engineering.
@johnhechtlinger9465
@johnhechtlinger9465 9 ай бұрын
this is insane....my serial plotter showed NOTHING...someone else here had the same problem even though the serial monitor worked fine. The solution? I had to remove the space between the colon and "Distance to target is: " in Serial.print . Huh?? Anyway, now it works
@emmetray9703
@emmetray9703 4 жыл бұрын
will be there any ARM tutorials?
@ledogu
@ledogu 3 жыл бұрын
Thank you. Was wondering what Serial Plotter was in the Tools.
@christianbautch4015
@christianbautch4015 3 жыл бұрын
Hey Paul, so I tried pulling up my serial plotter but instead of showing me the graph it showed a blank screen and the number values went from left to right instead of bottom to top. Do you know why that would be?
@johnhechtlinger9465
@johnhechtlinger9465 9 ай бұрын
same problem
@mattryan-mq2yp
@mattryan-mq2yp 4 ай бұрын
@@johnhechtlinger9465 @christianbautch4015 I'm pretty late. But it's most likely because in your Serial.println you have text. The Serial Plotter doesn't understand human text, so it doesn't know what to print. Change it to this Serial.println(pingTravelDistance); ... should work
@brucesmith9144
@brucesmith9144 4 жыл бұрын
Using an if statement to constrain the variable value to be printed could be used to constrain the y-axis plot value and keep the plot from wild rescaling. For example: if (varY > maxYValue) { Serial.print(maxYValue); } else { Serial.print(varY); } set maxYValue to a level beyond expected plus add some guardband. This should keep your plot from rescaling.
@aaroneipejohn5715
@aaroneipejohn5715 5 ай бұрын
hey great idea to prevent auto scaling, but is there a way to prevent it from hiding away old reading? as in could it compress the whole graph horizontally as new data keeps adding in?
@tameraziz2104
@tameraziz2104 4 жыл бұрын
Thanks Paul.
@sargetester99
@sargetester99 4 жыл бұрын
A program for this, called 'telemetry ' , you can view it on KZbin, search 'arduino telemetry '
@Top-notchShorts
@Top-notchShorts 4 жыл бұрын
Great video
@samilnaml7636
@samilnaml7636 4 жыл бұрын
Gute gemacht👾🤖
@גלעדהיימן
@גלעדהיימן Жыл бұрын
Can you use the distance data in another program live (like Unity)?
@willemjacobs7487
@willemjacobs7487 4 жыл бұрын
Hi Paul,do you have a series on the speeduino, vehicle ecu,Iwould love to learn to use this product,,,,awesome lessons
@s.sonski631
@s.sonski631 Жыл бұрын
You make learning so much easier. I was working on the Sin wave, BUT, the X axis moves way to fast so all I get is a wave line. Is their a way to slow the X axis speed/count/ ? down?
@MarvelBi
@MarvelBi 6 ай бұрын
Maybe it’s just the sensor that came with my kit but my data in the monitor and plotter flickers everywhere. Especially when I tried measuring distance a couple videos ago it would shift between like 193 then 230. My plotter looks like a rectangular wavelength that repeats lol. Any advice on how to fix it Paul?
@johanvanstaden1213
@johanvanstaden1213 4 жыл бұрын
Hi sir I have worked thru the the lessons from 1 to 56 and now the rest is privet video's, do I need to join toe do the rest. Thanks a lot excellent why of explaining I have learned a lot .
@3xAudio
@3xAudio 4 жыл бұрын
Nice Video and project. great idea I'm going back to basics because I'm a bit rusty with arduino and looking for ideas
@justinleomartin3164
@justinleomartin3164 4 жыл бұрын
How many more videos have you planned for this series
@mohsenr4434
@mohsenr4434 2 жыл бұрын
Thank you.
@webslinger2011
@webslinger2011 4 жыл бұрын
Thanks!
@brgarrison418
@brgarrison418 4 жыл бұрын
Seems like Lessons 57 - 68 are not available any idea on when they will be up ??
@paulmcwhorter
@paulmcwhorter 4 жыл бұрын
Patience, grasshopper . . . videos are released one per week on Tuesdays. If you are locked down and not getting enough material, hop over to the Jetson Nano playlist on this channel and check it out.
@brgarrison418
@brgarrison418 4 жыл бұрын
@@paulmcwhorter During the wait, I incorporated the LCD to lesson 55 but without a potentiometer. int trigPin = 12; int echoPin = 11; int deltime = 10; #include int Contrast = 75; // Setting the contrast to 75 float pingTravel; float pingDistance; float distance; float velocity = .0134992; // inches/microseconds int longwait = 1000; int rs = 7; // The next 7 int were to set up LCD pins int en = 8; int vo = 44; int d4 = 2; int d5 = 3; int d6 = 4; int d7 = 5; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); //Setup LCD Object void setup() { // put your setup code here, to run once: analogWrite(44, Contrast); // Writing Contrast to 44 (PWM pin) lcd.begin(16, 2); delay(longwait); Serial.begin(9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); } void loop() { // put your main code here, to run repeatedly: digitalWrite(trigPin, LOW); delayMicroseconds(deltime); digitalWrite(trigPin, HIGH); delayMicroseconds(deltime); digitalWrite(trigPin, LOW); pingTravel = pulseIn(echoPin, HIGH); // pingTravel is in Microseconds lcd.setCursor(0,0); lcd.print("Ping : "); lcd.print(pingTravel); pingDistance = (pingTravel / 2); // cutting travel by 2 to get point of deflection distance = (velocity * pingDistance); lcd.setCursor(0,1); lcd.print(distance); lcd.print(" Inches "); delay(longwait); }
@gjd54321
@gjd54321 4 жыл бұрын
Did I miss something here? In Tutorial 55 you talked about two lessons : one on dimensional analysis and one on using a low pass filter. Are they coming later? I was expecting them before this tutorial on plotting live data.
@MrBrotherchris65
@MrBrotherchris65 4 жыл бұрын
I didn't see one. I decided to sample my readings 100 times and take an average. I did a for loop 100 times. I added the sensor value (initialize to 0 at the beginning of the void loop) to a variable on each pass. Then, once outside the loop, divide the variable by 100 and use that result to calculate the distance. The output seems much more stable like that. This is a math workaround to an electronics problem. I hope to see the low pass video soon.
@johntiemeh5782
@johntiemeh5782 4 жыл бұрын
Paul, can you show us how to use the Infra Red module please
@paulmcwhorter
@paulmcwhorter 4 жыл бұрын
Patience . . . it is coming in a future lesson.
@prashantmalla3094
@prashantmalla3094 4 жыл бұрын
Thank you grandpa 😊😊
@areejrizwan7384
@areejrizwan7384 4 жыл бұрын
Awesome video! Can you make one about a 7 segment display tutorial? Thankyou!!
@dmhplays
@dmhplays 4 жыл бұрын
You should do a Tutorial on the RTC Module
@ajbalidio.01
@ajbalidio.01 Жыл бұрын
Can i apply it to RFID? serial plotter
@TORDesign
@TORDesign 3 жыл бұрын
When I disable serial monitor and restart it, the arduino board reboots. Is there any way to avoid that?
@fadi765
@fadi765 4 жыл бұрын
You could limit the distanceToTarget between 0 & 10.
@Szienz
@Szienz 4 жыл бұрын
Is Serial Plotter not an option for Visual Studio Code? only in Arduino?
@michaelcostello6991
@michaelcostello6991 4 жыл бұрын
Sometimes you get a negative spike for distance if you swipe your hand quickly across the sensor. Why is this ?
@wallaceshackleton1889
@wallaceshackleton1889 4 жыл бұрын
Sorry, I looked in the Arduino kit and I could not see any Sine Waves...and I went off on a Tangent, Cos. I don't know why.
@ricardohenry2160
@ricardohenry2160 Жыл бұрын
Clean graph*
@levelmastersystems117
@levelmastersystems117 4 жыл бұрын
Thanks
@MarvelBi
@MarvelBi 6 ай бұрын
Ok it seems to balance out with the boundaries but still really jumpy if anything moves
@shreeshahegde2875
@shreeshahegde2875 4 жыл бұрын
Sir, can you pls teach adafruit feather
@A.Qalawi
@A.Qalawi 19 күн бұрын
homework was simple enough!
@simontopley4771
@simontopley4771 Жыл бұрын
Out of interest, i upset mine, it was hung, the plotter was hung, the LCD display was stuck, even after changing data ints, i reset the arduino several times, in the end, i reset the sensor then reset the arduino, this cured the problem, can't say why, but there is quite a bit of logic on the pcb, so who knows?
@JimPeugh
@JimPeugh 9 ай бұрын
Thanks to your comment I reset the sensor and plotter began working.
@tobygibbes2111
@tobygibbes2111 3 жыл бұрын
"no sugar. none needed, it is refreshing enough as it is." and you're sweet enough as is.
@VinhPham-td1wm
@VinhPham-td1wm 4 жыл бұрын
Sir, can you pls make a video about nrf24L01 module tutorial? I look on the internet but i can't find good info that i could understand and write myself a code. So pls make a video about that. I would be really appreciated if you could make one for my friends and i.
@quickfixengineeringltd8035
@quickfixengineeringltd8035 4 жыл бұрын
Hello sir. Thank you so much for the content you put on KZbin. You're a model here in Africa. Could you possibly do a project on an arduino based solar charge controller with LEDs that change color on the basis of batteries been charged, charging and low. Alternative energy is a major priority here and I want to build projects related to alternative energy. Thank you in anticipation of a response.
@MrBrotherchris65
@MrBrotherchris65 4 жыл бұрын
Maybe you could use the voltage reading tutorial he did and then a series of if statements to light various leds based on the voltage. if reading >= 12 volts write greenLED High, if reading >11.5 && reading < 12 then yellowLED HIGH..... Of course you would probably need some pretty significant resistors to step down the voltage (see tutorial on that one) to get a voltage you could use with the Arduino. DISCLAIMER - I am not a professional coder or electrician, so check these ideas with someone who is. I'm just a middle school teacher.
@VinhPham-td1wm
@VinhPham-td1wm 4 жыл бұрын
Your tutorial is so awesome and so easy to understand and apply it in real life and pls recommend my comments about nrf24L01 module tutorial.
@ajjugamingyt643
@ajjugamingyt643 4 жыл бұрын
Sir make the video on quad helicopter plz
@robertwilkerson9723
@robertwilkerson9723 3 жыл бұрын
"The dog ate my homework"
@ultragaming1650
@ultragaming1650 4 жыл бұрын
we have different result i will try again
@ilyashick3178
@ilyashick3178 4 жыл бұрын
Paul. sorry I have to temporally stopping follow your lessons because of COVID-19.Unfortunately do not have my PC and all Arduino's KIts with me right now. Anyway, As I am thinking for the assignment of sine/cosine and my idea is graph which mirrored of function y = f(x) for sine and y=-y for cosine. From my old school Pi is better presentation for cycle of sine. 2Pi is whole cycle, Pi is half cycle and 1/4Pi, 1/2Pi, 3/4Pi and etc. As example, if max sine (y) as 10 then it is 1/2 of Pi, 1/4 of Pi equal y=5 or close, 3/4 of Pi is close to 5, then for next half cycle Pi+1/2Pi as max and etc. Thanks to refresh knowledge from 70 th.
@kekekeernest8920
@kekekeernest8920 4 жыл бұрын
Please Sir..... Can you do a lesson on keypad...
@joshhodges2311
@joshhodges2311 3 жыл бұрын
"Let me show you how to do a graph. First of all, you have to KILL-"
@hakimsalleh7831
@hakimsalleh7831 3 жыл бұрын
can i get you coding sir ?
@gundoggydog
@gundoggydog 2 жыл бұрын
Am I the only one getting negative numbers for the Ping Travel Time & Distance? I don't get how thats even possible lol
@tameraziz2104
@tameraziz2104 4 жыл бұрын
Thanks Paul.
@MrTrollified
@MrTrollified 4 жыл бұрын
Great video
Easy Way to Create CSV Files with Arduino Uno & Python (Save Data)
15:25
УЛИЧНЫЕ МУЗЫКАНТЫ В СОЧИ 🤘🏻
0:33
РОК ЗАВОД
Рет қаралды 7 МЛН
Вопрос Ребром - Джиган
43:52
Gazgolder
Рет қаралды 3,8 МЛН
Using SD Cards with Arduino - Record Servo Motor Movements
31:53
DroneBot Workshop
Рет қаралды 203 М.
How To Use Arduino's Serial Plotter
8:08
Elektor TV
Рет қаралды 50 М.
Arduino Tutorial 60: Add a Go Button to your Distance Sensor
24:32
Paul McWhorter
Рет қаралды 35 М.
15 | Combine a gyroscope and accelerometer to measure angles - precisely
9:49
SPI: The serial peripheral interface
33:00
Ben Eater
Рет қаралды 703 М.
How To Make Robots Move Smoothly | Arduino Tutorial
12:28
James Bruton
Рет қаралды 771 М.
УЛИЧНЫЕ МУЗЫКАНТЫ В СОЧИ 🤘🏻
0:33
РОК ЗАВОД
Рет қаралды 7 МЛН