Part Number: LAUNCHXL-CC2650
Tool/software: TI C/C++ Compiler
Hello,
I am trying to send an integer value, but I can only see the hex value. How to convert or present a char value in decimal?
thanks,
Rathna
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: LAUNCHXL-CC2650
Tool/software: TI C/C++ Compiler
Hello,
I am trying to send an integer value, but I can only see the hex value. How to convert or present a char value in decimal?
thanks,
Rathna
Rathna said:but I can only see the hex value.
Exactly how do you see it? What makes you think it is a hex value?
Thanks and regards,
-George
Hello,
Thank you for the response. I am using Ble Scanner App, I am working on SimpleBLEPeripheral Example.
This is my code in simpleProfile_ReadAttr(), and I am using Char4 to display data:
case SIMPLEPROFILE_CHAR4_UUID:
{
uint8_t level;
level = battMeasure();
battLevel = level;
if (level < battLevel)
{
// Update level
battLevel = (uint8)(level & 0x00FF);
}
*pLen = 1;
pValue[0] = battLevel;
}
And here is how I am getting Voltage value,
static uint8_t battMeasure(void)
{
uint32_t batt;
// Read the battery voltage (V), only the first 12 bits
batt = AONBatMonBatteryVoltageGet();
batt = (batt * 125) >> 5;
return batt;
}
I am getting, 0x78 as the hex value, and x as the value.
Can you please guide me through this.
Thanks,
Rathna