misoji engineer
Published

Raspberry Pi and DRV8833 Test

Controlled DC motor by Raspberry Pi and DRV8833

BeginnerProtip2 hours365
Raspberry Pi and DRV8833 Test

Things used in this project

Hardware components

Raspberry Pi 4 Model B
Raspberry Pi 4 Model B
×1
DRV8833 PCB
×1
DC motor (generic)
×1

Story

Read more

Schematics

DC motor work with DRV8833 and 4.5V

Code

DRV8833_test

Python
import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)
GPIO.setup(17,GPIO.OUT)
GPIO.setup(27,GPIO.OUT)
GPIO.setup(22,GPIO.OUT)

for i in range(2):
    
    GPIO.output(17, False); GPIO.output(27, True); GPIO.output(22, True)
    time.sleep(3)
    
    GPIO.output(17, True); GPIO.output(27, False); GPIO.output(22, True)
    time.sleep(3)
    
GPIO.cleanup()

Credits

misoji engineer

misoji engineer

16 projects • 5 followers

Comments