mymadi
Newbie level 6
Dear all forumer,
I have a little bit problem how to convert the hexadecimal (the value read from ADC) to a floating point. Currently i'm doing the Fuzzy Logic that need range from -1000 to 1000
so i have some idea how to convert it, it is possible:
Code:
128 is the setpoint (128H is equal to 0)
Thats mean the idea is:
0H is equal to -1000
128H is equal to 0
255H is equal to 1000
Please help me!!! :idea:
I have a little bit problem how to convert the hexadecimal (the value read from ADC) to a floating point. Currently i'm doing the Fuzzy Logic that need range from -1000 to 1000
so i have some idea how to convert it, it is possible:
Code:
Code:
float e;
e = ((ADC - 128)/128)*1000;
128 is the setpoint (128H is equal to 0)
Thats mean the idea is:
0H is equal to -1000
128H is equal to 0
255H is equal to 1000
Please help me!!! :idea: