Real-Time Data Visualization and CSV Logging with Arduino and Python

Поделиться
HTML-код
  • Опубликовано: 5 сен 2024

Комментарии • 42

  • @Stakodron
    @Stakodron 11 месяцев назад +7

    perfect on point video!
    In this world theire are 2 typ's of Tutorials those who go 25min+ and thos who just get to the point in 5min

  • @andrepereira3338
    @andrepereira3338 5 месяцев назад +2

    Thank you so much for this. Straight to the point, clean code, and easy to apply to just about any project with sensors. You really saved me a bunch of time on StackOverflow hahaha

  • @remremgaming2561
    @remremgaming2561 5 месяцев назад +2

    That was really well edited and so informative!! Thanks for actually explaining what each line does it was so helpful, def subscribing :)

  • @LeLouisLafontaine
    @LeLouisLafontaine Месяц назад +1

    Thank you so so so much !! This is exactly what I needed, short and effective, really good tutorial.

  •  Месяц назад +1

    since arduino is running before the python script activates the time stamps do not start at 0. is there a way to make the timestamp start at zero once the python code starts?

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  Месяц назад

      I'm sure there is a number of ways you can do this, but one of the ways is to use a timer in python and plot the x axis with that value instead.

  • @brynmrsh
    @brynmrsh 9 месяцев назад +1

    Great video. Wish you had made it a year ago when I was banging my head trying to figure this out.

  • @joshuas9078
    @joshuas9078 Месяц назад

    Thank you! Phenomenal video! I love the style I love the explanations, to the point and easy to follow!!
    You may was to consider adding to the end of the ser.close() in the in_close() function. My system doesn't automatically close serial communication and this may save some headaches for other viewers as well!

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  Месяц назад

      Glad it was helpful and thank you for the suggestion!

  • @ameliabuns4058
    @ameliabuns4058 5 месяцев назад +2

    oooh i'm gonna need this really soon.
    Thanks for saving a ton of people a ton of effort :)

  • @Daniel-dg5po
    @Daniel-dg5po 2 месяца назад +1

    I have to run the python file when the Arduino starts running?

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  2 месяца назад +1

      Do not open the serial monitor in Arduino. Get the code uploaded to your arduino first. Then run the python code.

  • @Alina-ph4vl
    @Alina-ph4vl 5 месяцев назад

    void setup() {
    Serial.begin(115200); //setting up the connection between arduino and computer
    }
    void loop() {
    float time = micros() /1e6; // calculate the current time using micros and convert it to seconds for time stamping
    int sensorValure1 = analogRead(A0); //read the analog values from the two light sensors
    int sensorValure2 = analogRead(A1);
    delay(100); // add a short delay to ensure a reasonable sampling rate
    Serial.print(time); // send the data to the computer via the seral port. Print the "timestamp,sensorValure1,sensorValure2"
    Serial.print(", ");
    Serial.print(sensorValure1);
    Serial.print(", ");
    Serial.println(sensorValure2);
    }

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  4 месяца назад

      This is a simple sensor read code. The video should show how to send it over to python.

  • @PeedrooHenriiquee
    @PeedrooHenriiquee 4 месяца назад

    hello. im performing a teste where i need that the sensorValue1 and 2 to be a float. because i need to be very precise.
    and so when i put float sensorValue1 and 2, in the python code, the append on the list does not accept float value to be assigned. Can you help?

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  3 месяца назад

      It's really hard to say without seeing your code. Recently, I've just been sending my error messages into any of the AI chat bots to help give me insight into issues with my code that I write.

  • @NicholasWong-vv1nn
    @NicholasWong-vv1nn 20 дней назад

    Does the baud rate need to be that high or can it be 9600?

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  17 дней назад

      No it doesn't. It just depends on how much data you want over a given time period.

  • @vigneshkailas1561
    @vigneshkailas1561 5 месяцев назад

    can i do the same thing in matlab ?? for further data processing and visualize as sub plots

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  5 месяцев назад

      I'm pretty sure MATLAB has a way to pull in serial data. I've never done that specifically before.

  • @zainarshadvirk3706
    @zainarshadvirk3706 8 месяцев назад

    can you please tell me which compiler you used for python?

  • @visheshsaxena6199
    @visheshsaxena6199 3 месяца назад

    Hi great video. But my code does not work. It just displays a blank plot and says: Animation was deleted without rendering anything

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  3 месяца назад +2

      Sorry to hear it doesn't work. If you want you can try copy and pasting the code:
      github.com/TheBoredRobot/RUclips-Code

    • @joshuas9078
      @joshuas9078 Месяц назад

      Consider adjust line:
      ani = FuncAnimation(fig, update_plot, interval=10)
      from 10 to another number. My system works better with 50 miliseconds instead of 10

  • @xavierblaster
    @xavierblaster 4 месяца назад

    is this also possible using an esp32

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  4 месяца назад

      Essentially this works with anything that can send serial data.

  • @ameliabuns4058
    @ameliabuns4058 5 месяцев назад

    Hi where can I find the code?

  • @NicolasPietrantoni
    @NicolasPietrantoni 4 месяца назад

    can you include python code to copy

  • @gregowen4806
    @gregowen4806 10 месяцев назад

    hi, where can we download code?
    Thanks!

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  10 месяцев назад

      I'm still working on getting some things posted, but if you want to contact me directly, I can send it to you.
      theboredrobot.com/pages/contact