Show Posts
Pages: 1 2 [3] 4 5 ... 10
31  Using Arduino / Networking, Protocols, and Devices / Re: I2C read problems on: June 18, 2011, 01:11:27 am
thanks a lot
i will use code tags from now on

but my output is

H: 3478  P: 17  R: 17  T: 305 
H: 3478  P: 17  R: 17  T: 304 
H: 3478  P: 17  R: 17  T: 303 
H: 3478  P: 17  R: 17  T: 303 
H: 3478  P: 17  R: 17  T: 305 
H: 3478  P: 17  R: 17  T: 306 
H: 3478  P: 17  R: 17  T: 307 
H: 3478  P: 17  R: 17  T: 307 
H: 3478  P: 17  R: 17  T: 306 
H: 0 P: 17  R: 17  T: 304 
H: 3478  P: 17  R: 17  T: 304 
H: 3478  P: 17  R: 17  T: 303 
H: 3478  P: 17  R: 17  T: 303 
H: 3478  P: 17  R: 17  T: 305 
H: 3478  P: 17  R: 17  T: 306 
H: 3478  P: 17  R: 17  T: 307 
H: 3478  P: 17  R: 17  T: 308 
H: 3478  P: 17  R: 17  T: 308 
H: 3478  P: 17  R: 17  T: 308 
H: 3478  P: 0  R: 17  T: 309 
H: 3478  P: 17  R: 17  T: 309 
H: 3478  P: 17  R: 17  T: 309 
H: 3478  P: 17  R: 17  T: 309 
H: 3478  P: 17  R: 17  T: 308 
H: 3478  P: 17  R: 17  T: 308 
H: 3478  P: 17  R: 17  T: 308 
H: 3478  P: 17  R: 17  T: 308 
H: 3478  P: 17  R: 17  T: 306 
H: 3478  P: 17  R: 17  T: 305 

why is this happening?


if i use this on the receiver:

Code:
while ( Wire.available() < 2 ){}

the program freezes
so i think that the sender is not sending two bytes

OR

the sender is not sending the command so the receiver reply to that command

OR

the receiver does not receive the command to send the two bytes




32  Using Arduino / Networking, Protocols, and Devices / Re: I2C read problems on: June 17, 2011, 03:37:08 pm
Quote
void requestEvent()
{
  if ( command == 'a' ) // Send All
  {
    WireSendAll();
  }
  else if ( command == 'H' ) // Heading
  {
    WireSendInt(1963);
  }
  else if ( command == 'P' ) // Pitch
  {
    WireSendInt(54);
  }
  else if ( command == 'R' ) // Roll
  {
    WireSendInt(-10);
  } 
  else if ( command == 'T' ) // Temp
  {
    WireSendInt(186);
  }
  else  if ( command == 'D' ) // Depth
  {
    WireSendInt(Depth);
  }
  else  if ( command == 'M' ) // Magnetic Vector
  {
    WireSendInt(MagneticVector);
  }
  else  if ( command == 'X' ) // Magnetic X
  {
    WireSendInt(MagneticX);
  }
  else  if ( command == 'Y' ) // Magnetic Y
  {
    WireSendInt(MagneticY);
  }
  else  if ( command == 'Z' ) // Magnetic Z
  {
    WireSendInt(MagneticZ);
  }
  else  if ( command == 'A' ) // Accelaration Vector
  {
    WireSendInt(AccelarationVector);
  }
  else  if ( command == 'x' ) // Accelaration X
  {
    WireSendInt(AccelarationX);
  }
  else  if ( command == 'y' ) // Accelaration Y
  {
    WireSendInt(AccelarationY);
  }
  else  if ( command == 'z' ) // Accelaration Z
  {
    WireSendInt(AccelarationZ);

  }
  else  if ( command == 'G' ) // Gyro X
  {
    WireSendInt(GyroX);

  }
  else  if ( command == 'g' ) // Gyro Y
  {
    WireSendInt(GyroY);
  }
  else
  {
  }
  command = 'N';
}


