san Antonio
Offline
Newbie
Karma: 0
Posts: 29
|
 |
« on: October 28, 2012, 09:29:47 pm » |
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
Faraday Member
Karma: 33
Posts: 3617
@ssh0le
|
 |
« Reply #1 on: October 28, 2012, 11:41:59 pm » |
post code
|
|
|
|
|
Logged
|
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
|
|
|
|
san Antonio
Offline
Newbie
Karma: 0
Posts: 29
|
 |
« Reply #2 on: October 29, 2012, 01:01:28 am » |
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
Faraday Member
Karma: 19
Posts: 3118
|
 |
« Reply #3 on: October 29, 2012, 07:33:11 am » |
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
Newbie
Karma: 0
Posts: 29
|
 |
« Reply #4 on: October 29, 2012, 02:54:11 pm » |
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
Faraday Member
Karma: 19
Posts: 3118
|
 |
« Reply #5 on: October 30, 2012, 03:04:55 am » |
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
Newbie
Karma: 0
Posts: 29
|
 |
« Reply #6 on: November 01, 2012, 02:39:30 pm » |
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
Faraday Member
Karma: 33
Posts: 3617
@ssh0le
|
 |
« Reply #7 on: November 01, 2012, 06:36:47 pm » |
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
|
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
|
|
|
|
san Antonio
Offline
Newbie
Karma: 0
Posts: 29
|
 |
« Reply #8 on: November 12, 2012, 01:58:59 am » |
how it does work for you?
|
|
|
|
|
Logged
|
|
|
|
|
California
Offline
Edison Member
Karma: 37
Posts: 1827
|
 |
« Reply #9 on: November 12, 2012, 02:12:47 am » |
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
Newbie
Karma: 0
Posts: 29
|
 |
« Reply #10 on: November 12, 2012, 02:49:51 am » |
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
|
|
|
|
|
|