What is byte in code for motors?

Hello, I am taking part in an robotics contest and they provided a basic code but I don't understand how byte works. I tried changing the values of it but when I did my robot isn't working. Also the driver for motors is an unique one and doesn't have 2 pins for one motor but one. Also the code is in a program called Mixly in which you can code using blocks.(Also inceput=begging, inainte=forward, inapoi=backwards, stare=state, senzorDreapta=sensorRight and sezorStanga=sensorLeft. Sorry for the inconvinience, the words are in romanian.)

volatile byte inceput;

volatile byte inainte;

volatile byte inapoi;

volatile int stare;

volatile int senzorStanga;

volatile int senzorDreapta;



void setup(){

  pinMode(3, INPUT);

  pinMode(9, INPUT);

  Serial.begin(9600);

  inceput = 254;

  inainte = 240;

  inapoi = 186;

  stare = 0;

  senzorStanga = 0;

  senzorDreapta = 0;

  pinMode(3, INPUT);

  pinMode(9, INPUT);

}



void loop(){

  senzorStanga = digitalRead(3);

  senzorDreapta = digitalRead(9);

  if (senzorStanga == 1) {

    if (senzorDreapta == 1) {

      stare = 0;



    } else {

      stare = 1;



    }



  } else if (senzorDreapta == 1) {

    stare = -1;

  }

  switch (stare) {

   case -1:

    Serial.write(inceput);

    Serial.write(1);

    Serial.write(inainte);

    Serial.write(50);

    Serial.write(inceput);

    Serial.write(2);

    Serial.write(inainte);

    Serial.write(0);

    break;

   case 1:

    Serial.write(inceput);

    Serial.write(1);

    Serial.write(inainte);

    Serial.write(0);

    Serial.write(inceput);

    Serial.write(2);

    Serial.write(inainte);

    Serial.write(50);

    break;

   default:

    Serial.write(inceput);

    Serial.write(1);

    Serial.write(inainte);

    Serial.write(50);

    Serial.write(inceput);

    Serial.write(2);

    Serial.write(inainte);

    Serial.write(50);

    break;

  }



}

I don't need any fixing for the program as it already works I just need to understand how byte works.

Thanks

byte is a data type, just an alias for 'unsigned char' which is an 8 bit variable.

The word "byte" tells the compiler to reserve one byte (8 bits) of space for the variable. A byte can hold values between 0 and 255

If the code was volatile int inceput; the compiler would reserve space for an integer (2 bytes or 16 bits) which could hold a value between -32768 and +32767

Read about Data Types in the Reference section.

...R