sakthi priya amirtharaj
/
BAE_hw_test1_5
with i2c
Fork of BAE_b4hw_test by
Diff: HK.cpp
- Revision:
- 2:edd107ea4740
- Parent:
- 0:ebdf4f859dca
- Child:
- 3:20647ff68b3c
diff -r deb3c0fafa3a -r edd107ea4740 HK.cpp --- a/HK.cpp Sat Dec 20 05:56:04 2014 +0000 +++ b/HK.cpp Fri Dec 26 06:12:09 2014 +0000 @@ -4,9 +4,9 @@ //GPIO pins used=> D2-D12, A0-A1 -DigitalOut SelectLinesA[]={PIN96,PIN44,PIN45,PIN46};//to mux1=>voltage mux , PTA 13-16 , CHNGE TO PIN43 LATER -DigitalOut SelectLinesB[]={PIN56,PIN57,PIN58,PIN59};//to mux2=>current mux(differential mux) , PTB 3,7,8,9 -DigitalOut SelectLinesC[]={PIN64,PIN65,PIN66,PIN67};//to mux3=>temp mux PTB 18-21 +DigitalOut SelectLinesA[]={PIN43,PIN44,PIN45,PIN46};//to mux1=>voltage mux , PTA 13-16 , CHNGE TO PIN43 LATER +DigitalOut SelectLinesB[]={PTD3,PTC4,PTC8,PIN59};//to mux2=>current mux(differential mux) , PTB 3,7,8,9 +DigitalOut SelectLinesC[]={PIN64,PIN65,PIN66,PTC9};//to mux3=>temp mux PTB 18-21 //--------------------------------------------MSB is SelectLines[0],LSB is SelectLines[3]-------------------------------- @@ -130,11 +130,15 @@ for(LoopIterator=0; LoopIterator<5; LoopIterator++) { + //following lines read the sensor values and stores them in 'SensorData' structure variable 'Sensor' Sensor.Temperature[LoopIterator]=(-90.7*3.3*TemperatureInput.read()+190.1543); voltage_thermistor=TemperatureInput.read()*3.3;//voltage across thermistor resistance_thermistor=24000*voltage_thermistor/(3.3-voltage_thermistor);//resistance of thermistor - //PanelTemperature will be updated depending on voltage_thermistor value later in the lines to follow + if (LoopIterator==0) + { + printf(" Temp =%f",-90.7*3.3*TemperatureInput.read()+190.1543); + } if(LoopIterator%2==0) {