This is probably a silly question, but how do I connect a sensor to the Arduino when a MotorShield is being used? Is the sensor supposed to be soldered into the Motor Shield somewhere?
Thanks.
How to Use a Sensor when a Shield is being used
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 35
- Joined: Sun Apr 12, 2009 11:30 am
- adafruit_support_bill
- Posts: 88086
- Joined: Sat Feb 07, 2009 10:11 am
Re: How to Use a Sensor when a Shield is being used
The MotorShield has a handy sensor area right next to the analog pins with +5 and GND alongside. This is perfect for connecting many 3-pin sensors.
If yoiu nee more space for other circuitry you can build the shield can be built with stacking headersand add a ProtoShield
If yoiu nee more space for other circuitry you can build the shield can be built with stacking headersand add a ProtoShield
-
- Posts: 35
- Joined: Sun Apr 12, 2009 11:30 am
Re: How to Use a Sensor when a Shield is being used
Okay, I see! So the bottom row is for the Analog Inputs, the second row for the Gnd, and the 3rd is for the 5+? Doesn't a PING sensor need to be connected to a Digital Input? Or can it be connected to one of the holes in the A0-5 row?
Thanks
Thanks
- adafruit_support_bill
- Posts: 88086
- Joined: Sat Feb 07, 2009 10:11 am
Re: How to Use a Sensor when a Shield is being used
I'm not familiar with the interface on the Ping sensor. If it needs a digital pin, you will need at least the stacking headers and possibly the protoshield.
The Maxbotix ultrasonic sensor has both analog and serial outputs.
The Maxbotix ultrasonic sensor has both analog and serial outputs.
-
- Posts: 35
- Joined: Sun Apr 12, 2009 11:30 am
Re: How to Use a Sensor when a Shield is being used
I'm using the Parallax PING ultrasonic sensor. It has 3 leads, labeled GND, 5V, and SIG. Do you know if I could use this for Analog input? I do have a protoshield, though. But the MotorShield can't sit on top of the ProtoShield. (Its too wide). So the ProtoShield sits on top of the Arduino, but does the Motor Shield sit on top of the ProtoShield?
I just read, It isn't really said that much but you can use the analog pins as digital ones, Just address them as 14-20 and you can use them like any other digital pin. Can I do this?
I just read, It isn't really said that much but you can use the analog pins as digital ones, Just address them as 14-20 and you can use them like any other digital pin. Can I do this?
- adafruit_support_bill
- Posts: 88086
- Joined: Sat Feb 07, 2009 10:11 am
Re: How to Use a Sensor when a Shield is being used
You can use the analog pins as digital For your application this would be the easiest thing to do.
Please be positive and constructive with your questions and comments.