X-Band 32213 how i can read speed ?
ronaldo1
Posts: 3
Hi, (sorry for my English)
I use the X-Band sensor whith Arduino (by serial port) and i can see the motion but i can't read the speed, how i can do it ?
Thanks.
Whith this program i alaways pulseCount = 1
I use the X-Band sensor whith Arduino (by serial port) and i can see the motion but i can't read the speed, how i can do it ?
Thanks.
Whith this program i alaways pulseCount = 1
int xPin = 4;
void setup() {
Serial.begin(57600);
Serial.println("Pulse test");
pinMode(xPin, INPUT);
attachInterrupt(0, intHandler, RISING);
}
volatile int pulseCount = 0;
void intHandler() {
pulseCount++;
}
void loop() {
Serial.print("MOTION! ");
Serial.println(pulseCount);
delay(250);
}
Comments