|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I am using easyC. Can I control the leds in the OI, that when I am writing setPWM(pwm_relay,value), the led in OI corresponding that relay switch will trun on? (just like the ability to control each pin in plab) Thanks |
|
#2
|
|||
|
|||
|
Re: controlling the leds
Yes. I do not use Easy-C but i can't believe it'll be too different from normal coding, cept it has nice buttons
The code would put a 0 or a 1 into the value of the LED you want to set (1 = on 0 = off) Suposing you want to control Pwm1_green, just do this Code:
if (something_is_true) Pwm1_green=1; else Pwm1_green=0; |
|
#3
|
|||||
|
|||||
|
Re: controlling the leds
SetOILED ( 5 , 1 ) ;
This sets Relay 1 Red to on There is "OI LED" under RC Control menu. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Controlling | team 803 | Programming | 10 | 21-02-2006 13:56 |
| Another question about LEDs on the OI. | DemonYawgmoth | Control System | 2 | 18-02-2006 21:51 |
| Controlling motors | railerobotics | Programming | 6 | 17-01-2006 17:17 |
| Fading LEDs using a PWM signal from the Edubot | DanL | Programming | 22 | 30-03-2004 00:07 |
| controlling with the radio | Lord Nerdlinger | Programming | 2 | 17-02-2004 22:40 |