with

Quote
void WireSendInt (int val)
{
  byte buf [2];
  buf
  • = val >> 8;
  buf [1] = val & 0xFF;
  Wire.send (buf, 2);
}


and i am reading back with uart on the receiver:


H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 0  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 
H: 1963  P: 54  R: -10  T: 186 

do you have any idea why?
33  Using Arduino / Networking, Protocols, and Devices / Re: I2C read problems on: June 17, 2011, 01:46:44 pm
nothing

34  Using Arduino / Networking, Protocols, and Devices / Re: I2C read problems on: June 17, 2011, 01:00:18 pm
i have one more problem

Quote
void setup()
{
  Serial.begin(UartBaudRate); 
  Wire.begin(I2C_Address); 
  Wire.onRequest(requestEvent);
  Wire.onReceive(ReceiveCommand);
}

void loop()
{
  if(command == 'C')
  {
    Capture_OS4000();
    Check_Sentence();
    if ( SentenceState == true ) Extract_Info();
    command = 'N';
  }
}


void ReceiveCommand(int howMany)
{
  while(!Wire.available());
  command = Wire.receive();
}


its working

but

that is not working

Quote
void setup()
{
  Serial.begin(UartBaudRate); 
  Wire.begin(I2C_Address); 
  Wire.onRequest(requestEvent);
  Wire.onReceive(ReceiveCommand);
}

void loop()
{
  
}


void ReceiveCommand(int howMany)
{
  while(!Wire.available());
  command = Wire.receive();
  
  if(command == 'C')
  {
    Capture_OS4000();
    Check_Sentence();
    if ( SentenceState == true ) Extract_Info();
    command = 'N';
  }
}


never executed the first command on Capture_OS4000();

also i am waiting enought untill i send another command on i2C

35  Using Arduino / Networking, Protocols, and Devices / Re: I2C read problems on: June 17, 2011, 05:14:09 am
also this working too

Quote
  for ( Eeprom_Address = 0; Eeprom_Address < 16; Eeprom_Address++ )
  {  
    Wire.beginTransmission(HMC6343_ID);
    Wire.send(0xE1);
    Wire.send(Eeprom_Address);             
    Wire.endTransmission();
    delay(10);
    Wire.requestFrom(HMC6343_ID, 1);
    while ( Wire.available() == 0 );
    ReceivedBytes[Eeprom_Address] = ( Wire.receive() );
    HardwareFile.print(Eeprom_Address);
    HardwareFile.print(" - ");
    HardwareFile.println( ReceivedBytes[Eeprom_Address],HEX );
  }


with the HMC6343 compass from honeywell
36  Using Arduino / Networking, Protocols, and Devices / Re: I2C read problems on: June 17, 2011, 04:01:43 am
thank you
its working

but this is freezing after some time

Quote
#include <Wire.h>
int heading;
byte headingMSB;
byte headingLSB;

void setup(){
  Wire.begin();
  Serial.begin(9600);
}

void loop(){
  Wire.beginTransmission(2);
  Wire.send('H');
  Wire.endTransmission();
  Wire.requestFrom(2,2);

  while(Wire.available()<2){
  }
  headingMSB = Wire.receive();
  headingLSB = Wire.receive();
  Serial.print(headingMSB,BIN);
  Serial.print(" ");
  Serial.print(headingLSB,BIN);
  Serial.print(" ");
  heading = ( ( headingMSB<<8 ) | ( headingLSB ) );
  Serial.println(heading);
  delay(500);
}
37  Using Arduino / Networking, Protocols, and Devices / Re: I2C read problems on: June 17, 2011, 03:17:58 am
this is never executed because i never send an A

i want to send 2 bytes on each request

the master send an H //heading

and requests two bytes


Wire.send("AB"); sends two bytes
Wire.send("ABCD"); sends four bytes

