     Serial.println("Resistance: " + String(flexR) + " ohms");
     Serial.println("Bend: " + String(uangle) + " degrees");
     Serial.println();
-    windDirChar.setValue(angle);
+    windDirChar.setValue(uangle);
     oldFlexAngle = angle;
   }
 }

// This function is called continuously, after setup() completes.
void loop() 
{
  updateFlexAngle();
  delay(500);
}


BLEService sensingService("181A"); // BLE "Environmental Sensing"

// BLE Battery Level Characteristic
BLEUnsignedIntCharacteristic windDirChar("2A73",  // standard 16-bit characteristic UUID
    BLERead | BLENotify);     // remote clients will be able to get notifications if this characteristic changes

//###Flex sensor properties###
