Board not found on COM5 when using the Gravity: Offline Language Learning Voice Recognition Sensor on Arduino Nano 33 IoT

Hello all,

I am currently trying to use the Gravity: Offline Language Learning Voice Recognition Sensor with my Arduino nano 33 IoT however every time I use it the nano with specifically just this voice recognition module I get the "No device found on COM5" error. I tried it with the same usb cable and still had the same issue, tried resetting the board and also no luck. I tested the board with a simple LED blink sketch and it worked no problem. This problem only arises when using the voice recognition module. I have a feeling it has something to do with the SDA/SCL pins I am using as this is the first time I have used them on a nano and I2C. Also probably worth mentioning I tried this circuit and program on the UNO and it worked just fine. Any help would be greatly appreciated, below is the code and picture of the circuit. Also I will add a link provided by the manufacturer that shows other details about the product. SKU_SEN0539-EN_Gravity_Voice_Recognition_Module_I2C_UART-DFRobot

/*!
 * @file  i2c.ino
 * @brief Control the voice recognition module via I2C
 * @n  Get the recognized command ID and play the corresponding reply audio according to the ID;
 * @n  Get and set the wake-up state duration
 * @copyright  Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
 * @licence  The MIT License (MIT)
 * @author  [qsjhyy](yihuan.huang@dfrobot.com)
 * @version  V1.0
 * @date  2022-04-02
 * @url  https://github.com/DFRobot/DFRobot_DF2301Q
 */
#include "DFRobot_DF2301Q.h"

#define Led 8

int blueLED = 7;

//I2C communication
DFRobot_DF2301Q_I2C asr;

void setup() {
  Serial.begin(9600);

  //pinMode(Led, OUTPUT);    //Init LED pin to output mode
  //digitalWrite(Led, LOW);  //Set LED pin to low 
  pinMode(blueLED, OUTPUT);


  // Init the sensor
  while (!(asr.begin())) {
    Serial.println("Communication with device failed, please check connection");
    delay(3000);
  }
  Serial.println("Begin ok!");

  /**
   * @brief Set voice volume
   * @param voc - Volume value(1~7)
   */
  asr.setVolume(4);

  /**
     @brief Set mute mode
     @param mode - Mute mode; set value 1: mute, 0: unmute
  */
  asr.setMuteMode(0);

  /**
     @brief Set wake-up duration
     @param wakeTime - Wake-up duration (0-255)
  */
  asr.setWakeTime(20);

  /**
     @brief Get wake-up duration
     @return The currently-set wake-up period
  */
  uint8_t wakeTime = 0;
  wakeTime = asr.getWakeTime();
  Serial.print("wakeTime = ");
  Serial.println(wakeTime);

  // asr.playByCMDID(1);   // Wake-up command

  /**
     @brief Play the corresponding reply audio according to the ID
     @param CMDID - command word ID
  */
  //asr.playByCMDID(23);  // Command word ID
}

void loop() {
  /**
     @brief Get the ID corresponding to the command word 
     @return Return the obtained command word ID, returning 0 means no valid ID is obtained
  */
  uint8_t CMDID = asr.getCMDID();
  switch (CMDID) {

    case 5:    //command 1                                              //If the command is “Turn on the light”
      digitalWrite(blueLED, HIGH);                                 //Turn on the LED
      Serial.println("received'Blue light ON',command flag'5'");  //Serial transmits "received"Turn on the light",command flag"103
      break;

      case 6:      // command 2                                            //If the command is “Turn on the light”
      digitalWrite(blueLED, LOW);                                 //Turn on the LED
      Serial.println("received'Blue light OFF',command flag'6'");  //Serial transmits "received"Turn on the light",command flag"103
      break;

    default:
      if (CMDID != 0) {
        Serial.print("CMDID = ");  //Printing command ID
        Serial.println(CMDID);
      }
  }
  delay(300);
}

Look very carefully at the switch in the image. It looks to me like it's in the UART position, not the I2C position.

1 Like

Amazing catch, I didn't even notice that switch was there. Thank you so much! Works now :slight_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.