but how i will send an int16_t?
38  Using Arduino / Networking, Protocols, and Devices / Re: I2C read problems on: June 17, 2011, 03:14:12 am
#include <Wire.h>
int heading;

byte headingMSB;
byte headingLSB;

void setup(){
  Wire.begin();
  Serial.begin(9600);
}

void loop(){
  Wire.beginTransmission(2);
  Wire.send('H');
  Wire.endTransmission();
  Wire.requestFrom(2,2);
  
  while(Wire.available()<2){}
  headingMSB = Wire.receive();
  headingLSB = Wire.receive();

  Serial.print(headingMSB,BIN);
  Serial.print(" ");
  Serial.println(headingLSB,BIN);

  delay(250);
}






the first is connected to the OS4000
http://www.sparkfun.com/products/8960

the Heading contains a number from 0 to 3600
i have checked that

On the serial monitor i get

10101011 11111111
10110010 11111111
10101110 11111111
10110011 11111111
10110000 11111111
10101110 11111111
10101110 11111111
10101110 11111111
10101100 11111111



and its frozen after a while


39  Using Arduino / Networking, Protocols, and Devices / Re: I2C read problems on: June 17, 2011, 03:11:04 am
#include <Wire.h>

#define I2C_Address 2
#define UartBaudRate 19200

int Position;
int NextData;

boolean SentenceState = false;
char OS4000Data[128];

char command;

int Heading;
int Heading100;
int Heading10;
int Heading1;
int Heading01;
byte HeadingMSB;
byte HeadingLSB;

int Pitch;
int Pitch100;
int Pitch10;
int Pitch1;
int Pitch01;
byte PitchMSB;
byte PitchLSB;

int Roll;
int Roll100;
int Roll10;
int Roll1;
int Roll01;
byte RollMSB;
byte RollLSB;

int Temp;
byte TempMSB;
byte TempLSB;
int Depth;
byte DepthMSB;
byte DepthLSB;
int MagneticVector;
byte MagneticVectorMSB;
byte MagneticVectorLSB;
int MagneticX;
byte MagneticXMSB;
byte MagneticXLSB;
int MagneticY;
byte MagneticYMSB;
byte MagneticYLSB;
int MagneticZ;
byte MagneticZMSB;
byte MagneticZLSB;
int AccelarationVector;
byte AccelarationVectorMSB;
byte AccelarationVectorLSB;
int AccelarationX;
byte AccelarationXMSB;
byte AccelarationXLSB;
int AccelarationY;
byte AccelarationYMSB;
byte AccelarationYLSB;
int AccelarationZ;
byte AccelarationZMSB;
byte AccelarationZLSB;
int GyroX;
byte GyroXMSB;
byte GyroXLSB;
int GyroY;
byte GyroYMSB;
byte GyroYLSB;

void setup()
{
  Serial.begin(UartBaudRate); 
  Wire.begin(I2C_Address); 
  Wire.onRequest(requestEvent);
  Wire.onReceive(ReceiveCommand);
}

void loop()
{
  Capture_OS4000();
  Check_Sentence();
  if ( SentenceState == true ) Extract_Info();
}


void ReceiveCommand(int howMany)
{
  while(!Wire.available());
  command = Wire.receive();
}

