View unanswered posts | View active topics It is currently Tue Jul 22, 2014 7:31 am






Reply to topic  [ 3 posts ] 
Multiplex: A GBC Module 
Author Message
Rookie

Joined: Mon Jun 11, 2012 9:28 pm
Posts: 37
Post Multiplex: A GBC Module
Hello everyone!

Here is my first RobotC Project: Multiplex, a huge Great Ball Contraption module.
For those of you unfamiliar with the Great Ball Contraption, it is a Rube-Goldberg style collaborative display where participants bring along separate 'modules', which are connected in a loop. They pass balls from one to the next in unique and interesting ways.

I've always been interested in the display, so when I got the chance I of course took the opportunity. I thought this would be the perfect time to use RobotC in some more challenging applications.

Image
Multiplex by sqiddster, on Flickr



Basically, the 'smart' NXT-controlled components are the color sorter and the ball array.

The color sorter was the hardest part - it was really difficult to wrap my head around. Basically, the overhead arms are supposed to swing across and push the ball in a certain direction, depending on its color. This is complicated by the fact that both arms can do both colors, and the first arm cannot interfere with the balls needed for then second arm!

I eventually got it working using two arrays - 'colors', and 'distances', specified in belt encoder degrees.
The code is attached to the post. Take note that I never got around to optimizing/commenting this, so it contains some nasty multitasking, hacks and beginner mistakes! You have been warned.

The ball array was easier, but a great application of a 2D array. Basically it stores white and orange balls, and a trolley system moves and dispenses either a white or orange ball dictated by the array within the program. It uses two light gates to make sure it has enough, yet not too many balls of each color. If there are too many, it can activate an overflow valve which lets balls bypass the array.
I will thank Xander and Spiked3 in regards to the code, they helped me iron out some of the kinks. The code for this part is also attached. It should be nice and clean ;)

Special thanks to Xander for his driver suite! I used the Hitechnic color sensor and IR link, and the suite made it so much easier.


Attachments:
Color Sorter.c [4.98 KiB]
Downloaded 301 times
Array.c [5.64 KiB]
Downloaded 303 times
Tue Jul 31, 2012 12:15 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3162
Location: Rotterdam, The Netherlands
Post Re: Multiplex: A GBC Module
Holy crow, that thing is awesome looking! Nice job! Great editing on the video, too.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue Jul 31, 2012 1:35 pm
Profile WWW
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: Multiplex: A GBC Module
Very cool!

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Fri Aug 03, 2012 6:57 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.