All Projects / Tutorial / Inverting an Input Value
Inverting an Input Value
0 votes
Sign In to add your vote
DOWNLOAD NOW!
DIFFICULTY
DESCRIPTION
Ever want to intvert the value you get from a sensor? Wish the light sensor value went up in the dark instead of down? Or a button normally had a value of 1000 and became 0 when pressed? Here's how.

Just use a variable and subtract the value from 1000.

Var_1 = 1000 - In_1;

Then use Var_1 in your project where it's convenient.

Out_B = Var_1;
THE CODE
Setup
Main Program
WHAT YOU NEED
1:
Knob

2:

3:

4:

5:

A:
LED (same value as input)

B:
LED (inverted from input)

C:

D:

E:

CREDITS
Built by
Teague Labs
Posted by
Adam Kumpf
Views
2446
Downloads
117