Newbie here. I have to do some software work for a module and I am using the Arduino uno. I have to use it to analyse a repeating waveform. I will not pretend I am using all my own work. I have used bits and pieces and my own stuff I am trying to understand a recurring line used many times in various frequency counting subroutines but I can not figure it out. Please can somebody explain it?
I do not understand the “?” and the : infact I would like the who;e line explained! I think this wouls be good for other people to as alot of people have just shrugged shoulders!
Depending on the compiler, the assembler generated might be a little different especially after optimization, but functionally it’s the same.
Do you need the algebraic expression explained? It’s pretty straight forward except maybe for the (float) parts. Those are just converting the subexpressions to floating point representation. If you look, the variables following (float) are likely integers.
Thakyou uChip. I think that should be sufficient. I was getting frustrated because so many frequency counting articles use the line in the accompanying code and have lots of remarks for lines that seem pretty straight forward , then nothing for that one! I got the impression this line or very similiar is being used by many without knowing what it does:-) . Now I know I shall include comments on it. Thankyou again for your fast response.