Project – Marble Maze

Project – Marble Maze

Have you ever played with a Marble Maze? This game is a game of skill and dexterity, but you will have a lot of fun like a board game!

What do you need

In this project you will use (link to the tutorials) :

We yet explained this modules in the tutorials! If you need, read the articles!

Then you can download the 3D models here:

Oh no!... That's not a valid download file

Where to buy

You can buy the modules here:

How it Works

It is a well known board game, I think that everyone of you has played it at least once.

I made it using two servos. A servo turns the maze up and down, the other servo is used for clockwise and anti-clockwise rotation. The goal of the game is to avoid the holes, and bring the ball until the end.

I think that I’m going to make other mazes for different difficulties.

Schematics

Simple schematics, the one for the joypad is the same seen in the joypad tutorial

For the servos:

  • Servo for rotation -> pin D3
  • Servo for Up-Down -> pin D4

Sketch

#include <Servo.h>

#define Xaxis A0
#define Yaxis A1

Servo serv1;
Servo serv2;
const int serv1Pin=3;
const int serv2Pin=4;
int servAngle1;
int servAngle2;

void setup()
{
  pinMode(A0, INPUT);
  pinMode(A1, INPUT);
  serv1.attach(serv1Pin);
  serv2.attach(serv2Pin);
  serv1.write(0);
  serv2.write(0);
}

void loop()
{
  int x= analogRead(Xaxis);
  int y= analogRead(Yaxis);
  servAngle1 = map(x, 0, 1023, 20, 160);
  servAngle2 = map(y, 0, 1023, 20, 160);
  serv1.write(servAngle1);
  serv2.write(servAngle2);

  delay(100);
}

Davide Busco

Davide Busco is an engineering student at Federico II University of Naples. He uses his passion and studies to create his projects. He loves be a maker and spread his knowledge. Moreover he has gained the second place in a national makers-tournament between Italian's Universities.

Leave a Reply

Your email address will not be published. Required fields are marked *

en_GBEnglish (UK)
it_ITItaliano en_GBEnglish (UK)
%d bloggers like this: