|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
After using the OI LED block to hijack an LED for my own nefarious schemes (or subroutines), is there any way to return it to its rightful purpose (displaying PWM, relay, or switch status) or is it stuck how I set it until the RC resets?
Or does the mysterious EasyC default code map it every time the code loops, so I don't have to worry about it? |
|
#2
|
||||
|
||||
|
Re: OI LED programming
EasyC doesn't use default code your OI LEDs only function when
you program them to. So, they don't monitor the state of relays, or limits like the default code would. Also, something to note if you use the small LCD display the LED's don't function and vise versa. |
|
#3
|
||||
|
||||
|
Re: OI LED programming
Oh really? I hadn't noticed that EasyC didn't run the LEDs - thanks.
Know any way to get it to? It would seem they would have to be mapped to pointers to the switches, PWMs, and relays, something like: Code:
OI_LED_08 = &switch_01 |
|
#4
|
||||
|
||||
|
Re: OI LED programming
You can type a variable name in any input or output. You don't have
to set numbers. void Autonomous ( void ) { unsigned char LED_0_State; unsigned char Enabled; Enabled = IsEnabled ( ) ; LED_0_State = Enabled ; SetOILED ( 0 , LED_0_State ) ; } |
|
#5
|
||||
|
||||
|
Re: OI LED programming
Thanks, but that part I knew. What I don't is how to grab output values (from PWMs, relays, etc.) to variables. That's what I thought would require pointers.
I think this thread has devolved into the same thing you're helping me with over here, Kingof1337. Weird. Anyway the difference between the two questions was based on my misunderstanding of EasyC LED code, so I guess this thread is kinda moot now. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming - Getting Started | Mark McLeod | Programming | 80 | 16-04-2008 23:37 |
| Making a beacon indicator LED burn its brightest without burning out | DanL | Electrical | 7 | 26-01-2004 08:05 |
| Help On Coding 2K1 Controller | GregTheGreat | Programming | 9 | 05-12-2003 18:35 |
| Rookie Programmer has question about the default code | DanL | Programming | 3 | 26-01-2002 19:59 |