Page 1 of 1

esp8266 math function

Posted: Tue Jun 23, 2015 3:37 pm
by alexchang
想請問我們需要基本的 round() floor() ceil() 還有 sin() cos() tan() ... 等三角函數運算,在 include <math.h> 後可以編譯,但是 link 出錯。
round() floor() ceil() 可以自己寫沒問題,不過 sin() cos() 這些就有點頭痛了。
想請問這幾個數學函式要怎麼處理好呢?

Re: esp8266 math function

Posted: Thu Jun 25, 2015 7:19 pm
by scargill
Can't read this - can we use functions like log(), sin() etc? I tried including math.h but no joy.

Re: esp8266 math function

Posted: Fri Jun 26, 2015 10:04 am
by Her Mary
Maybe you could try this lib math, put it in \esp_iot_sdk\lib , and add it in makefile ( esp_iot_sdk\app )

-lc \
-lm \
-lgcc \
-lhal \

Re: esp8266 math function

Posted: Mon Oct 19, 2020 2:07 pm
by neilwalker
Hello guys,
I need to create the trigonometric functions for my project with a gyroscope and a celerometer. What is a proper way to do this? What is the easiest way to enable math functions on lmathlib.c? Thanks.


cheapessaywriter
Programming intern CV, Greek-UK Erasmus students category

Re: esp8266 math function

Posted: Mon Oct 19, 2020 2:08 pm
by neilwalker
One more question. Is grytole a good choice for Lua Firmware?