How to Connect and Control an Arduino From Python!

preview_player
Показать описание


And don't forget to leave a like, subscribe to the channel, and comment what you want to see next!

Consider becoming a super supporter of the channel at my Patreon as well!

Thanks for watching and goodluck with your projects!!
Рекомендации по теме
Комментарии
Автор

Thanks for making this tutorial. This is a great generic parser to implement for most projects to easily add microcontroller sensors to l your python program

seanmcelwee
Автор

Thanks! I had problems communicating from my Python script to Arduino through a GUI. I've taken it back to basics now and it works with the console! Now I'll have to build it back up! :)

angeloblomme
Автор

Thank you very much for sharing this video.Very useful and just what I needed for some future projects using Raspberry Pi, Arduino, ESP32.Never done serial port programming in Python before.

oladunk
Автор

Thank you for your time and dedication to making this video. For me it was excellent, fast and direct. Your video helps me with a project that I want to do in which I use a muscle sensor in which if the muscle sensor is activated it turns on a green LED. and when it stops receiving signal it turns off. Hopefully you can make an example of what I intend to do. Thanks for help and time.

whitenoise
Автор

Thanks for making this tutorial! It was super helpful and well explained!

cw
Автор

Nice video and good luck ! Now i understand how complicated is, thank you for share this.

NNN
Автор

Thanks for this video,
Exactly what i was looking for.

sambaradaran
Автор

thank you sir for sharing this video Im trying this now as beginner

mixme
Автор

bro your so cool i will tell about you to all my programmer friends

MaxPersia-pt
Автор

Hi
Bit late to the party but I only just found your channel.
NEVER used Python but I hear that it is rather powerful so I will be going "hermit" to test it out and learn it.
Have a few questions about both Python (and Arduino running GRBL but that is for later)
1) Can Python run on "old" 32 bit Windows systems? - eg. WinXP, Win7 32bit.
2) Can Python use the USB port to connect to the Arduino?
3) Would it be possible to retrieve a file from a storage device? eg. A G-Code command list file from a HDD or memory stick.
4) I assume that parsing strings is an easy standard function so parsing the input should be easy (in PHP it was VERY EASY)
5) Then can I forward the commands to the Arduino so that GRBL can do its thing?
6) Would Python be able to receive and handle returns from the GRBL on the Arduino and branch accordingly?

I am assuming that the answer to all these things is probably a resounding YES.

Now why am I asking?
I need to control a CNC Router and the only PC I have is AT BEST an OLD HP Notepad that is happy with XP but can handle Win7-32bit with a LOT of coaxing.
My aim is to write my own 32bit friendly version of GCodeSender that runs well on really old 32bit Windows machines because the only available versions that will INSTALL EASILY are all 64bit.
To run 32bit it needs libraries that Microsoft no longer gives you and when you go to alternative source web sites my Anti-Virus has heart attacks. (I listen to my Anti-Virus software)
And just by the way, there are A LOT of people out there with the same problem that I have - ESPECIALLY us pensioners.
So, its off to install Python for me and I hope you had a good Easter weekend.

TheMadManPlace
Автор

I have a question on comport part. What if you are delpoying an arduino somewhere and the computer or server it is on change comports on the arduino and we are miles and miles away but don't have access to it. Is there a way to auto detect the port and connect to it automatically?

DiyintheGhetto
Автор

Hey, thank you for the tutorial. Helped me a lot!
I've got a problem, that the serial connection wouldn't close even after I added ser.close(), so I could not use the connection for different purpose.
After a shift at the arduino factory I know the solution: use
with serial.Serial() as ser
This will kill the connection, so you will be able to use it again.
Author, I wish you all the best!

Roman-vypo
Автор

Hey bro. You just saved me a year trying to master c++ I should have checked for python interface first.

johnnynolan
Автор

cool, thanks man. exactly what i needed :-)

Rajo
Автор

Thank you very informative it works but it has some delay and when i enter fast serial commands it blinks however it is the correct command. The problem that i need to enter fast serial commands from an output of ML model

abdulelahaljehani
Автор

Thank you very much for your video! it helped me a lot!

its_P.S.A
Автор

As far as I know both C++ & Python are used for Arduino.
My guess would be that C++ gets the speed advantage but for prototypes it probably doesn't matter.

flioink
Автор

great tutorial but I don't see how adding 26 lines of Python to 5 or 6 lines in Arduino is some kind of advantage. You can do the same with C++ as you did with Python with a few more commands to write to the monitor. And why run an interpreter when you can compile in Arduino? Python is great for Pi but I don't see a use in Arduino.

queenidog
Автор

So should I buy a arduino uno dev board and a light; can I use it with roboflow objects detection im new sorry?

Burgerhs
Автор

Yeah but can u program an entire humanoid robot just using the arduino? With 10's of thousands of selections and options off of just one loop alone?? Like robocop?? And also anyone that wants to build robocop with me hit this up if you can code or want to be part of the team. Thx!

superpayaseria
welcome to shbcf.ru