Project in progress
Controlled Board Eraser using Arduino and 1Sheeld

Controlled Board Eraser using Arduino and 1Sheeld © GPL3+

Erase your board according to your smart phone accelerometer sensor values or using the 1sheeld gamepad

  • 9,086 views
  • 4 comments
  • 34 respects

Components and supplies

Necessary tools and machines

About this project

Board Eraser using Arduino and 1sheeld


Introduction: (What is the project about?)


Are you tired of erasing the board every time you use it. Have you ever thought of erasing the whole board while you are sitting in your place. The automatic board eraser is a normal magnetic board eraser with motors and wheels that can easily erase and clean your board using your mobile phone. Just leave it mounted on the board and use it when you need to erase.


Why did i decide to make it ?


Most of the people nowadays use white boards in classes or meeting rooms. They write a lot and erase every time when they finish. There are some disadvantages from erasing the whole board physically with your hand, like wasting some time, doing effort, not professional in some meetings for important people to do it themselves and it the eraser makes your hands more dirty after using it. Moreover, some people find it hard to reach all the parts of the board especially when it is mounted on a high distance from the ground. As a result, I decided to build a small magnetic automated board eraser with wheels so i could control it easily from my mobile phone to erase the board from my place.


How Does it work?


After connecting all the hardware components and uploading the code to the arduino and 1sheeld start opening the 1sheeld mobile application and connect it to the 1sheeld board via Bluetooth. Then you have to select the shields that we will use; they are the game pad shield and accelerometer shield. Put the eraser on the board and open the game pad shield and start using the four arrow directions to move up, down, left or right. An LED will be high when the magnetic eraser moves on the board to start erasing words. Another way to control this eraser is to open the accelerometer shield and hold the phone in your hand. If you want to move up tilt your hand in the front direction to make the Y < -5, so the eraser will move up. If you want to move down tilt your hand in the backward direction to make the Y < 6, so the eraser will move down. Furthermore, if you want to move right tilt your hand in the right direction to make the x < -6, so the eraser will move in the right direction and finally If you want to move left tilt your hand in the left direction to make the x > 6, so the eraser will move in the left direction. Now your board will be easily controlled to erase the whole board without doing any effort.


Images of hardware Components


Code

Automatic_Eraser.inoC/C++
This is the code for the board eraser to be controlled either by a game pad shield or by the mobile accelerometer sensor values to move in all directions and erase the board. A LED is used to give a clear sign for user that it is erasing now.
#define CUSTOM_SETTINGS
#define INCLUDE_GAMEPAD_SHIELD
#define INCLUDE_LED_SHIELD
#define INCLUDE_ACCELEROMETER_SENSOR_SHIELD


float x, y, z;


/* Include 1Sheeld library. */
#include <OneSheeld.h>

/* A name for the LED on pin 7. */
const int ledPin = 13;



/* Pin configuration of the Seeedstudio's motor shield. */
int motorAPin1 = 8;
int motorAPin2 = 11;
int motorBPin1 = 12;
int motorBPin2 = 7;
int motorASpeedPin = 9;
int motorBSpeedPin = 10;

void setup()
{
  /* Start communication. */
  OneSheeld.begin();
  /* Set the LED pin as output. */
  pinMode(ledPin, OUTPUT);

  /* Seeedstudio's motor shield initialization. */
  pinMode(motorAPin1, OUTPUT);    // IN1 of motor A
  pinMode(motorAPin2, OUTPUT);    // IN2 of motor A
  pinMode(motorBPin1, OUTPUT);    // IN3 of motor B
  pinMode(motorBPin2, OUTPUT);    // IN4 of motor B
  pinMode(motorASpeedPin, OUTPUT); // Speed of motor A
  pinMode(motorBSpeedPin, OUTPUT); // Speed of Motor B
}

void loop()

{ x=AccelerometerSensor.getX();
  y=AccelerometerSensor.getY();
  z=AccelerometerSensor.getZ();
  
  /* If up is pressed, move the car forward. */
  if (GamePad.isUpPressed()|| y < -5)
  {
    analogWrite(motorASpeedPin, 255);
    analogWrite(motorBSpeedPin, 255);
    digitalWrite(motorAPin1, LOW);
    digitalWrite(motorAPin2, HIGH);
    digitalWrite(motorBPin1, LOW);
    digitalWrite(motorBPin2, HIGH);
    digitalWrite(ledPin, HIGH);

  }
  /* If down is pressed, move the car backwards. */
  else if (GamePad.isDownPressed()||  y > 6)
  {
    analogWrite(motorASpeedPin, 255);
    analogWrite(motorBSpeedPin, 255);
    digitalWrite(motorAPin1, HIGH);
    digitalWrite(motorAPin2, LOW);
    digitalWrite(motorBPin1, HIGH);
    digitalWrite(motorBPin2, LOW);
    digitalWrite(ledPin, HIGH);


  }
  /* If right is pressed, turn the car to the right. */
  else if (GamePad.isRightPressed() || x < -6)
  {
    analogWrite(motorASpeedPin, 255);
    analogWrite(motorBSpeedPin, 255);
    digitalWrite(motorAPin1, LOW);
    digitalWrite(motorAPin2, HIGH);
    digitalWrite(motorBPin1, HIGH);
    digitalWrite(motorBPin2, LOW);
    digitalWrite(ledPin, HIGH);

  }
  /* If left is pressed, turn the car to the left. */
  else if (GamePad.isLeftPressed()|| x > 6)
  {
    analogWrite(motorASpeedPin, 255);
    analogWrite(motorBSpeedPin, 255);
    digitalWrite(motorAPin1, HIGH);
    digitalWrite(motorAPin2, LOW);
    digitalWrite(motorBPin1, LOW);
    digitalWrite(motorBPin2, HIGH);
    digitalWrite(ledPin, HIGH);

  }
  /* If nothing is pressed stop all motors. */
  else
  {
    analogWrite(motorASpeedPin, 0);
    analogWrite(motorBSpeedPin, 0);
    digitalWrite(ledPin, LOW);
  }
 
}

Schematics

Fritzing Project Diagram
Untitled%20Sketch%202.fzz
Fritzing Diagram
Capture

Comments

Similar projects you might like

4x4x4 LED cube with Arduino Uno and 1sheeld

Project tutorial by Hassan Ibrahim

  • 35,009 views
  • 7 comments
  • 64 respects

1Sheeld Controlled Robotic Arm

Project tutorial by L1Ranger

  • 4,425 views
  • 1 comment
  • 13 respects

Line Follower Robot Using Arduino & 1Sheeld

Project tutorial by Ashraf Nabil

  • 3,387 views
  • 0 comments
  • 7 respects

Locks controlled via bluetooth

Project in progress by FabLab SPQwoRk

  • 2,420 views
  • 2 comments
  • 14 respects

Crying Baby Detector Using 1Sheeld

Project tutorial by Kirollos Magdi Sobhy

  • 6,142 views
  • 7 comments
  • 29 respects

Bluetooth Steering wheel for a robot using 1Sheeld

Project tutorial by Kristian Blåsol

  • 2,793 views
  • 1 comment
  • 13 respects
Add projectSign up / Login