dit is em

Dependencies:   mbed

Committer:
bjorntukkertje
Date:
Mon Feb 27 20:51:53 2017 +0000
Revision:
4:038346651cc0
Parent:
3:e01162e592f3
Child:
5:f49c7b6e8bcc
hihi;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bjorntukkertje 0:9756a10feb5f 1 #include "mbed.h"
bjorntukkertje 0:9756a10feb5f 2
bjorntukkertje 0:9756a10feb5f 3 DigitalOut Motor1 (D13);
bjorntukkertje 0:9756a10feb5f 4 DigitalOut Motor2 (A0);
bjorntukkertje 0:9756a10feb5f 5 DigitalOut Motor3 (D12);
bjorntukkertje 0:9756a10feb5f 6 DigitalOut Motor4 (D11);
bjorntukkertje 2:5c11199e4ff2 7 AnalogIn Sensor (A1);
bjorntukkertje 4:038346651cc0 8
bjorntukkertje 0:9756a10feb5f 9
bjorntukkertje 0:9756a10feb5f 10
bjorntukkertje 0:9756a10feb5f 11 int main() {
bjorntukkertje 0:9756a10feb5f 12 while(1) {
bjorntukkertje 2:5c11199e4ff2 13 if ( Sensor >= 100) {
bjorntukkertje 2:5c11199e4ff2 14 Motor1 = 1 ;
bjorntukkertje 2:5c11199e4ff2 15 Motor2 = 0 ;
bjorntukkertje 2:5c11199e4ff2 16 Motor3 = 0 ;
bjorntukkertje 2:5c11199e4ff2 17 Motor4 = 1 ;
bjorntukkertje 2:5c11199e4ff2 18 wait_ms (1000);
bjorntukkertje 2:5c11199e4ff2 19 }
bjorntukkertje 2:5c11199e4ff2 20 else {
bjorntukkertje 2:5c11199e4ff2 21 Motor1 = 1 ;
bjorntukkertje 2:5c11199e4ff2 22 Motor2 = 0 ;
bjorntukkertje 2:5c11199e4ff2 23 Motor3 = 1 ;
bjorntukkertje 2:5c11199e4ff2 24 Motor4 = 0 ;
bjorntukkertje 2:5c11199e4ff2 25 }
bjorntukkertje 2:5c11199e4ff2 26
bjorntukkertje 0:9756a10feb5f 27
bjorntukkertje 0:9756a10feb5f 28 }
bjorntukkertje 0:9756a10feb5f 29 }