I'm going to need more to go on here — "the Rainbow Machine" could refer to an item in a dozen different games, and the method is completely different in each one.
Tell me which game you're playing and where you've got to in it, and I can give you a straight answer instead of a guess.