Arduino GUI Part 1 Communications

  Переглядів 134,703

Byte Me

Byte Me

День тому

This is a series of six videos that covers the creation of a Windows application to control devices connected to an Arduino microprocessor. C# is used to develop serial communications between the PC and an Arduino. The C# windows form app is further developed to transmit both analog and digital data and commands in both directions between the Arduino and PC.
Video Summary:
Part 1: Set up serial communications and send digital commands to the Arduino from the PC GUI
Part 2: Expand the program to send analog data to the Arduino to set the angle of a servo motor
Part 3: Add intensity control of LEDs on the Arduino using trackbar controls on the GUI
Part 4: Send digital data from the Arduino to the PC in the form of button presses
Part 5: Send analog data from the Arduino to the PC in the form of potentiometer voltage readings
Part 6: Make the fully functional GUI more attractive and easier to use
To fully follow this series of videos you should have installed both the Arduino IDE and Microsoft Visual Studio Community Edition. Here is the link to download Visual Studio Community Edition for free:
visualstudio.microsoft.com/do...
Note that this is not an exhaustive treatment of GUI control systems nor is it a robust control system. Much has been left out for the sake of brevity and clarity. Additional programming must be added to trap errors, insure data integrity, and improve overall functionality.

КОМЕНТАРІ: 93
@omidsaadikhany1694
@omidsaadikhany1694 2 роки тому
I've so much problems with Arduino serial communication and your explanation was really help full for me , thanks man .
@mugur4104
@mugur4104 Місяць тому
Best teacher i have seen in a very long time.
@fireomen87
@fireomen87 7 місяців тому
Great video! Really helpful, thank you!
@shortexposureastrophotogra4988
@shortexposureastrophotogra4988 2 роки тому
Great video series! I just programmed my first gui button.
@emmanuelpil
@emmanuelpil 4 роки тому
Very clear explanations. Thank you.
@Overclocked2300
@Overclocked2300 Рік тому
Just want to say thanks for this! Im not using an arduino but Im using a PIC micro. It works the same way once you get serial coms all set up :) but it works! Im going to watch your next video and then figure out how to read serial data.
@jdarnell123
@jdarnell123 9 місяців тому
I don't want to "byte you" (😂) but what a damn great video!! You made communicating between the Arduino and a C# GUI as simple as can be! AWESOME content and I liked and subscribed. Keep rocking the house!! 🙂
@subhashsingh8553
@subhashsingh8553 8 місяців тому
You have explained very honestly
@AkorJohnOmaaka
@AkorJohnOmaaka 14 днів тому
you explanation is sweet and straight, keep it up
@ghostaka7405
@ghostaka7405 Рік тому
My first GUI ,ty for video
@hugocorrea6984
@hugocorrea6984 Рік тому
Muito obrigado. Vídeo maravilhoso
@fardiansajo9000
@fardiansajo9000 2 роки тому
Good work, this is what i am looking for
@darshansalian2967
@darshansalian2967 2 роки тому
Explanation was awesome but can you also teach how to integrate scan port and baud rate buttons
@rul1175
@rul1175 Рік тому
Amazing info. Thank you!
@martindostalek7596
@martindostalek7596 3 роки тому
Very nice sample. Thank you...
@deryorsh
@deryorsh 2 роки тому
U saved my life xD Thank you!
@averagehooligan620
@averagehooligan620 Рік тому
My new favorite video. Thanks
@manofmesopotamia7602
@manofmesopotamia7602 Рік тому
That was so informative 😊
@perinoveriza1658
@perinoveriza1658 3 роки тому
Teaching from heart , thanks madem
@jaderfbsousa
@jaderfbsousa 3 роки тому
Thank you very much for this tutorial. The way you explain it is very clear and easy to understand.
@nasirbennett3635
@nasirbennett3635 2 роки тому
You all prolly dont care at all but does someone know of a tool to log back into an instagram account?? I was stupid lost my login password. I appreciate any tips you can give me.
@caidenkenneth6857
@caidenkenneth6857 2 роки тому
@Nasir Bennett Instablaster :)
@nasirbennett3635
@nasirbennett3635 2 роки тому
@Caiden Kenneth Thanks for your reply. I found the site through google and Im in the hacking process now. Looks like it's gonna take a while so I will reply here later with my results.
@nasirbennett3635
@nasirbennett3635 2 роки тому
@Caiden Kenneth It did the trick and I now got access to my account again. I am so happy:D Thank you so much you saved my ass :D
@caidenkenneth6857
@caidenkenneth6857 2 роки тому
@Nasir Bennett Happy to help =)
@robertmf
@robertmf Рік тому
I thought I was listening to physicist Dr. Michio Kaku... 😊 Thanks for the tutorial...
@geoffwade8144
@geoffwade8144 3 роки тому
Good job, thank you.
@Neopan210
@Neopan210 10 місяців тому
Thanks so much, I can see how to adapt this to an Excel user form to start, stop and collect data.
@brandisbrown8011
@brandisbrown8011 Рік тому
Thank you, sir.
@matijamandarelo4829
@matijamandarelo4829 3 роки тому
Very helpful.
@maulanawahyudi7127
@maulanawahyudi7127 3 роки тому
thankyou madem :)) love youu !
@Myssa002
@Myssa002 2 роки тому
have you ever made a GUI for a PIR motion sensor ?
@gerardoherreragonzalez8192
@gerardoherreragonzalez8192 Рік тому
finally found thanks to the author
@sam35696
@sam35696 9 місяців тому
Many thanks to you .
@davidlanda4093
@davidlanda4093 6 днів тому
YOU ARE AWESOME !!!!!!!!!!!!!!!!!
@BodyByGaming
@BodyByGaming Рік тому
how would you implement a drop down that lets you select the serial port, instead of hard coding it into the properties?
@maziarbesanj1613
@maziarbesanj1613 2 роки тому
thank you.
@jasonmare33
@jasonmare33 2 роки тому
best out there!
@paulwyleciol3459
@paulwyleciol3459 Рік тому
thank you!!!
@alvaromirab
@alvaromirab Рік тому
What should be add to send data to the PC application. Let's say to get the reading of a temperature sensor
@mattnsac
@mattnsac Рік тому
Is there a way to actually program with a GUI like this? Sending serial is one thing, Im wondering if this can be made to permanently change values in the base program?
@kifahzaidan4505
@kifahzaidan4505 Рік тому
Hi, Thanks a lot, its really greate effort and great knowledge. i need to do a project for a preset position linear actuator with a DC motor abd a stepper motor, with Arduino Mega or UNO but i am not able to write the code and the scheme, can you please help. Regards
@ismaelachekar3941
@ismaelachekar3941 2 роки тому
thank you for this very helpful video. when I want to add a second yes no button and connect it to another pin on the arduino. Should I call the data char d2? how can the arduino know the difference between d1 and d2?
@smarttv1868
@smarttv1868 Рік тому
U can do like when we press second "ON" button, instead of sending "A", visual studio will send any other character like "B" and in Arduino code, if we get "B", turn the second led on. Simple u don't need to add d2
@playingitvr4550
@playingitvr4550 Рік тому
would you be able to let us know how to install the ardunio tools in visual studio? and i also got this error when i have installed it "ASCIIEncodingSealed Doesnt exist in type ASCIIEncoding"
@boxingfan5742
@boxingfan5742 3 місяці тому
This was an outstanding tutorial and I appreciate it very much. May I ask if you have any suggestions for how to reduce the lag between the moment I click the GUI buttons and the response time for each of those steps on the board. Could it be helped by a particular compiling method, or will it never go faster due to the serial com's 9600 baud rate? ... or any other ideas would be really helpful as I need to set some equipment up in a lab for work. Thank you very very much for this tutorial, even if you don't have any ideas on that.
@byteme8708
@byteme8708 3 місяці тому
You could try to compile the program as a stand alone .exe program that does not run within Visual Studio. I'm not sure that you can do it with the Community Edition, but there may be other ways it can be done. Good luck.
@kez5729
@kez5729 Рік тому
goated video
@newtechnical715
@newtechnical715 2 роки тому
Sir how to save potential meter reading in PC ?
@Zerhaki
@Zerhaki 8 днів тому
That is the video I have been looking for. I need to make a GUI. Temperature, speed, weight etc are been reading from a robots sensor. Robot is sending the data via esp32. How can I read the data and use on GUI like you? It is almost same that you did on serie but there should be wireless communication.
@thestansatan4337
@thestansatan4337 2 дні тому
this is for wired communication
@kmix9943
@kmix9943 7 місяців тому
i have question, my visual studio cant find my port (COM) and it gives an error that it cannot connect. everything works fine in arduino. what should I do?
@byteme8708
@byteme8708 7 місяців тому
You have to specify a com port number in your command.. e.g. COM3 Make sure you use the same port number that the Arduino wants to use. If you still have problems finding a port, try this link: www.virtual-serial-port.org/articles/com-port-on-windows-10/
@jherico2534
@jherico2534 7 місяців тому
My "String" Function is not Hihlihted or change to color blue, On my ARDUINO IDE... Why is that?
@SamP_64
@SamP_64 Рік тому
How long should it take for the led to turn on after the button click? Im trying to make it instant but it takes about 1.5 seconds
@boxingfan5742
@boxingfan5742 3 місяці тому
Yeah, I've got the same issue. I'm very appreciative of learning this, but that lag is a problematic issue. If you learn any ways to improve or resolve it, I'd really appreciate it if you could come back to this comment reply and point me in the right direction. Best wishes for your success.
@amedbouchareb4218
@amedbouchareb4218 4 місяці тому
BONJOUR ET THANKS
@J_Creative
@J_Creative 4 місяці тому
great
@Tony770jr
@Tony770jr Рік тому
Is the visual studio a free download?
@claudenonya7278
@claudenonya7278 4 місяці тому
Hello, i have a request for a video series , How to control A stepper motor (nema 17 with easy controller) with an Arduino C# GUI with joystick.
@cookiekhai465
@cookiekhai465 2 роки тому
hello and good day, I have been following this tutorial and it seem I cannot turn on the led on and off, but when I click on the GUI the the RX led blinked once but the led on pin13 did not light up. am I missed some of the steps?
@byteme8708
@byteme8708 2 роки тому
You probably did not type the code in exactly as shown in the video. Carefully compare your code with the video's to see what is different.
@cookiekhai465
@cookiekhai465 2 роки тому
@@byteme8708 thank you for the reply, its my mistake for messing up the serial part. I had fixed it and it totally worked. Many thanks
@yazztark
@yazztark 2 роки тому
I'm new, why'd you use 9600 as the serial#?
@byteme8708
@byteme8708 2 роки тому
9600 Baud is the serial communications rate of transfer of data between the Arduino and the PC.
@rul1175
@rul1175 Рік тому
Why did you declare the "char dl;" ??
@tahabutt474
@tahabutt474 Рік тому
i have downloaded the visual studio but it is showing multiple options to download all around 20GB can you explain which one to download
@byteme8708
@byteme8708 Рік тому
Download the C# programming option. You don't need the other languages for this exercise.
@estelagomez137
@estelagomez137 3 роки тому
I can't find the SerialPort tool in the current version. How could I proceed?
@byteme8708
@byteme8708 3 роки тому
Estela, follow this link: developercommunity.visualstudio.com/t/serialport-missing-from-toolbox/1278827
@estelagomez137
@estelagomez137 3 роки тому
@@byteme8708 Thank you for your fast and helpful reply.
@wanglikin8719
@wanglikin8719 Рік тому
how to make a g code controller with visual basic 6
@jonasdefrancisco6217
@jonasdefrancisco6217 2 роки тому
Button click to actual LED turning on has SUPER LAG. It takes about 1sec to actually change state after pressing the button. Picked much faster baud rate, but no change. Without question the slow feedback is an issue with Visual Studio, not the mcu. How to solve this?
@byteme8708
@byteme8708 2 роки тому
When I created the program, I did not experience any lag. You may want to verify that you did all of the communications setup correctly by comparing it with the program in the video.
@SamP_64
@SamP_64 Рік тому
I’m having this problem also. Did you manage to fix it?
@nikhilgupta7569
@nikhilgupta7569 Рік тому
Hi! I have tried it and my code is also exactly same as in video and can't find any error but still I am not able to switch in the led....I just have different board (which Shouldn't matter).
@thestansatan4337
@thestansatan4337 День тому
the problem is writing the code yourself because if you want to add buttons in this you should not write the code yourself you should double tap on the element like button on the form design and then write the code inside that button block in the code. i dont know why but there is a reference in the code you can notice the difference when you write the function yourself and whe you double tap on the element to make the function
@kelizhongmauricristaldo3453
@kelizhongmauricristaldo3453 7 місяців тому
SerialPort doesn't exist on my toolbox. Can someone help me?
@alistairmurray626
@alistairmurray626 7 місяців тому
i have the same problem, let me know if you figure it out, i'll let you know likewise!
@alistairmurray626
@alistairmurray626 7 місяців тому
i found the solution, when you create a new project, make sure you select "Windows Form App (.framework)", NOT "Windows Form App"
@mikoajyzwa92
@mikoajyzwa92 6 місяців тому
What if I have no "Serial port" option?
@byteme8708
@byteme8708 6 місяців тому
Try this link: stackoverflow.com/questions/67202747/why-is-the-serial-port-component-missing-from-my-visual-studio-toolbox
@mohamedadam3085
@mohamedadam3085 Рік тому
Hi, I keep getting this error ......................."System.UnauthorizedAccessException: 'Access to the port 'COM4' is denied."
@bob-ny6kn
@bob-ny6kn Рік тому
You need to add accesses to your project.
@mohamedadam3085
@mohamedadam3085 Рік тому
Actually I found the issue, I had Arduino serial port open so the serial port was busy fixed by turning off the serial port of Arduino and sometimes I had to close Arduino all together
@martin98
@martin98 Рік тому
@@mohamedadam3085 Hey, can you tell me how you turned off the serial port of the Arduino? I have the same issue you had and putting in an 'Serial.end();' command in the Arduino code didn't fix the problem.
@mohamedadam3085
@mohamedadam3085 Рік тому
@@martin98 Hi, you can close arduino ide or turn of serial monitor in the arduino ide, when you use the GUI.
@martin98
@martin98 Рік тому
@@mohamedadam3085 Thank you, that fixed the problem :)
@simplyishan06
@simplyishan06 2 роки тому
U made the pin 13 output... What if I wish to change it to a input dynamically
@ahmadhussainwebshare1001
@ahmadhussainwebshare1001 2 роки тому
This is the wonderful vedio, Thx lot . Pls tell me what model of Arduino board we need to test this tutorial.
Arduino GUI Part 2   Servo Motor
17:58
Byte Me
Переглядів 36 тис.
How to do multiple tasks in Arduino | Beginners | millis() function
10:23
Китайка и Мармеладный Лего😂😆
00:19
KITAYSKAYA ZMEYKA
Переглядів 2,3 млн
Read Data From Arduino Sensors in Visual Studio C#
9:07
Coding With Brett
Переглядів 17 тис.
Python GUI for Arduino Control
12:52
Anas Kuzechie
Переглядів 30 тис.
Build Arduino user interfaces with MegunoLink
25:23
megunolink
Переглядів 16 тис.
Serial Communication with Arduino - The details!
16:51
Programming Electronics Academy
Переглядів 54 тис.
C# Tutorial - Serial Communication | FoxLearn
5:46
Fox Learn
Переглядів 165 тис.
#224 🛑 STOP using Serial.print in your Arduino code! THIS is better.
26:39
Как должен стоять ПК?
1:00
CompShop Shorts
Переглядів 467 тис.
Как должен стоять ПК?
1:00
CompShop Shorts
Переглядів 467 тис.
СКОЛЬКО ЕЩЕ БУДЕТ АКТУАЛЕН IPHONE 13?
14:10
DimaViper Live
Переглядів 41 тис.
I7 2600K тест в играх и сравнение с AMD Ryzen
17:53