guys plz help me

I was tried so much
but I can't fix this program;;
so I want you guys help
please help me

program is

ERRORS

In file included from blue.ino:4:
C:\Users\jsg79\Documents\Arduino\libraries\AndroidAccessory/AndroidAccessory.h:71: error: conflicting return type specified for 'virtual void AndroidAccessory::write(uint8_t)'
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'

Welcome to the Forum. Please read the first three posts at the top of the Forum, as they detail the format that is expected for posts. Doing that will help all of us to help you with your problem, especially how to post source code. Also, a more clear statement of what your problem is will also help.

like this????

Click on the sharp sign (#) and place your code between the tags.

I was tried so much
but I can fix this plogram
so I want you guys help
please help me

You aren't showing us all your sketch so we cannot help you.
=(

From the errors I see that you must be including a file "androidAccessory.h" (Even though it doesn't appear in your listing!) So I've sought out that library and downloaded it, in an attempt to recreate your problem. But I find there must be other libraries involved. As I am getting a whole raft of errors for undefined stuff.

We can't help unless you give COMPLETE information.

LarryD:
You aren't showing us all your sketch so we cannot help you.

And the part you did show, has simple errors like this:

dleay(loopDelay);

dleay?

ps.... reason for the code tags is this: you notice your code went all italic? Well the forum code tag for italic is open square bracket i close square bracket. But you have a for loop index i and it seems to want to access an array element. Guess what your code contained there?- yep, open square bracket i close square bracket, so the browser changed it to italic and the array index has disappeared.

#include <Servo.h> // servo motor header
#include <Max3421e.h> // USB HOST header
#include <Usb.h> // USB header
#include <AndroidAccessory.h> // ADK interlocking header
#include <Stepper.h> // stepmotor header
#include <LiquidCrystal.h> // character LCD header

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // RS,EN,D4,D5,D6,D7(RW?GND)

#define LED0 37
#define LED1 36
#define LED2 35
#define LED3 34
#define LED4 33
#define LED5 32
#define LED6 31
#define LED7 30
#define SERVO1 9
#define LIGHT_SENSOR A0
#define VR A1
#define TEMP_SENSOR A2
#define HUMI_SENSOR A3
#define sonicVal 55.5
#define trigger 10
#define echo 13
#define col0 49
#define col1 48
#define col2 47
#define col3 46
#define row0 45
#define row1 44
#define row2 43
#define row3 42
const int columnPin[]={49,48,47,46};
const int rowPin[]={45,44,43,42};
#define SM1 14
#define SM2 15
#define SM3 16
#define SM4 17
#define PIR 39
#define keyScanDelay 30 // keypad scan time setting
#define keyTxDelay 10 // keypad input during trasmission function wait time
#define loopDelay 50 // ADK action function wait time

AndroidAccessory acc("Google, Inc.",
"DemoKit",
"DemoKit Arduino Board",
"1.0",
"http://www.android.com",
"0000000012345678");
Servo servos[1];
byte msg[3];
char count=0;
const int stepsPerRevolution = 200;

// 1 Revolution 1.8degrees, 200 Revolution 360degrees
Stepper stepper(stepsPerRevolution,SM1,SM2,SM3,SM4);
unsigned int stepSpeed=100, contiuneTurn=0;
char CW=0,Contiune=0;;
char rxlcd=0, i=0;
int len=0;
unsigned long val;
char adkflag=0;
uint8_t success;
uint8_t uidLength;
uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the returned UID

void init_ultrasonic()
{
pinMode(trigger,OUTPUT);
digitalWrite(trigger,LOW);
pinMode(echo,INPUT);
digitalWrite(echo,LOW);
}

void init_leds()
{
pinMode(LED0, OUTPUT);
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
pinMode(LED4, OUTPUT);
pinMode(LED5, OUTPUT);
pinMode(LED6, OUTPUT);
pinMode(LED7, OUTPUT);
digitalWrite(LED0,HIGH);
digitalWrite(LED1,HIGH);
digitalWrite(LED2,HIGH);
digitalWrite(LED3,HIGH);
digitalWrite(LED4,HIGH);
digitalWrite(LED5,HIGH);
digitalWrite(LED6,HIGH);
digitalWrite(LED7,HIGH);
}

// KEYPAD
void init_keypad()
{
for(char i=0 ; i<4 ; i++)
{
pinMode(columnPin*,INPUT);*
_ digitalWrite(columnPin*,LOW);_
_
}*_

* for(char i=0 ; i<4 ; i++)*
* {*
_ pinMode(rowPin*,OUTPUT);
digitalWrite(rowPin,LOW);
}
}
// STEPMOTOR*

void init_stepmotor()
{
* pinMode(SM1,OUTPUT);
pinMode(SM2,OUTPUT);
pinMode(SM3,OUTPUT);
pinMode(SM4,OUTPUT);
digitalWrite(SM1, LOW);
digitalWrite(SM2, LOW);
digitalWrite(SM3, LOW);
digitalWrite(SM4, LOW);
}
void init_PIR()
{
pinMode(PIR, INPUT);
}
void setup()
{
Serial.begin(9600);
Serial.print("\r\nStart");
Serial1.begin(19200);//BT serial*

* lcd.begin(16, 2);
lcd.setCursor(0, 0); lcd.print(" WELCOM HIROSCI ");
lcd.setCursor(0, 1); lcd.print(" HR - ARDUINO ");
delay(1000); // 1S wait*

* lcd.setCursor(0, 0); lcd.print(" HR - ARDUINO ");
lcd.setCursor(0, 1); lcd.print(" ");*_

* init_leds();
init_ultrasonic();
init_keypad();
init_PIR();
_ servos[0].attach(SERVO1);
servos[0].write(0);*_

* acc.powerOn();*
}
void loop()
{
* stepper.setSpeed(stepSpeed);*
* if (acc.isConnected()) {*
* adkflag=1;*
* len = acc.read(msg, sizeof(msg), 1);*

* }*

* if(Serial1.available() >= 3)*
* {*
* adkflag=0;*
* msg[0]=Serial1.read();*
* msg[1]=Serial1.read();*
* msg[2]=Serial1.read();*
* len = sizeof(msg);*
* }*
* driverSelect(); // ADK action function*
}

int key_check() // Keypad check function
{
digitalWrite(row0,HIGH);
if(digitalRead(col0)){if(count){keyTx(1,0x0); count=0;}
else {keyTx(0,0x0); count=1;}} // key1
if(digitalRead(col1)){if(count){keyTx(1,0x1); count=0;}
else {keyTx(0,0x1); count=1;}} // key2
if(digitalRead(col2)){if(count){keyTx(1,0x2); count=0;}
else {keyTx(0,0x2); count=1;}} // key3
if(digitalRead(col3)){if(count){keyTx(1,0x3); count=0;}
else {keyTx(0,0x3); count=1;}} // key F1
digitalWrite(row0,LOW);

digitalWrite(row1,HIGH);
if(digitalRead(col0)){if(count){keyTx(1,0x4); count=0;}
else {keyTx(0,0x4); count=1;}} // key4
if(digitalRead(col1)){if(count){keyTx(1,0x5); count=0;}
else {keyTx(0,0x5); count=1;}} // key5
if(digitalRead(col2)){if(count){keyTx(1,0x6); count=0;}
else {keyTx(0,0x6); count=1;}} // key6
if(digitalRead(col3)){if(count){keyTx(1,0x7); count=0;}
else {keyTx(0,0x7); count=1;}} // key F2
digitalWrite(row1,LOW);
digitalWrite(row2,HIGH);
if(digitalRead(col0)){if(count){keyTx(1,0x8); count=0;}
else {keyTx(0,0x8); count=1;}} // key7
if(digitalRead(col1)){if(count){keyTx(1,0x9); count=0;}
else {keyTx(0,0x9); count=1;}} // key8
if(digitalRead(col2)){if(count){keyTx(1,0xa); count=0;}
else {keyTx(0,0xa); count=1;}} // key9
if(digitalRead(col3)){if(count){keyTx(1,0xb); count=0;}
else {keyTx(0,0xb); count=1;}} // key F3
digitalWrite(row2,LOW);

digitalWrite(row3,HIGH);
if(digitalRead(col0)){if(count){keyTx(1,0xc); count=0;}
else {keyTx(0,0xc); count=1;}} // key BACK
if(digitalRead(col1)){if(count){keyTx(1,0xd); count=0;}
else {keyTx(0,0xd); count=1;}} // key0
if(digitalRead(col2)){if(count){keyTx(1,0xe); count=0;}
else {keyTx(0,0xe); count=1;}} // key ESC
if(digitalRead(col3)){if(count){keyTx(1,0xf); count=0;}
else {keyTx(0,0xf); count=1;}} // key ENTER
digitalWrite(row3,LOW);
delay(keyScanDelay);
}
// keypad input during Transmission function
void keyTx(unsigned int flag, unsigned int TX)
{
msg[0]=0x8;
msg[1]=TX;
msg[2]=flag ? 0:1;
if(adkflag){acc.write(msg,3);}
else {
for(char i=0 ; i<3 ; i++){
Serial1.write(msg*);*

  • }*
  • }*
  • delay(keyTxDelay); *
    }
    // stepmotor angle, direction setting function
    void stepTurn(unsigned int turn)
    {
  • if(CW) {stepper.step(turn); } // Forward*
  • else {stepper.step(-turn); } // Reverse*
    }
    void driverSelect()
    {
  • if (len > 0) { // 1-byte ~ 3-byte data is received from the smart phone*
  • if (msg[0] == 0x0) { // LED Control*
  • if (msg[1] == 0x0) digitalWrite(LED0,msg[2] ? HIGH : LOW);*
  • // LED1 ON or OFF*
  • else if (msg[1] == 0x1) digitalWrite(LED1,msg[2] ? HIGH : LOW);*
  • // LED2 ON or OFF *
  • else if (msg[1] == 0x2) digitalWrite(LED2,msg[2] ? HIGH : LOW);*
  • // LED3 ON or OFF*
  • else if (msg[1] == 0x3) digitalWrite(LED3,msg[2] ? HIGH : LOW);*
  • // LED4 ON or OFF*
  • else if (msg[1] == 0x4) digitalWrite(LED4,msg[2] ? HIGH : LOW);*
  • // LED5 ON or OFF*
  • else if (msg[1] == 0x5) digitalWrite(LED5,msg[2] ? HIGH : LOW);*
  • // LED6 ON or OFF*
  • else if (msg[1] == 0x6) digitalWrite(LED6,msg[2] ? HIGH : LOW);*
  • // LED7 ON or OFF*
  • else if (msg[1] == 0x7) digitalWrite(LED7,msg[2] ? HIGH : LOW);*
  • // LED8 ON or OFF *
  • }*
  • if (msg[0] == 0x1) { // Servo motor Control*
  • if (msg[1] == 0x0) servos[0].write(map(msg[2], 0, 255, 0, 180));*
  • // Servo motor 0~180angle data Setting*
  • }*
  • if(msg[0]==0x2){// stepmotor Control*
  • if(msg[1]==0x0){CW=1; stepTurn(msg[2]);}*
  • else if(msg[1]==0x1){CW=0; stepTurn(msg[2]);}*
  • else if(msg[1]==0x2){Contiune=1; contiuneTurn=msg[2];}*
  • else if(msg[1]==0x3){Contiune=0;}*
  • }*
  • if(msg[0]==0xa)// Received data character lcd*
  • {*
  • if(msg[1]==0x0)*
  • {*
  • rxlcd=msg[2];*
  • if(rxlcd==127)*
  • {*
  • --i;*
  • if(i<0) i=15;*
  • lcd.setCursor(i,1);lcd.print(" ");*
  • }*
  • else*
  • {*
  • lcd.setCursor(i,1);lcd.print(rxlcd);i++;*
  • }*
  • if(i==16) i=0;*
  • }*
  • }*
  • }*
  • if(Contiune) // stepmotor contiune control*
  • {*
  • if(CW) stepper.step(contiuneTurn);*
  • else stepper.step(-contiuneTurn);*
  • } *
  • // Temperature sensor data transmission smartphone*
  • val = analogRead(TEMP_SENSOR);*
  • msg[0] = 0x03;*
  • msg[1] = val >> 8;*
  • msg[2] = val & 0xff;*
  • if(adkflag){acc.write(msg,3);}*
  • else {*
  • for(char i=0 ; i<3 ; i++){*
    _ Serial1.write(msg*);_
    _
    }_
    _
    } _
    _
    // Humidity sensor data transmission smartphone*_
    * val = analogRead(HUMI_SENSOR);
    _
    msg[0] = 0x4;_
    _
    msg[1] = val >> 8;_
    _
    msg[2] = val & 0xff;_
    _
    if(adkflag){acc.write(msg,3);}_
    _
    else {_
    _
    for(char i=0 ; i<3 ; i++){_
    _ Serial1.write(msg);
    }
    }
    // CdS sensor data transmission smartphone*
    * val = analogRead(LIGHT_SENSOR);*
    * msg[0] = 0x5;
    msg[1] = val >> 8;
    msg[2] = val & 0xff;
    if(adkflag){acc.write(msg,3);}
    else {
    for(char i=0 ; i<3 ; i++){
    Serial1.write(msg);
    }
    }
    // Potentiometer sensor data transmission smartphone*

    * val = analogRead(VR);
    msg[0] = 0x6;
    msg[1] = val >> 8;*_

* msg[2] = val & 0xff;*
* if(adkflag){acc.write(msg,3);}*
* else {*
* for(char i=0 ; i<3 ; i++){*
_ Serial1.write(msg*);
}
} *_

* key_check();
_ // PIR sensor data transmission smartphone
val = digitalRead(PIR);
msg[0] = 0x9;
msg[1] = 0x0;
msg[2] = val?0:1;
if(adkflag){acc.write(msg,3);}
else {
for(char i=0 ; i<3 ; i++){
Serial1.write(msg);
}
}
// Ultrasonic sensors data transmission smartphone
digitalWrite(trigger, HIGH);
delayMicroseconds(10);
digitalWrite(trigger, LOW);
val=pulseIn(echo,HIGH)/sonicVal;
delay(50);
msg[0] = 0x7;
msg[1] = 0x0;
msg[2] = val;
if(adkflag){acc.write(msg,3);}
else {
for(char i=0 ; i<3 ; i++){
Serial1.write(msg);
}
}
delay(loopDelay);
}*_

You have not read the first three posts to this Forum and you didn't use the code tags. I, for one, will not respond again until you learn how to use code tags.

Did you miss the part about it going italic in my previous post? It's not just that it's italic: your cosde has actually been interpreted by the browser. Nobody can read that... please use code tags. Go to Modify, select the code text, and hit the # icon above the :wink: :sweat_smile: smilies.

And you can do attachments. Which you would have found out if you had read the sticky posts at the start of the forum section as a number of people have advised you to do.