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.
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.
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
Re: Multiplex: A GBC Module
Holy crow, that thing is awesome looking! Nice job! Great editing on the video, too.
_________________ | Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat) | My Blog: I'd Rather Be Building Robots | ROBOTC 3rd Party Driver Suite: [Project Page]
Tue Jul 31, 2012 1:35 pm
Joined: Wed Sep 28, 2011 10:13 pm Posts: 509 Location: Totally not spying on Hassenplug to see what he has for the Brickworld Chicago 2013 sumo contest.
Re: Multiplex: A GBC Module
_________________ 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.
Users browsing this forum: No registered users and 2 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