View Single Post
  #1   Spotlight this post!  
Unread 16-12-2009, 16:50
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Driverstation Pong!

Yesterday, the programming part of our team had a little fun playing pong on our (still functional!) Driverstation. I had originally written the code coming back from one of our competitions while trying to teach some C++ to a VB programmer, and had never tested it. Once we finished what we were doing yesterday, I happened to notice the project, and decided to test it out. Aside from a few small bugs, it worked! I have the (C++) source attached. This is fun!

to use: create new simpleTemplate example project, and copy DS pong files to it. Build and download. Then switch to the user display on the DS (hold Select down for 1 second). Start pong by pulling Joystick 1's trigger. to reset after winning or loosing, pull joystick 1's trigger. The ball moves in random directions from random locations.

Ideal setup: Driver station on table between 2 people, with joystick 1 on left of DS, joy 2 on right, both backwards (trigger towards front of DS)
Attached Files
File Type: zip DSPong.zip (3.1 KB, 143 views)
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib