dit is em

Dependencies:   mbed

main.cpp

Committer:
bjorntukkertje
Date:
2017-02-27
Revision:
2:5c11199e4ff2
Parent:
0:9756a10feb5f
Child:
3:e01162e592f3

File content as of revision 2:5c11199e4ff2:

#include "mbed.h"

DigitalOut Motor1 (D13);
DigitalOut Motor2 (A0);
DigitalOut Motor3 (D12);
DigitalOut Motor4 (D11);
AnalogIn Sensor (A1);


int main() {
    while(1) {
        if ( Sensor >= 100) {
          Motor1 = 1 ;
          Motor2 = 0 ;
          Motor3 = 0 ;
          Motor4 = 1 ;
          wait_ms (1000);
          }
        else {
          Motor1 = 1 ;
          Motor2 = 0 ;
          Motor3 = 1 ;
          Motor4 = 0 ;
          }
          
        
    }
}