void requestEvent()
{
  if ( command == 'A' ) // Send All
  {
    Wire.send(HeadingMSB);
    Wire.send(HeadingLSB);
    Wire.send(PitchMSB);
    Wire.send(PitchLSB);
    Wire.send(RollMSB);
    Wire.send(RollLSB);
    Wire.send(TempMSB);
    Wire.send(TempLSB);
    Wire.send(DepthMSB);
    Wire.send(DepthLSB);
    Wire.send(MagneticVectorMSB);
    Wire.send(MagneticVectorLSB);
    Wire.send(MagneticXMSB);
    Wire.send(MagneticXLSB);
    Wire.send(MagneticYMSB);
    Wire.send(MagneticYLSB);
    Wire.send(MagneticZMSB);
    Wire.send(MagneticZLSB);
    Wire.send(AccelarationVectorMSB);
    Wire.send(AccelarationVectorLSB);
    Wire.send(AccelarationXMSB);
    Wire.send(AccelarationXLSB);
    Wire.send(AccelarationYMSB);
    Wire.send(AccelarationYLSB);
    Wire.send(AccelarationZMSB);
    Wire.send(AccelarationZLSB);
    Wire.send(GyroXMSB);
    Wire.send(GyroXLSB);
    Wire.send(GyroYMSB);
    Wire.send(GyroYLSB);
  }
  else if ( command == 'H' ) // Heading
  {
    Wire.send(Heading);
  }
  else if ( command == 'P' ) // Pitch
  {
    Wire.send(PitchMSB);
    Wire.send(PitchLSB);
  }
  else if ( command == 'R' ) // Roll
  {
    Wire.send(RollMSB);
    Wire.send(RollLSB);
  } 
  else if ( command == 'T' ) // Temp
  {
    Wire.send(TempMSB);
    Wire.send(TempLSB);
  }
  else  if ( command == 'D' ) // Depth
  {
    Wire.send(DepthMSB);
    Wire.send(DepthLSB);
  }
  else  if ( command == 'M' ) // Magnetic Vector
  {
    Wire.send(MagneticVectorMSB);
    Wire.send(MagneticVectorLSB);
  }
  else  if ( command == 'X' ) // Magnetic X
  {
    Wire.send(MagneticXMSB);
    Wire.send(MagneticXLSB);
  }
  else  if ( command == 'Y' ) // Magnetic Y
  {
    Wire.send(MagneticYMSB);
    Wire.send(MagneticYLSB);
  }
  else  if ( command == 'Z' ) // Magnetic Z
  {
    Wire.send(MagneticZMSB);
    Wire.send(MagneticZLSB);
  }
  else  if ( command == 'a' ) // Accelaration Vector
  {
    Wire.send(AccelarationVectorMSB);
    Wire.send(AccelarationVectorLSB);
  }
  else  if ( command == 'x' ) // Accelaration X
  {
    Wire.send(AccelarationXMSB);
    Wire.send(AccelarationXLSB);
  }
  else  if ( command == 'y' ) // Accelaration Y
  {
    Wire.send(AccelarationYMSB);
    Wire.send(AccelarationYLSB);
  }
  else  if ( command == 'z' ) // Accelaration Z
  {
    Wire.send(AccelarationZMSB);
    Wire.send(AccelarationZLSB);
  }
  else  if ( command == 'G' ) // Gyro X
  {
    Wire.send(GyroXMSB);
    Wire.send(GyroXLSB);
  }
  else  if ( command == 'g' ) // Gyro Y
  {
    Wire.send(GyroYMSB);
    Wire.send(GyroYLSB);
  }
  else
  {
    //Error
  }
  command = 'N';
}

void  Capture_OS4000()
{
  Serial.flush();
  while ( Serial.read () != '$' );
  Serial.flush();
  while( Serial.available() < 127 );
  for ( Position = 0; Position < 126; Position++ ){
    OS4000Data[Position] = char( Serial.read());
  }
}

void Check_Sentence()
{
  if ( ( OS4000Data[0] == 'O' ) && ( OS4000Data[1] == 'H' ) && ( OS4000Data[2] == 'P' ) && ( OS4000Data[3] == 'R' ) && ( OS4000Data[4] == ',' ) )SentenceState = true;
  else SentenceState = false;
}

