ELCT302 Motor / Mbed 2 deprecated motor

Dependencies:   mbed MotorLab3Code

Committer:
Loganlp
Date:
Thu Jan 31 00:39:41 2019 +0000
Revision:
1:5b2bc7ec7b14
Parent:
0:cb571e42343c
Child:
2:060a86df835f
Finalized Lab 1 Code;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rjs718 0:cb571e42343c 1 #include "mbed.h"
rjs718 0:cb571e42343c 2 #include <iostream>
rjs718 0:cb571e42343c 3
rjs718 0:cb571e42343c 4 AnalogIn AI_in(PTB0);
rjs718 0:cb571e42343c 5 PwmOut PWM_out(PTE20);
rjs718 0:cb571e42343c 6
Loganlp 1:5b2bc7ec7b14 7
Loganlp 1:5b2bc7ec7b14 8
rjs718 0:cb571e42343c 9
rjs718 0:cb571e42343c 10 int main() {
rjs718 0:cb571e42343c 11 PWM_out.period(.05);
rjs718 0:cb571e42343c 12 while(1) {
Loganlp 1:5b2bc7ec7b14 13 PWM_out.write(AI_in.read());
Loganlp 1:5b2bc7ec7b14 14 wait(.05);
rjs718 0:cb571e42343c 15 }
rjs718 0:cb571e42343c 16 }