C# Tutorial - Serial Communication | FoxLearn

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

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

  • @teamplutonz1026
    @teamplutonz1026 7 лет назад +7

    I am working as a project manager, and one of my team members promised a client (who happened to be a bunch of college students), that he would integrate an RFID module into the system. This guy then quit the job suddenly without doing anything. This caused a huge problem. I had no Electronics background and had to do the project by myself in a day. This video was in fact a helping hand from heaven....
    Thank you very much....

    • @foxlearn
      @foxlearn  7 лет назад +1

      You're welcome & Thank you so much ^_^

  • @AnilKumar-of1pb
    @AnilKumar-of1pb 2 года назад

    Wonderful.. Quick and Neat

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

    Thanks very much !

  • @zoeyan7225
    @zoeyan7225 8 лет назад +3

    Hi sir, your video about Serial communication is amazing, thank you. I am wondering do you plan to record another video about communication with Ethernet port using C#?

  • @jeanchrinot
    @jeanchrinot 6 лет назад +1

    Great. It was helpful.

    • @foxlearn
      @foxlearn  6 лет назад

      Thank you so much !

  • @tegaekoh7813
    @tegaekoh7813 8 лет назад +2

    You are doing a great job, thank you.

    • @foxlearn
      @foxlearn  8 лет назад +1

      Thank you so much :)

    • @JobQuestUnveiled
      @JobQuestUnveiled 7 лет назад

      Hey Fox! Would you share your source code with us please?

    • @JobQuestUnveiled
      @JobQuestUnveiled 7 лет назад

      My email is: henriaghaei@gmail.com Thank ya!

  • @aliguner7486
    @aliguner7486 8 лет назад +1

    It's very useful thank you.

  • @frankfahrenheit9537
    @frankfahrenheit9537 7 лет назад

    This is nicely quick and informative.

  • @shadurskysergey
    @shadurskysergey 8 лет назад

    Nice tutorial. Thanks!

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

    thanks !

  • @ProBro-x3o
    @ProBro-x3o 10 месяцев назад

    I want to send files to iPhone, I want to get system information, which folder should I use?

  • @ElectricalInstrumentationEng
    @ElectricalInstrumentationEng 7 лет назад

    Great!!

  • @yu.diachenko7889
    @yu.diachenko7889 8 лет назад +2

    Make a video record, work MODBAS Protocol
    Data transmission through serial line RS-485, RS-422, RS-232, and TCP / IP network connection.
    Many thanks. Excellent video. According to them, and learning.

    • @foxlearn
      @foxlearn  8 лет назад +1

      You're welcome & Thank you

  • @kumaresha3348
    @kumaresha3348 4 года назад +1

    How to read data from more than one serial port? Can you please provide video on this.

  • @therawbot
    @therawbot 7 лет назад

    Hello, thank you for a such wonderful tutorial,
    I have a question, shall I install the device driver to communicate with instrument using c# ?

    • @foxlearn
      @foxlearn  7 лет назад

      Hi, You need install driver for your device before playing demo

  • @rio3903
    @rio3903 4 года назад

    Thanks

  • @kumaresha3348
    @kumaresha3348 4 года назад

    Thanks for great video on Serial communication. I need help from you regarding how to read multiple port data by using windows service or threading. Can you do video on any one.

  • @arunkumar-eo8nn
    @arunkumar-eo8nn 8 лет назад

    i want to set a timer while sending the data is it possible ?? if yes how .????

    • @foxlearn
      @foxlearn  8 лет назад

      Yes, You can use timer control, or you can view this video ruclips.net/video/0cnM8LypCnA/видео.html. to hows how to make a count down, and you can send message. Thanks

    • @arunkumar-eo8nn
      @arunkumar-eo8nn 8 лет назад

      Thank you sir, But this is not what i am expecting , I want to set timer for serial port, like sending a message it will repeat every 5 secs . is it possible ??

  • @Xerox482
    @Xerox482 5 лет назад

    what is the name of voice app you used in video , that lady voice app . thanks

    • @foxlearn
      @foxlearn  5 лет назад

      I'm using natural text to speech. thank you !

  • @tunglampham1761
    @tunglampham1761 7 лет назад

    I haven't seen any line to set a baudrate, do we need it?

    • @joerideman
      @joerideman 7 лет назад +1

      yes! at least I did. If you ever worked with microcontrollers (arduino?) it follows the same principle. You set all the properties and then you open the port.
      If you type "serialport1." you will find out that one of the options is BaudRate.

    • @tunglampham1761
      @tunglampham1761 7 лет назад

      Ok thanks, I 've got it :) I'm just a newbie in this section :)

    • @joerideman
      @joerideman 7 лет назад +1

      So am I, I have been spending way to many hours trying to get the same result with a universal app and only minutes ago I tried this. Windows Forms is very much like the arduino platform if you are into that. Good Luck with your projects.

  • @Fadu4u
    @Fadu4u 8 лет назад

    Thanks, nice tutorial!
    it would be great if you could do a tutorial on receive an sms on a computer and return values from database.

    • @foxlearn
      @foxlearn  8 лет назад +2

      Thank you for your suggestion. I'll make the tutorial as soon as possible :)

  • @洪米堂
    @洪米堂 4 года назад

    If I wanna send a message containing "carriage return" in this program, how should I do?
    I sent directly in "
    " but the PLC attached on PC has no response.

    • @foxlearn
      @foxlearn  4 года назад

      Let me try to research

  • @rickyreddy5894
    @rickyreddy5894 8 лет назад

    Most modern laptops and Pcs don't have serialports. How can I simulate this program for usb ports

    • @foxlearn
      @foxlearn  8 лет назад

      Hi, You need to find a GSM Modem to play the demo, plugin to your computer you can see serial port. thanks

  • @cesaraugustofernandezrios934
    @cesaraugustofernandezrios934 5 лет назад

    Im trying this example, but it shows that one error ocurred, like this:
    System.ArgumentOutOfRangeException: 'InvalidArgument=The value of '0' isn't valid for 'SelectedIndex'.
    Nombre del parámetro: SelectedIndex'
    . Help :(

    • @foxlearn
      @foxlearn  5 лет назад

      Please check your code again. i think you missing something

    • @cyeborg2
      @cyeborg2 3 года назад

      Its because you have no COM ports on your PC.

  • @PraveenKumar-je5vx
    @PraveenKumar-je5vx 2 года назад

    Hi I am using it in .NET 4.6, Code has no error but I am receiving empty message always. Please suggest

  • @shadurskysergey
    @shadurskysergey 8 лет назад

    I really liked your learning style.
    I used the serial from your example. But there is one problem. If I run a program when the serial device is not in the system, it pops up an error. How can I fix this?

    • @foxlearn
      @foxlearn  8 лет назад

      Hi, You need to check your device, Which port are you using? Thanks

    • @Kaczakat
      @Kaczakat 8 лет назад

      This application checks com ports when "form_load" (program starts), if they aren't in the system you can put function SerialPort.GetPortNames() in the dedicated button, for egz. "Check Port" or add "try" and "catch Exception" like when you send data.
      Nice tutorial by the way. You can add EVENT DataReceived for serialPort1 + function EventHandler to AppendText in txtReceive , then you can see respond from modem without Receive button.

    • @shadurskysergey
      @shadurskysergey 8 лет назад

      Kaczakat - thanks for the advice. I'll try.

  • @kovoproxy
    @kovoproxy 7 лет назад

    I can´t select the Port? It´s like a disabled button, why is that so?

  • @alexlo7708
    @alexlo7708 6 лет назад

    Some wrong code in 4:30 -> the writeline command send double newline.
    Correct by delete Environment.Newline.

    • @foxlearn
      @foxlearn  6 лет назад

      Let me check again. thank you !

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

    download link?

  • @RabiulawaalRipon
    @RabiulawaalRipon 6 лет назад

    How To Share USB port over IP and access remote USB port over IP c#
    Thanks for share Your great job.

    • @foxlearn
      @foxlearn  6 лет назад +1

      Thank you for your suggestion. Let me try to research !

  • @water5398
    @water5398 3 года назад

    I want to conect with serial port but when I use “using System.IO.Ports;” I take this error

  • @aboodnimer9097
    @aboodnimer9097 6 лет назад

    hellow friend
    what type serial port use read smart card?
    and what write information code in visual studio c# to serial port for get data from reader smart card
    thanks

    • @foxlearn
      @foxlearn  6 лет назад

      Thank you for your suggestion !

  • @kshitijbali6915
    @kshitijbali6915 4 года назад

    my combo box is not picking any serial port. Please help.

  • @saliht7780
    @saliht7780 5 лет назад

    You know how to integrate us Robotics 5637 to our c# project

    • @foxlearn
      @foxlearn  5 лет назад

      Let me try to research. Thank you for your suggestion !

  • @farwaaslam4648
    @farwaaslam4648 6 лет назад

    sir one problem ds'nt solve please help me... an error occure when iwrite serialport1.portname.... even i include system.io.ports.

    • @廖光辉-w1x
      @廖光辉-w1x 3 года назад

      i meet the same problem, did you fixed it?

  • @JobQuestUnveiled
    @JobQuestUnveiled 7 лет назад +1

    The compiler says: serialPort1 does not exist in the context!

    • @miketuttle2606
      @miketuttle2606 6 лет назад

      you may need to add using.System.IO.Ports;

  • @nischalmadiraju4701
    @nischalmadiraju4701 7 лет назад

    can i have the code to acess data from a usb device?

    • @foxlearn
      @foxlearn  7 лет назад +2

      Hi, What's your email? thanks

    • @JobQuestUnveiled
      @JobQuestUnveiled 7 лет назад

      Can you please do me a favour and send it out to me as well @
      henriaghaei@gmail.com

    • @hendrasondrett9215
      @hendrasondrett9215 7 лет назад

      please send me ankzmexanonymous@gmail.com thanks

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

    It doesn't work with me! The array doesn't filling with the names of my ports! It stell empty, What is the reason?! Can you help me please..

  • @bobanlapcevic5406
    @bobanlapcevic5406 7 лет назад

    i trying to use this with my fiscal printer but dont work :) nothing received :/

  • @dailyenglishphrases461
    @dailyenglishphrases461 8 лет назад

    I think You didn't show us all code , we have to add "using System.IO.Ports" am I wrong ?

    • @foxlearn
      @foxlearn  8 лет назад

      Hi, Please check your code again, What error are you getting? Thank you

  • @akshatapatil151
    @akshatapatil151 6 лет назад

    It shows exception that 0 value not valid for selectedIndex at form1_Load function

    • @foxlearn
      @foxlearn  6 лет назад

      Have you added item to the combobox

  • @siddalingeshapatil9107
    @siddalingeshapatil9107 8 лет назад

    Hi,
    How to select automatically serial port in dropdownlist no need to select manually ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????/

    • @foxlearn
      @foxlearn  8 лет назад

      Hi. You can try
      string[] ports = SerialPort.GetPortNames();foreach(string port in ports)
      { cboPort.Items.Add(port);//cboPort is a Combobox
      }Thank you

  • @chounekomajin
    @chounekomajin 6 лет назад +2

    there shoud be a "timeout handle"

  • @salimshahzada4786
    @salimshahzada4786 5 лет назад

    sir, please give me the best link , for download visual studio, please

    • @Ironborn01
      @Ironborn01 5 лет назад

      Microsoft Visual Studio

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

    Can u please share the code?

  • @muhammadhammad1845
    @muhammadhammad1845 6 лет назад

    make a video of barcode scan by barcode scanner and retrieve barcode number.
    thanks,
    hammad

  • @hozonghan6681
    @hozonghan6681 8 лет назад

    hi, my serial com 7 is sending data out from my project but i need it to display on visual studio text box, do you have any idea how should it be done?

    • @foxlearn
      @foxlearn  8 лет назад

      Hi, I'm using GSM modem, you need to get a gsm modem to play demo. thanks

  • @nazs8775
    @nazs8775 8 лет назад

    can i have the source code please.Also what if we are fetching data from USB?will this Work?

    • @foxlearn
      @foxlearn  8 лет назад +1

      Hi, What's your email? You can fetch data from USB 3G

    • @nazs8775
      @nazs8775 8 лет назад

      oh sorry sayednazneen11@gmail.com and thanks much

    • @nischalmadiraju4701
      @nischalmadiraju4701 7 лет назад

      can i have the code to acess data from a usb device?

  • @حابسحابس-ب6ه
    @حابسحابس-ب6ه 6 лет назад

    Helow Fox learn
    How use serial port to read data from electric meter ?
    Thanks you

  • @MohamedHassnMo7sEn
    @MohamedHassnMo7sEn 7 лет назад

    can you send me the source code ? it didn't work with me

  • @JoseLima-fn2vn
    @JoseLima-fn2vn 4 года назад

    Very good, too bad that serious things are only in English.

  • @cunijoeme
    @cunijoeme 4 года назад

    poly bridge called, they want their music back

  • @ChupoCro
    @ChupoCro 4 года назад

    Hi, it would be nice to have the first screen with programmatically created radio buttons for selecting the COM port and the next (main) screen would show automatically after selecting the COM port by clicking the radio button. That way only one click is needed to select the COM port which is useful when interfacing with microcontrollers. That would be a tutorial about dinamically creating the radio buttons (one button for each detected COM port) plus *Multiple pages on the Form using Panel Control* tutorial (but without a button to show the next screen) or plus *Dynamically Loading User Control* tutorial.
    BTW, when making GUI with Python + Tkinter the next screen could be shown in the same frame as the first screen by first destroying all GUI elements inside the frame by:
    for child in masterframe.winfo_children():
    child.destroy()
    and then dinamically creating the next screen. But here, when using Visual Studio, seems as the better option is to create the next screen in visual designer and to later show it in panel.

  • @ОлегВасильев-в1ш
    @ОлегВасильев-в1ш 8 лет назад

    Я русский и то все понял. Спасибо.

    • @foxlearn
      @foxlearn  8 лет назад

      You're welcome & Thank you so much ^_^

    • @shadurskysergey
      @shadurskysergey 8 лет назад

      Скажи Олег - реально эффективный вариант обучения использует FoxLearn...
      Без лишних ээ... бе... ме... как у многих других... хотя там есть кой какие комменты, но реально я даже не слушал что там напевала электронная девица, итак все понятно... Очень ритмично совершает манипуляции экономя наше время... при этом где нужно можно поставить на паузу и повторить у себя...
      В общем нет слов, одни слюни )))
      А сколько материала FoxLearn нашлепал - просто диву даюсь... вот это знания у человека!!!

  • @balasubrahmanyams8428
    @balasubrahmanyams8428 5 лет назад

    not working

    • @foxlearn
      @foxlearn  5 лет назад

      please check your code again. i think you miss something

  • @SingleWolf22
    @SingleWolf22 3 года назад

    who will help me, give me error an txtMessage.Text

  • @therplayer1291
    @therplayer1291 3 года назад

    Wish to have a real voice

  • @prod.dopamine
    @prod.dopamine 5 лет назад

    looks way too easy

  • @mohamadalibrahim2995
    @mohamadalibrahim2995 8 лет назад +1

    You are doing a great job, thank you.

  • @nguyencanh8369
    @nguyencanh8369 4 года назад

    thanks