Final version of program with changed pin for PWM, freq for led and bluetooth comma seperated values

Dependencies:   mbed TextLCD

main.cpp

Committer:
osamugint
Date:
2018-10-26
Revision:
1:3ae60fd51e2b
Parent:
0:3e6bb88dd7ee
Child:
4:28134b3439bc

File content as of revision 1:3ae60fd51e2b:

#include "stdafx.h"

AnalogIn temp_sen(A0);
AnalogIn light_sen(A1);
TextLCD lcd(PTC7,PTC0,PTC3,PTC4,PTC5,PTC6);
//InterruptIn button(D0);
DigitalIn enter(D1);
DigitalIn down(D2);
DigitalIn up(D3);

int temp = 25;
int state = 0;
int pointer = 0;
int light = 57;
int fan = 3;
int temp_mem, vl;
int main()
{
    temp_mem = temp_cal(temp_sen);
    light = light_cal(light_sen);
    while(1){
        buttonMode(state, enter);
        if (state == 0){
            mainScreen(lcd, temp_sen, light_sen, state, temp_mem, light, fan);    
            }
        if (state == 1){
            optionScreen(lcd, state, pointer, up, down);
            }
        }
}