[#GALILEO] Using non #Grove sensors with Grove, ie: #UltraSonic Ranger

Hello!

If you work with Arduinos or Intel Galileo, you will surely be a fan of Grove. Grove is great, you only need to Plug and play sensors and lets you prototype very quickly with the boards. In a couple of seconds you can have a great layout with sensors and actors connected to each other.

The funny thing is that when you decide to use “not grove” sensors to connect them to a Shield Grove, you get get to study a little before you can use them. For example, if we compare the 2 versions of the ultrasonic sensor we will see that the Grove version has 4 connectors and the normal version only 3.

Picture1

When we read the specifications from the normal version (red one), we see that also this version does not bring a series of libraries or headers C to use on our Arduino projects. The code example includes all of the code to see how works at low level sensor.

The following lines are worth gold, we see that to “take away” what makes the sensor is

-Initializes the pin in OUTPUT mode

-several milliseconds apart, performs several digitalWrite() actions to send information to the PIN

-changes the mode of the pin to INPUT

-use pulseIn() to determine the “distance” which was collected by the sensor.

Clipboard02

And ready! then a couple of conversions to return centimeters or inches and the sensor is working. If we now that this sensor works on a single grove plate we need to respect the cables for power and ground (red and blue); e reverse the data cables. Since the signal sensor takes is captured in the white wire and plate Grove the yellow cable is used to define the Pin.

photo247099884290812206

.Greetings @ Home

/El Bruno

References:

Groove for Galileo, http://www.seeedstudio.com/depot/Grove-starter-kit-plus-Intel-IoT-Edition-for-Intel-Galileo-Gen-2-and-Edison-p-1978.html

Ultra Sonic Ranger, http://www.seeedstudio.com/wiki/index.php?title=Ultra_Sonic_range_measurement_module

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.