Neil McLoughlin / Mbed 2 deprecated Lab_colour_mixer

Dependencies:   mbed

Committer:
ellieoin
Date:
Sat Aug 15 19:15:05 2020 +0000
Revision:
0:f077ff1db7a0
Had a go at the lab before seen had to commit on it as i started with lab 1, 2, 3 so when got to lab 4 was a bit late should of had that at start so could of saved my changes and commit them as i went a long

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ellieoin 0:f077ff1db7a0 1 #include "mbed.h"
ellieoin 0:f077ff1db7a0 2
ellieoin 0:f077ff1db7a0 3 AnalogIn pot1(p19);
ellieoin 0:f077ff1db7a0 4 AnalogIn pot2(p20);
ellieoin 0:f077ff1db7a0 5
ellieoin 0:f077ff1db7a0 6 PwmOut red_led(p23);
ellieoin 0:f077ff1db7a0 7 PwmOut red_blue(p25);
ellieoin 0:f077ff1db7a0 8
ellieoin 0:f077ff1db7a0 9 int main()
ellieoin 0:f077ff1db7a0 10 {
ellieoin 0:f077ff1db7a0 11 while (1) {
ellieoin 0:f077ff1db7a0 12 red_led.write(pot1.read());
ellieoin 0:f077ff1db7a0 13 printf("red: %f ",pot1.read());
ellieoin 0:f077ff1db7a0 14 red_blue.write(pot2.read());
ellieoin 0:f077ff1db7a0 15 printf("blue: %f\n",pot2.read());
ellieoin 0:f077ff1db7a0 16 wait(0.01);
ellieoin 0:f077ff1db7a0 17 }
ellieoin 0:f077ff1db7a0 18 }