Go Down

Topic: Meetandroid does not name a type? (Read 1 time) previous topic - next topic

ironheartbj18

I tried upload or verify it said " 'Meetandroid' does not name a type".
I am using the cho1 droid droid file

ch01_droid_droid.cpp: In function 'void setRight(byte, byte)':
ch01_droid_droid.pde:-1: error: 'phone' was not declared in this scope

I download all the zip files from Amarino MeetAndroid - Arduino Library. I was test any of Meetandroid it still error.

Does anybody know how to solve it? please help thanks !

Osgeld

http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

ironheartbj18

i am on Arduino version 1.0.1 click file , sketchbook, Arduino android, ch 1 droid droid. the example were

#include <MeetAndroid.h>

#define supplyVolts 6
#define motorVolts 5
#define baudRate 9600

MeetAndroid phone;

int left = 255; // midpoint
int right = 255;


int pwmLeftPin = 3; 
int pwmRightPin = 11; 
int directionLeftPin = 12; 
int directionRightPin = 13; 


void setup() 
{
  pinMode(pwmLeftPin, OUTPUT);
  pinMode(pwmRightPin, OUTPUT);
  pinMode(directionLeftPin, OUTPUT);
  pinMode(directionRightPin, OUTPUT);
  setMotors();
 
  // use the baud rate your bluetooth module is configured to
  Serial.begin(baudRate);
  phone.registerFunction(setLeft, 'l'); 
  phone.registerFunction(setRight, 'r'); 
}

void loop()
{
  phone.receive();
}

void setLeft(byte ignore, byte count)
{
  int value = phone.getInt();
  left = value;
  setMotors();
}


void setRight(byte ignore, byte count)
{
  int value = phone.getInt();
  right = value;
  setMotors();
}

void setMotors()
{
   int vLeft = abs(left - 255) * motorVolts / supplyVolts;
   int vRight = abs(right - 255) * motorVolts / supplyVolts;
   int dLeft = (left > 255);
   int dRight = (right > 255);
   if (vLeft < 50)
   {
     vLeft = 0;
   }
   if (vRight < 50)
   {
     vRight = 0;
   }
   analogWrite(pwmLeftPin, vLeft);
   analogWrite(pwmRightPin, vRight);
   digitalWrite(directionLeftPin, dLeft);
   digitalWrite(directionRightPin, dRight);
}

then i verify it and 'Meetarduino' does not name a type with orange label.

dxw00d

That code compiles fine for me. As you are using 1.0.1, it won't tell you if it can't find the library files, which is the most likely problem. Where have you put them?

ironheartbj18

yes it was very strange with Arduino 1.0. i was wondering which one the Arduino did not recognize the meetardunio.  which one you were using the verison?
even i tried the version were 0023  its still same problem.

i checked what i did is i went to Amarino clickd the download said " MeetAndroid - Arduino Library"
they said The MeetAndroid library (MeetAndroid.zip) needs to be extracted into your Arduino sketches directory...

BUT...  i did is i went to Arduino click sketch , add file. not import library.

after that , it does show on my sketch book of Meet Android few of example in there...

I already extracted into my Arduino sketches book. it seem fine so far except error the code by said meetarduino in the beginning... 

is there problem with my computer software?
or
is there problem with my update Arduino?

dxw00d

There should be a libraries folder in your sketchbook folder. If there isn't a libraries folder there, create one. The MeetAndroid folder should be in the libraries folder.

ironheartbj18

i made the video here is http://www.youtube.com/watch?v=XbleM0Vm85k

i dont know what wrong with that... why it does showing meetandroid does not type a name???

it already in the stechk book. My Arduino does not recongized it... any one have experience this before???? i need help so badly ! i was working on this project for two days already...

Osgeld

when you first install arduino there is nothing in the sketch book, so where you got this and where is the library is the mystery.
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

ironheartbj18


Arrch

Click Sketch > Import Library. If you don't see the MeetAndroid in there, then it's not installed correctly. You need to unzip the zip file into your Sketchbook/libraries folder. It needs to be in it's own folder under the libraries sub-directory.

ironheartbj18

about the time!!! thank you so much. i was working on my zip to unzip folder move into my libraries . I opened up my Arduino and go to sketch, import library  if the meet android were there. and it should said #include <MeetAndroid.h>

Go Up