SeeedStudio Grove Series Manual

Starter kit for launchpad

Advertisement

Quick Links

Grove
Starter
Kit for
LaunchPad
About Grove
Grove is a modular, ready-to-use tool set that takes a building block approach to assembling
electronics. The Grove system consists of a base shield and a large selection of modules that
feature standardized connectors. The base shield allows for easy connection of popular
microcontroller devices to interface with the various Grove modules. Each Grove module
addresses a unique function & the overall collection of modules expand a wide range of
functionality - from a simple push-button to a complex heart rate sensor. Each one comes with
clear documentation and demo code to help you get started quickly.
About LaunchPad and BoosterPack
The Texas Instruments LaunchPad ecosystem is a set of low-cost & easy-to-use microcontroller
development kits that enable developers to rapidly prototype with modular, open source
hardware based on TI silicon. BoosterPacks are plug-in modules that can stack on top of the
various LaunchPad kits to add additional functionality, such as sensors, displays, wireless
modules & more.The Grove Base BoosterPack is a welcome addition to the
LaunchPad/BoosterPack ecosystem, enabling any LaunchPad to interface with the growing
offering of Grove modules from Seeed Studio. The Grove Base BoosterPack offers a
convenient and easy way for rapid prototypers to use more than one hundred Grove modules
with standardized connectors, including sensors, actuators, displays, lights, motors and more.
http://www.ti.com/launchpad
About Seeed Studio
Seeed is a hardware innovation platform for makers to grow inspirations into
differentiated products. Seeed provides accessible technologies with quality, speed
and supply chain knowledge. Seeed helps productize 1 to 1,000 pieces using in-house
engineering, supply chain management and agile manufacture forces. Seeed also
teams up with incubators, China tech ecosystem, investors and distribution channels to
portal Maker startups beyond.
http://www.seeedstudio.com/depot/
About Texas Instruments
Texas Instruments Incorporated (TI) is a global semiconductor design and manufacturing
company that develops analog ICs and embedded processors. By employing the world's
brightest minds, TI creates innovations that shape the future of technology. TI is helping more
than 100,000 customers innovate with 80000+ analog ICs & embedded processors, software &
the industry's largest sales/support staff.
http://www.ti.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Grove Series and is the answer not in the manual?

Questions and answers