void Extract_Info()
{
  Heading100 = 0;
  Heading10 = 0;
  Heading1 = 0;
  Heading01 = 0;
  if ( OS4000Data[8] == '.' ){
    Heading100 = OS4000Data[5] - '0';
    Heading10 = OS4000Data[6] - '0';
    Heading1 = OS4000Data[7] - '0';
    Heading01 = OS4000Data[9] - '0';
    NextData = 10;
  }
  else if ( OS4000Data[7] == '.' ){
    Heading10 = OS4000Data[5] - '0';
    Heading1 = OS4000Data[6] - '0';
    Heading01 = OS4000Data[8] - '0';
    NextData = 9;
  }
  else if ( OS4000Data[6] == '.' ){
    Heading1 = OS4000Data[5] - '0';
    Heading01 = OS4000Data[7] - '0';
    NextData = 8;
  }
  Heading = 1000*Heading100 + 100*Heading10 + 10*Heading1 + Heading01;

  Pitch100 = 0;
  Pitch10 = 0;
  Pitch1 = 0;
  Pitch01 = 0;
  if ( OS4000Data[NextData+1] == '-' ){
    if ( OS4000Data[NextData+5] == '.' ){
      Pitch100 = OS4000Data[NextData+2] - '0';
      Pitch10 = OS4000Data[NextData+3] - '0';
      Pitch1 = OS4000Data[NextData+4] - '0';
      Pitch01 = OS4000Data[NextData+6] - '0';
      NextData += 7;
    }
    else if ( OS4000Data[NextData+4] == '.' ){
      Pitch10 = OS4000Data[NextData+2] - '0';
      Pitch1 = OS4000Data[NextData+3] - '0';
      Pitch01 = OS4000Data[NextData+5] - '0';
      NextData += 6;
    }
    else if ( OS4000Data[NextData+3] == '.' ){
      Pitch1 = OS4000Data[NextData+2] - '0';
      Pitch01 = OS4000Data[NextData+4] - '0';
      NextData += 5;
    }
    Pitch = - ( 1000*Pitch100 + 100*Pitch10 + 10*Pitch1 + Pitch01 );
  }
  else
  {
    if ( OS4000Data[NextData+4] == '.' ){
      Pitch100 = OS4000Data[NextData+1] - '0';
      Pitch10 = OS4000Data[NextData+2] - '0';
      Pitch1 = OS4000Data[NextData+3] - '0';
      Pitch01 = OS4000Data[NextData+5] - '0';
      NextData += 6;
    }
    else if ( OS4000Data[NextData+3] == '.' ){
      Pitch10 = OS4000Data[NextData+1] - '0';
      Pitch1 = OS4000Data[NextData+2] - '0';
      Pitch01 = OS4000Data[NextData+4] - '0';
      NextData += 5;
    }
    else if ( OS4000Data[NextData+2] == '.' ){
      Pitch1 = OS4000Data[NextData+1] - '0';
      Pitch01 = OS4000Data[NextData+3] - '0';
      NextData += 4;
    }
    Pitch = ( 1000*Pitch100 + 100*Pitch10 + 10*Pitch1 + Pitch01 );
  }

  Roll100 = 0;
  Roll10 = 0;
  Roll1 = 0;
  Roll01 = 0;
  if ( OS4000Data[NextData+1] == '-' ){
    if ( OS4000Data[NextData+5] == '.' ){
      Roll100 = OS4000Data[NextData+2] - '0';
      Roll10 = OS4000Data[NextData+3] - '0';
      Roll1 = OS4000Data[NextData+4] - '0';
      Roll01 = OS4000Data[NextData+6] - '0';
      NextData += 7;
    }
    else if ( OS4000Data[NextData+4] == '.' ){
      Roll10 = OS4000Data[NextData+2] - '0';
      Roll1 = OS4000Data[NextData+3] - '0';
      Roll01 = OS4000Data[NextData+5] - '0';
      NextData += 6;
    }
    else if ( OS4000Data[NextData+3] == '.' ){
      Roll1 = OS4000Data[NextData+2] - '0';
      Roll01 = OS4000Data[NextData+4] - '0';
      NextData += 5;
    }
    Roll = - ( 1000*Roll100 + 100*Roll10 + 10*Roll1 + Roll01 );
  }
  else
  {
    if ( OS4000Data[NextData+4] == '.' ){
      Roll100 = OS4000Data[NextData+1] - '0';
      Roll10 = OS4000Data[NextData+2] - '0';
      Roll1 = OS4000Data[NextData+3] - '0';
      Roll01 = OS4000Data[NextData+5] - '0';
      NextData += 6;
    }
    else if ( OS4000Data[NextData+3] == '.' ){
      Roll10 = OS4000Data[NextData+1] - '0';
      Roll1 = OS4000Data[NextData+2] - '0';
      Roll01 = OS4000Data[NextData+4] - '0';
      NextData += 5;
    }
    else if ( OS4000Data[NextData+2] == '.' ){
      Roll1 = OS4000Data[NextData+1] - '0';
      Roll01 = OS4000Data[NextData+3] - '0';
      NextData += 4;
    }
    Roll = ( 1000*Roll100 + 100*Roll10 + 10*Roll1 + Roll01 );
  }
}
40  Using Arduino / Networking, Protocols, and Devices / Re: I2C read problems on: June 17, 2011, 02:58:28 am
ok if i send the int heading

