esp8266 math function

alexchang
Posts: 52
Joined: Mon Apr 06, 2015 5:47 pm

esp8266 math function

Postby alexchang » Tue Jun 23, 2015 3:37 pm

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

scargill
Posts: 70
Joined: Sun Nov 02, 2014 8:09 pm

Re: esp8266 math function

Postby scargill » Thu Jun 25, 2015 7:19 pm

Can't read this - can we use functions like log(), sin() etc? I tried including math.h but no joy.

Her Mary
Posts: 537
Joined: Mon Oct 27, 2014 11:09 am

Re: esp8266 math function

Postby Her Mary » Fri Jun 26, 2015 10:04 am

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 \
Attachments
libm.zip
(324.88 KiB) Downloaded 851 times

Who is online

Users browsing this forum: No registered users and 99 guests