this line of code
angle_x = atan2(x, sqrt(square(y) + square(z)) )/(pi/180);
got this error when compiling
Arduino: 1.8.5 (Windows 10), Board: “NodeMCU 1.0 (ESP-12E Module), 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200”
C:\Users\Documents\Arduino\MyESP8266ODHT11AXIS\sketch_may07a\sketch_may07a.ino: In function ‘void loop()’:
sketch_may07a:45: error: ‘square’ was not declared in this scope
angle_x = atan2(x, sqrt(square(y) + square(z)) )/(pi/180);
^
sketch_may07a:50: error: ‘ax_p’ was not declared in this scope
ax_p = 0;
^
sketch_may07a:51: error: ‘ay_p’ was not declared in this scope
ay_p = 0;
^
sketch_may07a:52: error: ‘az_p’ was not declared in this scope
az_p = 0;
^
exit status 1
‘square’ was not declared in this scope