5 Replies Latest reply on Apr 17, 2019 8:34 PM by the_future

    Help! Speech Recognition (upload error)

    the_future

      Hi thanks for giving this a look at!

      Was following a tutorial on youtube on Speech Recognition (geeetech module) as you (https://www.youtube.com/watch?v=Ur1tzMDP97g )

      and I noticed that when I tried to upload the code I got a busy board and a runtime error whatever

      that means.

       

      What is funny is that I had to move to another computer to be able to upload any other code

      to the boards but when I reuploaded the code on a new computer it gave me the same error again and stops me

      from uploading any different code even a blank sketch.

       

      Please help

      Code:

       

      byte com = 0;

       

      void setup() {

           Serial.begin(9600);

       

           Serial.write(0xAA);

           Serial.write(0x37);

           delay(1000);

           Serial.write(0xAA);

           Serial.write(0x21);

      }

       

      void loop() {

       

        while(Serial.available()) {

             com = Serial.read();

             switch(com) {

       

            case 0x11:   //command 1

            Serial.println("a");

            break;

       

            case 0x12:  //command 2

            Serial.println("b");

            break;

       

       

            case 0x13:  //command 3

            Serial.println("c");

            break;

       

       

            case 0x14:  //command 4

            Serial.println("d");

            break;

       

       

            case 0x15:  //command 5

            Serial.println("e");

            break;

       

                  }

            }

      }

       

       

       

       

      Mega Error Messages:

       

      "Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)" Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

      Sketch uses 2084 bytes (0%) of program storage space. Maximum is 253952 bytes.

      Global variables use 199 bytes (2%) of dynamic memory, leaving 7993 bytes for local variables.Maximum is 8192 bytes.

       

      avrdude: stk500v2_ReceiveMessage(): timeout

      avrdude: stk500v2_ReceiveMessage(): timeout

      avrdude: stk500v2_ReceiveMessage(): timeout

      avrdude: stk500v2_ReceiveMessage(): timeout

      avrdude: stk500v2_ReceiveMessage(): timeout

      avrdude: stk500v2_ReceiveMessage(): timeout

      avrdude: stk500v2_getsync(): timeout communicating with programmer An error occurred while uploading the sketch

       

       

       

       

      Uno Error Messages:

       

      Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"

      Sketch uses 1786 bytes (5%) of program storage space. Maximum is 32256 bytes.

      Global variables use 199 bytes (9%) of dynamic memory, leaving 1849 bytes for local variables.Maximum is 2048 bytes.

       

      avrdude: stk500_recv(): programmer is not responding

      avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x68

      avrdude: stk500_recv(): programmer is not responding

      avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x68

      avrdude: stk500_recv(): programmer is not responding

      avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x68

      avrdude: stk500_recv(): programmer is not responding

      avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x68

      avrdude: stk500_recv(): programmer is not responding

      avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x68

      avrdude: stk500_recv(): programmer is not responding

      avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x68

      avrdude: stk500_recv(): programmer is not responding

      avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x68

      avrdude: stk500_recv(): programmer is not responding

      avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x68

      avrdude: stk500_recv(): programmer is not responding

      avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x68

      avrdude: stk500_recv(): programmer is not responding

      avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x68

        • Re: Help! Speech Recognition (upload error)
          shabaz

          Hi,

           

          It looks like a driver, program installation, software version, or connection issue. I don't have any more knowledge in this area though.

          From the error message, it is unlikely to be anything to do with your source code that you have shown, provided it built correctly. This is because the error message refers to the programmer, it is not related to the compiler.

          1 of 1 people found this helpful
          • Re: Help! Speech Recognition (upload error)
            lui_gough

            Check you have selected the correct board type and serial port. It looks like the Arduino IDE is having problems communicating with the microcontroller on the board. My suspicion is that you may have a shield or some other circuitry that is using the Pin 0 or Pin 1 on the Arduno Uno (i.e. its UART port pins) or attempting to communicate with the board during programming corrupting the data. As a result, communication is not being established with the ATMega microcontroller and the programmer times out.

             

            Try removing any shields or anything connected to the Arduno Uno board and try programming again. Once programmed, then reattach the shield to see if it works. Some shields have switchable serial lines so you can use other pins with SoftwareSerial or you can temporarily disconnect the UART connection to prevent interfering with sketch upload.

             

            If this doesn't help and nothing is attached to Pin D0/D1 ... you may have something else going on - e.g. a damaged bootloader on the ATMega microcontroller which you might need to use ArduinoISP and another working Arduino to recover from.

             

            - Gough

            4 of 4 people found this helpful
              • Re: Help! Speech Recognition (upload error)
                the_future

                Hi thanks for this great help it now uploads when I remove the pins of the Geeetech Voice Module attached to the TX (pin 1) and RX (pin 0) of the Arduino Uno board, however even though it uploads when I say the words I have stored and imported to the module in "Group 1" nothing happens. See tutorial I am following -> https://youtu.be/Ur1tzMDP97g

                  • Re: Help! Speech Recognition (upload error)
                    lui_gough

                    The way you've wired or designed your sketch is probably not the best for an Arduino Uno which has a single UART port. You're trying to use the UART to communicate with the module itself, and it seems you're trying to read a response from the module and communicate with the computer. While it could possibly work, I'm not sure it's necessarily a great idea to do it this way as most UARTs are designed to "talk" to one partner only and if there is a disagreement between the logic levels (e.g. module sends a high but the USB-Serial bridge sends a low) then you're likely to cause a short which would either stress or damage the UART. For a Uno, it's probably best to have the module hosted on its own separate SoftwareSerial instance which can run on its own pins separate from the 0/1 which are used for communication with the PC via the USB-Serial bridge.

                     

                    With different boards (e.g. the Arduino Leonardo ATMega32u4-based boards), the UART pins (0/1) are separate from the serial monitor console (emulated USB serial port) which would allow this sort of configuration to work but in return they come with their own complications to do with port enumeration on resetting which can cause its own headaches.

                     

                    Regardless, at this point, you may have uploaded the sketch correctly, but if nothing happens then it seems several possibilities could be the cause:

                    • The module itself may not be sending the response you are expecting - maybe it's not functioning, not correctly powered, not receiving the input it expects.
                    • The Arduino may not be receiving the response from the module it expects and is not generating the output you expect - perhaps you have RX/TX swapped or there is something subtle wrong with the code such as a baud rate mismatch between the module and Arduino or more likely, there's a logic level clash because you have multiple drivers connected to an input as I mentioned earlier.
                    • The PC may not be receiving the expected response from the Arduino - this may be because the terminal emulator baud rate is incorrectly set, because of incorrect port selection or for some other reason.

                     

                    You really need to break the problem down to identify where the issue is. Perhaps if you have access to an oscilloscope, start by seeing what is happening on the data lines and whether it corresponds to what you're expecting (e.g. response from module).

                     

                    - Gough

                    2 of 2 people found this helpful
                • Re: Help! Speech Recognition (upload error)
                  the_future

                  Sorry you are going to have to break that down for me :) what do I physically have to, what are the physical common problems that this model has? This is an open question