0

I have an old motor shield but can see the revision 3 is still being sold: https://store.arduino.cc/arduino-motor-shield-rev3

When I follow the link for "Getting Started section" the page lists a lot of shields but not the motor shield. I must be missing something really obviously but I can't find a library for the motor board.

I'm trying to drive 2 DC motors.

asked Jun 3, 2019 at 20:16
5
  • 1
    Have you googled this, before asking here? I googled "Arduino motor shield rev3 library" and directly found this library on github. Have you tried it or any other library? Commented Jun 3, 2019 at 20:30
  • Yes for the last 90 minutes: ecosia.org/… ecosia.org/search?q=arduino+motor+shield+library+-adafruit google.com/… google.com/search?q=arduino+motor+shield+library+example Granted that for me: google.com/search?q=arduino+motor+shield+library shows your link as the fifth result down for but then it's followed by Adafruit Motor Shield again... their SEO is too good. Commented Jun 3, 2019 at 21:06
  • Ok so using Ecosia is part of the "problem", along with Adafruit's SEO... but I just realised Ecosia is powered by bing.com and the extreme irony is that this question is already indexed as result number 7 but the library you helpfully provided is not! bing.com/search?q=arduino+motor+shield+library LOL Commented Jun 3, 2019 at 21:12
  • Often it is helpful to add the term github to your search, since almost every Arduino library is hosted there. Commented Jun 3, 2019 at 21:13
  • Thanks @chrisl something seriously weird is going on with all my filter bubbles because your result now isn't shown in my google search after being shown in it minutes before... * so confused *. Adding github just shows the Adafruit barrage, at least on page 1. Commented Jun 3, 2019 at 21:19

1 Answer 1

0

From Chrisl's comment: https://github.com/gallingern/arduino-motor-shield-r3

You don't really need a library though as the code is simple enough:

void setup() {
 //Setup Channel A
 pinMode(12, OUTPUT); //Initiates Motor Channel A pin
 pinMode(9, OUTPUT); //Initiates Brake Channel A pin
}
void loop(){
 //forward @ full speed
 digitalWrite(12, HIGH); //Establishes forward direction of Channel A
 digitalWrite(9, LOW); //Disengage the Brake for Channel A
 analogWrite(3, 255); //Spins the motor on Channel A at full speed
 delay(3000);
 digitalWrite(9, HIGH); //Engage the Brake for Channel A
}

From here.

answered Jun 3, 2019 at 21:07

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.