Go to Post being surgically altered to have two right hands is a big commitment, but if you wanna drive, and drive well ..... ! - KenWittlief [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 30-05-2007, 20:36
IraJason IraJason is offline
In Search of "Bang Head Here" Sign
AKA: Ira Goldberg
FRC #3632 (D-Tecs); FRC #1712 (Dawgma)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Lower Merion, PA
Posts: 283
IraJason has a brilliant futureIraJason has a brilliant futureIraJason has a brilliant futureIraJason has a brilliant futureIraJason has a brilliant futureIraJason has a brilliant futureIraJason has a brilliant futureIraJason has a brilliant futureIraJason has a brilliant futureIraJason has a brilliant futureIraJason has a brilliant future
Send a message via AIM to IraJason Send a message via MSN to IraJason
Single Click On/Off Using the Trigger in EasyC

I've posted a few pictures of my senior project, and before my presentation I've been working with Easy C to get the cathodes that are attached to my robot to light up and stay lit after a single click of the left trigger. I then wanted the cathodes to turn off once the trigger was clicked again. The cathodes are connected to the RC using a Spike Relay. I have been using EasyC to program my robot. I do not have the laptop that is used for programing with me but I believe my current code is:

if(p1_sw_trig && n == 0)
{
OItoRelay(1,1,1,1);
n = 1;
}

if(p1_sw_trig && n == 1)
{
n = 0;
}

This turns the light on with a single button click, but the cathodes do not always turn off with the next click. I was wondering if anyone knew how to make this work, rather than have it work half the time or using two buttons to turn it on and off. Thanks in advance!

-Ira
__________________
Many respectable physicists said that they weren't going to stand for this - partly because it was a debasement of science, but mostly because they didn't get invited to those sort of parties."
-Douglas Adams The Hitchhiker's Guide to the Galaxy

2007 Galileo #6 seed, 5th Alliance Captain, Semi-finalist
2007 Philly Regional #4 Seed, Philly Regional GM Industrial Design Award Winner
2006 Philly Regional Highest Rookie Seed,Philly Regional Rookie All Star
 


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
multiple autonomous modes using easyc cerberus170 Programming 3 20-02-2007 15:01
Using printf() as UserCode in EasyC 2.0 tacman1123 Programming 2 31-05-2006 10:01
Using SMC Single Selenoid Valve from last year? Sachiel7 Pneumatics 3 20-01-2005 21:31
Is Anyone Using Motors to Hoist themselves off the platform on the bar? xxlshortys Motors 36 25-02-2004 01:06
using single solenoid like a double SteveO Programming 14 02-02-2004 22:51


All times are GMT -5. The time now is 11:52.

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