Python Serial Port Commuincation

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

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

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

    I'm close to this on the Cardputer and didn't think of timeout. Now I can dig into that.

  • @omnipotentpotato2436
    @omnipotentpotato2436 ปีที่แล้ว +3

    Very good video for out project thanks

  • @agkkhan2622
    @agkkhan2622 2 ปีที่แล้ว +2

    Do not stop
    Never give up

    • @dhanawadeamit
      @dhanawadeamit  2 ปีที่แล้ว +1

      You are right @Agk Khan :)
      Let's Keep Moving Toward Goals

  • @engr.inigo.silva2000
    @engr.inigo.silva2000 2 ปีที่แล้ว +1

    Thank you Sir. Amit. This video is so handy. Greetings from Mexico.

    • @dhanawadeamit
      @dhanawadeamit  2 ปีที่แล้ว

      Glad it was helpful! Thank You!

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

    very very thank you so much for the video

  • @yorlysflores6564
    @yorlysflores6564 2 วันที่ผ่านมา

    Hello, your video is excellent. I have a question. If I wanted to read two ports at the same time with pyserial, how would I do it? Could you help me? Thanks.

  • @akashbidap
    @akashbidap 2 ปีที่แล้ว +1

    Nice video sir 😍 Please make a video on java serial communication it will help us a lot sir

    • @dhanawadeamit
      @dhanawadeamit  2 ปีที่แล้ว

      Thank You, Aakash.
      I am so sorry Aakash, as of now I have minimal knowledge of java. But I take this request into account let's see if I could do it for you. Please expect some delay for this video.

  • @eswar9255
    @eswar9255 2 ปีที่แล้ว +1

    great explanation sir

  • @sujatayadav1517
    @sujatayadav1517 2 ปีที่แล้ว +1

    This was helpful. Great job

  • @loadfield1133
    @loadfield1133 2 ปีที่แล้ว +1

    Thank you ,very clear explanation especially timeout attribute.

    • @dhanawadeamit
      @dhanawadeamit  2 ปีที่แล้ว

      Glad you liked it. Thank You!

    • @gulshankumar-hd5yj
      @gulshankumar-hd5yj ปีที่แล้ว

      @@dhanawadeamit sir usb to ttl pr connection ki video bnao jisne clear data fildes ho or data excel 3or more sheets se import kiya ho or on off connection switch ho

  • @josesaumell2908
    @josesaumell2908 ปีที่แล้ว

    Thank you Amit

  • @zikaaaaaa
    @zikaaaaaa ปีที่แล้ว +1

    thanks you so much

  • @ansonkiek6471
    @ansonkiek6471 2 ปีที่แล้ว +1

    Just wanted to ask, my barcode scanner can detect by Hercules serial , but I can’t detect on my software serial input. Is this has to do with port 2,3 RC , TX reverse problem ? The programming software only have serial input selection and setting such as baud rate same as scanner but still can’t trigger

    • @dhanawadeamit
      @dhanawadeamit  2 ปีที่แล้ว

      There is also a possibility that Hercules serial needs Rx, Tx & GND but your software uses full RS232 protocol with DTR, DSR, CTS & RTS and there could be a problem with these pins.
      Please have a look in this direction, let me know if you want any help

  • @ccc5226
    @ccc5226 2 ปีที่แล้ว +1

    Good job 👍

  • @nityanandadas5575
    @nityanandadas5575 ปีที่แล้ว +1

    Excellent

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

    If I want press special Burton's like ESC,f1,f2..... Means how?

  • @woodperfekt
    @woodperfekt ปีที่แล้ว

    Please also do same thing for C++ & Java :) thanks

  • @PedroBorges-pe2mu
    @PedroBorges-pe2mu ปีที่แล้ว

    Do you think I could use something similar to, if I am using two barcode scanners connected in different usb port, see the information that came from each scanner?

    • @dhanawadeamit
      @dhanawadeamit  ปีที่แล้ว +1

      Yeah, you can have as many serial ports as you can. Just you shall use correct port names while using it. Also in one of experience when I was having bluetooth gadgets connected with laptop i could see that windows creates a serial port for those devices and when I actually connect the USB to Serial module some time it wont work. Then when I disconnect all Bluetooth gadgets deleted all serial port that were created for BT gadgets and started a fresh it started to work perfect as expected all the time.

  • @praneshkumar6082
    @praneshkumar6082 2 ปีที่แล้ว

    Thanks for your input.

    • @dhanawadeamit
      @dhanawadeamit  2 ปีที่แล้ว

      My pleasure!
      Here is the link for Python Tkinter GUI
      th-cam.com/video/RLp1xWJobAA/w-d-xo.html

  • @Ardbot
    @Ardbot 2 ปีที่แล้ว +2

    Спасибо, всё доступно и понятно!

    • @dhanawadeamit
      @dhanawadeamit  2 ปีที่แล้ว

      Thank you 😊

    • @ozcanilyas
      @ozcanilyas ปีที่แล้ว

      Reis adama ingilizce yazsana nasıl anlasın böyle

  • @rajibkudas123
    @rajibkudas123 ปีที่แล้ว

    Very well explained....If I am only receiving some data through serial and I want to plot it in real time can we use the same code with omitting the send part....and can u please tell how to store and plot data in real time...Thanks.....

    • @dhanawadeamit
      @dhanawadeamit  ปีที่แล้ว +1

      Hello Rajib, Yes it is possible to receive serial data and plot it in real time.
      I recently have uploaded a radar project where I plot real time data, please have a look.
      Here is the video link for you th-cam.com/video/3jeLWl_nZ28/w-d-xo.html

  • @roshanbagul5606
    @roshanbagul5606 2 ปีที่แล้ว +1

    Thank you for nice information ..
    I have one question , and I hope you can assist me in that
    I am going to buy a digital dial gauge, and I want to read its measurement with Python on my PC. The digital dial gauge works on the USB serial communication protocol.Some details as follows :Data in ASCII format without unit:
    Pre-decimal position with leading zeroes.
    Number on the post decimal positions depends upon the set resolution.
    Unit: [mm]:
    sign X X X . X X X X CR
    „CR“ Carriage Return
    Is it possible to communicate with python with digital dial gauge?and How?
    Thanks in advance..

    • @dhanawadeamit
      @dhanawadeamit  2 ปีที่แล้ว

      Yes it is possible to read data from digital dail gauge. As your data is in string format and not a character you shall use "readline" method in python. In the video I have explained how to read complete string using readline method. First use my code as it is with readline method and verify gauge data can be read, then modify the code as per your application.

    • @roshanbagul5606
      @roshanbagul5606 2 ปีที่แล้ว

      @@dhanawadeamit Thank you very much for your quick response
      I will inform you , when it works ..

    • @roshanbagul5606
      @roshanbagul5606 2 ปีที่แล้ว +2

      Hallo ..
      It is working for me . Thanks again..👍

    • @dhanawadeamit
      @dhanawadeamit  2 ปีที่แล้ว +1

      @@roshanbagul5606 Glad to know Roshan. Enjoy Coding ;)

  • @robertoaraiza7434
    @robertoaraiza7434 ปีที่แล้ว

    Thank you my friend!

  • @אביבאזולאי-ת8ק
    @אביבאזולאי-ת8ק ปีที่แล้ว +1

    Hi, thank you.
    I have a quastion, if i dont know the port name. How can i get it and use it in the code?

    • @dhanawadeamit
      @dhanawadeamit  ปีที่แล้ว

      th-cam.com/video/ji0aeZnnqQg/w-d-xo.html In this video I have showed how to test and debug a serial port

  • @bheemkill4282
    @bheemkill4282 ปีที่แล้ว

    Pls make a video for ubuntu also for serial communication

    • @dhanawadeamit
      @dhanawadeamit  ปีที่แล้ว

      Sure I have noted it into my todo list

  • @Matan_Miller
    @Matan_Miller ปีที่แล้ว +1

    hi, thank you for your video. i copied eveything you did in this video, yet it doen't working. the errors throws me to another file named serialwin32 and serialutil, do you have an idea what can i do? thanks

    • @dhanawadeamit
      @dhanawadeamit  ปีที่แล้ว

      There must be an issue with the usb to serial module. I recommend you to test it individually first so that you will be sure that the hardware works perfectly.

  • @mauriciograsso8102
    @mauriciograsso8102 2 ปีที่แล้ว +1

    Gracias :)

  • @diegodavicino5721
    @diegodavicino5721 2 ปีที่แล้ว +1

    hi good video , can explain how to install the import serial.Thanks

    • @dhanawadeamit
      @dhanawadeamit  2 ปีที่แล้ว

      Hi Diego,
      The serial library installation process is described in the video below:
      th-cam.com/video/ji0aeZnnqQg/w-d-xo.html
      This could be a help

  • @hamidabdalla5214
    @hamidabdalla5214 2 ปีที่แล้ว

    Hi sure
    i need to read data from scale by using python
    the scale connect with my computer using usb Rs232
    Cab you help me ?

    • @dhanawadeamit
      @dhanawadeamit  2 ปีที่แล้ว

      Are you available to see data on Terminal Software?

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

    my serial port is sending data bit by bit so how to receive it bit by bit?

  • @amanbajaj7591
    @amanbajaj7591 2 ปีที่แล้ว

    in my editior loop is working , break through q is working but it is not showing that line "This is the message".it is just going down in terminal. it is like this line is printing but not visible.

    • @dhanawadeamit
      @dhanawadeamit  2 ปีที่แล้ว

      Aman you might have notice it must be going down after timeout. This means your serial did not recieve data.
      There could be multiple reasons like Rx & Tx open, UART to USB module not working, loose connection. I would recommend to check your USB module.
      Check this video th-cam.com/video/ji0aeZnnqQg/w-d-xo.html
      Please let me know if you need some more help with it.

  • @TECHCODETWINS
    @TECHCODETWINS ปีที่แล้ว

    Why i am getting this error in my code
    SerialException: could not open port 'COM4': PermissionError(13, 'Access is denied.', None, 5)

    • @dhanawadeamit
      @dhanawadeamit  ปีที่แล้ว

      This could be because it was open in the previous session. Please try to disconnect and connect back the usb to serial device.

    • @Frabito_editzzzzz
      @Frabito_editzzzzz 11 วันที่ผ่านมา

      was it resolved ? I am getting the same error and am unable to fix it.

    • @Frabito_editzzzzz
      @Frabito_editzzzzz 11 วันที่ผ่านมา

      @@dhanawadeamit It says could not open port COM3. Permission Error (Access is denied)

  • @abcboy-wg6fw
    @abcboy-wg6fw ปีที่แล้ว

    Hello Amit, i copied your code but my issue is that i am ot getting any output on my terminal it always prints an empty line. Could you help me please. Thank you in advance

    • @dhanawadeamit
      @dhanawadeamit  ปีที่แล้ว

      First: Please check if your usb to series converter is working separately.
      Second: Is the comp port name in the code matching as that of in device manager.

  • @aikrihn8069
    @aikrihn8069 ปีที่แล้ว


    eliminates the timeout I understand but my doubt is can I remove the timeout by keeping
    ?

    • @dhanawadeamit
      @dhanawadeamit  ปีที่แล้ว

      Yeah, you can but you have to make sure that all the time you message shall contain
      or else it will stuck infinite time there, usually when we connect with hardware we might not know that the hardware will send correct values so it is recommended to have time out. If your data comes delayed then what you set in time out then you shall consider increasing the time in timeout setting.

  • @abhijitdixit6670
    @abhijitdixit6670 2 ปีที่แล้ว

    Hii sir i have a doubt how to print the values separate separate like - arr[0]-A,arr[1]-B. This.

    • @abhijitdixit6670
      @abhijitdixit6670 2 ปีที่แล้ว

      Can any one send the code for this type of out put

    • @dhanawadeamit
      @dhanawadeamit  2 ปีที่แล้ว +1

      @@abhijitdixit6670Do you see this same string on your serial port?
      If yes what specific character do you want to print?

    • @abhijitdixit6670
      @abhijitdixit6670 2 ปีที่แล้ว

      @@dhanawadeamit i want to print A,B,C but in separate separate

    • @abhijitdixit6670
      @abhijitdixit6670 2 ปีที่แล้ว

      can I contact u personally wp or mail

    • @abhijitdixit6670
      @abhijitdixit6670 2 ปีที่แล้ว

      @@dhanawadeamit hii sir

  • @nurbaini4308
    @nurbaini4308 ปีที่แล้ว

    Can we use this script and using for Linux ubuntu?

    • @dhanawadeamit
      @dhanawadeamit  ปีที่แล้ว

      Yes, you just need python installed.

  • @sushmashaiva1380
    @sushmashaiva1380 ปีที่แล้ว

    How to print live data?

  • @mohitarya-fs7tr
    @mohitarya-fs7tr 5 หลายเดือนก่อน

    hello @sir can I get your contact info, I need you help to create one project

  • @danyalaslam8174
    @danyalaslam8174 ปีที่แล้ว

    Is this code compileable ?

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

    What is the point of this video! Useless.
    Better usage of the usb uart board it bi-directional communication.
    Where the pico or whatever can read things from the pc and do something based on it!