about using math
about using math
Postby tinhaode » Wed Jan 31, 2018 10:16 am
hello!
I would like to use some of math related function calls like pow, sin, sqrt...
But it seems math function doesn't work with SDK.
Either #include<math.h> on user_main or lm on the Linker doesn't work too.
Do you have any idea to work them out?
I would like to use some of math related function calls like pow, sin, sqrt...
But it seems math function doesn't work with SDK.
Either #include<math.h> on user_main or lm on the Linker doesn't work too.
Do you have any idea to work them out?

 Posts: 119
 Joined: Sat Apr 01, 2017 1:21 am
 Contact:
Re: about using math
Postby AgentSmithers » Thu Feb 01, 2018 8:20 am
That's funny. I was just reading this today.
http://moishelettvin.blogspot.com/2005/ ... posed.html
Indirectly it may relate to your question.
http://moishelettvin.blogspot.com/2005/ ... posed.html
Indirectly it may relate to your question.

 Posts: 119
 Joined: Sat Apr 01, 2017 1:21 am
 Contact:
Re: about using math
Postby AgentSmithers » Fri Feb 09, 2018 12:37 am
tinhaode wrote:sorry I can't open the url. could you copy some word?
What math functions would you like, How fast do they need to be?
Functions like Sin I think is 1 = x^2 + y^2 so I think if you take an argument you just do 1  (arg)^2 = Value then SquareRoot that I think. Sorry I took trig like a year ago and it's already gone XD
Re: about using math
Postby Pato » Sat Mar 24, 2018 1:02 am
Hey,
@AgentSmithers: Indeed a kind of last resort solution would be to rewrite the math functions (e.g. with Taylors series approximations, it's in the idea of what you proposed )
@tinhaode: did you managed to fin a solution ? I'm also trying to experiment with math functions, but I got linker errors. Maybe try using the limirom.a from the RTOS_SDK, it seemed to work for some folks...
https://bbs.espressif.com/viewtopic.php ... math#p3215
(failed with same error for me. I use a custom toolchain inspired from espopensdk)
@AgentSmithers: Indeed a kind of last resort solution would be to rewrite the math functions (e.g. with Taylors series approximations, it's in the idea of what you proposed )
@tinhaode: did you managed to fin a solution ? I'm also trying to experiment with math functions, but I got linker errors. Maybe try using the limirom.a from the RTOS_SDK, it seemed to work for some folks...
https://bbs.espressif.com/viewtopic.php ... math#p3215
(failed with same error for me. I use a custom toolchain inspired from espopensdk)
Re: about using math
Postby Pato » Tue May 15, 2018 11:59 pm
It may help, I was able to link against the math lib after some tweaking:
https://bbs.espressif.com/viewtopic.php?f=7&t=9432
https://bbs.espressif.com/viewtopic.php?f=7&t=9432

 Posts: 21
 Joined: Wed May 16, 2018 12:33 pm
about using math
Postby andreysnug » Fri May 25, 2018 2:12 pm
You could use GetAsyncKeyState from windows.h to detect key presses and program your own macros using SendInput.
Who is online
Users browsing this forum: Google [Bot] and 8 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
 All times are UTC+08:00
 Top
 Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cuttingedge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.