I am trying to run a Geeetech Voice Recognition Module to recognize my commands and change the color of Neopixels with them. The problem is, that my Arduino never receives the output from the voice recognition module. When connect it to my computer and use AccessPort to communicate, everything works fine. The module is connected to the Rx and Tx pins correctly and it even receives the startup data from the Arduino Uno.
I've already tried sending a command via serial monitor, the Arduino Rx LED blinks shortly, by it never blinks when my Voice Recognition Module should send data. I even tried to power it through a separate power supply, but it didn't change anything. I disconnect the Rx pin while uploading, connect the pin after that and then I use the reset button of the Arduino.
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 5
Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, PIN, NEO_GRB + NEO_KHZ800);
byte com = 0;
void setup()
{
Serial.begin(9600);
strip.begin();
strip.show();
delay(2000);
Serial.write(0xAA);
Serial.write(0x37);
delay(1000);
Serial.write(0xAA);
Serial.write(0x21);
}
void loop() // run over and over again
{
if(Serial.available() > 0)
{
com = lowByte(Serial.read());
switch(com)
{
case 0x11:
strip.setPixelColor(0, strip.Color(255,255,255));
break;
case 0x12:
strip.setPixelColor(0, strip.Color(255,0, 0));
break;
case 0x13:
strip.setPixelColor(0, strip.Color(0,255, 0));
break;
case 0x14:
strip.setPixelColor(0, strip.Color(0, 0, 255));
break;
case 0x15:
strip.setPixelColor(0, strip.Color(0,0,0));
break;
}
}
delay(250);
}
I expect the LED color to change, but it never changes.