![]() |
![]() |
#include <dsensor.h> // rotation sensor func is included #include <conio.h> int main(int argc, char *argv[]) { ds_active(&SENSOR_2); ds_rotation_on(&SENSOR_2); // rotation sensor on ds_rotation_set(&SENSOR_2,0); // rotation sensor Initialization while(1) { if(SENSOR_1<0xf000) ds_rotation_set(&SENSOR_2,0); // rotation sensor Initialization lcd_int(ROTATION_2); msleep(50); } ds_rotation_off(&SENSOR_2); // rotation sensor off return(0); } |