Hey Andrew! Great tutorial! My guess is that you are new to python and have experience in either C/C++ or Java from your for loop. In python, you can iterate over a list (portList, in your case) with just add the below code after line 4. ‘ for port in ports: # You could replace “ports” with serial.list_ports.comports() to remove line 3 in your code. if port.startswith(“COM” + str(val)): portVar = “COM” + str(val) ‘ ^this would eliminate the necessity of code from line 6 to line 16. Kudos to you for helping me learn serial communication using Python.
After literally 3 hours of trying to install pyserial, your code finally came alive. 100% what I wanted. Now I just have to see how to write the data in a file, preferably .csv. As someone that has only coded minecraft blocks on a RPi3, how I find another video like this hahaha
Great video! Would you know how to read the same kind of data but coming from a WiFi connected Arduino such as the Arduino Uno R4 WiFi (not connected to a USB port)?
Hello, very nice tutorial. I have been working on the opposite to this video content i.e. i have to send a list of integers from python to arduino. but i end overflowing the serial port and arduino going crazy. Please do a tutorial on that. THanks
It is supposed that I have already installed pyserial like 3 times or so, and on Spyder it says that there is no module called serial, and on Visual it does not allow to use the port, and on issues it appears as a missing import. I need solve it asap.
Thanks a lot for this awesome method. Can you help me further I have a question. I am using ESP32, and want to send AT command to it and then read the Response and use if conditions to do some actions based on the response. Can we do this with python? Please suggest!
Amazing video. Is there a chance you could make a py script video that could teach us how to send and receive serial data? ie. arduino sends "Ready" via serial. Python sees "ready" via serial and sends "im ready too"
I have an Arduino printing data to the serial port every 100 milliseconds, but when I read the data in python and print it to the console, it does not print nearly as fast (maybe every 500 milliseconds?). Do you know of any fix for this?
@@TinkerAssist_ I print 5 values, each separated by a comma, and the last one prints using Serial.println(), and that is followed by delay(100). I bumped up the baud to 115200 and it is printing slightly faster. I decided to use the time library to get the time difference between starting the method and finishing the method, where I print, and python is telling me it actually is 0.10xxxx seconds. However, I did realize that for some reason the prints show up in packs of 3 (I print the array of 5 values from the arduino in one line, my python output is printing the one line in packs of 3 though. it prints the last 3 input readings every 0.3 seconds, even though it is set to print every time the method gets called)... not sure why.
Anyone else having issues with val = input("Select Port: COM")? For some reason Spyder crashes when this point is reached. What am I missing? P.S: For my IT friends, yes, I have tried turning it off and on (if you know, you know) ;)
It is so great when one of the fist things that look for is exactly the one you need. Thank you very very much for this video.
Hey Andrew! Great tutorial! My guess is that you are new to python and have experience in either C/C++ or Java from your for loop. In python, you can iterate over a list (portList, in your case) with just add the below code after line 4.
‘
for port in ports: # You could replace “ports” with serial.list_ports.comports() to remove line 3 in your code.
if port.startswith(“COM” + str(val)):
portVar = “COM” + str(val)
‘
^this would eliminate the necessity of code from line 6 to line 16.
Kudos to you for helping me learn serial communication using Python.
Also there will be an issue if you have a COM30 or COM31 or…
program harus berjalan di C:\Users\jhoea\AppData\Local\Programs\Python\Python311\Lib\site-packages
After literally 3 hours of trying to install pyserial, your code finally came alive. 100% what I wanted. Now I just have to see how to write the data in a file, preferably .csv. As someone that has only coded minecraft blocks on a RPi3, how I find another video like this hahaha
Thanks a lot mate! Great tutorial, explained better than the actual documentation. 👍
you are literally a God on earth. Thank's for saving me
It would be great if you make a complete video starting from how you setup the arduino and the temp sensor ^^.
great video! thanks a lot man!! It saved me in one project of mine!
God please bless this guy with a lot of pizzas and money and grant his every single wish
Great explanation thank you , saved me ton of time.
Thank you so much. This is great tutorial. Recommended!
Hello ! Thanks for the tuto ! Does it works with Linux on a raspberry pi ?
Thanks a lot dude for this wonderful tutorial. It helps me a lot.☺✌
Great video! Would you know how to read the same kind of data but coming from a WiFi connected Arduino such as the Arduino Uno R4 WiFi (not connected to a USB port)?
How to display for 2 values like temp,pressure???
Great video. I am going to connect to my fire panel serial port. How do I set the parameters for bit, parity and stop bit ?
Great tutorial!
Thank you for this, it was very helpful!
thnx dude.. this video really helped a lot!
Can you do the reverse send from python to serial monitor? I really need it
Thanks a lot! Great tutorial!
hello, very nice tutorial, i have question is it possible to make it single line data?
thamks so much for this i apreciate it
Hello
I am looking for the equivalent of : arduino.write("X="+str(200)+'
') in matlab .
Great content, thanks
Hello, very nice tutorial. I have been working on the opposite to this video content i.e. i have to send a list of integers from python to arduino. but i end overflowing the serial port and arduino going crazy. Please do a tutorial on that. THanks
Thanks a lot. This is what I want to learn.
It is supposed that I have already installed pyserial like 3 times or so, and on Spyder it says that there is no module called serial, and on Visual it does not allow to use the port, and on issues it appears as a missing import. I need solve it asap.
good video. but i take TypeError: Serial.open() missing 1 required positional argument: 'self' error .How can i fix this?
Thanks alot bro for your help
Happy to help!
Great Work
Thank you men!!!
I try to this python code with stm32 uart, but it's constantly on the line. after each character. How can I fix it ?
Thanks a lot for this awesome method. Can you help me further I have a question. I am using ESP32, and want to send AT command to it and then read the Response and use if conditions to do some actions based on the response. Can we do this with python? Please suggest!
Amazing video. Is there a chance you could make a py script video that could teach us how to send and receive serial data? ie. arduino sends "Ready" via serial. Python sees "ready" via serial and sends "im ready too"
thanks alot , very nice tutorial
i can send data from tkinter and serial to another serial port and read it
but cand receive
my app crashing when want to read
do you why?
hey can you tell how to store data directly to MySQL from here
need help asap
Thank you so much 😀😀😀😀😀😀
thank you grate video!!
Can you take this one step further and make a video of how to save the serial port data to a .txt or .csv file?
Python Tutorial - How to Read/Write Data To/From .CSV Files and Basic Data Parsing/Manipulation
th-cam.com/video/Nuo8-UrCDrM/w-d-xo.html
hello nice video, but i'm getting an error on 20.-21. line
the error is :
open() missing 1 required positional argument: 'self'
thanks
I figure out my solution
I get a permission error when trying to read data from the port, anyone know why and how to fix?
Serial not halted after a few hours?
@@TinkerAssist_ You can tray 😀
Thank you!
I have an Arduino printing data to the serial port every 100 milliseconds, but when I read the data in python and print it to the console, it does not print nearly as fast (maybe every 500 milliseconds?). Do you know of any fix for this?
@@TinkerAssist_ I print 5 values, each separated by a comma, and the last one prints using Serial.println(), and that is followed by delay(100). I bumped up the baud to 115200 and it is printing slightly faster. I decided to use the time library to get the time difference between starting the method and finishing the method, where I print, and python is telling me it actually is 0.10xxxx seconds. However, I did realize that for some reason the prints show up in packs of 3 (I print the array of 5 values from the arduino in one line, my python output is printing the one line in packs of 3 though. it prints the last 3 input readings every 0.3 seconds, even though it is set to print every time the method gets called)... not sure why.
Anyone else having issues with val = input("Select Port: COM")?
For some reason Spyder crashes when this point is reached. What am I missing?
P.S: For my IT friends, yes, I have tried turning it off and on (if you know, you know) ;)
@@TinkerAssist_ thank you for the reply! i havent, and i surely will. hopefully it will work for me, as it did for the others in the github thread
Does it matter what kind of arduino I have?
It shouldn't matter.
catatan : program harus berjalan di folder pithon.. dan port serial arduino dan python tidak boleh beradu/sama
how to save data bro ? thanks
@@TinkerAssist_ ok, i am waiting for it, thanks
source code link pls???
I cant do that T-T
Love you My Boy It helps so much Thank you!!!!!❤❤❤❤❤❤❤❤❤❤❤❤😍😍😍😍😍😍💖💖💖💖💖💖🌹🌹🌹🌹🎉🎉🎉🎉🎉🎉