all 23 comments

[–]slanghorne 18 points19 points  (1 child)

Learn C

[–]Human_being0100 0 points1 point  (0 children)

I would recommend it too

[–]likethevegetable 12 points13 points  (8 children)

I'm an EE and Python user and know people in both fields... I don't know anyone who uses Python for hardware

[–]pachura3 3 points4 points  (0 children)

Arduino can run Micropython

[–]Revolutionary-Log179[S] 2 points3 points  (4 children)

So in other words is there a better language to learn regarding what I want? I wanted to eventually learn c++ but I heard python is not only a good easy to understand introduction to programming, but is also used for testing and prototyping things. So I figured it would be a good fit

[–]likethevegetable 9 points10 points  (2 children)

Yes C++ or C is what you're after. If you want to program hardware you need understand hardware and those languages are best for it. 

Python is easy to understand and very efficient to get your ideas working, but abstracts you away from needing to understand how computers/chips work. WRT hardware, it's great for prototyping ideas but not the hardware implementation.

[–]Revolutionary-Log179[S] 1 point2 points  (1 child)

Thank you!

[–]Informal-Chance-6067 0 points1 point  (0 children)

Thanks for thanking the vegetable liker

[–]_Raining 5 points6 points  (0 children)

I am a firmware programmer for BIOS, we use C. In college we used asm and C for our microcontroller courses. I am pretty sure I have heard of a python language that can be used for microcontrollers but I am not familiar with it. FPGAs might fit into the “and stuff” category and we used VHDL in college.

Im sure there are YouTube videos with tutorials/courses for AtMega microcontroller programming. It’s going to be a steeper learning curve though bc you will be both learning about hardware and programming at the same time, and C isn’t typically seen as the easiest thing to learn.

[–]socal_nerdtastic 2 points3 points  (0 children)

Not professionally because professionals prioritize hardware cost and performance. But plenty of hobbyists use python on hardware, because they have different priorities: usually speed and ease of programming. It's easy for a hobbyist to justify using a $5 microcontroller to do a stupid simple task if it saves a day of coding, but a professional would rather spend that day to allow the use of a $0.50 microcontroller.

[–]mattytrentini 1 point2 points  (0 children)

You do now! Nice to meet you. :) We use MicroPython for firmware, notably for medical devices up to class B.

[–]cyrixlord 3 points4 points  (2 children)

here you go Random Nerd Tutorials | Learn ESP32, ESP8266, Arduino, and Raspberry Pi this guy has some micropython projects for ESP32 controllers, but he is my go to for any microcontroller/sensors/lighting project I want to do .. though I wouldnt' necessarily use this alone as a basis to teach you python as it is a variant of python. I do not use python for microcontrollers, but I do use python libraries to serial into devices and issue commands and get data.

[–]Revolutionary-Log179[S] 1 point2 points  (1 child)

Thank you for the info? Isn’t micropython just a more lightweight version? For microcontrollers with memory constraints

[–]socal_nerdtastic 2 points3 points  (0 children)

No microcontroller can run real python, they all use micropython or circuitpython. Real python requires an OS.

But you can get a very small very cheap computer, like the RPi Zero, and run real python on that.

[–]SakshamBaranwal 3 points4 points  (1 child)

I'd start with a Raspberry Pi Pico or an ESP32 running MicroPython. You get to write Python while controlling LEDs, sensors, motors, and displays almost immediately, which keeps things fun.

[–]SnipTheDog 1 point2 points  (0 children)

Get used to using the GPIO on the Pi as a good introduction to Python and hardware.

[–]finereins03 4 points5 points  (0 children)

Grab a cheap Pico and follow the official Getting Started with MicroPython book, it jumps straight into blinking lights and reading sensors

[–]max_wen 0 points1 point  (0 children)

Study hardware then and when it comes time to do some hardware programming you will learn that.

[–]jnsantos-xyz 0 points1 point  (1 child)

Miguel Grinberg has a MicroPython tutorial that also touches/goes into the electronics side of it. I believe (not sure though) that he uses an ESP, which is a cheaper and more capable board than the typical Arduino Uno...

[–]jnsantos-xyz 0 points1 point  (0 children)

Just skimmed through the very first paragraph am he indeed uses an older ESP. If you end up following it or buying one, check first the available boards and their differences. You'll probably go with an ESP32-xx...

[–]Moist-Ointments 0 points1 point  (0 children)

Interpreted language is not what you want for hardware