Example #1
0
void loop(void)
{ 
	delay(2000);
  // call sensors.requestTemperatures() to issue a global temperature 
  // request to all devices on the bus
  Serial.print("Requesting temperatures...");
  sensors.requestTemperatures(); // Send the command to get temperatures
  Serial.println("DONE");
  
  
  // Loop through each device, print out temperature data
  for(int i=0;i<numberOfDevices; i++)
  {
    // Search the wire for address
    if(sensors.getAddress(tempDeviceAddress, i))
	{
		// Output the device ID
		Serial.print("Temperature for device: ");
		Serial.println(i,DEC);
		
		// It responds almost immediately. Let's print out the data
		printTemperature(tempDeviceAddress); // Use a simple function to print out the data
	} 
	//else ghost device! Check your power requirements and cabling
	
  }
}
Example #2
0
void Display::printFridgeTemp(void) {
    oled.setCursor(6,2);
    if(tempControl.fridgeSensor.isConnected()) {
        printTemperature(tempControl.getFridgeTemp());
    }
    else {
        oled.print_P(PSTR(" --.-"));
    }
}
Example #3
0
void Display::printBeerTemp(void) {
    oled.setCursor(6,1);
    if(tempControl.beerSensor.isConnected()) {
        printTemperature(tempControl.getBeerTemp());
    }
    else {
        oled.print_P(PSTR(" --.-"));
    }
}
Example #4
0
void Display::printFridgeSet(void) {
    oled.setCursor(12,2);
    fixed7_9 fridgeSet = tempControl.getFridgeSetting();
    if(fridgeSet == INT_MIN) { // beer setting is not active
        oled.print_P(PSTR(" --.-"));
    }
    else {
        printTemperature(fridgeSet);
    }
}
void loop(void)
{ 
  // call sensors.requestTemperatures() to issue a global temperature 
  // request to all devices on the bus
  Serial.print("Requesting temperatures...");
  sensors.requestTemperatures(); // Send the command to get temperatures
  Serial.println("DONE");
  
  // It responds almost immediately. Let's print out the data
  printTemperature(insideThermometer); // Use a simple function to print out the data
  delay(1000);
}
Example #6
0
void printProtocolData(struct _protocolData *p) {
	PROTOCOL_DATA_PRINT("**********************client data:************\r\n");
	PROTOCOL_DATA_PRINT("ID:%s\n",p->id);
	printCellsVol(&p->cellsVol);
	printGpsInfo(&p->gpsPosition);
	printGpsTime(&p->gpsTime);
	printGpsAllInfo(&p->gpsInfoAll);
	printWarnInfo(&p->m_warn);
	printfBtrSumInfo(&p->btrSumInfo);
	printTemperature(&p->temps);
	PROTOCOL_DATA_PRINT("\r\n**********************client data over************\r\n\r\n");
}
Example #7
0
void MainScreen::display()
{
	printTime();
	printDate();
	printTemperature();
}
Example #8
0
void LcdDisplay::printTemperatureAt(uint8_t x, uint8_t y, temperature temp) {
    lcd.setCursor(x,y);
    printTemperature(temp);
}