source: software/Girlsday/Girlsday.pde @ 29

Last change on this file since 29 was 10, checked in by Jürgen Berwein, 15 years ago
File size: 1.3 KB
Line 
1#include <BristleBot.h>
2
3BristleBot robo;
4
5void setup()   
6{                ;
7  robo.init(180,20);
8}
9
10
11void LOS()                     
12{
13    SCHALTE (robo.leseSensor())
14    {
15      FALLS LINKS:
16         robo.rechtesLicht(AN);
17         robo.linkesLicht(AUS);
18         robo.ruecklicht(AUS);
19         robo.fahreRechts();
20         break;
21      FALLS RECHTS:
22         robo.rechtesLicht(AUS);
23         robo.linkesLicht(AN);
24         robo.ruecklicht(AUS);
25         robo.fahreLinks();
26         break;
27      FALLS BEIDE:
28         robo.rechtesLicht(AUS);
29         robo.linkesLicht(AUS);
30         robo.ruecklicht(AN);
31         robo.fahreGerade();
32         break;
33    };
34    /*
35    WENN( robo.linkerSensor() IST HELL)
36       {
37         Serial.println( "hell dunkel");
38         robo.rechtesLichtAn();
39         robo.linkesLichtAus();
40               robo.ruecklichtAus();
41      robo.fahreRechts();
42       }     
43    SONST WENN( robo.rechterSensor() IST HELL)
44    {
45     Serial.println( "dunkel hell");
46              robo.linkesLichtAn();
47         robo.rechtesLichtAus();
48                        robo.ruecklichtAus();
49      robo.fahreLinks();
50    }
51    SONST WENN( robo.beideSensorGleich() )
52    {
53      Serial.println( "dunkel dunkel");
54                    robo.linkesLichtAus();
55         robo.rechtesLichtAus();
56       robo.ruecklichtAn();
57      robo.fahreGerade();
58
59    }
60   */
61}
62   
Note: See TracBrowser for help on using the repository browser.