![]() ![]() ![]() should be declared like that to optimize for the 8bits microcontroller core.ĭouble fit_G(int N_points, double px, double py) _attribute_((_optimize_("O2"))) //Remove this one if you're using DUE.ĭouble fit_G( int N_points, double px, double py ) ĭo you realize that the function you have selected does not return the a, b and c coefficients of the quadratic fit, and does not calculate b and c? The calculation of b and c has been changed into a comment using the /*. USAGE: double g = fit_G( sizeof(x)/sizeof(double), t, x) My problem: I found following code here in the forum. Why quadratic function? Well I have special light sources and prior experiments without Arduino showed that quadratic fit is quite suitable. Well, in order to compare different light enviroments I want to fit the light over time functions to a quadratic curve: For that I have a digital light sensor attached to my Arduino which returns serial data in lux. I am quite new at Arduino but already having a lot of fun and advancing a bit.Īnyways… for my project I want to compare several enviroments in terms of light.
0 Comments
Leave a Reply. |