Plamen Totev
/
peltier
peltier with 2 fans
main.cpp
- Committer:
- redplam
- Date:
- 2014-04-12
- Revision:
- 3:0ef2ced1f02d
- Parent:
- 2:a4524f94f189
- Child:
- 4:5213bee8158e
File content as of revision 3:0ef2ced1f02d:
#include "mbed.h" #include "pindefs.h" #include "led_lights.h" #include "peltier.h" #include "peltier_pindefs.h" #include "TextLCD.h" #include "pumps.h" #include "pumps_pindefs.h" #include "weight.h" #include "weight_pindefs.h" Serial pc(USBTX, USBRX); // tx, rx DigitalOut te1(PTD7); DigitalOut te2(PTD6); /* AnalogIn ain(p19); DigitalOut led(LED1); int main() { while (1){ if(ain > 0.3) { led = 1; } else { led = 0; } } } */ //TextLCD lcd(PTE29, PTE30, PTC12, PTD0, PTD5, PTA13, TextLCD::LCD20x2); // rs, e, d4-d7 ok void init (void) { //void pumps(bool pump_1,bool pump_2,bool valve_1,bool humidity_fan_1); pump1-up pump2-down pumps(false,false,false,false); //void peltier(bool fan_in,bool fan_out,bool cold,bool hot,int pwm_procent); peltier(false,false,false,false,0); } int main(void) {te1=1; te2=1; while(1) { read_weight(); calc_weight(); //peltier_auto(20); //led_test(); // pc.printf("wait20"); /* te2=1; wait(1); te1=0; wait(10); peltier(true,true,false,false,10); te1=1; wait(1); te2=0; wait(10); peltier(true,true,false,false,10);*/ wait(1); /* wait(10); pumps(true,false,false,false); wait(2); pumps(false,true,true,false); wait(2); pumps(false,false,false,true); wait(2); pumps(false,false,false,false); wait(20);*/ } }