Go to Post Besides, all the FIRSTers that I know - are children at heart. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-01-2007, 18:50
hanan hanan is offline
Registered User
no team
 
Join Date: Jan 2007
Location: Israel
Posts: 14
hanan has a spectacular aura abouthanan has a spectacular aura about
Question controlling the leds

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   Spotlight this post!  
Unread 18-01-2007, 21:50
Jimmy Cao Jimmy Cao is offline
Registered User
AKA: Jimmy Cao
no team
 
Join Date: Sep 2006
Rookie Year: 2004
Location: San Francisco, CA
Posts: 295
Jimmy Cao has a brilliant futureJimmy Cao has a brilliant futureJimmy Cao has a brilliant futureJimmy Cao has a brilliant futureJimmy Cao has a brilliant futureJimmy Cao has a brilliant futureJimmy Cao has a brilliant futureJimmy Cao has a brilliant futureJimmy Cao has a brilliant futureJimmy Cao has a brilliant futureJimmy Cao has a brilliant future
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;
or whatever you variation of that you want to do. It can also be used to set the Relay LEDs.
__________________
Jimmy Cao

Team 469 2006-2010 Student/Alumni
Team 830 2011-2012 Mentor
  #3   Spotlight this post!  
Unread 18-01-2007, 22:05
Gamer930's Avatar
Gamer930 Gamer930 is offline
Team 930 and 171 Alumni
AKA: Justin
no team
Team Role: Alumni
 
Join Date: Mar 2002
Rookie Year: 2002
Location: New Berlin, WI
Posts: 388
Gamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to behold
Re: controlling the leds

SetOILED ( 5 , 1 ) ;
This sets Relay 1 Red to on
There is "OI LED" under RC Control menu.
__________________
2010 to Present, Scorekeeper/Field Power Volunteer for FRC/FTC/FLL
2005 - 2010, Team 171 College Mentor
2002 - 2005, Team 930 Student
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 23:48.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi