Це відео не доступне.
Перепрошуємо.

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

КОМЕНТАРІ • 22

  • @edinetgrunhed6000
    @edinetgrunhed6000 10 місяців тому +2

    simple but concise!! thank u sir

  • @cd-mar
    @cd-mar 4 місяці тому

    Thank you !!! wonderful !! I can send data to my ardruino !!! You save my brain 🧠

  • @exclusiveforcroma8126
    @exclusiveforcroma8126 9 місяців тому

    theri level ... .Easy but superbly explained .

  • @gustavolimay
    @gustavolimay 9 місяців тому +1

    Superb! Thanks man!

  • @algercomalekmalki7997
    @algercomalekmalki7997 4 місяці тому +1

    Thank you !

  • @agnichatian
    @agnichatian 8 місяців тому +2

    is the call ser.readline() a blocking call ? if so then how to do it without blocking the rest of the application ?

    • @Avirup171
      @Avirup171  7 місяців тому

      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.

  • @giovannifernandesgarciados9534
    @giovannifernandesgarciados9534 4 місяці тому

    Thank you so much!

  • @craigthepony6259
    @craigthepony6259 5 місяців тому +2

    how? I literally just get a syntax error

    • @Avirup171
      @Avirup171  5 місяців тому

      Can you please paste the error once?

  • @yrnn23
    @yrnn23 5 місяців тому

    hello ı have some question . I want to use in virtual serial ports how can ı make

  • @TECHCODETWINS
    @TECHCODETWINS Рік тому +2

    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

    • @Avirup171
      @Avirup171  11 місяців тому

      Is the same com port being used by any other application?

    • @aasifajawsi1928
      @aasifajawsi1928 10 місяців тому

      @@Avirup171 I have also same problem. I used COM3 port in arduino IDE only. What can I do to overcome this problem sir?

    • @Avirup171
      @Avirup171  10 місяців тому +2

      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

  • @arifagustyawan1456
    @arifagustyawan1456 7 місяців тому

    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''`.

  • @v24blog46
    @v24blog46 3 місяці тому

    import serial
    Ple help !
    File "c:/Users/youtb/Downloads/vehicle counting/CCom7.py", line 1, in
    import serial
    ModuleNotFoundError: No module named 'serial'

    • @markestz9402
      @markestz9402 9 днів тому

      did you install a pyserial?
      in terminal:pip install pyserial

  • @unik8985
    @unik8985 3 місяці тому

    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!

    • @Avirup171
      @Avirup171  3 місяці тому

      Can you make sure that the port isn’t being used anywhere else?

  • @kolboy2028
    @kolboy2028 Рік тому +2

    Docker plz!

    • @Avirup171
      @Avirup171  Рік тому +2

      Sure. Next year will create a series on the same. Docker, Python and IoT. Thanks for the feedback.