You can use digitalRead() on an output pin:
Serial.print(micros());
Serial.print(",");
Serial.print(digitalRead(triggerPin));
Serial.print(",");
Serial.print(value1);
Serial.print(",");
Serial.print(value2);
Serial.print(",");
Serial.print(value3);
Serial.print(",");
Serial.print(value4);
And then the trick is to report in sync with the trigger toggling. That is doing a couple things at the same time, and it might be good to read up on:
I'd use micros() and a couple routines like:
uint32_t now = 0;
int triggerState = LOW;
...
void loop() {
now = micros();
RunTrigger();
RunMeasurement();
}
void RunTrigger() {
const uint32_t OnTime = 150, OffTime = 500;
static uint32_t changeTime = 0;
switch (triggerState) {
case LOW:
if (now - changeTime >= OffTime) {
digitalWrite(triggerPin, HIGH);
triggerState = HIGH;
changeTime += OffTime;
}
break;
case HIGH:
if (now - changeTime >= OnTime) {
digitalWrite(triggerPin, LOW);
triggerState = LOW;
changeTime += OnTime;
}
break;
}
}
...where the ???Time+= ???? keeps the changes in sync with micros() and if you do something similar with RunMeasurement() the measurements will be in sync.
Still, 9600 baud isn't fast enough for the data you are asking to be printed.
(Multiple code typos corrected)