Go to Post Maybe we'll see some awesome Game change like.... CARPET! - thefro526 [more]
Home
Go Back   Chief Delphi > Competition > OCCRA > OCCRA Programming
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-15-2011, 04:20 PM
weberr's Avatar
weberr weberr is offline
Registered User
AKA: Ron Weber
FRC #3641 (The Flying Toastters)
Team Role: Coach
 
Join Date: Jan 2011
Rookie Year: 2011
Location: South Lyon East
Posts: 16
weberr is an unknown quantity at this point
Unhappy [OCCRA]: Spike Relay and Cortex

We are having problems wiring and programming a spike relay to work with the vex cortex.


How can we program the spike relay to be controlled by a set of buttons to control a keyang motor?
Reply With Quote
  #2   Spotlight this post!  
Unread 11-15-2011, 08:57 PM
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
FRC #0033 (Killer Bees)
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,310
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: [OCCRA]: Spike Relay and Cortex

Yes, that is possible.

I took a standard PWM cable, and used a scribe to pull out the red (center) wire from the Cortex end, and put it into another PWM cable shell. I plugged the two of them into a pair of digital ports.

Because I was running some automation on them, the driving state is a typedef enum (with states for hoodFORWARD,hoodREVRSE,and hoodOFF). You don't need to do this, and simply getting a joystick button and setting it to a digital output in code should work. Don't forget to open the IO configuration and set those digital channels as outputs.

While I don't have easyC in front of me (I would have to boot up my windows laptop do use it...), there is a function called joystick-to-digital or something like that which can be used to directly map a joystick button to a digital output. Placing that in your main loop will allow you to control your spike, you will need two buttons (one for each direction).
__________________
Kettering University - Electrical Engineering
Kettering University SAE Teams
Chrysler Powertrain - Controls and Calibration

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
Reply


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


All times are GMT -5. The time now is 08:18 AM.

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


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