Go to Post Overall... the secret is PROTOTYPING! Design is an iterative process. Do some basic design in your head. Build it. Test it. Improve it. Repeat until satisfied. - JVN [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
  #15   Spotlight this post!  
Unread 11-06-2010, 22:03
synth3tk's Avatar
synth3tk synth3tk is offline
Volunteer / The Blue Alliance
AKA: David Thomas
no team
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Ohio
Posts: 2,005
synth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond repute
Re: no control of bot when kicker is operating

Notes:

This is setup so that a button on a USB gamepad triggers the kicker.

Replace the sFire/sLatch/etc parts with your actual kicking code.

Depending on how your kicker works, you may need more or less "sections".

kickTime.start in the first block is required, and kickTimer.stop(); and kickTimer.reset();.

Code:
        // Set kicking loop to start when button 7 on gamepad is pressed and not in loop already
        Watchdog.getInstance().feed();
        if(gamePad.getRawButton(7) == true && kickTimer.get() == 0.0)
        {
            kickTimer.start();
            sFire.set(true);
            sLatch.set(false);

            sExt.set(true);
            sRet.set(false);
        }
        if (kickTimer.get() > 0.75 && kickTimer.get() < 1.05)
        {
            sFire.set(true);
            sLatch.set(false);

            sExt.set(false);
            sRet.set(true);
        }
        if (kickTimer.get() > 1.05 && kickTimer.get() < 1.35)
        {
            sFire.set(false);
            sLatch.set(true);

            sExt.set(false);
            sRet.set(true);
        }
        if (kickTimer.get() > 1.35)
        {
            sFire.set(false);
            sLatch.set(true);

            sExt.set(true);
            sRet.set(false);
            kickTimer.stop();
            kickTimer.reset();
        }
 


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
842 Kicker On Bot kE7JLM General Forum 36 29-01-2010 11:51
How & where do you build the bot when it snows and your robo-base (school) is closed? Elgin Clock General Forum 28 03-03-2008 00:12
paper: Control an FRC bot with a Wiimote Greg Marra Extra Discussion 8 21-01-2008 12:41
1189 - Human-Bot Arm Control jmcr8on Robot Showcase 50 13-10-2007 22:58


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

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