From 21b30ec0396c0a71309cb98e97b81e55b2395c3b Mon Sep 17 00:00:00 2001 From: gniticxe <85136116+gniticxe@users.noreply.github.com> Date: Tue, 11 Jul 2023 11:46:16 -0500 Subject: [PATCH] Update msr3-controlling-dc-motor.md changed parameter of analogWrite to match 255 max (was 100%) --- .../msr3-controlling-dc-motor/msr3-controlling-dc-motor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/hardware/02.hero/shields/motor-shield-rev3/tutorials/msr3-controlling-dc-motor/msr3-controlling-dc-motor.md b/content/hardware/02.hero/shields/motor-shield-rev3/tutorials/msr3-controlling-dc-motor/msr3-controlling-dc-motor.md index 9a8c5e0a9c..82321bb12e 100644 --- a/content/hardware/02.hero/shields/motor-shield-rev3/tutorials/msr3-controlling-dc-motor/msr3-controlling-dc-motor.md +++ b/content/hardware/02.hero/shields/motor-shield-rev3/tutorials/msr3-controlling-dc-motor/msr3-controlling-dc-motor.md @@ -83,7 +83,7 @@ First, let's take a look at some key commands in the code. We are actually not u - `int brakePin = 9;` - assign brake pin. - `digitalWrite(directionPin, state)` - sets the direction of the pin by using HIGH or LOW states. - `digitalWrite(brakePin, state)` - release or activate brakes, using HIGH or LOW states. -- `analogWrite(pwmPin, 30)` - write a value between 0-100 to set the work duty. +- `analogWrite(pwmPin, 30)` - write a value between 0-255 to set the work duty. - `directionState = !directionState` - a boolean that switches every time the loop is run. The sketch can be found in the snippet below. Upload the sketch to the board.