Esempio n. 1
0
int main(void)
{
	int fahr;
	
	const int LOWER = 0;
	const int UPPER = 300;
	const int STEP = 20;

	printf("Fahr | Celsius\n\n");

	for (fahr = LOWER; fahr <= UPPER; fahr = fahr + STEP)
		printf("%3d %6.1f\n", fahr, getCelsius(fahr));
}
Esempio n. 2
0
int main(void) {

     float fahr, celsius; 
      
     const float lower = 0;      /* lower limit of temperature scale */ 
     const float upper = 300;    /* upper limit */ 
     const float step = 20;      /* step size */ 
     
     for(fahr = lower; fahr <= upper ; fahr = fahr + step){
         
         printf("%3.0f %6.1f\n", fahr, getCelsius(fahr)); 
         
     }
    
    return (0); //sin esta línea, el programa se ejecuta bien pero termina diciendo: RUN FAILED (exit value 11, total time: 78ms)
}
/*
 * Added methods for supporting Adafruit Unified Sensor framework
 */
float PietteTech_DHT::readTemperature() {
    acquireAndWait();
    return getCelsius();
}
Esempio n. 4
0
float I2C_Temp::getFarenheit()
{
    return (getCelsius() * 9.0F / 5) + 32;
}
Esempio n. 5
0
float getFahrenheit(int raw, float pinVoltage) {
	return (getCelsius(raw, pinVoltage) * 1.8) + 32;
}