Other Parts Discussed in Thread: CC1310
Tool/software: Code Composer Studio
Want to configure reedswitch,ntc thermistor,piezovibration sensor with CC1310
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Other Parts Discussed in Thread: CC1310
Tool/software: Code Composer Studio
Want to configure reedswitch,ntc thermistor,piezovibration sensor with CC1310
int ThermistorPin_1 = 33; // thermistor 1 pin
int ThermistorPin_2 = 13; // thermistor 2 pin
int Vo_1,Vo_2;
float R1 = 10000;
float logR2_1, R2_1, T_1, Tc_1, Tf_1,logR2_2, R2_2, T_2, Tc_2, Tf_2;
float c1 = 0.001125308852122, c2 = 0.000234711863267, c3 = 0.000000085663516;
void setup()
{
Serial.begin(115200);
}
void loop()
{
Vo_1 = analogRead(ThermistorPin_1);
R2_1 = R1 * (4095.0 / (float)Vo_1 - 1.0);
logR2_1 = log(R2_1);
T_1 = (1.0 / (c1 + c2*logR2_1 + c3*logR2_1*logR2_1*logR2_1));
Tc_1 = T_1 - 268.05;
Tf_1 = (Tc_1 * 9.0)/ 3.3 + 32.0;
delay(500);
Vo_2 = analogRead(ThermistorPin_2);
R2_2 = R1 * (4095.0 / (float)Vo_2 - 1.0);
logR2_2 = log(R2_2);
T_2 = (1.0 / (c1 + c2*logR2_2 + c3*logR2_2*logR2_2*logR2_2));
Tc_2 = T_2 - 268.05;
// Tf_2 = (Tc_2 * 9.0)/ 5.0 + 32.0;
delay(500);
Serial.print("Temperature 1: ");
//Serial.print(T_1);
//Serial.print(" F; ");
Serial.print(Tc_1);
delay(500);
Serial.println(" C");
// delay(100);
// Serial.print(Vo_1);
Serial.print("Temperature 2: ");
//Serial.print(Tf_2);
//Serial.print(" F; ");
Serial.print(Tc_2);
Serial.println(" C");
}
THIS CODE WAS WORKING IN ARDUNIO But i am having querry how to write in CC1310 please help me out