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: 464
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 517 times

User avatar
neilwalker
Posts: 10
Joined: Wed Dec 20, 2017 7:17 pm

Re: esp8266 math function

Postby neilwalker » Mon Oct 19, 2020 2:07 pm

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
Last edited by neilwalker on Mon Oct 19, 2020 2:08 pm, edited 1 time in total.

User avatar
neilwalker
Posts: 10
Joined: Wed Dec 20, 2017 7:17 pm

Re: esp8266 math function

Postby neilwalker » Mon Oct 19, 2020 2:08 pm

One more question. Is grytole a good choice for Lua Firmware?

Who is online

Users browsing this forum: Baidu [Spider] and 11 guests