PES 4 - Smart Medication Dispenser / PES4_ProgrammeforDesignReview2

Dependencies:   SDFileSystem mbed

Fork of PES4_Programme by PES 4 - Smart Medication Dispenser

Committer:
EHess
Date:
Mon Mar 26 15:54:52 2018 +0000
Revision:
22:828b393dff51
Parent:
17:bbafd216e059
Child:
23:79638b0e9b16
defined setValvePosition

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;
EHess 22:828b393dff51 8 }
itslinear 17:bbafd216e059 9
itslinear 17:bbafd216e059 10 void setValvePosition(char pos)
itslinear 17:bbafd216e059 11 {
EHess 22:828b393dff51 12 switch(pos){
EHess 22:828b393dff51 13 case 0: // neutrale Position
EHess 22:828b393dff51 14 setPWM(0, 50);
EHess 22:828b393dff51 15 break;
EHess 22:828b393dff51 16 case 1: // Glas
EHess 22:828b393dff51 17 setPWM(0, 100);
EHess 22:828b393dff51 18 break;
EHess 22:828b393dff51 19 case 2: // Auswurf
EHess 22:828b393dff51 20 setPWM(0, 0);
EHess 22:828b393dff51 21 break;
itslinear 17:bbafd216e059 22 }
itslinear 17:bbafd216e059 23
itslinear 17:bbafd216e059 24 void setSpeed(char container, char direction) {}
aeschsim 12:f28a798d2661 25
EHess 22:828b393dff51 26
itslinear 17:bbafd216e059 27 bool controlPosition(char container)
itslinear 17:bbafd216e059 28 {
itslinear 17:bbafd216e059 29 return 0;
itslinear 17:bbafd216e059 30 }
itslinear 17:bbafd216e059 31 int getServoAngle(char container)
itslinear 17:bbafd216e059 32 {
itslinear 17:bbafd216e059 33 return 0;
itslinear 17:bbafd216e059 34 }