Changes between Version 4 and Version 5 of 2011/Programmierung


Ignore:
Timestamp:
Mar 31, 2011, 6:22:52 PM (14 years ago)
Author:
kittmann
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 2011/Programmierung

    v4 v5  
    148148
    149149== Das fertige Programm ==
    150 {{{
    151 #include <BristleBot.h>
    152 
    153 BristleBot robo;
    154 
    155 void setup()   
    156 {               
    157   robo.init(180,20);
    158 }
    159 
    160 void LOS()                     
    161 {
    162 
    163         SCHALTE (robo.leseSensor())
    164         {
    165             FALLS LINKS:
    166                 robo.rechtesLicht(AN);
    167                 robo.linkesLicht(AUS);
    168                 robo.ruecklicht(AUS);
    169                 robo.fahreRechts();
    170                 break;
    171             FALLS RECHTS:
    172                 robo.rechtesLicht(AUS);
    173                 robo.linkesLicht(AN);
    174                 robo.ruecklicht(AUS);
    175                 robo.fahreLinks();
    176                 break;
    177             FALLS BEIDE:
    178                 robo.rechtesLicht(AUS);
    179                 robo.linkesLicht(AUS);
    180                 robo.ruecklicht(AN);
    181                 robo.fahreGerade();
    182                 break;
    183         };
    184 }
    185 }}}
    186 Das Programm kann von unserer [https://svn.mpia.de/trac/gulli/girlsday/export/38/2011/software/Girlsday/Girlsday.pde Hompage] herunter geladen werden.
     150[https://svn.mpia.de/trac/gulli/girlsday/export/38/2010/software/Girlsday/Girlsday.pde Girlsday.pde]
     151[[Include(source:/2011/software/Girlsday/Girlsday.pde, text/cpp)]]
    187152
    188153== Justieren ==