Grove* Starter Kit with Intel® Galileo Gen 2 – Getting Started

When I started with IoT I was all confused about electronics stuffs, resistors and circuits, then I got Seeed Studio’s Grove Starter Kit plus. With this we have to just plug the sensor modules instead of managing it through soldering or breadboard. So let us see how easily we can get started with Internet of Things with Grove Starter Kit without worrying about electronic component and circuits.

Grove starter kit is a complete development kit that consists of collection of sensors, actuators and shields. It is hardware and software solution to help you explore the IoT space and create innovative projects. Grove starter kit is a better choice because-

  • It accelerates development and testing with IoT
  • The Grove shield and sensors have 4 pin connectors that allow us to plug the sensor with ease rather than managing circuits and sensors through breadboard.
  •  The Grove shield has been tested as compatible with Windows* by the Windows IoT team.
  • There is a huge variety of sensor modules available with Seeed Studio.

 

If you are new to IoT, Seed Studio Grove Starter kit will help you to easily get started with development as you need not to worry about circuits and other electronics stuffs. With Grove shield and sensor modules you can easily create anything without worrying about electronic components much. There is no need of managing sensors through soldering or a breadboard. This article will guide you about how to set up and get running with Grove starter kit plus and Intel Galileo.

The booklet contains instructions about basic sketches with Grove Starter Kit Plus.

 

Required Components

Intel Galileo Gen2 board

Seeed Studio Grove Starter Kit Plus – Intel IoT Edition for Intel Galileo Gen 2

 

Setting Up

Setup the Dev Environment

Download the Seeed Studios Sketchbook Starter

 

Adding SketchBook to Arduino* IDE

  • Extract the downloaded Sketchbook Starter
  • Open Arduino IDE
  • Select “File-> Preferences”

View the “Sketchbook Location” field

  • Click “Browse” and copy the Seeed Studios Sketches folder you downloaded into the resulting folder and rename it something like “Sketchbook_Grove.”

  • Restart your Arduino IDE.

 

Making Connections

Power up the Intel Galileo, You will see the power led will light up. Intel Galileo will start booting from the customized version of Linux. Wait for few seconds.Note: Unlike Intel Galileo Gen 1 board Intel Galileo Gen2 board uses 12 V power supply. Use the specific power adapter which is provided with Intel Galileo Gen2 board.
Now we are ready to make the rest of the connections, we will connect Intel Galileo to computer via USB cable. Now we see the USB led will light up.

Adding Grove Base Shield

In the Grove kit pull up the pink Styrofoam underneath the LED screen to locate the Base Shield.

The Base Shield has a variety of 4-pin plugs for connecting various sensors to Intel Galileo.

Now attach the Base Shield to Intel Galileo board and press down firmly. A green LED on the Base Shield will turn on when it is powered up.

 

 

Plugging in the Temperature Sensor Module

In the Grove Starter kit Plus locate the Temperature Sensor Module, On its back side it will be written “Temperature Sensor”.Using one of the wires provided in the kit attach it to your Base Shield unit. Make sure to plug it into the port marked as A0 as it is the default port in the sample code but you can change it as desired.

 

Running up your first sketch

Open Arduino IDE.

Go to “File->Sketchbook-> Sketchbook_Grove->Grove_Temperature_Sensor” to load basic temperature sketch.

 

Sketch

// Define the pin to which the temperature sensor is connected.
const int pinTemp = A0;

// Define the B-value of the thermistor.
// This value is a property of the thermistor used in the Grove - Temperature Sensor,
// and used to convert from the analog value it measures and a temperature value.

const int B = 3975;
void setup()
{
// Configure the serial communication line at 9600 baud (bits per second.)
Serial.begin(9600);
}

void loop()
{
// Get the (raw) value of the temperature sensor.
int val = analogRead(pinTemp);
// Determine the current resistance of the thermistor based on the sensor value.
float resistance = (float)(1023-val)*10000/val;

// Calculate the temperature based on the resistance value.
float temperature = 1/(log(resistance/10000)/B+1/298.15)-273.15;

// Print the temperature to the serial console.
Serial.println(temperature);

// Wait one second between measurements.
delay(1000);
}

 

