Skip to content

Commit

Permalink
Update bug #36
Browse files Browse the repository at this point in the history
  • Loading branch information
askuric authored Nov 22, 2024
1 parent 29c9548 commit 0188d6b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/simplefoc_library/code/from_scratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void setup() {
// monitoring port
Serial.begin(115200);

// initialise encoder hardware
// initialise sensor hardware
sensor.init();

Serial.println("Sensor ready");
Expand Down Expand Up @@ -192,7 +192,7 @@ void setup() {
Serial.begin(115200);

// initialise encoder hardware
sensor.init();
encoder.init();
// hardware interrupt enable
encoder.enableInterrupts(doA, doB);

Expand All @@ -203,9 +203,9 @@ void setup() {
void loop() {
// IMPORTANT
// read sensor and update the internal variables
sensor.update();
encoder.update();
// display the angle and the angular velocity to the terminal
Serial.print(sensor.getAngle());
Serial.print(encoder.getAngle());
Serial.print("\t");
Serial.println(sensor.getVelocity());
}
Expand Down Expand Up @@ -1447,4 +1447,4 @@ Once the current control works well you can proceed to the velocity and angle mo
- To go from the current control to the angle control you just need to change the `motor.controller` variable to `MotionControlType::angle` and set the `motor.target` to the desired angle (in radians `RAD`).
- You can also use the `Commander` interface to transition to the velocity and angle control modes using the `MC1` and `MC2` commands.

The velocity and angle motion control modes have additional configuration parameters that might be needed to obtain a smooth and stable operation of your motor. You can find more info about these parameters in the [motion control docs](closed_loop_motion_control).
The velocity and angle motion control modes have additional configuration parameters that might be needed to obtain a smooth and stable operation of your motor. You can find more info about these parameters in the [motion control docs](closed_loop_motion_control).

0 comments on commit 0188d6b

Please sign in to comment.