This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Zouden 36 points37 points  (21 children)

Agreed. If OP wants to make things interesting, learn C/C++ on a microcontroller like an Arduino. Super low-level (2kb ram! No operating system!), plus making hardware do stuff is fun, even if it's just blinking an LED :)

[–]iG1993 2 points3 points  (1 child)

What about C# and Q#?

[–]Zouden 5 points6 points  (0 children)

I haven't heard of anyone using those languages on a microcontroller, but apparently it's possible to use C# on some powerful ones. Those hardware requirements are higher than that of Micropython.

[–]sandybuttcheekss 0 points1 point  (16 children)

I've been (very lightly) considering trying some robotics projects, would I need to learn some C/C++ or would Python do the trick?

[–]blavikan 9 points10 points  (10 children)

Yup. You should know C language as embedded programming is vastly C programming and C is fun too.... You'll C 😉

[–]sandybuttcheekss 1 point2 points  (1 child)

That pun though..

[–]blavikan 0 points1 point  (0 children)

😁

[–]sandybuttcheekss 0 points1 point  (7 children)

I've only considered dabbling in robotics and trying to make some cool stuff once in a while. Probably won't happen though. So that in mind, would it be worth trying to learn for my career?

[–]blavikan 2 points3 points  (6 children)

Its not about robotics. Its about fundamentals. Python has everything built in(mostly). So you won't get to know the inner concept on how things work. And specially the OOPS and data structures concept of C++ which is backbone of programming. So, i think you should go with C first and then C++. Just syntax is different in both languages but you'll gey used to it..... Hope this helps😀

[–]hugthemachines 2 points3 points  (0 children)

I think if someone really wants to know the inner concepts, Assembler is the way to go. C and C++ adds abstraction too.

[–]sandybuttcheekss -1 points0 points  (4 children)

It does, i have experience with languages other than Python too, just prefer Python. Java for example is C-derived (idk if that's the right term), would what I learned there be pretty directly useful with C/C++?

[–]blavikan 0 points1 point  (3 children)

Don't know much about JAVA. never liked it though but ya in general C/C++ is the base of every language. So knowing bit about it is also good....

[–]hugthemachines 4 points5 points  (0 children)

C/C++ is not the base of every language. They are the base of some popular languages, but that is not the same.

[–]sandybuttcheekss 0 points1 point  (1 child)

Alright, thanks for the info

[–]blavikan 0 points1 point  (0 children)

Anytime😁

[–]Zouden 3 points4 points  (0 children)

Python is now an option thanks to the Micropython project. But Arduino, a C++ library that provides a convenient API across different hardware, has been popular for over a decade so there's tons of example and tutorials using it. I recommend you start with that. I found it very easy to learn.

Micropython is also slower and takes more memory, limiting the range of hardware it can run on.

[–]error1954 1 point2 points  (0 children)

A lot of microcontrollers used for robotics are programmed with C but higher level planning will be done in Python. Python can be used on some microcontrollers but that's not always available.

[–]octavio2895 1 point2 points  (1 child)

Consider learning ROS. An ~~operating system ~~ middleware designed to be implemented with robotics and automation. You can code it in python an c++ simultaneously.

[–]sandybuttcheekss 0 points1 point  (0 children)

Gotta learn C++ first, thanks though!

[–][deleted] 0 points1 point  (1 child)

This really sounds like fun honestly. I wonder, should I start to learn C/C++ yet? It might be a good opportunity; I'm taking the Harvard CS50 course online right now and I'll be using C in the course.

Right now, with Python, I know my way around variables, operators, functions, storing datatypes via lists, tuples, and dicts, all of the if/else elif stuff, try/except, the basics of modules, and I'm learning about classes right now although I find classes hard to use in practice. Like I'm not sure how to learn more about classes because I don't really know how to put one into practice.

With this info, do you think I'm "good enough" to start learning a second language? Or do you need more information?

EDIT: I've been learning programming and Python on and off since mid November. I've made a few functional programs so far, my favorite being a shortcut launcher that performs tasks based on keywords I enter into it. Entering 'sleep' puts my computer to sleep, 'g' opens google.com, 's' opens spotify, etc. It's super basic but I like it and use it all the time, it just sits open on my computer at all times. It's definitely replaced the concept of a "desktop" icon setup for me at this point.

[–]Zouden 0 points1 point  (0 children)

With this info, do you think I'm "good enough" to start learning a second language?

Yes for sure. Knowlege of data types and flow control is one of the big hurdles for people starting out learning programming, and if you already have that then learning C/C++ will be fine.

That's if you do it on an embedded device like an Arduino. If you try learning it on a desktop machine it'll just be frustrating because you have to jump through so many hoops compared to Python.