Driver for Arduino SEEED Relay Shield.
Digital connections to Raspberry pi:
* Connect 5v pin to 5v pin from Raspberry pi.
* Connect ground to ground.
* Connect 2 GPIO pins to digital inputs.
* Options: SEEED pins 4 thru 7 operate relays 1 thru 4.
Power connections to motor:
Wire the motor between the common pins on 2 of the relay outputs
Wire the motor power (+) to the normally open pins (NO) of the 2 relays
Wire the motor ground (-) to the normally closed pins (NC) of the 2 relays
Circuit Diagram:

(+PWR)--NC1------NO1----(GND)
|
(Motor)
|
(+PWR)--NC2------NO2----(GND)

Usage:
motor1 = RelayMotor(3, 5)
motor1.forward()
print motor1
time.sleep(1)
motor1.off()
print motor1
time.sleep(1)
motor1.reverse()
print motor1
time.sleep(1)
motor1.off()

Features

  • Supports an H-bridge connected relay shield.
  • Allows two motors to be driven forward and backward.
  • Ideal for differential drive robots.

Project Activity

See All Activity >

Categories

Raspberry Pi

Follow raspberrypi-seeed-relayshield

raspberrypi-seeed-relayshield Web Site

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

Build gen AI apps with an all-in-one modern database: MongoDB Atlas

MongoDB Atlas provides built-in vector search and a flexible document model so developers can build, scale, and run gen AI apps without stitching together multiple databases. From LLM integration to semantic search, Atlas simplifies your AI architecture—and it’s free to get started.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of raspberrypi-seeed-relayshield!

Additional Project Details

Registered

2015-03-02