Go to Post Put on shows. Start new teams, FRC, FVC, or FLL. It doesn't matter. But I know that being on the robotics team has given me some of the best memories of my life, and I wouldn't want anybody else to miss out on that. - irishninja [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 14-02-2008, 11:55
LordFrz's Avatar
LordFrz LordFrz is offline
Team 2330
FRC #2330 (FTech)
Team Role: Leadership
 
Join Date: Jan 2008
Rookie Year: 2007
Location: USA,OK
Posts: 14
LordFrz is on a distinguished road
Help Programming Buttons

HY im trying to program our triggers to move the cylinders. I have used search and found most of what I need. But when i compile it says I must define my symbol p1_sw_trig and p2_sw_trig


Im using easy C

Can anyone help me please.
__________________
Team 2330 Web Site
  #2   Spotlight this post!  
Unread 14-02-2008, 12:36
omalleyj omalleyj is offline
Registered User
AKA: Jim O'Malley
FRC #1279 (Cold Fusion)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: New Jersey
Posts: 132
omalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to behold
Re: Help Programming Buttons

Those variables are not predefined in EasyC. You need to either define them as a local variable, if you are only using them in one function, or globally if you use it in several functions.
Most likely you want to have them available anywhere in the program, so define them globally. Press F6 to pop up the global variables section and add a variable to the list at the bottom. Probably you will want an 'unsigned char', as joysticks use 0-255, but you may want an 'int' if you plan to do math on the value and the variable may end up holding a negative value.
  #3   Spotlight this post!  
Unread 14-02-2008, 12:43
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,754
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Help Programming Buttons

Quote:
Originally Posted by LordFrz View Post
... p1_sw_trig and p2_sw_trig
Im using easy C
The code you've been looking at is not what you need in EasyC.
A better place to post future questions about EasyC programming is in this sub-forum http://www.chiefdelphi.com/forums/fo...play.php?f=164

You use those variables if you are using MPLAB, so ignore and don't try to use them.

For EasyC use "OI to Relay" under "RC Control" to work your cylinders.
For example, to use the trigger from Joystick Port 2, and the solenoid relay connected to Relay 7, you'll end up with a line of code something like:
Code:
OIToRelay(2,1,7,1);
This example will put the cylinder in one position while the trigger is held, and another when it is not being held.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 14-02-2008 at 12:55.
  #4   Spotlight this post!  
Unread 14-02-2008, 13:55
LordFrz's Avatar
LordFrz LordFrz is offline
Team 2330
FRC #2330 (FTech)
Team Role: Leadership
 
Join Date: Jan 2008
Rookie Year: 2007
Location: USA,OK
Posts: 14
LordFrz is on a distinguished road
Re: Help Programming Buttons

Thanks for the help yall.
__________________
Team 2330 Web Site
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
PLEASE HELP!! Need help programming arm?? amirjpl Programming 12 15-03-2007 15:11
Programming Extra Joystick Buttons Inverted Programming 2 08-02-2007 11:45
Buttons, Buttons and more Buttons (2006) Freddy Schurr Team Organization 11 14-12-2005 21:36
Programming motors with joystick buttons TMHStitans Programming 5 21-03-2005 21:07
Looking for some help with buttons and pins... Amanda Morrison General Forum 4 26-02-2003 17:32


All times are GMT -5. The time now is 15:12.

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