PES 4 - Smart Medication Dispenser / PES4_ProgrammeforDesignReview2

Dependencies:   SDFileSystem mbed

Fork of PES4_Programme by PES 4 - Smart Medication Dispenser

Committer:
itslinear
Date:
Mon Mar 26 14:39:43 2018 +0000
Revision:
17:bbafd216e059
Parent:
12:f28a798d2661
Child:
22:828b393dff51
implemented setTime;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
aeschsim 8:6ece7caefb33 1 #include "functions.h"
aeschsim 8:6ece7caefb33 2
cittecla 11:e8a7a4a9af05 3 void setLED(char button, uint32_t color)
cittecla 11:e8a7a4a9af05 4 {
cittecla 11:e8a7a4a9af05 5 float red = ((color >> 16) & 0xff)/2.55;
cittecla 11:e8a7a4a9af05 6 float green = ((color >> 8) & 0xff)/2.55;
cittecla 11:e8a7a4a9af05 7 float blue = (color & 0xff)/2.55;
itslinear 17:bbafd216e059 8
cittecla 11:e8a7a4a9af05 9 //PWM channel 9-15
cittecla 11:e8a7a4a9af05 10 setPWM(9+(3-3*button) , red);
cittecla 11:e8a7a4a9af05 11 setPWM(9+(3-3*button)+1 , green);
cittecla 11:e8a7a4a9af05 12 setPWM(9+(3-3*button)+2 , blue);
cittecla 11:e8a7a4a9af05 13
cittecla 11:e8a7a4a9af05 14 }
itslinear 17:bbafd216e059 15 void setValvePosition(char pos)
itslinear 17:bbafd216e059 16 {
itslinear 17:bbafd216e059 17 //switch
itslinear 17:bbafd216e059 18 //setPWM(0, ...);
itslinear 17:bbafd216e059 19 }
itslinear 17:bbafd216e059 20
itslinear 17:bbafd216e059 21 void setSpeed(char container, char direction) {}
aeschsim 12:f28a798d2661 22
itslinear 17:bbafd216e059 23 bool controlPosition(char container)
itslinear 17:bbafd216e059 24 {
itslinear 17:bbafd216e059 25 return 0;
itslinear 17:bbafd216e059 26 }
itslinear 17:bbafd216e059 27 int getServoAngle(char container)
itslinear 17:bbafd216e059 28 {
itslinear 17:bbafd216e059 29 return 0;
itslinear 17:bbafd216e059 30 }