connect(HOST, PORT); // Connect to brickd // Don't use device before ipcon is connected // Get current temperature (unit is °C/100) $temperature = $t->getTemperature() / 100.0; $ipcon->disconnect(); header('content-type: text/html; charset=utf-8'); ?>
Temperature: °C