DIY Projects Lab
Published © CC BY-SA

How To Build DIY Maze Game Using Arduino

In this project, we will be using Arduino to create a Maze Solver. The Arduino will be programmed to navigate through a Maze,

IntermediateFull instructions provided2 hours3,132
How To Build DIY Maze Game Using Arduino

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
Jumper wires (generic)
Jumper wires (generic)
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
Modulo Joystick
Modulo Joystick
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Schematics

Schematics

Code

Code

C/C++
#include <Servo.h>
  
Servo servo1;
Servo servo2;
int joyX = 0;
int joyY = 1;
  
int servoVal;
  
void setup() 
{
  servo1.attach(4);
  servo2.attach(3);
}
void loop()
{
  servoVal = analogRead(joyX);
  servoVal = map(servoVal, 0, 1023, 0, 20);
  servo1.write(servoVal);

  servoVal = analogRead(joyY);
  servoVal = map(servoVal,0, 1023, 0 , 20);
  servo2.write(servoVal);
}

Credits

DIY Projects Lab

DIY Projects Lab

41 projects • 154 followers
I am a DIY hobbyist by passion and an Electronics Engineer by profession. Sponsor (PCB Manufacturer) - www.nextpcb.com

Comments