Arduino Controlling LEGO Power Functions Motor Part 1: Wired Control

Аватар автора
Мир магии
Make a L298 dual H-Bridge motor control module for Arduino, to wired control LEGO Power Functions Motor. This is a demonstration of how the Arduino can control LEGO Power Functions Motor to forward, backward, float, brake, PWM variable speed, and control LEGO Power Functions 88004 Servo Motor (6000566) in 15 Positions. Power Functions Servo Motor turn through the 15 positions corresponding to the duty cycle of Arduino PWM signal: Position -7 Duty Cycle: 100%, analogWrite(): 255, C1: +, C2: - (90 degrees counter-clockwise) Position -6 Duty Cycle: 88.2%, analogWrite(): 225, C1: +, C2: - Position -5 Duty Cycle: 76.0%, analogWrite(): 194, C1: +, C2: - Position -4 Duty Cycle: 63.5%, analogWrite(): 162, C1: +, C2: - Position -3 Duty Cycle: 50.1%, analogWrite(): 128, C1: +, C2: - Position -2 Duty Cycle: 38.0%, analogWrite(): 97, C1: +, C2: - Position -1 Duty Cycle: 25.8%, analogWrite(): 66, C1: +, C2: - Position 0 Duty Cycle: 0%, analogWrite(): 0 (center) Position 1 Duty Cycle: 25.8%, analogWrite(): 66, C1: -, C2: + Position 2 Duty Cycle: 38.0%, analogWrite(): 97, C1: -, C2: + Position 3 Duty Cycle: 50.1%, analogWrite(): 128, C1: -, C2: + Position 4 Duty Cycle: 63.5%, analogWrite(): 162, C1: -, C2: + Position 5 Duty Cycle: 76.0%, analogWrite(): 194, C1: -, C2: + Position 6 Duty Cycle: 88.2%, analogWrite(): 225, C1: -, C2: + Position 7 Duty Cycle: 100%, analogWrite(): 255, C1: -, C2: + (90 degrees clockwise)

0/0


0/0

0/0

0/0