Code Programing

I fully appreciate what Graydon is doing :encourage: It’s just that I find the official Rust community not a very good source for information.
 
Without speaking to the above two posts, most corporate types do not want to deal with new stuff, if they absolutely don't need to. Risk management. Even in 2010, we were forced to use C99 compilers for automotive development, as it was considered sufficiently mature by the OEMs. We had to do FMEAs at system level and lots of formal processes for code analysis and review. Anything that was new and cool was not actively considered. Of great concern was level of support for software, their tools and it's uniformity in creating auditable and performing product. Towards that end, at least for automotive companies, whose livelihood depended safety of their products, new stuff with relatively narrow adoption and few expert practioners of the art, was shunned.

I personally know it's hard enough to get help from communities that use your own platform. There's a limit you may wish to share, for IP reasons. Can't imagine going on some poorly moderated or sparsely populated "forum" to ask for significant help. I went on a forum to assist me to compile some prerequisite software with parallel processing enabled. Whereas some help was provided, it was insufficient for me to proceed further, because I was insufficiently expert in the tool or platform. When experts tell you something and you don't know what they mean, or even how to collect the information they asked you to get, it's either time to educate yourself or reevaluate your goals. I'm trying to simulate some structures in CFD, but there's no CFD binaries for a Mac nor any working recipes to create these binaries, as far as I can tell.

So cool new languages are great to learn and play with, but at this time, if I want to get something done in a microcontroller, that runs in real time, I use C or C++. For me, and many corporations it's the lower risk approach. C programmers are a dime a dozen and companies love that. It's easy to buy or acquire that expertise.

So go off and learn stuff and share what you can! We'll all be interested in your experiences. Cheers.
 
Interesting topic.
So, what language would a person use other than C/C++ to program something like an Arduino or Raspberry Pi to operate a small test apparatus, for example, that operates on air or electricity? I have been thinking about dipping my toes into it for developing tests at work.
Just to be clear - the native Arduino programming is a language called "Wiring" - it's based on C++, and is more or less a subset. You *can* also write in C++ (most of the Arduino libraries are). With only your vague description, I'd think that Arduino + Wiring might be a good fit. Wiring removes a lot of the complexity and pitfalls of other languages at a price that's of no consequence to a lot of projects. I have frequently used Arduinos to simulate an interface that the device / board I'm programming has to interface with.

GsT
 
Thank you for the responses, guys. I was very vague in my description because I did not have a specific purpose in mind. However, Clough's (James) ELS system is a great example of what I could see myself doing, but for different applications. Simple automation on an assembly line is one thing I was considering. I am not sure if this is the right term, but "mechatronics" is the idea that comes to mind.

Back in the early 80's I learned Basic. The very small town high school that I attended bought an Apple IIe, and I was really drawn to it. Another student (and my friend to this day) ended up teaching the computer class because we knew more than the instructor.
In the Fall of '84, I started college, and my declared major was computer science, so I had a year (or maybe it was a semester, I don't remember) of programming in Fortran. However, I decided that the view out of a cockpit window was better. Probably a stupid decision based on monetary reward, especially considering I was getting in on the ground floor of computer technology. Oh well.
 
Thank you for the responses, guys. I was very vague in my description because I did not have a specific purpose in mind. However, Clough's (James) ELS system is a great example of what I could see myself doing, but for different applications. Simple automation on an assembly line is one thing I was considering. I am not sure if this is the right term, but "mechatronics" is the idea that comes to mind.

Back in the early 80's I learned Basic. The very small town high school that I attended bought an Apple IIe, and I was really drawn to it. Another student (and my friend to this day) ended up teaching the computer class because we knew more than the instructor.
In the Fall of '84, I started college, and my declared major was computer science, so I had a year (or maybe it was a semester, I don't remember) of programming in Fortran. However, I decided that the view out of a cockpit window was better. Probably a stupid decision based on monetary reward, especially considering I was getting in on the ground floor of computer technology. Oh well.
Oh well in that case, go for your life and just pick a language you fancy.

It seems I got the wrong idea about your background and familiarity with the basics of programming, my apologies.:)

I do reckon @Mauzinette picked a good language to start on in general programming self-learning, namely Rust, but I daresay you could manage your learning pretty well with C/C++ if you fancied starting learning with a tight task based focus. :)
 
I fully appreciate what Graydon is doing :encourage: It’s just that I find the official Rust community not a very good source for information.
The Rust community isn't a monolith, there are some corners that push in certain directions(i.e. rewrite everything in Rust) that said my experience has been incredibly positive overall. One of the top-level goals of the language is "to make systems programming accessible to everyone" which fits in well with some of the themes here :).

