 #endif // SCAN_SENSORS
 }
 
-int getRawTemperature(float temp) {
-  switch (TEMPERATURE_PRECISION) {
+int getRawTemperature(float temp,int precision=12) {
+  switch (precision) {
     case 12:
-      return (int)(temp / 0.0625);
+      return ((int)(temp / 0.0625)) & 0x0fff;
     case 11:
-      return (int)(temp / 0.125);
+      return ((int)(temp / 0.125)) & 0x07ff;
     case 10:
-      return (int)(temp / 0.25);
+      return ((int)(temp / 0.25)) & 0x03ff;
     case 9:
-      return (int)(temp / 0.5);
+      return ((int)(temp / 0.5)) & 0x01ff;
   }
   
   return 0;

//              GND Dq  Vdd
//
#include <DallasTemperature.h>

// UART baud rate
#define UART_BAUD_RATE  9600

 * Main loop
 */
void loop() {

#ifdef SEND_DATA
  // send dumy telegram
  theSender.send(0, 12);
  theSender.send(4095, 12);
#endif // SEND_DATA

#ifdef READ_SENSORS
  if ( sensors.getDeviceCount() > 0 ) {
