Це відео не доступне.
Перепрошуємо.
Python serial port communication using PySerial
Вставка
- Опубліковано 25 гру 2022
- This video is about reading data from a device (Arduino or anything else) using Serial Port communication. This video shows the way to read the data. A nodemcu was used to send the data connected to a PC.
This technique is widely used in embedded systems and IoT. This is also a part of the series where I am covering topics on IoT and Python.
Playlist URL: • Python for IoT
Github URL for code: github.com/avi...
Do share this video and share your feedback. I would really appreciate the support.
#python3 #embedded_systems #iot #nodemcu #iot #pythonlearning #coder #developer
simple but concise!! thank u sir
Thank you !!! wonderful !! I can send data to my ardruino !!! You save my brain 🧠
theri level ... .Easy but superbly explained .
Superb! Thanks man!
Thank you !
is the call ser.readline() a blocking call ? if so then how to do it without blocking the rest of the application ?
Its a blocking call. One approach simply is to check if something is available in the serial first and then read it.
Use an if statement to check ----- if (Serial.available() > 0) then continue to read else continue with other parts.
Thank you so much!
how? I literally just get a syntax error
Can you please paste the error once?
hello ı have some question . I want to use in virtual serial ports how can ı make
Hello sir, i have seen so much videos on youtube and didn't find any useful video except this. i am stuck at a line and the line is
SerialException: could not open port 'COM4': PermissionError(13, 'Access is denied.', None, 5)
how to solve this problem i have tried everything but didn't get solution please help me
Is the same com port being used by any other application?
@@Avirup171 I have also same problem. I used COM3 port in arduino IDE only. What can I do to overcome this problem sir?
Hi. Ideally if the same port is accessed by another application, this problem happens. Since you are facing this issue, it will be gereat if we can get on a call to resolve this issue.
Feel free to block my callender for a free quick chat.
topmate.io/avirup171
Hello SIr. I have watched your video. I have a problem related to python serial and barcode scanner.
I have a USB Barcode Scanner and plug into my Ubuntu PC. The Scanner is work propperly, since when I used it, it will output the reuslt of barcode on every cursor i put (such as terminal, vscode, etc.) but the `received_string` variable is always empty. The script is not give any error. Do you have any idea?
```
import serial
import time
SerialObj = serial.Serial("/dev/ttyS0", 9600)
time.sleep(3)
SerialObj.timeout(3)
print("Starting")
while True:
received_string = SerialObj.readline()
print("Received: ", received_string)
SerialObj.close()
```
I want to retrieve the data using Serial with the code, so the variable `received_string` will be assign with the value of the scanner data, but I always get `Received: b''`.
import serial
Ple help !
File "c:/Users/youtb/Downloads/vehicle counting/CCom7.py", line 1, in
import serial
ModuleNotFoundError: No module named 'serial'
did you install a pyserial?
in terminal:pip install pyserial
Hello sir, May I ask if do you know how to fix the " Access is Denied " problem? I've been dealing with it for the past 12 hours. Thank you in advance!
Can you make sure that the port isn’t being used anywhere else?
Docker plz!
Sure. Next year will create a series on the same. Docker, Python and IoT. Thanks for the feedback.