IdentityMine

| Tags: Internet of Things, Matthias Shapiro

As a way of accelerating our development testing with Windows IoT on the Intel Galileo board, we decided to use the Grove Starter Kit shield and family of sensors. We used Grove because:

  1. The Grove shield and sensors have 4 pin connectors that allow us to plug the sensors in rather than managing sensors through soldering or a breadboard.
  2. SeeedStudio (the company that sells the Grove kit) offers a wide variety of sensors to expand our prototypes.
  3. The Grove shield has been tested as compatible with Windows by the Windows IoT team. (http://ms-iot.github.io/content/ShieldCompat.htm)

The Grove kit comes with a “shield” that can be installed into the top of the Galileo board and a set of a dozen input and output sensors.

We’ve played with these sensors and to help beginners get started, here is a set of demo projects interfacing with these sensors using the Windows Galileo project type in Visual Studio.

Grove-kit

Note: These projects are made using the Galileo 2 board, but the code in Main.cpp that drives these examples is compatible with the Galileo 1 as well.

Grove LED

The LED is the simplest visible output for IoT projects. In the simplest form (the famous “blinking light”) it can signal an on-off binary condition. In this example, however, we will use the variable brightness capability of the LED to have it “breathe” on and off.

Hardware:

  • Grove LED Socket
  • LED

Grove-LED-Socket LED

Steps:

  1. Connect the LED Socket to D3.
  2. Connect the LED into the socket with the long wire in the + socket.

Run the application. The light will “breathe” on and off.

Grove Touch and Button Sensors

The touch and button sensors both allow input of a binary condition. The touch sensor can also be modified with additional capacitive materials to create a larger area of touch sensitivity. This project uses the touch sensor to turn the light on and off. You could also plug in the button sensor with no chance to the code.

Hardware:

  • Grove Touch Sensor (or button sensor)
  • Grove LED Socket
  • LED

Grove-Touch-Sensor OR Grove-Button-Sensor Grove-LED-Socket LED

 

Steps:

  1. Connect the touch sensor to D4
  2. Connect the LED Socket to D3
  3. Connect the LED into the socket

Run the application. The light will come on when the touch sensor is active.

Grove Rotary Angle

Think of the rotary angle sensor as a knob that can be turned up and down. But instead of going from 0 to 11, this sensor inputs an integer value from 0 to 1023. In this project, we’ll use that value to drive the brightness of our LEDs.

Hardware:

  • Grove Rotary Angle Sensor
  • Grove LED Socket
  • LED

Grove-Rotary-Angle-Sensor Grove-LED-Socket LED

Steps:

  1. Connect rotary sensor into A0
  2. Connect LED socket to D3
  3. Connect LED into socket

Run application. The light will increase in brightness with the turn of the angle sensor.

Grove Buzzer

The buzzer sensor can output a buzzing “tune” at a variable frequency. In this project, we use the buzzer to “play” a song using a specific set of tone frequencies.

Hardware:

  • Grove Buzzer

Grove-Buzzer

Steps:

  1. Connect rotary sensor to A0
  2. Connect buzzer to D3

Run application. The buzzer will play a tune.

Grove Relay

The Grove relay sensor is a way to flip a circuit with a power supply external to the Galileo board. This relay can run an external circuit up to 220V, which is enough to handle pretty much anything you can plug into a wall outlet. This project is substantially less dangerous. We’ll use the relay to control a simple fan connected to a 9V battery.

Hardware:

  • Grove Relay v1.1
  • Grove Touch Sensor
  • 9 Volt battery and wiring harness
  • Computer fan

Grove-Relay-v1.1 Grove-Touch-Sensor

+

Computer-Fan

Steps:

  1. Connect the touch sensor to D3
  2. Connect the Relay sensor to D8
  3. Connect the wiring harness to the 9V battery
  4. Wire the red wires from the 9V battery to the fan
  5. Connect the black wires to the terminal on the relay sensor

Run the application. The fan will turn on when the touch sensor is pressed.

Using the LCD with RGB backlight

Delivering user output is an important part of any technology experience and nothing is more understandable than good old plain text. For the rest of these samples, we’re going to be using the Grove LCD display. In addition to acting as a traditional LCD display, this sensor also gives us the ability to change the color and brightness of the backlight, which gives us another dimension of output to display.

Setting a Galileo app up to appropriately use the RGB LCD requires implementing the library supplied by SeeedStudio - https://github.com/Seeed-Studio/Sketchbook_Starter_Kit_V2.0/tree/master/libraries/Grove_LCD_RGB_Backlight

For ease of use, we have a base project (Galileo_Grove_LCDBase) with that library already implemented that can be used to drive projects without having to implement this over and over.

Grove RGB LCD

For our intro to the Grove RGB LCD, we’re combining the angle sensor, the touch sensor and the LCD screen to create a project to control the color values of the LCD.

Hardware:

  • Grove Angle Sensor
  • Grove Touch Sensor
  • Grove LCD RGB Backlight

Grove-Angle-Sensor Grove-Touch-Sensor Grove-LCD-RGB-Backlight

Steps:

  1. Connect the angle sensor to A0
  2. Connect the touch sensor to D3
  3. Connect the LCD display to I2C

Run application. Press the touch sensor to change the color mode from red to green to blue. Rotate the angle sensor to change the selected color.

Grove Light Sensor (an LCD project)

The sound sensor takes a detected volume level and outputs it as a sound value between 0 and 1023. Similar to the light sensor, the data coming in can be quite noisy (get it?!?) so we take the average of 10 sensor readings and change the brightness of the LCD based on that.

Hardware:

  • Grove Light Sensor
  • Grove LCD RGB Backlight

Grove-Light-Sensor Grove-LCD-RGB-Backlight

Steps:

  1. Connect the light sensor to A1
  2. Connect the LCD display to I2C

Run the application. Bright light will make the LCD dimmer and dimmer light will make it brighter.

 

Grove Sound Sensor (an LCD project)

Similar to the light sensor, the data coming in can be quite noisy (get it?!?) so we take the average of 10 sensor readings and change the brightness of the LCD based on that.

Hardware:

  • Grove Sound Sensor
  • Grove LED Backlit LCD

Grove-Sound-Sensor Grove-LCD-RGB-Backlight

Steps:

  1. Connect the sound sensor to A0
  2.  Connect the LCD to I2C

Run the application. The LCD will get brighter as the sound sensor detects louder noises.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInPin on PinterestShare on RedditShare on TumblrEmail this to someoneDigg thisFlattr the authorShare on StumbleUpon

One Response to “Using Grove with Windows IoT”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>