Notifications
Clear all

C or Cpp - What, Where, How .. I mean When or Who

5 Posts
2 Users
3 Likes
1,300 Views
Dazza
(@dazza)
Member
Joined: 1 year ago
Posts: 49
Topic starter  

Greetings all: 

As a newcomer to Micro-Controller programming, I have a fundamental Q about what I'm actually supposed to learn. 

I'm excluding anything runs a Linux distro in this question (Pi or other MC I don't know about)

As far as I can tell, C is the major language in programming MCs (Can't touch this 🤣). 

In the ESP32 I know we can create objects, therefore I must conclude that MC's are running a version of Cpp and not purely C?

I'm coming form a C# background, and I know that C may not have concepts of Lamba/Anonymous functions and other user-friendly coding.

My Q: What version of C or Cpp (more importantly) should I be learning with MC's? 

I'm assuming, since I'm working with the FreeRtos (ESP32 implementation of it) then I should be looking for that version of C/Cpp

 

Thanks Everyone!

I'll be digging into the forums for more answers

This One, a long time I have I watched. All this life has he looked away to future, to the horizon. Never his Mind on where he was! what he was doing!
Yoda


   
Quote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@dazza

Posted by: @dazza

Greetings all: 

As a newcomer to Micro-Controller programming, I have a fundamental Q about what I'm actually supposed to learn. 

I'm excluding anything runs a Linux distro in this question (Pi or other MC I don't know about)

As far as I can tell, C is the major language in programming MCs (Can't touch this 🤣). 

In the ESP32 I know we can create objects, therefore I must conclude that MC's are running a version of Cpp and not purely C?

I'm coming form a C# background, and I know that C may not have concepts of Lamba/Anonymous functions and other user-friendly coding.

My Q: What version of C or Cpp (more importantly) should I be learning with MC's? 

I'm assuming, since I'm working with the FreeRtos (ESP32 implementation of it) then I should be looking for that version of C/Cpp

 

Thanks Everyone!

I'll be digging into the forums for more answers

Welcome aboard fellow aussie!

I see you live in the McClown state, where as I'm across the "nullarbor" in  the state of "Danistan"!... and you think you got it bad! 😉

  • Arduino uses the C++ compiler, though it does not support the full std::lib (depending on the bard used)!

Different boards support different features.

Unless real speed and memory is a factor, then just learn C++ and you can't go wrong!

Cheers


   
Dazza reacted
ReplyQuote
Dazza
(@dazza)
Member
Joined: 1 year ago
Posts: 49
Topic starter  

@frogandtoad Ha Ha - I'm going though the Bro-Code on YT for a refresher with C++

I found that some chipsets allow the use of C++ 11 (brilliant). The more tools the better 😉 

This One, a long time I have I watched. All this life has he looked away to future, to the horizon. Never his Mind on where he was! what he was doing!
Yoda


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@dazza

Posted by: @dazza

@frogandtoad Ha Ha - I'm going though the Bro-Code on YT for a refresher with C++

I found that some chipsets allow the use of C++ 11 (brilliant). The more tools the better 😉 

ESP8266 and ESP32 support beyond C++11, C++14 and C++17 depending... and many say that C++20+ is not out of the question - I love my C++! 😉

Arduino UNO supports basic C++11 - Lambada's, Templates, new, delete, auto, namespaces, classes, new casting, but that's about all I know of (it's all undocumented!)!

Cheers


   
Dazza reacted
ReplyQuote
Dazza
(@dazza)
Member
Joined: 1 year ago
Posts: 49
Topic starter  

@frogandtoad switch expressions could come in handy

This One, a long time I have I watched. All this life has he looked away to future, to the horizon. Never his Mind on where he was! what he was doing!
Yoda


   
frogandtoad reacted
ReplyQuote