Pages: [1]   Go Down
Author Topic: Meetandroid does not name a type?  (Read 1608 times)
0 Members and 1 Guest are viewing this topic.
san Antonio
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

post code
Logged


san Antonio
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

san Antonio
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

san Antonio
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i made the video here is

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...
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


san Antonio
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

how it does work for you?
Logged

California
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3446
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

san Antonio
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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>
Logged

Pages: [1]   Go Up
Jump to: