Serial Port Communication between PC and Arduino using Python 3 and PySerial Tutorial for Beginners

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

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

  • @qozia1370
    @qozia1370 Год назад +4

    This is wonderful! The only tutorial on RUclips that shows the whole process!
    Thank you.
    I like how calm your voice is btw! Most channels try to be too active and shout!
    I almost never subscribe but subscribed to you.
    Cheers.

  • @batuhanisktas553
    @batuhanisktas553 11 месяцев назад +1

    I was trying to send 130 integer data from Python to Arduino for days. I had used just serial.Serial('COM4' , 9600) . I had not used as you used. Now, I did the same thing as you and it worked.

  • @omodolapojaiyesinmi8515
    @omodolapojaiyesinmi8515 2 года назад +3

    good work expecting pserial exception video soon expecially how to clear the memory after serial communication without ending serial which makes the arduino or esp32 respond faster

  • @nguyenninh2094
    @nguyenninh2094 11 месяцев назад +1

    can I send data from arduino to py and vice versa in a same program ? Like datas from sensors

  • @XanthiumIndustries
    @XanthiumIndustries  2 года назад +4

    👋Please Subscribe 👈

  • @pekorabestgirl543
    @pekorabestgirl543 Год назад +1

    Hello, I have a question.
    Since I don't have Arduino uno, is it possible if I just connect two PC with usb to RS-232 converter and have 1 pc send signal to the other using serial.write() and use serial.readline() to receive?

  • @Khalid_Vau
    @Khalid_Vau 22 дня назад +1

    serial.serialutil.SerialException: could not open port 'COM2': PermissionError(13, 'Access is denied.', None, 5)
    please help me !!! i've watched 7 tutorials on it . but my code is giving this error !

    • @XanthiumIndustries
      @XanthiumIndustries  21 день назад

      I hope you are using windows,check device manager for correct port number,is any other program using the port ,is your port number com2 or different

  • @mashrishi
    @mashrishi 2 года назад +2

    Great tutorial. Is it possible to listen to the a COM port continuously and capture a string upon arrival with out over loading the winXP PC? I suppose using some kind of COM wake up on interrupt or similar concept.

    • @XanthiumIndustries
      @XanthiumIndustries  2 года назад

      I dont think that is possible on a Windows XP or a Windows 10 system. That would require access to the underlying hardware directly
      and most of the time on x86 PC the serial port is virtual and runs on the USB hardware.
      You may be able to do it in some embedded linux systems that would allow you direct access to the hardware.
      I think you can do a network wakeup where the whole PC starts up on receiving a network packet through the LAN cable
      Hope this helps

    • @XanthiumIndustries
      @XanthiumIndustries  2 года назад

      Do Subscribe to our channel if you are interested in learning about embedded systems ,electronics or programming.

  • @pranav6528
    @pranav6528 7 месяцев назад +1

    I can't find the cs file generated

  • @rahul_sreedharan
    @rahul_sreedharan 2 года назад +1

    Hey nice tutorial,well done.it was quite helpful

  • @vthelagan2198
    @vthelagan2198 6 месяцев назад +1

    can we do the same with esp32 wroom 32 board

    • @XanthiumIndustries
      @XanthiumIndustries  5 месяцев назад +1

      Our code deals with the PC side of things,Yes you can use it to communicate with the ESP32

  • @MTos-l3o
    @MTos-l3o 10 месяцев назад +1

    How do we send sensor data from Arduino to the pc directly?

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

      we are sending data directly from Arduino to PC and vice versa here. Could you be more specific

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

    Thank you, but i have some issues : SerialException: could not open port 'COM6': PermissionError(13, 'Accès refusé.', None, 5)
    No specific suggestions for this error (yet).

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

      is your com port number com6?check that first,go to device manager find the com port number and substitute in for com6

  • @mr_tpk
    @mr_tpk 11 месяцев назад

    Thank you 🎉

  • @balakishore1274
    @balakishore1274 Год назад +2

    I canot find a port section in device manager

    • @XanthiumIndustries
      @XanthiumIndustries  Год назад +1

      you need to connect some device to your USB port that will act as a Virtual COM port for Eg Arduino UNO,Arduino Mega,USB to serial converter chips like FT232 or CP210x and the drivers for those chips installed.
      Then check the device manager or refresh it

  • @ahmadhafiz2916
    @ahmadhafiz2916 6 месяцев назад

    I have this error
    Traceback (most recent call last):
    File "E:\Downloads\peoplecounteryolov8-main\peoplecounteryolov8-main\test 26april buzzer.py", line 39, in
    arduino = serial.Serial(arduino_port, baud_rate, timeout=1)
    AttributeError: module 'serial' has no attribute 'Serial'

    • @XanthiumIndustries
      @XanthiumIndustries  6 месяцев назад

      have you installed pyserial using pip.pyserial is not installed by default.check the spelling of your pyserial function also?

  • @muzamilabbaskhakwani7271
    @muzamilabbaskhakwani7271 6 месяцев назад

    No pyvenv.cfg file
    this appears if I check my python version. please help

    • @XanthiumIndustries
      @XanthiumIndustries  6 месяцев назад

      Are you trying to create a virtual environment using env

  • @marodfmaro5912
    @marodfmaro5912 Год назад +1

    great

  • @Trade_Studs
    @Trade_Studs Год назад +1

    Hello sir com4 not showing

    • @XanthiumIndustries
      @XanthiumIndustries  Год назад +1

      COM4 is what the arduino is assigned in my system, In your system COM number will be different, do change it.
      Plug your Arduino to PC and check the device manager for the correct COM number.
      Or you can check it in the arduino ide Menu settings,Tools-> Port

  • @XanthiumIndustries
    @XanthiumIndustries  6 месяцев назад

    added subtitles for the video

  • @SOALRusdi
    @SOALRusdi Год назад

    Thanks you

  • @grindhawg31
    @grindhawg31 Год назад

    I was referred from Twitter