Raindrops -a rainbowduino game by Christoph

Arduino, Seeeduino Serials and mutants. Share your problems and experence on arduino compatible board such as seeeduino/stalker, etc.

Moderators: lily.li, violet, salmanfarisvp

Post Reply
User avatar
seeedstudio-fan128
Staff
Staff
Posts: 46
Joined: Thu Feb 19, 2009 11:58 pm
Location: China
Contact:

Raindrops -a rainbowduino game by Christoph

Post by seeedstudio-fan128 » Wed Oct 07, 2009 3:15 pm

Raindrops - a little toy, which is based on the interplay of Arduino, Rainbowduino and an accerlerometer. As pictures can tell you more than hundreds of words maybe you should just start by watching my little video:
5430DB56-611B-420A-968B-10251D8A794A.jpg
5430DB56-611B-420A-968B-10251D8A794A.jpg (34.96 KiB) Viewed 9725 times
http://vimeo.com/6916458

You can find the code at github:

http://github.com/ccb23/Raindrops

mshaub
Pre-kindergarten
Pre-kindergarten
Posts: 12
Joined: Mon Oct 12, 2009 2:46 pm

Re: Raindrops -a rainbowduino game by Christoph

Post by mshaub » Tue Oct 13, 2009 1:18 pm

Hi, your game looks great. I'd like to test out your code, but the client.pde won't compile without the "Rainbowduino.h" library. Can you post that as well on your github page please? Thanks.

ccb23
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Tue Oct 13, 2009 4:40 pm

Re: Raindrops -a rainbowduino game by Christoph

Post by ccb23 » Tue Oct 13, 2009 4:45 pm

Hi
mshaub wrote:I'd like to test out your code, but the client.pde won't compile without the "Rainbowduino.h" library.
I used the Rainbowduino.h which is part of Tobis mtXcontrol package, find the sources here:
http://github.com/rngtng/mtXcontrol/tre ... nbowduino/

Just put the Rainbowduino folder into your Arduino IDE Library and it'll compile fine.

I'm working on an (updated) documentation, will be out soon..
Cheers

mshaub
Pre-kindergarten
Pre-kindergarten
Posts: 12
Joined: Mon Oct 12, 2009 2:46 pm

Re: Raindrops -a rainbowduino game by Christoph

Post by mshaub » Tue Oct 13, 2009 9:55 pm

awesome, I knew that .h looked familiar. Thanks for the clarification and the great work.

mshaub
Pre-kindergarten
Pre-kindergarten
Posts: 12
Joined: Mon Oct 12, 2009 2:46 pm

Re: Raindrops -a rainbowduino game by Christoph

Post by mshaub » Sat Oct 17, 2009 1:39 am

Actually, I've got another error asking about the Accelerometer.h library. I found another one online, built by Atmel for AVR32. I guess it's not the right library because the code still doesn't compile. I looked a bit on the Arduino.cc page but no luck there. Would you mind pointing me in the right direction or posting that library as well? Thanks again.

_mike

ccb23
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Tue Oct 13, 2009 4:40 pm

Re: Raindrops -a rainbowduino game by Christoph

Post by ccb23 » Mon Oct 19, 2009 4:48 am

mshaub wrote:Actually, I've got another error asking about the Accelerometer.h library. I found another one online, built by Atmel for AVR32. I guess it's not the right library because the code still doesn't compile. I looked a bit on the Arduino.cc page but no luck there. Would you mind pointing me in the right direction or posting that library as well? Thanks again.

_mike
hi mike

sorry I forgott to mention, I used the accelerometer Lib on seedstudions website, see here:
http://www.seeedstudio.com/depot/wiimot ... p-107.html
copy this into your source or library folder as well, now it should work!?

mshaub
Pre-kindergarten
Pre-kindergarten
Posts: 12
Joined: Mon Oct 12, 2009 2:46 pm

Re: Raindrops -a rainbowduino game by Christoph

Post by mshaub » Mon Oct 19, 2009 7:46 am

Thanks. I actually just hacked out all the accelerometer code to try to get it to even run. It certainly did, and looked great.
But, the display looked kind of dim. Any ideas why? I've loaded up different firmware and the original Seeedstudio rainbow.h library as well as the one you've used (rainbowduino.h I think). Of all, it looks like the seeed example on using the Rainbowduino to control their 12V light strips gives the highest brightness output. http://www.seeedstudio.com/blog/?p=512 The problem with this example is that I can't figure out how to make use of all the LEDs in the matrix, it's just controlling 2 rows of them.
Any thoughts on why the LEDs are so much dimmer when I'm running your code?

BTW, I really like how you've coded the game. It's pretty brilliant way of tracking collisions and running the game from what I can tell. Nice work!

_mike

ccb23
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Tue Oct 13, 2009 4:40 pm

Re: Raindrops -a rainbowduino game by Christoph

Post by ccb23 » Mon Oct 19, 2009 5:44 pm

hey mike, thanks again ;-)
mshaub wrote: Any thoughts on why the LEDs are so much dimmer when I'm running your code?
yeah that's a 'bug' in Rainbowduino.h, tobi reported same problem for mtXcontrol, see here:
http://github.com/rngtng/mtXcontrol/issues#issue/3

I changed 31 to 32 the matrix is shiny bright by colors change. really wired, don't know what's wrong have to dig deeper into it, unfortunately I'm quite busy right now, but it's on my TODO list to check it out.. I'll let you know..

cheers

ccb23
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Tue Oct 13, 2009 4:40 pm

Re: Raindrops -a rainbowduino game by Christoph

Post by ccb23 » Tue Oct 27, 2009 6:55 pm

Hey
I've finally updated the source and Docu, pls check out the latest version from here:

http://github.com/ccb23/Raindrops

Raindrops
This is the Raindrops Rainbowduino Game. It’s a Rainbowduino connected via I2C to an Arduino with an Accelerometer. The current position/movement is determined and send via the I2C Bus to the Rainbowduino. With that you can move the red dot on the Matrix and avoid hitting the falling blue raindrops. But if you do so, the game is over. Tilting the devices influences the speed of the drops as well.... Have fun!

Used Components:
Rainbowduino
8x8 RGB LED Matrix
Accelerometer ADXL330
Arduino

Usage:
First, get the Rainbowduino.h Library and put it into your Arduino IDE Library (or in the same folder as the sources). Second, do the same with the Accelerometer Library found here.

Now, compile both sketches and upload the Server.pde sketch to the Accelerometer, upload Client.pde to the Rainbowduino. You are ready to go! Have fun!

Post Reply