Problem with a line of code

I have a Arduino mega with the Audeme MOVI speech recognition/speech generation module. I'm using 7 of the digital pins for my project. I control a couple of motors and 3 lights. Everything works fine until I enter the code line pinMode(10,OUTPUT); if this line is a part of the code it will not excuse any verbal commands or MOVI will not update new commands. I do get the audible signal that MOVI heard my command . It's just not exicuted. Remove that line of code and everything functions normal. I switched that output from pin 10 t0 pin 4 and it's ok.
Has anyone seen this problem?

Your topic was MOVED to its current forum category as it is more suitable than the original

It sounds like something else is using pin 10

Please post your full sketch using code tags when you do

From the MOVIShield.h header file:

#ifndef ARDUINO_RX_PIN
#define ARDUINO_RX_PIN 10 // Arduino RX pin (default 10) needs to be connected to MOVI TX PIN
#endif

#ifndef ARDUINO_TX_PIN
#define ARDUINO_TX_PIN 11 // Arduino TX pin (default 11) needs to be connected to MOVI RX PIN
#endif

So it appears that pin 10 is used by the shield to connect with software serial. Of course that is assuming that you are using an AVR based board, you do not say.

Why am I tempted to wonder how much whitespace is in the code?

@leonbs never mind, that’s a world wide inside joke on these fora just now.

a7

I’m not using avr board to my knowledge.
Just mega 2560 and movi

| groundFungus
February 19 |

  • | - |

From the MOVIShield.h header file:

#ifndef ARDUINO_RX_PIN
#define ARDUINO_RX_PIN 10 // Arduino RX pin (default 10) needs to be connected to MOVI TX PIN
#endif

#ifndef ARDUINO_TX_PIN
#define ARDUINO_TX_PIN 11 // Arduino TX pin (default 11) needs to be connected to MOVI RX PIN
#endif

So it appears that pin 10 is used by the shield to connect with software serial. Of course that is assuming that you are using an AVR based board, you do not say.

Mega is an AVR-based board.

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