Loading...

# Thread: how to calculate reverse value with scale

1. ## how to calculate reverse value with scale

Hi,

I cannot find how to convert my level value from receiver (from -130dBm to -30dBm) I do not use minus -> so 130 to 30
My display (nextion type) has a "vu meter" witch needs 0 to 100
When my receiver value is 130, I need to send 0 to LCD
When my receiver value is 30 then I need to send 100 to LCD

Regards

2. ## Re: how to calculate reverse value with scale

output = (reading+130)*10/16
should do it. Where I assume you are reading -130 to +30.

Thus, a reading of -130 will give output = 0
and a reading of +30 will give output = 100

3. ## Re: how to calculate reverse value with scale

or

output = 130-reading
should do it. Where I assume you are reading 130 to 30.

Thus, a reading of 130 will give output = 0
and a reading of 30 will give output = 100

4. ## Re: how to calculate reverse value with scale

Ohhh yes yes ! I'm so tired... didn't saw as simple as it is !
Regards

#### Members who have read this thread : 17

You do not have permission to view the list of names.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts