Jump to content
43oh

Tilt-sensitive rolling ball display


Recommended Posts

Hi all,

 

Just to show off a little something I did :smile: It's an LCD display of a "ball" rolling around on a spotted surface, and bouncing from the boundries. The direction and speed of rolling is determined by the tilt of the entire setup. 

 

The hardware is a Nokia 5110 LCD breakout and a cheap 3-axis accelerometer breakout, both hooked directly to the MSP430 Launchpad. Code was written in Energia. 

 

Here's the video:

 

I don't consider the code clean enough to publish, however I'll be happy to answer any questions about it.

 

Happy coding!

Link to post
Share on other sites

Thanks!

 

Is there a preset bounce when you hit an edge?

 

I'm not sure what you mean by "preset"... It's not constant; When the ball crosses a boundry, its current speed on the relevant axis is reversed and halved (e.g. ball.dx = -ball.dx >> 1). 

 

What accelerometer did you use?

 

It's based on the MMA7361 chip. The breakout is from China, really cheap (~$4 on ebay). It can work with 5V or 3.3V and has analog outputs.

Link to post
Share on other sites

Thanks!

 

 

 

I'm not sure what you mean by "preset"... It's not constant; When the ball crosses a boundry, its current speed on the relevant axis is reversed and halved (e.g. ball.dx = -ball.dx >> 1). 

 

 

 

It's based on the MMA7361 chip. The breakout is from China, really cheap (~$4 on ebay). It can work with 5V or 3.3V and has analog outputs.

Awesome - I've actually got all of the pieces.  Looking forward to seeing the code.  I especially like the bounce - I'm interested to see how you're keeping track of the graphics.

Link to post
Share on other sites

Super cool! would be sweet to see a pong implementation w/ that tilt sensor though I suppose it would be alot more coding work. Mind posting which tilt sensor breakout board you used?

 

I was thinking more along the lines of a basic Breakout game ;-)

 

I don't know if this accelerometer breakout even has a name, it's probably the cheapest on ebay. Like I said somewhere up the comments, is based on the MMA7361 chip, and I guess any analog-output accelerometer with 3.3V input will do the trick just fine.

 

Thanks!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...