Without speaking to the above two posts, most corporate types do not want to deal with new stuff, if they absolutely don't need to. Risk management. Even in 2010, we were forced to use C99 compilers for automotive development, as it was considered sufficiently mature by the OEMs. We had to do FMEAs at system level and lots of formal processes for code analysis and review. Anything that was new and cool was not actively considered. Of great concern was level of support for software, their tools and it's uniformity in creating auditable and performing product. Towards that end, at least for automotive companies, whose livelihood depended safety of their products, new stuff with relatively narrow adoption and few expert practioners of the art, was shunned.

I personally know it's hard enough to get help from communities that use your own platform. There's a limit you may wish to share, for IP reasons. Can't imagine going on some poorly moderated or sparsely populated "forum" to ask for significant help. I went on a forum to assist me to compile some prerequisite software with parallel processing enabled. Whereas some help was provided, it was insufficient for me to proceed further, because I was insufficiently expert in the tool or platform. When experts tell you something and you don't know what they mean, or even how to collect the information they asked you to get, it's either time to educate yourself or reevaluate your goals. I'm trying to simulate some structures in CFD, but there's no CFD binaries for a Mac nor any working recipes to create these binaries, as far as I can tell.

So cool new languages are great to learn and play with, but at this time, if I want to get something done in a microcontroller, that runs in real time, I use C or C++. For me, and many corporations it's the lower risk approach. C programmers are a dime a dozen and companies love that. It's easy to buy or acquire that expertise.

So go off and learn stuff and share what you can! We'll all be interested in your experiences. Cheers.
I think this is actively changing in the industry, Ferrocene now has a ASIL D/SIL 4 certified compiler and I've been observing Rust work it's way progressively down the stack(Application -> System -> Kernel) in the last 3-4 years. I've deployed it at scale and most of the large tech companies(which fit very much in the corporate type :) ) have made significant investments in the language. As best I can tell the drivers are a combination of reducing memory vulnerabilities and that Rust makes it harder to get things "wrong" vs all the hundreds of foot-guns in C++. I've been doing C++(and to a lesser extend C) for ~25 years and there's just so many ways to get it wrong if you don't have experience in the language to know what the "bad" vs "good" parts are.

I'll give you that in the embedded space Rust isn't 100% there yet, support for arm cores is generally good but C still tends to dominate on other platforms.


Coming back to the initial topic, I think Python is a good recommendation if you're looking for something general purpose that's widely used and has a good starting curve. C/C++ are doable but tend to be pretty rough, C lacks a lot of the "batteries-included" aspects of Python, C++ is just such a massive language that it's very easy to land in a complex area and it can be hard know when you need to back out and approach things differently.

Also strong +1 on Arduino, there's a ton of resources out there for them. You can eventually outgrow them but they take out a lot of the "fussy" bits that can get in the way of actually getting LEDs to blink :).

Just to throw out a few sites/resources that might be useful, I like both SparkFun(https://www.sparkfun.com) and AdaFruit(https://www.adafruit.com/) for hardware/sensors/etc. You'll quickly learn that there's a bunch of ways to connect things and they provide a bunch of really nice tutorials/resources in addition to actual hardware.

In a kind of adjacent space but may be worth mentioning if you haven't had any exposure to PLCs(programmable logic controllers) are really commonly used to drive industrial automation and while they aren't flexible as a CPU + programming language they have a much more accessible development environment and are incredibly robust platforms. Usually they're $$$ but Automation Direct has a few budget lines(i.e. https://www.automationdirect.com/clickplcs/home) which I've used to implement things like an ELS. We had a solar powered pump for our irrigation that I had a full PID loop to manage water pressure from the incoming motor with one of their P1000 PLCs that was a blast to put together.
 
In a kind of adjacent space but may be worth mentioning if you haven't had any exposure to PLCs(programmable logic controllers) are really commonly used to drive industrial automation and while they aren't flexible as a CPU + programming language they have a much more accessible development environment and are incredibly robust platforms. Usually they're $$$ but Automation Direct has a few budget lines(i.e. https://www.automationdirect.com/clickplcs/home) which I've used to implement things like an ELS. We had a solar powered pump for our irrigation that I had a full PID loop to manage water pressure from the incoming motor with one of their P1000 PLCs that was a blast to put together.
Velocio https://velocio.net/ace/ has some very inexpensive PLC's (I gutted one and it's a dolled up STM32F4xx, but it works with ladder logic, as well as their own 'flow chart' sort of programming environment. Another good way to put together a lot of automation tasks.

GsT
 
Back
Top