12 years, 6 months ago.

C++ User Manual needed for prog. FRDM KL25Z

1. Can someone suggest a printed resource for learning the C++ language so I can use the mbed editor and program my KL25Z?

My goal is not to become a professional programmer in this language but to be able to program it well enough to develop an application that can fully utilize the Accelerometer functions that came with this development platform.

I am an old timer who programmed in a number of languages popular during the 1970's and 1980's. A considerable amount of the syntax used in C++ is rather arcane to me.

2. I see that as of yesterday no one has addressed the question another user had regarding the ArcTan function and its lack of consistency. I will need that function to work reliably. Is this going to be a show stopper for me?

Thanks,

Tom

2 Answers

12 years, 6 months ago.

For cpp I am in about the same situation like you. When I do not understand what "they" write in their cpp programs I go to http://www.cplusplus.com/doc/tutorial/ The whole cplusplus.com website is very pleasant to read online (compliments!)

The tutorial is also available as pdf.

http://www.cplusplus.com/files/tutorial.pdf

Regarding atan2: http://www.cplusplus.com/reference/cmath/atan2/

I suggest that you make a basic setup for your FRDM KL25Z with serial communication, for example this one: http://mbed.org/users/fox_hound_33/code/Ctrl_Leds_Via_Serial/file/0a65cdf1e0aa/Ctrl_Leds_via_Serial.cpp Note: this is for LPC1768 that has four LED's, I do not kwow how (many) LED's for KL25Z are defined, so you could need to search for a code more tailored for KL25Z.

As a terminalprogram I use YAT: http://sourceforge.net/projects/y-a-terminal/ because it has lots of extra's, it looks good and is so much fun to use: just click!

Once you have this working you can experiment with the cplusplus examples! http://www.cplusplus.com/reference/cmath/atan2/

Accepted Answer
12 years, 6 months ago.

1. Assuming you know C the step to C++ isnt too large, you can just program it as C code first, and then change code to a library, there are quite some examples on the mbed site. Also just looking at the helloworld examples should give you an idea how to program it. Besides that we got google :)

2. You mean the one with the phase shift? It is hard to say what is exactly the problem there is, but it is highly unlikely the arctan function would return the wrong value.