Hello
I'm building a robot. We use a Arduino Uno and untop of that a Adafruit Motor Shield V2. We use 2 DC motors wich are connected to M1 and M2. We also want to use 3 Ultrasonics Sensors. We want to use the a0-5. I have tested those and i saw that those worked. Now comes the problem: When i have the Ultrasonic Sensor connected on a4 and a5 and use the DCmotortest. I see the wheels wont turn. But when i have the Ultrasonic sensor connected on a0 and a1 i works just fine. I tried to first let the wheels run and then put the sensor on a4 and a5 but then it gets stuck in a certain speed and i have to reset. I have tried different wires it wont make a difference. I have tried different Ultrasonics sensors but they al do the same. The only thing i have noticed is that when i connect the wire of the Trigpin on a4 or a5 it wil work just fine but when i connect the wire of the Echopin on a4 or a5 it won't work. I hope you have a solution so i could get along with my project.
Greetings Joost Cauberg
Arduino Uno + Adafruit Motorshield V2 PROBLEM
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88142
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino Uno + Adafruit Motorshield V2 PROBLEM
A4 and A5 are also known as SDA and SCL or the i2c bus. The Motorshield v2 is controlled via i2c, so you can't use A4 and A5 while you are using the motor shield.
http://learn.adafruit.com/adafruit-moto ... rduino/faq
You should be able to connect your 3 ultraasonic sensors to A0-A2.
http://learn.adafruit.com/adafruit-moto ... rduino/faq
You should be able to connect your 3 ultraasonic sensors to A0-A2.
Please be positive and constructive with your questions and comments.