The code is loaded but doesnt work, Please help...

The code is loaded but doesnt work :frowning: ...the green LED lights up after recording. After the code is loaded, only RX and ON light up red. This code is for PIR sensor, which gives signals to the program VPT 8 that controls the projection.
However, the sensor does not respond after I recording this code. This code is specifically for the VPT 8 program. I find this code on the official website.
Normally sensor works when I use other codes.
Problem with this code:

 int digitalSensor,analogSensor;

void setup()
{
  // start serial port at 9600 bps:
  pinMode(2, INPUT); //configure digital pin as input
  digitalWrite(2, HIGH);
  Serial.begin(9600);
  delay(100);
  Serial.flush();
  delay(1000);
  Serial.println(-1,DEC);  //send -1 to let VPT serial port is ready
}

void loop()
{
 
    analogSensor = analogRead(0);
    digitalSensor= digitalRead(2);
    // delay 10ms to let the ADC recover:
    delay(10);
    Serial.print("A ");
    Serial.println(analogSensor, DEC);
    Serial.print("B ");
    Serial.println(digitalSensor, DEC);
}

(deleted)

Do you see what you expect to see when you use Serial Monitor?