Grove - Heelight Sensor

Introduction

Grove – Heelight Sensor is a smart voice sensor that can recognize up tp 500 digital voice commands. It was originally used on the Heelight – a smart colorful bulb that can be controlled by digital sound waves. Now we introduce this sensor into the small and neat Grove modules, allow you to realize smart control in your Arduino – based projects.

Features

  • Digital Voice Recognition

  • Support over 500 digital voice commands

  • Compatible with the Grove system

Specification

Product Name Grove-Heelight Sensor
Operating Voltage DC 3.3V~5V
Operating Current 15mA
Identification Range 0.1~10m
Angle Range 360°
Size 20*20mm
Baud Rate 115200
Serial Port Output TTL logic level

Getting Started

What do we need?

Name Function Qty Link
Base Shield V2 Provide Grove connectors 1 Get One Now
Seeeduino V4.2 Controller 1 Get One Now
Grove - Heelight Sensor Sensor 1 Get One Now

Hardware Connection

  • Plug the Base Shield V2 on the Seeeduino V4.2
  • Connect the Grove - Heelight Sensor to D6 port of Base Shield V2.

Upload the code

Before uploading the code, please make sure you have already selected the right board and COM port. For Seeeduino V4.2, we can choose Arduino/Genuino Uno.

This is the basic example that can show the ability of the sensor, which is output different hex values in the serial monitor when it receives (or hear) different digital sounds. You can also download this example in the Resources

/*
  Software serial multple serial test

 Receives from the hardware serial, sends to software serial.
 Receives from software serial, sends to hardware serial.

 The circuit:
 * RX is digital pin 10 (connect to TX of other device)
 * TX is digital pin 11 (connect to RX of other device)

 Note:
 Not all pins on the Mega and Mega 2560 support change interrupts,
 so only the following can be used for RX:
 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69

 Not all pins on the Leonardo support change interrupts,
 so only the following can be used for RX:
 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

 created back in the mists of time
 modified 25 May 2012
 by Tom Igoe
 based on Mikal Hart's example

 This example code is in the public domain.
*/

#include <SoftwareSerial.h>

SoftwareSerial mySerial(6, 7); // RX, TX

void setup()
{
  // Open serial communications and wait for port to open:
  Serial.begin(57600);
   mySerial.begin(115200);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port

  //mySerial.println("Hello, world?");
}

void loop() // run over and over
{
  if (mySerial.available())
  {
    Serial.print(mySerial.read(),HEX);
    Serial.print(" ");
    Serial.print(mySerial.read(),HEX);
    Serial.print(" ");
    Serial.print(mySerial.read(),HEX);
    Serial.print(" ");
    Serial.print(mySerial.read(),HEX);
    Serial.println();
  }
  if (Serial.available())
    mySerial.write(Serial.read());
}

Results

Open the serial monitor, set baud rate to be 57600, then play the sound. We have prepared 511 different digital sounds for you. Every time one sound is played, the heelight sensor will output a hex value correspond to the sound, and the last 2 characters of the hex value is the same as the sounds value.

Note

If this sensor doesn’t work well when you play the specific sounds we provided via PC or other speakers, please set the volume in a low level. We recommend 10/100 in windows PC.

Resources

Help us make it better

Welcome to the new documentation system of Seeed Studio. We have made a lot of progress comparing to the old wiki system and will continue to improve it to make it more user friendly and helpful. The improvement can't be done without your kindly feedback. If you have any suggestions or findings, you are most welcome to submit the amended version as our contributor via Github or give us suggestions in the survey below, it would be more appreciated if you could leave your email so that we can reply to you. Happy Hacking!