Summary of Contents for SeeedStudio Grove Series

  • Page 1 Seeed also teams up with incubators, China tech ecosystem, investors and distribution channels to portal Maker startups beyond. http://www.seeedstudio.com/depot/ About Texas Instruments Texas Instruments Incorporated (TI) is a global semiconductor design and manufacturing company that develops analog ICs and embedded processors.
  • Page 2 If you encounter any problem, please refer to the following websites for resources & help. For all the Grove resources for LaunchPad www.seeed.cc/s/boosterpack For the details of Grove system http://www.seeedstudio.com/wiki/GROVE_System For tech support for your Grove Base BoosterPack or Starter Kit http://support.seeedstudio.com For all the details and support of TI LaunchPad development kits http://www.ti.com/launchpad...
  • Page 3: Table Of Contents

    TABLE OF CONTENTS LEARN MORE ABOUT THE PRODUCT Getting to know the Grove Base BoosterPack Using the Grove Base BoosterPack Brief overview of the included Grove modules Installing the Energia Development Environment SETTING UP THE ENERGIA IDE 批注 [1]: Add a section on CCS Cloud? (1) Launch Energia (2) Selecting the Serial Port (3) Selecting your Board...
  • Page 4: Learn More About The Product

    LEARN MORE ABOUT THE PRODUCT Getting to know the Grove Base BoosterPack Below is an overview of the Grove Base BoosterPack. The BoosterPack is organized into 3 types of connectors - Digital, Analog & Serial. Depending on the Grove module you want to interface with, you need to ensure you plug it into the appropriate connector type.
  • Page 5 批注 [2]: Add a zoomed in shot to show how the pins at the Grove module are the same as those on the BP connector!
  • Page 7: Using The Grove Base Boosterpack

    Using the Grove Base BoosterPack Using a 40-pin LaunchPad (i.e. MSP-EXP430F5529LP, MSP-EXP432P401R, EK- TM4C123GXL, etc) Recommended The Grove Base BoosterPack was designed in a way to leverage pin numbers 21 through 40. Visually, these are the inner 20 pins of the BoosterPack connector. The pins are connected as shown in the table below: Using the table below, developers should be able to read an analog value from a Grove module (i.e.
  • Page 8 Using your specific LaunchPad’s pin out diagram, you can physically/electrically connect the Grove module to the appropriate pin. Pinout diagrams for each LaunchPad are available here: http://energia.nu/pin-maps/ With the help of these pin diagrams, you know which pin has the function you need. If you want to use Grove connector J8 for an analog Grove module (i.e.
  • Page 9 In Energia, you can use either the digitalWrite(pin, state) API to buzz the piezo at a fixed tone. Or, you can use the analogWrite(pin, dutyCycle) or tone(pin, frequency, duration) function if you want to modulate a specific frequency or tone. More details: http://www.seeedstudio.com/depot/Grove-Buzzer-p-768.html 批注 [5]: Vanity/alias URL 批注 [6]: Applies to all module overviews The Grove-Relay...
  • Page 10 If motion was detected, this function will return a 1, else 0. More details: http://www.seeedstudio.com/depot/Grove-PIR-Motion-Sensor-p-802.html?cPath=25_31 The Grove-4-Digit Display What is it? The 4-Digit 7-segment display module usually takes 12 pins to control, but in this Grove module, a TM1637 was used to allow us to control the display with only two pins.
  • Page 11 File > Examples > Libraries > UltrasonicRanger > [Examples] 批注 [7]: File path should be: file>sketchbook>launchpad kit>grove modules>ultrasonic ranger More details: http://www.seeedstudio.com/depot/BackorderGroveUltrasonic-Ranger-p-960.html?cPath=25_31 ANALOG MODULES The Grove-Light Sensor What is it? The Light sensor module detects the light intensity of the environment. This is an analog Grove module that will return a voltage between 0V and 3.3V.
  • Page 12 LaunchPad ADC channels, the API will return a number between 0-255 (8-bit ADC), 0 - 1024 (10-bit ADC), or 0 - 4095 (12-bit ADC). More details: http://www.seeedstudio.com/depot/Grove-Sound-Sensor-p-752.html The Grove-Moisture Sensor What is it? This Moisture Sensor can be used to detect the moisture of soil or judge if there is water around the sensor.
  • Page 13 If the library is installed in Energia, you can find it at: File > Examples > Libraries > Humidity_Temperature_Sensor > [Examples] More details: http://www.seeedstudio.com/depot/Grove-TemperaureHumidity-Sensor-Pro-p- 838.html?cPath=25_125 The Grove-Rotary Angle Sensor What is it? The potentiometer module produces an analog output between 0 and Vcc on SIG0. The angular range is 300 degrees with a linear change in the output voltage.
  • Page 14 http://www.seeedstudio.com/depot/Grove-Rotary-Angle-Sensor-p-770.html?cPath=85_52...
  • Page 15 Installing the Energia IDE Installing Energia Energia is an open-source and community-driven development environment for LaunchPad kits. It is based on the popular Wiring framework, offering a large collection of easy-to-use functions and APIs. Energia support is available for many LaunchPad development kits across various TI microcontroller devices: MSP430/MSP432, TM4C, C2000, and CC3200.
  • Page 16: Setting Up The Energia Idex

    SETTING UP THE ENERGIA IDE (1) Launch Energia Once installed, go ahead and plug in your LaunchPad into the USB port of your computer. Then, double-click Energia.exe (Windows users) / Energia.app (Mac OS X users). Energia will start and an empty Sketch window will appear. (2) Selecting the Serial Port Select Serial Port from the Tools menu to view the available serial ports.
  • Page 17: Preparing Libraries

    Also, ensure that Energia is configured for the specific LaunchPad device you are using. You can do so by navigating to Tools > Board > [select your LaunchPad] (4) Preparing Libraries Go to https://github.com/Seeed-Studio/LaunchPad_Kit http://www.energia.nu/grovekitcode 批注 [8]: Add vanity URL/alias & host a zip file on Energia site or Seeed site.
  • Page 18: The Examples

    Once you have the folder structure as shown above, you may have to restart Energia in order for the IDE to discover these new examples/libraries. Note that these libraries and example projects are open source and available on github: https://github.com/Seeed-Studio/LaunchPad_Kit THE EXAMPLES...
  • Page 19: Getting Started (Blinking Led)

    Example - 01 : Getting Started (Blinking LED) WHAT ARE WE DOING HERE? In this example, we will not be using any Grove modules. First, we’ll learn how to blink one of the on-board LEDs that are featured on the LaunchPad development kit itself. All LaunchPad kits feature a few user LEDs, typically a red LED.
  • Page 20: Playing Music (Buzzer)

    RESULT The LED on board will periodically switch on and off, with each state lasting for 1 second. TIPS The 2 main APIs we are using are digitalWrite(pin, state) & delay(milliseconds). Note that we need to also use the pinMode(pin, direction) function to set the appropriate pin as an OUTPUT port before we can use the digitalWrite function for toggling it ON &...
  • Page 21 * LED anode (long leg) attached to RED_LED * LED cathode (short leg) attached to ground * Note: This example code is in the public domain. http://www.seeedstudio.com/wiki/index.php?title=GROVE_-_Starter_Kit_v1.1b#Grove_- _Buzzer /* Macro Define */ #define BUZZER_PIN /* sig pin of the buzzer */ int length = 15;...
  • Page 22 /* set buzzer pin as output */ pinMode(BUZZER_PIN, OUTPUT); void loop() for(int i = 0; i < length; i++) { if(notes[i] == ' ') { delay(beats[i] * tempo); } else { playNote(notes[i], beats[i] * tempo); delay(tempo / 2); /* delay between notes */ /* play tone */ void playTone(int tone, int duration) { for (long i = 0;...
  • Page 24: Controlling Other Electronics (Relay)

    Example - 03 : Controlling other electronics (Relay) WHAT ARE WE DOING HERE? This example showcases how to use the Grove-relay module to control a larger load, i.e. a desk lamp light. A 3V voltage signal can cause the relay to switch on, allowing current to flow through the connected appliance.
  • Page 25 RESULT Once a second, the relay switch will open & close. You should hear a clicking noise whenever the relay is switched open or close. TIPS Please pay attention to the maximum value of the current and voltage marked on the Relay.
  • Page 26: Displaying The Numbers (4-Digit Display)

    Example - 04 : Displaying the Numbers (4-Digit Display) WHAT ARE WE DOING HERE? This example demonstrates how to display some digital numbers using a Grove-4-Digit Display. THE CIRCUIT Parts: ● Grove-4-Digit Display x1 ● Grove cable x1 ● Grove-Base BoosterPack x1 ●...
  • Page 27 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN...
  • Page 28 RESULT Numbers will cycle through the display one by one. Pretty, isn’t it? TIPS The Energia library offers control of both the content and the brightness of the display using just 2 digital pins of the LaunchPad.
  • Page 29: Reading The Potentiometer (Rotary Angle Sensor)

    Example - 05 : Reading the Potentiometer (Rotary Angle Sensor) This example shows how to read the analog output coming from the Grove potentiometer module. We will be combining a few Grove modules in this example! By turning the potentiometer knob, we will display the analog reading value on the Grove 4-Digit display. THE CIRCUIT Parts: ●...
  • Page 30 Created by Oliver Wang This example code is in the public domain. http://www.seeedstudio.com/wiki/GROVE_-_Starter_Kit_v1.1b#Grove_- _Rotary_Angle_Sensor #include "TM1637.h" /* Macro Define */ #define CLK /* 4-digital display clock pin */ #define DIO /* 4-digital display data pin */ #define ROTARY_ANGLE_P /* pin of rotary angle sensor */ /* Global Variables */ TM1637 tm1637(CLK, DIO);...
  • Page 31 kit’s ADC (analog-to-digital converter), your range may vary. For an 8-bit ADC, a number from 0-255 will show. For a 10-bit ADC, a number from 0-1023 will show. For a 12-bit ADC, a number from 0-4095 will be displayed on 4-Digit Display. Turn the knob to see the values change on the 4-Digit Display! TIPS The rotary angle sensor is a very useful device.
  • Page 32: Sensing The Light (Light Sensor)

    Example - 06 : Sensing the Light (Light Sensor) WHAT ARE WE DOING HERE? This example reads the amount of light incident on the Grove-Light Sensor and displays the reading on the Grove 4-Digit Display. This is similar to the previous example except we are now using the ambient light sensor instead of the potentiometer rotary angle knob.
  • Page 33 Created by Oliver Wang This example code is in the public domain. http://www.seeedstudio.com/depot/Grove-Light-Sensor-p-746.html?cPath=25_27 #include "TM1637.h" /* Macro Define */ #define CLK /* 4-digital display clock pin */ #define DIO /* 4-digiral display data pin */ #define LIGHT_SENSOR /* pin of grove light sensor */ /* Global Varibles */ TM1637 tm1637(CLK, DIO);...
  • Page 34 from 0-1023 will show. For a 12-bit ADC, a number from 0-4095 will be displayed on 4-digital- display. Watch the values change as you present light to the sensor. TIPS Now that we can tell how bright it is in the environment, try to turn an LED on when the room is too dark.
  • Page 35: Turning On An Led By Sound (Sound Sensor)

    Example - 07 : Turning on an LED by Sound (Sound Sensor) WHAT ARE WE DOING HERE? This example program shows how to use the sound sensor (microphone). When the incoming sound amplitude exceeds a threshold, we will turn an LED on for 1 second. THE CIRCUIT Parts: ●...
  • Page 36 #define SOUND_SENSOR /* sound sensor pin */ #define LED RED_LED /* LED pin */ #define THRESHOLD_VALUE 3000 /* Depending on your LaunchPad’s ADC 批注 [17]: explain how to change this better in above resolution you may have to adjust the threshold */...
  • Page 37: Is Anybody Here? (Pir Motion Sensor)

    * the other side pin to +VCC * LED anode (long leg) attached to RED_LED * LED cathode (short leg) attached to ground * Note: Position the trig jumper on N_Retrig to ensure This example code is in the public domain. http://www.seeedstudio.com/wiki/index.php?title=Twig_-_PIR_Motion_Sensor...
  • Page 38 /* Macro Define */ #define PIR_MOTION_SENSOR /* sig pin of the PIR sensor */ #define LED RED_LED /* led */ #define ON HIGH /* led on */ #define OFF /* led off */ #define _handle_led(x) digitalWrite(LED, x) /* handle led */ /* the setup() method runs once, when the sketch starts */ void setup() { pinMode(PIR_MOTION_SENSOR, INPUT);...
  • Page 40: Taking Care Of Your Plants (Moisture Sensor)

    Example - 09 : Taking Care of Your Plants (Moisture Sensor) WHAT ARE WE DOING HERE? The following sketch demonstrates a simple application of sensing the moisture in soil. With this, you can know whether your plant needs water or not by observing the results from the output of the sensor.
  • Page 41 This example code is in the public domain. http://seeedstudio.com/wiki/Grove_-_Moisture_Sensor #include "TM1637.h" /* Macro Define */ #define CLK /* 4-digital display clock pin */ #define DIO /* 4-digiral display data pin */ #define BLINK_LED RED_LED /* blink led */ #define MOISTURE_PIN...
  • Page 42 for(int i = 3; i >= 0; i--) { /* get single bits of the analog value */ bits[i] = analog_value % 10; analog_value = analog_value / 10; tm1637.display(i, bits[i]); /* display by 4-digital display */ delay(200); RESULT If a plant needs water, the red LED of the LaunchPad will be turned on. Note that depending on the resolution of your LaunchPad kit’s ADC (analog-to-digital converter), your range may vary.
  • Page 43: Sensing Distance (Ultrasonic Ranger Sensor)

    Example - 10 : Sensing Distance (Ultrasonic Ranger Sensor) WHAT ARE WE DOING HERE? This example shows how to measure the distance to obstacles using the ultrasonic sensor and display the value on a 4-Digit Display (centimeters). THE CIRCUIT Parts: ●...
  • Page 44 #include "TM1637.h" #include "Ultrasonic.h" /* Macro Define */ #define CLK /* 4-digital display clock pin */ #define DIO /* 4-digital display data pin */ 批注 [20]: update pin number in code to 40 and 39 #define BLINK_LED RED_LED /* blink led */...
  • Page 45 The 4-Digit Display will show you the distance between the ultrasonic ranger and the object in front of it (in centimeters). TIPS Try to create a musical instrument by pairing this with the Grove-buzzer module & change the tone based on distance. Example - 11 : Feeling the Environment (Temperature and Humidity) WHAT ARE WE DOING HERE? This example allows you to read the value from the Grove-Temperature-Humidity sensor.
  • Page 46 * LED anode (long leg) attached to RED_LED * LED cathode (short leg) attached to ground * Note: Put your hands on Grove-Temperature-Humidity Sensor, both of the value will rise. 4-digital-display: |--------------------------| | temperature : humidity | |--------------------------| This example code is in the public domain. http://www.seeedstudio.com/wiki/Grove_-_Temperature_and_Humidity_Sensor_Pro...
  • Page 47 #include "TM1637.h" #include "DHT.h" /* Macro Define */ #define CLK /* 4-digital display clock pin */ #define DIO /* 4-digital display data pin */ #define BLINK_LED RED_LED /* blink led */ #define TEMP_HUMI_PIN /* pin of temperature&humidity sensor */ /* Global Varibles */ TM1637 tm1637(CLK, DIO);...
  • Page 48 h_bits[1] = _humidity % 10; /* show it */ tm1637.display(1, t_bits[0]); tm1637.display(0, t_bits[1]); tm1637.display(3, h_bits[0]); tm1637.display(2, h_bits[1]); RESULT The first two digits display the temperature (celsius) and the next two digits display humidity (%). TIPS When paired with the Grove-Moisture module, you can create a greenhouse monitoring system.
  • Page 49 LET’S USE OUR NEW KNOWLEDGE TO BUILD A FEW PROJECTS Do you think you can build the projects below on your own? PROJECT ONE: Intelligent Tulip Water Reminder Device WHAT ARE WE DOING HERE? Decorate your room with tulips, and make your home a pleasant space. But what if we are too busy to take care of the lovely tulips? Perhaps we can build a device that will remind us when they are thirsty! We can enable our plants to reach out for help using the Moisture Sensor, which can detect the electric resistance of the soil, and thus show us the soil moisture using the...
  • Page 50 WHAT ARE WE DOING HERE? How about we create a project for home automation? For example, when night falls or if motion is detected, perhaps we can turn on a lamp in your room automatically. When no one is around or the day dawns, it can also automatically turn off.
  • Page 51 Mouser Electronics Authorized Distributor Click to View Pricing, Inventory, Delivery & Lifecycle Information: Seeed Studio 110020004 110060123...

This manual is also suitable for:

110020004110060123

Table of Contents