MTS310 보드엔.
조도, 온도, 사운드(부저),마이크,가속,자력 센서등이 달려있다.
이런것들을 잘이용한다면, 현재 환경속에서 많은 정보를 얻을수 있다.
사운드 컴포넌트와 연결.
SenseM.SounderControl -> Sounder;
인터페이스 추가.
interface StdControl as SounderControl;
초기화
call SounderControl.init();
사운드 on.
call SounderControl.start();
사운드 off.
call SounderControl.stop();
빛이 어두워졌을경우. LED의 빨간색이 밝혀지고 센서보드에서 소리가 나게된다.
if (value &4) {
call Leds.redOn();
call SounderControl.start();
}
else {
call Leds.redOff();
call SounderControl.stop();
}