wire.send(heading);

that contains the headingMSB and headingLSB

i am also getting the 11111111
41  Using Arduino / Networking, Protocols, and Devices / Re: I2C read problems on: June 17, 2011, 01:56:37 am
so how can i make it work?
42  Using Arduino / Networking, Protocols, and Devices / Re: I2C read problems on: June 16, 2011, 08:34:11 am
i am also having a trouble with wire library


Quote
void setup()
{
  Serial.begin(UartBaudRate); 
  Wire.begin(I2C_Address);  // 2
  Wire.onRequest(requestEvent);
  Wire.onReceive(ReceiveCommand);
}

void requestEvent()
{

  if ( command == 'H' ) // Heading
  {
    Wire.send(HeadingMSB);
    Wire.send(HeadingLSB);
  }
  else if ( command == 'P' ) // Pitch
  {
    Wire.send(PitchMSB);
    Wire.send(PitchLSB);
  }


------------------------------------------

and on receiver

Quote
void loop(){
  Wire.beginTransmission(2);
  Wire.send('H');
  Wire.endTransmission();
  Wire.requestFrom(2,2);
 
  while(Wire.available()<2):
  headingMSB = Wire.receive();
  headingLSB = Wire.receive();

  Serial.print(headingMSB,BIN);
  Serial.print(" ");
  Serial.println(headingLSB,BIN);

  delay(250);
}

but i am getting

11000100 11111111
10101000 11111111
1110100 11111111
10011110 11111111
1010110 11111111
11001 11111111
10000 11111111
101111 11111111

i am sure that the HeadingMSB and HeadingLSB on the slave device have values from the compass
i am not sure if the first byte that apears on screen is the MSB or the LSB
also

when i am trying that

Quote
if ( command == 'H' ) // Heading
  {
    Wire.send("AB");
}

i am getting

1000001 1000010

but when i am trying

Quote
if ( command == 'H' ) // Heading
  {
    Wire.send("A");
    Wire.send("B");
  }

i am getting

1000010 11111111

*headingMSB and headingLSB on both codes are byte type
why???





43  Using Arduino / Displays / Re: GLCD library version 3 on: June 08, 2011, 01:57:35 pm
this code

 GLCD.DrawCircle(31,31,31,BLACK);
    GLCD.DrawLine(31,31,31,0);

creates a vertical line not a horizontal

so it is GLCD.DrawLine(X0,Y0,Y1,X1);
44  Using Arduino / Displays / Re: GLCD library version 3 on: June 08, 2011, 07:14:58 am
i found it

just a broken wire
45  Using Arduino / Displays / Re: GLCD library version 3 on: June 07, 2011, 03:40:04 pm


its the sparkfun's GLCD

why?

i have check the conections

i tried to change pin14 to A0 and 15 to A1 etc

but then its not compile

thanks a lot
Pages: 1 2 [3] 4 5 ... 10