[[ロボティクス入門ゼミ]] *ロボちゃん はじめてのPROGRAM [#je773c87] **5/12 [#p006b49e] task main() { OnFwd(OUT_A+OUT_B); Wait(300) Off(OUT_A) Wait(500) OnFwd(OUT_A) Off(OUT_B) } *ロボちゃん ちょっと応用PROGRAM(木) [#t80ee671] **5/19 [#h67e6b60] task main() { OnFwd(OUT_A+OUT_B); Wait(300); OnRev(OUT_B); Wait(100); OnFwd(OUT_A+OUT_B); Wait(200); OnRev(OUT_B); Wait(100); OnFwd(OUT_B); Wait(350); OnRev(OUT_A+OUT_B); Wait(300) OnFwd(100) } *どこかおかしい光を追うロボットPROGRAM [#ee566e6e] **6/23 [#z96cc9cc] #define TURN_TIME 400 task main() { int light_max=0; int time_max=0; SetSensor(SENSOR_1,SENSOR_LIGHT); ClearTimer(0); while(FastTimer(0)<TURN_TIME) {if(SENSOR_1>light_max) { light_max=SENSOR_1; time_max=FastTimer(0); } }