10 Arduino grove modules – plug and play with the seeedstudio grove system
Have you heard of the Arduino Grove System from Seeed Studio? Check out our video to learn more about the Arduino Grove System and to see some Arduino code examples using the Grove system.
The above is an affiliate link – it’s helps us buy yachts 😉
In this lesson, we’re going to look at:
- 10 of the Grove modules that come in the Arduino Grove starter kit from Seeed Studio
- 3 Arduino code examples using the Grove system
- Our favorite feature of the Grove system (it’s probably not what you think)
What is the Grove system?
The Grove system is essentially two things: there’s an Arduino shield, and there’s a bunch of different electrical modules.
The shield connects to your Arduino board and maps out a bunch of the Arduino pins to these four point connectors. The electrical modules also have four point connectors.
To connect a module to the shield you simply use a little ribbon cable. So the whole idea of the Grove system is that you can create circuits by simply plugging in different modules into the Grove shield.
Let’s take a look at the Grove starter kit and see what comes in it.
The Starter Kit
First, there’s an I2C LCD that has an RGB backlight. Notice the connector on the LCD module, you’re going to see a connector exactly like this on all of the modules. It’s that standard Grove four point connector.
Next, there’s the Grove shield itself. The shield is layered with these four point connectors. It has them them all over the place.
They have seven connections for digital pins D2 through D8, it has a connection for the UART, it’s got four I2C connection points, and four connectors for analog pins A0 through A3.
It also has a two way switch to select either 3.3 volts or 5 volts as the power from the Arduino board. It’s got a handy side facing reset button so you can reset your Arduino board, and it also has an LED indicator so you know when the board has power.
Along the edges of the board you’ve got your standard Arduino headers, so if you want to try to stack a board you could (although most shields would block the connectors – you could probably squeeze some through).
The starter kit also comes with ten ribbon cables – these are what connect the shield and the modules together.
There’s a micro hobby Servo that also has that standard four pin Grove connection. It even comes with a little instruction manual for getting started which doesn’t go in depth into all the modules, but it gives a quick little tip on them and some demo projects to use each one – it’s definitely worth looking over.
Beyond that there’s three standalone LEDs and a nine volt battery connector for connecting your Arduino to external power.
Let’s Talk Modules
It has a capacitive touch sensor that can be used on one of the digital pin connections.
There’s a momentary push button meant also for one of the digital pin connectors, when you press the button it creates a high output at the pin.
There’s a Piezo buzzer module that can be connected to a digital pin.
There’s a potentiometer module, you could use this on one of the analog connectors.
There’s a light sensing module, this also is meant for the analog connector.
There’s an LED module, and this is where you can connect one of those standalone LEDs. It’s got a little trimmer potentiometer to adjust the resistance to the LED. The long leg of the LED goes into the hole marked with the plus sign.
Then there’s a relay module, that’s meant to be used with one of the digital connector points on the Grove shield
There’s a temperature sensor, and that’s meant for connecting to one of the analog connectors.
Finally there’s a sound sensor that uses an electric microphone, and that’s meant to be used with one of the digital pins.
That’s a handful of really common sensors and output devices that you might want to use with your Arduino and this is literally plug and play for these modules.
Let’s talk Code
There’s a GitHub Repo where you can grab all of the code examples that go for the different modules in the Groove starter kit.
We downloaded the zip file of all the examples, and then we saved the sketches in the Arduino folder in “My documents”. There’s also a library in there for the LCD, and we took that library folder and put it into the libraries folder in the Arduino sketchbook folder.
So once you’ve put those code examples in the appropriate folder, and you open up your Arduino IDE, you then you go to File > Sketchbook, and navigate to where you extracted the zip file.
Let’s open the Grove button example. They’ve got a pin button attached to pin three, and then a pin LED attached to pin seven, so let’s go ahead and connect the button module to the Grove, and connect the LED module, and use digital pin three and digital pin seven.
Go ahead and upload the code. If we press the button, the LED’s comes on, if we don’t press the button the LED goes off. That was pretty cool, and really easy to do.
Okay, let’s look at another example – let’s check out the rotary angle sensor (also known as a potentiometer). Connect the potentiometer at A0.
Pay attention to which direction the connector goes (you can attach it backwards). This sketch will read the value at pin A0 and then print that value to the serial monitor window.
So let’s upload this code, open up the serial monitor window, and now adjust the potentiometer. The value we should get is between a zero and 1023. The potentiometer is acting as a voltage divider between five volts and zero volts, and we can see it’s working as advertised.
Again, pretty darn easy. Let’s check another program out – the RGB backlight LCD “Hello World” example.
Connect the module and upload the code. It looks like this will print “hello world” to the LCD, and then it prints the number of seconds since the last reset below that. You can set the background color by adjusting the “const int” colorR, colorG, or colorB variables between 0 and 255. Right now it’s set as 255 red, and 0 for green and blue.
Set up the circuit, upload the code – works like a charm! It’s got the hello world at the top, and then it is showing the number of seconds that have past since the last reset.
That’s pretty sweet. What’s also neat with the I2C ports is it doesn’t matter which port we use – we can plug it into any one of the 4 ports and the board will automatically pick up the correct port that we have it attached to. Pretty cool.
Let’s add a servo to this example. Let’s go to File > Servo > Knob. In this example you’ve got a Servo attached to pin nine, but since we don’t have a nine on the Grove system, let’s change this to pin six. This will still work because we know pin six can still do PWM (Pulse Width Modulation).
In this sketch you read a value from the potentiometer where you’ve got the potentiometer attached, and we map that output from zero to 180, and then you pass that value to the Servo to write the directions.
Let’s take this code and throw it right into that other LCD program and see if we can make a quick mesh up here.
So now when we move the potentiometer, it’s going to move the Servo. In addition, the position the servo is at, between zero and 180, is going to show up on the LCD. Now we didn’t do a great job printing to the LCD, and if you can catch the error we made let us know in the comments below.
Our favorite feature
This may sound kinda lame, but we just like that it’s easy to make the connections and that the connections don’t click in. It’s a snug fit, you can push it in, and then pull it out, and there’s no clicking that holds it in there. It doesn’t require you to “un-click” it.
Getting in the Groove
We hope you like this lesson where we walked through the Grove system for Arduino. We think it’s pretty cool, and we can definitely see how it can allow you to put some circuits together really quickly and start playing around. It comes with some pretty basic code examples that you can play with, and you can mesh them together pretty easily, so all in all, pretty neat!
Take it easy, and we’ll see you next time, bye.