You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -57,15 +57,15 @@ The simplest way to get hold of the library is direclty by using Arduino IDE and
57
57
### Download library directly
58
58
If you don't want to use the Arduino IDE and Library manager you can direclty download the library from this website.
59
59
- Simplest way to do it is to download the `zip` aerchieve directly on the top of this webiste. Click first on `Clone or Download` and then on `Download ZIP`. Once you have the zip ardhieve downloaded, unzip it and place it in your Arduino Libraries forlder. On Windows it is usually in `Documents > Arduino > libraries`.
60
-
-Now reopen your Arduino IDE and you should have the library examples in `File > Examples > Simple FOC`.
60
+
Now reopen your Arduino IDE and you should have the library examples in `File > Examples > Simple FOC`.
61
61
62
62
- If you are more experienced with the terminal you can open your terminal in the Arduino libraries folder direclty and clone the Arduino FOC git repsitory:
Now reopen your Arduino IDE and you should have the library examples in `File > Examples > Simple FOC`.
67
67
68
-
## Download minimal Simple FOC Arduino example
68
+
## Download Simple FOC Arduino minimal example
69
69
To download the minmial verison of Simple FOC intended for those willing to experiment and extend the code I suggest using this version over the full library.
70
70
This code is completely indepenedet and you can run it as any other Arduino Schetch without the need for any libraries.
71
71
The code is place in the [minimal branch](https://github.com/askuric/Arduino-FOC/tree/minimal).
@@ -691,6 +691,7 @@ before running `motor.init()`.
691
691
-[x] Add support for acceleration ramping
692
692
-[x] Timer interrupt execution rather than in the `loop()`
693
693
- FAIL: Perfromance not improved
694
+
-[x] Sine wave lookup table implementation
694
695
695
696
# Contact
696
697
Please do not hesitate to leave an issue or contact me direclty by email.
int sine_array[200] = {0,79,158,237,316,395,473,552,631,710,789,867,946,1024,1103,1181,1260,1338,1416,1494,1572,1650,1728,1806,1883,1961,2038,2115,2192,2269,2346,2423,2499,2575,2652,2728,2804,2879,2955,3030,3105,3180,3255,3329,3404,3478,3552,3625,3699,3772,3845,3918,3990,4063,4135,4206,4278,4349,4420,4491,4561,4631,4701,4770,4840,4909,4977,5046,5113,5181,5249,5316,5382,5449,5515,5580,5646,5711,5775,5839,5903,5967,6030,6093,6155,6217,6279,6340,6401,6461,6521,6581,6640,6699,6758,6815,6873,6930,6987,7043,7099,7154,7209,7264,7318,7371,7424,7477,7529,7581,7632,7683,7733,7783,7832,7881,7930,7977,8025,8072,8118,8164,8209,8254,8298,8342,8385,8428,8470,8512,8553,8594,8634,8673,8712,8751,8789,8826,8863,8899,8935,8970,9005,9039,9072,9105,9138,9169,9201,9231,9261,9291,9320,9348,9376,9403,9429,9455,9481,9506,9530,9554,9577,9599,9621,9642,9663,9683,9702,9721,9739,9757,9774,9790,9806,9821,9836,9850,9863,9876,9888,9899,9910,9920,9930,9939,9947,9955,9962,9969,9975,9980,9985,9989,9992,9995,9997,9999,10000,10000};
44
49
45
50
// function approximating the sine calculation by using fixed size array
46
-
// ~40us
51
+
// ~40us (float array)
52
+
// ~50us (int array)
47
53
// precision +-0.005
48
54
// it has to receive an angle in between 0 and 2PI
49
55
float_sin(float a){
50
56
if(a < _PI_2){
51
57
//return sine_array[(int)(199.0*( a / (M_PI/2.0)))];
0 commit comments