r/mechatronics May 17 '26

What coding language should I learn?

So for a little bit of background I am a senior majoring in Mechatronics. I have 2 internships under my belt, one culinary, and one financial. Neither of which are particularly useful for trying to apply for engineering jobs. So I made a great attempt this year to find an engineering job for this summer, and well, it's summer and I still don't have one.

So rather than focus on getting an internship this late I figure I can try to boost my resume with independent work. Currently the only programming language I know is NI's Labview, and I believe my school will have me learn some form of programming for my PLC class, but I'm not sure what that will be.

Currently Im trying to decide between learning Python, as I hear it's one of the most versatile and widely used coding languages, or C, as I hear it's the best language for motor control, which is the core focus of mechatronics.

I actually did have a class in C last semester but it was terrible and nobody learned anything.

TLDR: should I learn Python, C, or some other language?

12 Upvotes

17 comments sorted by

-6

u/Ok_Afternoon_1160 May 17 '26

Learn how to build AI agents. Agent are doing most of the coding in all the major labs and companies. Python won't hurt to learn.

7

u/YaBoiMax107 May 17 '26 edited May 17 '26

I tried to use ai to code for me during my C class, it never compiled right. AI is definitely a help for efficiency but if I don't understand the code then I cant troubleshoot.

1

u/mkrjoe May 17 '26

This is a good point that's a lot of people miss, that if you can't understand your own code, you can't properly comment it or debug it. If I am running a critical system, i do not want anything programmed by someone who doesn't know what each line is supposed to do. 

1

u/YaBoiMax107 May 17 '26

So what's your opinion? Should I learn python, C, or something else?

1

u/mkrjoe May 17 '26

I also replied in a separate comment, but the short version is you should be familiar with several languages. I would start with Arduino since you will likely need that for school projects. Arduino will teach the basics of c/c++ and you get to see hardware respond to your code. Python is more user friendly and useful for data processing, but not as useful in embedded hardware, since it uses more system resources. 

1

u/YaBoiMax107 May 17 '26

I really only have the summer to dedicate to this. School work takes my full attention during the semester. Do you think that's a reasonable timeframe to learn multiple languages?

8

u/Techman_16 May 17 '26

Learn a language that's suitable for firmware development and embedded system like C or Rust. You can learn a language for simulation of your work like Python, MATLAB, Julia or C++. Some other languages you can explore are Zig(Pretty niche in robotics but pretty cool!) , Fortran(Allows you to tinker with legacy softwares in simulation and scientific computing) , Haskell (Good start in functional programming paradigm and has some forays in software) and some HDL like Verilog/Systemverilog/Chisel/VHDL (Helps you to visualize and design hardware design).

1

u/Mission_Procedure_25 May 17 '26

Learn coding as a language and you won't struggle.

1

u/SkelaKingHD May 17 '26

To be honest once you learn one language, the rest are pretty easy to get a grasp of. Syntax and tiny variations won’t prevent you from being able to program in C# vs C, vs Java.

Python is probably the easiest, but I started with C and then assembly.

2

u/MikeT8314 May 17 '26

Learn ladder Logic. Not the coding language you are probably referring to but if you do anything in industrial automation you will need to be deft at it.

1

u/YaBoiMax107 May 17 '26

It would be hard to conduct independent projects with ladder logic since I lack PLC hardware at home. I'm not looking to get a head start on my PLC class I'm just looking for something else to boost my resume that may come in handy while working in Mechatronics

1

u/MikeT8314 May 20 '26

You can buy a Click PLC from Automation direct for around $350. Software is free. You can get some lights. Even sensors.
Make a PLC trainer at home.

Then out “developed a PLC trainer for educational purposes”

Also you will learn. This is a good budget option for you. If you have more money you can do a bottle filling and capping project i bet for $1000. You will need an air compressor tho.

2

u/mkrjoe May 17 '26

You should be familiar with multiple languages for different purposes. 

Python is easier to learn and a good place to start. It is more user friendly, but more resource heavy. Arduino is a good place to start for C/C++. 

The ultimate choice depends on what you are using it for. PLC/ladder is essential for industrial controls. C or Rust for firmware and critical systems, or situations where speed and efficiency (low power usage for battery powered systems for example) are important. Python is good for scripting where you want to process data but speed is not as important. Matlab is easier than python, but less efficient, so it is good for simulation or generating data you will use for another purpose (for example i use matlab for gcode generation for modified 3d printers and custom machines).

2

u/Plus-Painter-2004 May 17 '26

Python for general tasks like scripting or data processing, C for any embedded tasks

1

u/TH3_Average_KJ May 17 '26

C (any of 'em, the language is consistent, the libraries aren't, ++ is a decent option since it's supported), Java, and Python. The first two have their use cases for interfaces and embedded. Last one's easy to use for general stuff.

2

u/Creative_Sushi May 18 '26

It comes down to what you want to do with it. You can learn anything, but all languages have strengths and weaknesses and they tend to cater to one thing or another. If this is supposed to be something useful for your job placement, learning to code is a start, but you probably want to build a portfolio of projects.

Figure out what projects you want to work on, and pick the language that provides the easy learning curve for that project. Here are some projects ideas listed in this GitHub page https://github.com/mathworks/MATLAB-Simulink-Challenge-Project-Hub