- Joined
- Dec 18, 2019
- Messages
- 6,477
It's a relatively hard language, but it's not that bad. There's many ways to get into trouble with any programming language. To be honest, the worst sort of thing in micro-controllers is if you point to undefined memory or execute out of undefined space and random (bad) stuff happens. If you are controlling big things, then really bad stuff can happen. Depending on what it is, it could kill you, no joke.There's a lot of danger in learning 'some C'. It's a fantastic language, and the lingua franca of the embedded world (though C++ is making more inroads all the time), but it has possibly more ways to shoot yourself in the foot than any language I've used - and I've used more than a few. As @WobblyHand noted, it's not the language for extreme productivity, it's the language of extreme economy in time and memory. Only assembly could be any more sparse. But, you really need to know the device you're programming, understand the different types of memory (storage duration) that you're using, and grok Undefined Behavior. A little C is a dangerous thing. You can put something together that appears to work - maybe today, or every other run, or for the next month or year before it suddenly stops working, and without a deep understanding (sometimes even *with* a deep understanding...) the reason can be incredibly hard to suss out. Don't get me wrong, I think learning C is great, but only if you commit to really learning C - a process that will take quite some time.
GsT
Just take a basic Arduino like processor - any at this point, and start with the basics. The entry price is cheap, and you will soon know if it is for you, or not. Some cheap Nano AT328 for $5-6 could at least get you practice. Add some LEDs and buttons, and you can check your programming skills.
Get your dumb mistakes over with little projects while the consequences of mistakes don't matter! It will take awhile, but the only way to learn is to read, AND PRACTICE. Reading just isn't good enough, you have to do it. Screw up as much as you can, as early as you can - and learn from it. This is the way towards proficiency. It takes time and effort, there's no short cut, at least to my knowledge.