Go Down

Topic: Problems while uploading a sketch into my Arduino IDE software. Desperation. (Read 1 time) previous topic - next topic

JosuEF

Brief description of the issue:

I have recently bought my new board (Arduino Micro) and now I am trying to upload a sketch (program) that I just opened. This sketch is set to enable a connection between BitVoicer and Arduino.

My OS is Windows 7. The green light of my board is not fixed, it flashes all the time (the only moment it's fixed is when I reset the board or when I unplug and then plug the USB cable, and it just lasts a few seconds).

Arduino IDE version: 1.0.5-r2
BitVoicer version: 1.2


_______________________________________

This is the error log that appears in the Arduino software console:

moverjugadasArena:9: error: 'BitVoicerSerial' does not name a type
moverjugadasArena.ino: In function 'void loop()':
moverjugadasArena:46: error: 'bvSerial' was not declared in this scope
moverjugadasArena:54: error: 'BV_BYTE' was not declared in this scope

_______________________________________

And this is the whole tag thing of the sketch:

Code tags added by moderator
Code: [Select]

//Imports the BitVoicer library to the sketch

#include <BitVoicer11.h>



//Instantiates the BitVoicerSerial class

BitVoicerSerial bvSerial = BitVoicerSerial();



//Stores the data type retrieved by getData()

byte dataType = 0;




void setup()

{

 //Starts serial communication at 9600 bps

 Serial.begin(9600);



}



void loop()

{

 

 if (Serial.available() > 0)

 {

   //Reads the serial buffer and stores the received data type

   dataType = bvSerial.getData();

 

   //Checks if the data type is the same as the one in the

   //Voice Schema

   if (dataType == BV_BYTE)

   {

     //Checks the stored value in byteData by getData()

     //movimientos:

   
     switch (bvSerial.byteData) {
   case 0:
     Keyboard.print("a1");
     break;
   case 1:
     Keyboard.print("a2");
     break;
   case 2:
     Keyboard.print("a3");
     break;
       case 3:
     Keyboard.print("a4");
     break;
         case 4:
     Keyboard.print("a5");
     break;
         case 5:
     Keyboard.print("a6");
     break;
         case 6:
     Keyboard.print("a7");
     break;
         case 7:
     Keyboard.print("a8");
     break;
         case 8:
     Keyboard.print("b1");
     break;
         case 9:
     Keyboard.print("b2");
     break;
         case 10:
     Keyboard.print("b3");
     break;
         case 11:
     Keyboard.print("b4");
     break;
         case 12:
     Keyboard.print("b5");
     break;
         case 13:
     Keyboard.print("b6");
     break;
         case 14:
     Keyboard.print("b7");
     break;
         case 15:
     Keyboard.print("b8");
     break;
         case 16:
     Keyboard.print("c1");
     break;    
         case 17:
     Keyboard.print("c2");
     break;  
         case 18:
     Keyboard.print("c3");
     break;
         case 19:
     Keyboard.print("c4");
     break;
         case 20:
     Keyboard.print("c5");
     break;
         case 21:
     Keyboard.print("c6");
     break;
         case 22:
     Keyboard.print("c7");
     break;
         case 23:
     Keyboard.print("c8");
     break;
         case 24:
     Keyboard.print("d1");
     break;
         case 25:
     Keyboard.print("d2");
     break;
         case 26:
     Keyboard.print("d3");
     break;      
               case 27:
     Keyboard.print("d4");
     break;
               case 28:
     Keyboard.print("d5");
     break;
               case 29:
     Keyboard.print("d6");
     break;
               case 30:
     Keyboard.print("d7");
     break;
               case 31:
     Keyboard.print("d8");
     break;
               case 32:
     Keyboard.print("e1");
     break;
               case 33:
     Keyboard.print("e2");
     break;
               case 34:
     Keyboard.print("e3");
     break;
               case 35:
     Keyboard.print("e4");
     break;
               case 36:
     Keyboard.print("e5");
     break;
               case 37:
     Keyboard.print("e6");
     break;
               case 38:
     Keyboard.print("e7");
     break;
               case 39:
     Keyboard.print("e8");
     break;
               case 40:
     Keyboard.print("f1");
     break;
               case 41:
     Keyboard.print("f2");
     break;
               case 42:
     Keyboard.print("f3");
     break;
               case 43:
     Keyboard.print("f4");
     break;
               case 44:
     Keyboard.print("f5");
     break;
               case 45:
     Keyboard.print("f6");
     break;
               case 46:
     Keyboard.print("f7");
     break;
               case 47:
     Keyboard.print("f8");
     break;
               case 48:
     Keyboard.print("g1");
     break;
               case 49:
     Keyboard.print("g2");
     break;
               case 50:
     Keyboard.print("g3");
     break;
               case 51:
     Keyboard.print("g4");
     break;
               case 52:
     Keyboard.print("g5");
     break;
               case 53:
     Keyboard.print("g6");
     break;
               case 54:
     Keyboard.print("g7");
     break;
               case 55:
     Keyboard.print("g8");
     break;
               case 56:
     Keyboard.print("h1");
     break;
               case 57:
     Keyboard.print("h2");
     break;
               case 58:
     Keyboard.print("h3");
     break;
               case 59:
     Keyboard.print("h4");
     break;
               case 60:
     Keyboard.print("h5");
     break;
               case 61:
     Keyboard.print("h6");
     break;
               case 62:
     Keyboard.print("h7");
     break;
               case 63:
     Keyboard.print("h8");
     break;
     
     //borrar jugada - NO SE USA EN ARENA:
     
     //          case 64:
    // Keyboard.write(8);

   //  break;
     
     //retroceder movimiento:
               case 65:
    Keyboard.write(8);
    Keyboard.write(8);
    Keyboard.write(8);
    Keyboard.write(8);
    Keyboard.write(8);
     break;
     
     //nueva partida:
           case 66:
      Keyboard.write(130);
      Keyboard.write(217);
      Keyboard.print("n");
     break;
     
     
 }

   }

 }

}


Thank you very much in advance.


spycatcher2k

Mrs Drew
-=-
http://www.uk-pcb.co.uk - UK PCB Fab Company
I will design & code for you, but I will also charge you (PM me)
If you don't like my answers, realize : I'm not being cheeky, I'm Just trying to prompt you to use your own brain/google etc.

CrossRoads

In File:Preferences, there is a path.
That path should have a /libraries folder.
The bitvoicer library should be there.
From the error noted, it doesn't appear to be.

Also, please use code tags (# button) when posting code.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

JosuEF

It worked!

Thank you very much for your quick replies and for the the instructions on how to insert code tags when including codes in my posts.

Issue solved  ;)

JosuEF

Well, all seemed ok (now that the sketch is correctly uploaded to the Arduino software) but it turns out that now the green light of the board is off (there's only the blue light that is on under the main part of the board) and when I reset the board it just lights for a few seconds (the amount of time needed for Windows to recognise the new device plugged in, like a pen drive for example), but then it switches off again and an orange light (RX, that is next to a TX light that I suppose is orange as well because both are equal) appears for one second and then nothing happens. What is that RX orange light that lights for just 1 second?

I have tried to find the answer myself in the troubleshooting section, but I can't find it. Do you know what may be happening?

Thank you very much again.

JosuEF

I have an important update on this issue, the green light only turns itself on when I upload a different sketch from the two I've been trying for a few hours (https://sites.google.com/site/chesswithvoice/home/files). I have uploaded the Blink basic example into my Arduino micro and the green light just flashed as usual (before uploading the files on the link above).

Any ideas? Hope this may help you find out what's going on, I'm quite a newbie on this whole thing with Arduino.

Thanks again.

Go Up