Click the “Upload” button. You should see a “Transfer Complete” message if it is successfully deployed.

 

Viewing Sensor Results

To view the temperature reading of deployed sketch, click the “Serial Monitor” button in the upper right hand corner of the Arduino IDE.

 

The Serial Monitor is a separate pop-up window that acts as a separate terminal that communicates by receiving and sending Serial Data. See the icon on the far right of the image below. You can use the Serial Monitor to debug Arduino Software Sketches or to view data sent by a working Sketch.

You can see the output in Serial Monitor. Now you are ready to do some more complex projects and dive into the world of IoT with many sensor modules provided by Seeed Studio.

For more complete information about compiler optimizations, see our Optimization Notice.

6 comments

Top
bodepudi r.'s picture

I am using galileo gen 2 with grove kit,i want to flash some code using above procedure(arduino in linux machine) but i am getting below error.

 

 

Arduino: 1.6.12 (Linux), Board: "Intel® Galileo Gen2"

Sketch uses 82,671 bytes (0%) of program storage space. Maximum is 10,000,000 bytes.
starting download script
Args to shell: /root/.arduino15/packages/Intel/tools/sketchUploader/1.6.2+1.0/x86/bin /tmp/arduino_build_330082/Grove_Temperature_Sensor.ino.elf /dev/ttyS4
Serial Port PORT
Using tty Port /dev/ttyS4
Sending Command String to move to download if not already in download mode
#!/bin/sh

# clupload script to invoke lsz 
# Copyright (C) 2014 Intel Corporation

# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.

# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
#

echo "starting download script"
echo "Args to shell:" $*
#
# ARG 1: Path to lsz executable.
# ARG 2: Elf File to download
# ARG 3: TTY port to use.
#
#path may contain \ need to change all to /
path_to_exe=$1
fixed_path=${path_to_exe//\\/\/}
#
tty_port_id=$3
echo "Serial Port PORT" $com_port_id 
echo "Using tty Port" $tty_port_id 
#
echo "Sending Command String to move to download if not already in download mode"
echo "~sketch downloadGalileo" > $tty_port_id
#Give the host time to stop the process and wait for download
sleep 1
#
Deleting existing sketch on target
#Move the existing sketch on target.
echo "Deleting existing sketch on target"
"$fixed_path/lsz" --escape -c "mv -f /sketch/sketch.elf /sketch/sketch.elf.old" < $tty_port_id > $tty_port_id
Retry 0: Got TIMEOUT
Retry 0: Got TIMEOUT

Transfer incomplete
#
# Execute the target download command
#
#Download the file.
host_file_name=$2
"$fixed_path/lsz" --escape --binary --overwrite $host_file_name < $tty_port_id  > $tty_port_id
Retry 0: Timeout on pathname

Transfer incomplete
#
#mv the downloaded file to /sketch/sketch.elf 
target_download_name="${host_file_name##*/}" 
echo "Moving downloaded file to /sketch/sketch.elf on target"
Moving downloaded file to /sketch/sketch.elf on target
"$fixed_path/lsz" --escape -c "mv $target_download_name /sketch/sketch.elf; chmod +x /sketch/sketch.elf" < $tty_port_id > $tty_port_id
Retry 0: Got TIMEOUT
Retry 0: Got TIMEOUT

Transfer incomplete
#
#
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

 

 

 

BiswaRanjan S.'s picture

Hi Actually i am very new towards IOT and i found this kit "" Grove starter kit plus – Intel IoT Edition for Intel Galileo Gen 2 and Edison"" but i have a doubt that weather this kit contains board (i:e - Either Intel Edision or Intel Galileo ) or i have to buy the board separately .

Pooja Baraskar's picture

Josue Can you please check again pink styrofoam underneath the LED screen to locate the Base Shield.

Josue B.'s picture

Found the missing part! the Base shield. Can I import the co2 sensor library into the Intel Eclipse IDE?

Pooja Baraskar's picture

Glad that you liked it  :) Ricardo Braga

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.