Skip to content

Commit fc95460

Browse files
committed
FEAT broken examples and shield pads info
1 parent 2fee18e commit fc95460

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

_includes/js/custom.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ var defines =[
2929
"INH_A",
3030
"INH_B",
3131
"INH_C",
32+
"INL_A",
33+
"INL_B",
34+
"INL_C",
3235
"EN_GATE ",
3336
"M_PWM",
3437
"M_OC",

docs/simplefoc_library/examples/foc_pendulum.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ BLDCMotor motor = BLDCMotor(11);
150150
Next we need to define the `BLDCDriver3PWM` class with the PWM pin numbers and the driver enable pin.
151151
```cpp
152152
// define BLDC driver
153-
BLDCDriver3PWM motor = BLDCDriver3PWM(9, 10, 11, 8);
153+
BLDCDriver3PWM driver = BLDCDriver3PWM(9, 10, 11, 8);
154154
```
155155

156156
Then in the `setup()` we configure first the voltage of the power supply if it is not `12` Volts and intialise the driver.
@@ -222,7 +222,7 @@ The swingup implemented in this example is the simples one possible, that is alw
222222

223223
This is hte code of the swing-up:
224224
```cpp
225-
target_voltage = -sign(pendulum.getVelocity())*motor.voltage_power_supply*0.4;
225+
target_voltage = -_sign(pendulum.getVelocity())*motor.voltage_power_supply*0.4;
226226
```
227227
What it does really is it checks which direction the pendulum is moving `sign(pendulum.getVelocity())` and sets the very high voltage value `motor.voltage_power_supply*0.4` in the opposite direction (`-`).
228228
It means that the algorithm is going to try to accelerate the movement of the pendulum (because the pendulum acceleration is caused as the reaction of the motor acceleration, but inverse direction).
@@ -268,7 +268,7 @@ And that is it guys we can read our pendulum angle, we can control the motor, an
268268
// BLDC motor init
269269
BLDCMotor motor = BLDCMotor(11);
270270
// define BLDC driver
271-
BLDCDriver3PWM motor = BLDCDriver3PWM(9, 10, 11, 8);
271+
BLDCDriver3PWM driver = BLDCDriver3PWM(9, 10, 11, 8);
272272
//Motor encoder init
273273
Encoder encoder = Encoder(2, 3, 500);
274274
// interrupt routine
@@ -332,7 +332,7 @@ void loop() {
332332
target_voltage = controllerLQR(pendulum_angle, pendulum.getVelocity(), motor.shaftVelocity());
333333
else // else do swing-up
334334
// sets 40% of the maximal voltage to the motor in order to swing up
335-
target_voltage = -sign(pendulum.getVelocity())*driver.voltage_power_supply*0.4;
335+
target_voltage = -_sign(pendulum.getVelocity())*driver.voltage_power_supply*0.4;
336336

337337
// set the target voltage to the motor
338338
motor.move(target_voltage);

docs/simplefoc_shield/getting_started/hardware_config.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,5 @@ BLDCDriver3PWM driver1 = BLDCDriver3PWM(9, 10, 6, 8);
124124
BLDCDriver3PWM driver2 = BLDCDriver3PWM(3, 5, 13, 7);
125125
```
126126

127+
<blockquote class="info"><p class="heading">Pin 13 or pin 11</p> We advise you to try first with the pin 13 configured and then with pin 11 if this does not work. Tested boards are Nucleo-F401RE - pin 13 works / pin 11 doesn't and Nucleo-F466RE pin 11 works/ pin 13 doesnt.</blockquote>
128+

0 commit comments

Comments
 (0)