Servo that turns towards heat source with temperature reading display.

Dependencies:   mbed

Committer:
bmichael21
Date:
Mon Jan 14 07:46:34 2019 +0000
Revision:
17:fc23cf904932
Parent:
16:58b9673e64d7
comments

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bmichael21 8:fb50cf601521 1 /**********************************************************************
mchristianson21 6:dd0950b071e9 2 Mini-Project 4
mchristianson21 4:c69bc1be9869 3 Move TMP36 sensors attached to servo to make them line up with highest
mchristianson21 4:c69bc1be9869 4 heat source and display the hot temperature on seven segment displays.
mchristianson21 4:c69bc1be9869 5
mchristianson21 4:c69bc1be9869 6 Authors: Ben Michael and Matthew Chiristianson
mchristianson21 4:c69bc1be9869 7 Created: 1/12/19
bmichael21 8:fb50cf601521 8 ***********************************************************************/
bmichael21 0:aa880dde82e2 9 #include "mbed.h"
bmichael21 1:596a2915f7a2 10 #include "tempSnsr.h"
bmichael21 1:596a2915f7a2 11 #include "servo.h"
bmichael21 1:596a2915f7a2 12 #include "display.h"
bmichael21 0:aa880dde82e2 13
bmichael21 11:362594298828 14 Serial pc(USBTX, USBRX);
bmichael21 0:aa880dde82e2 15 DigitalOut myled(LED1);
bmichael21 0:aa880dde82e2 16
bmichael21 0:aa880dde82e2 17 int main() {
bmichael21 10:f427bdd495ac 18 servoInit();
bmichael21 1:596a2915f7a2 19 while(true) {
bmichael21 16:58b9673e64d7 20 pc.printf("temp1: %f temp2: %f\r\n", temp1, temp2); //used to see if the temperature sensors are working since the wires are loosely connected
bmichael21 10:f427bdd495ac 21 updateTempDifference();
mchristianson21 14:5831b2b375e7 22 sevSegDisplay();
bmichael21 10:f427bdd495ac 23 moveServo();
bmichael21 0:aa880dde82e2 24 }
bmichael21 0:aa880dde82e2 25 }