2010年6月8日火曜日

Motion sensor preparation

While I am testing a motion sensor with the program that was available online tutorial  I realized that motion sensor and program do not work preferably.
In order to solve the issue, I have to analyze about motion sensor more.
For the first, I have to detect what kind of signal does the motion sensor send to Arduino such as digital or analog.
I connect a motion sensor to the analog input and program Arduino.

void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println(analogRead(0));
delay(500);
}

So that I can read the signal.

The following value is send from  motion sensor

0
0
658
676
680
670
0
0
666
684
674
669
660
0
0
661
677
664
675
0
0
669
681
659
679
0
0
0
662
669
660
674
663
683
674
683
685
0
0
656
676
663
673
676
679
672
677
663
674
667
675
678
676
678
668
668
684
684
665
0
0
675
677
657
660
677
0
0
663
674
659
685
0
0
686
657
659
678
671
0
0


It seems that the signal is a digital and sensor send signal more than 5 time when I am actually moving. I think that the sensor is too much sensitive, have some problem or my room's condition is bad for motion sensor.


I will fix the program for the motion sensor based on this information.

0 件のコメント:

コメントを投稿