Variable assignment in EasyC

I usually use MPLAB for programming, but since I was teaching complete beginners this year I decided to use EasyC instead. My question is this: How can I assign a value from the OI to a variable in EasyC. For example, in MPLAB I would make a statement like

myVariable = p1_y;

or

myVariable = pwm01;

I know how to use the assignment block to assign specific values to a variable, and I know how to use the OIToPWM block, but I want to take the pwm value and assign it to a variable.

Thanks.

Creat a variable (double click on “Variables”).

To make the assignment:
Under “RC Control” use “Analog OI Input” or “Digital OI Input”

e.g.,


unsigned char x;
 
x = GetOIAInput(1,1);