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

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 พ.ค. 2024
  • In this video, I demonstrate how to send sensor data from the Arduino, plot the data in python, and then automatically save the data to a CSV file.
    Check out this Reference Desk Mat for Arduino:
    amzn.to/3vO6QBl
    Video Timestamps:
    0:00 - Introduction
    0:11 - Arduino Code
    0:59 - Python Code
    4:15 - Data Visualization in Arduino
    4:25 - Data Visualization in Python
    4:34 - Saving data to a CSV
    👉Subscribe for more robotics and engineering tips:
    / @theboredrobotllc
    Share this video with a friend:
    • Real-Time Data Visuali...
    Website:
    www.theboredrobot.com/
    Parts needed for this example:
    Arduino Uno - amzn.to/3pGK6Am
    Jumper Wires - amzn.to/3r6zZpq
    Resistors - amzn.to/3PyGRp5
    Photoresistors - amzn.to/3RakZ4s
    Connect:
    Instagram - /theboredrobot
    Twitter - @theboredrobot
    Facebook - / theboredrobot
    Pinterest - /TheBoredRobot
    Disclaimer: This video contains affiliate links, meaning that if you make a purchase from one of the product links, I'll receive a small commission.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 29

  • @Stakodron
    @Stakodron 7 หลายเดือนก่อน +5

    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

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  7 หลายเดือนก่อน +1

      Thanks! I'm glad you enjoyed it.

  • @andrepereira3338
    @andrepereira3338 2 หลายเดือนก่อน +1

    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 หลายเดือนก่อน

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

  • @brynmrsh
    @brynmrsh 5 หลายเดือนก่อน +1

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

  • @ameliabuns4058
    @ameliabuns4058 2 หลายเดือนก่อน

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

  • @zainarshadvirk3706
    @zainarshadvirk3706 5 หลายเดือนก่อน

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

  • @PeedrooHenriiquee
    @PeedrooHenriiquee 15 วันที่ผ่านมา

    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  5 วันที่ผ่านมา

      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.

  • @vigneshkailas1561
    @vigneshkailas1561 หลายเดือนก่อน

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

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  หลายเดือนก่อน

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

  • @Alina-ph4vl
    @Alina-ph4vl หลายเดือนก่อน

    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  หลายเดือนก่อน

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

  • @gregowen4806
    @gregowen4806 7 หลายเดือนก่อน

    hi, where can we download code?
    Thanks!

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  6 หลายเดือนก่อน

      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

  • @xavierblaster
    @xavierblaster หลายเดือนก่อน

    is this also possible using an esp32

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  หลายเดือนก่อน

      Essentially this works with anything that can send serial data.

  • @visheshsaxena6199
    @visheshsaxena6199 4 วันที่ผ่านมา

    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  2 วันที่ผ่านมา

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

  • @ameliabuns4058
    @ameliabuns4058 2 หลายเดือนก่อน

    Hi where can I find the code?

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  2 หลายเดือนก่อน +1

      github.com/TheBoredRobot/TH-cam-Code

  • @NicolasPietrantoni
    @NicolasPietrantoni หลายเดือนก่อน

    can you include python code to copy

    • @TheBoredRobotLLC
      @TheBoredRobotLLC  หลายเดือนก่อน

      github.com/TheBoredRobot/TH-cam-Code