The 'BYTE' keyword is no longer supported error

Hi,

I'm trying to get a this camera running on a Intel Galileo 2 board it comes with example code that relies on the SoftwareSerial library.

http://linksprite.com/wiki/index.php5?title=JPEG_2M_Pixel_Color_Camera_Serial_Interface(TTL_level)

I'm getting this error:

camera.ino:115: error: The 'BYTE' keyword is no longer supported.
As of Arduino 1.0, the 'BYTE' keyword is no longer supported.
Please use Serial.write() instead.

I tried change all the mySerial.print(0x56, BYTE); to mySerial.write(0x56) but I get another error saying

exit status 1
call of overloaded 'write(int)' is ambiguous

Would anybody know what is wrong?

Thanks

/* Linksprite */
 
#include <SoftwareSerial_Class.h>

SoftwareSerial mySerial(2, 3); // RX, TX
 
byte incomingbyte;                   //Configure pin 4 and 5 as soft serial port
int a=0x0000,j=0,k=0,count=0;                    //Read Starting address       
uint8_t MH,ML;
boolean EndFlag=0;
 
void SendResetCmd();
void SendTakePhotoCmd();
void SendReadDataCmd();
void StopTakePhotoCmd();
 
void setup()
{ 
  Serial.begin(19200);
  mySerial.begin(38400);
}
 
void loop() 
{
     SendResetCmd();
     delay(4000);                               //After reset, wait 2-3 second to send take picture command
 
      SendTakePhotoCmd();
 
     while(mySerial.available()>0)
      {
        incomingbyte=mySerial.read();
 
      }   
      byte a[32];
 
      while(!EndFlag)
      {  
         j=0;
         k=0;
         count=0;
         SendReadDataCmd();
 
         delay(25);
          while(mySerial.available()>0)
          {
               incomingbyte=mySerial.read();
               k++;
               if((k>5)&&(j<32)&&(!EndFlag))
               {
               a[j]=incomingbyte;
               if((a[j-1]==0xFF)&&(a[j]==0xD9))      //Check if the picture is over
               EndFlag=1;                           
               j++;
         count++;
               }
          }
 
          for(j=0;j<count;j++)
          {   if(a[j]<0x10)
              Serial.print("0");
              Serial.print(a[j],HEX);
              Serial.print(" ");
          }                                       //Send jpeg picture over the serial port
          Serial.println();
      }      
     while(1);
}
 
//Send Reset command
void SendResetCmd()
{
      mySerial.print(0x56, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x26, BYTE);
      mySerial.print(0x00, BYTE);
}
 
//Send take picture command
void SendTakePhotoCmd()
{
      mySerial.print(0x56, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x36, BYTE);
      mySerial.print(0x01, BYTE);
      mySerial.print(0x00, BYTE);  
}
 
//Read data
void SendReadDataCmd()
{
      MH=a/0x100;
      ML=a%0x100;
      mySerial.print(0x56, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x32, BYTE);
      mySerial.print(0x0c, BYTE);
      mySerial.print(0x00, BYTE); 
      mySerial.print(0x0a, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(MH, BYTE);
      mySerial.print(ML, BYTE);   
      mySerial.print(0x00, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x20, BYTE);
      mySerial.print(0x00, BYTE);  
      mySerial.print(0x0a, BYTE);
      a+=0x20;                            //address increases 32,set according to buffer size
}
 
void StopTakePhotoCmd()
{
      mySerial.print(0x56, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x36, BYTE);
      mySerial.print(0x01, BYTE);
      mySerial.print(0x03, BYTE);        
}

I think you can just cast it to a byte and it will work

mySerial.print(0x56, BYTE);becomes mySerial.write((unsigned char)0x56);

conor1:
Would anybody know what is wrong?

You are trying to combine a software library from the age of the dinosaurs with a recent Arduino-IDE.

Use a more recent library instead!

Or use your library from the age of the dinosaurs with an Arduino-IDE which is also that old!

It would be helpful if the libraries were updated.

For example, the MAX6675 library.

I was recently advised to use it by a critic in this forum and they didn't take this matter into consideration.

Back to the drawing board...

It looks like noobs need to learn how to write their own libraries!

It would be helpful if the libraries were updated. For example, the MAX6675 library.

Which MAX6675 library are you looking at ? I wouldn't expect BYTE to appear except in the examples, and The Adafruit Library looks like it has in fact been updated. (The Adafruit library appears first on a Google web search, and first in the Arduino Library manager list...)