Adding 16x2 LCD to DIY Centrifuge!!! Please Help

Hey guys,

I made a DIY Centrifuge from this instructable :

However I would like to run this script for a set amount of time !!

I’d like to add an lcd display and two buttons (or a potentiometer) using which i can instruct the arduino to run for a set amount of time.( using buttons/potentiometer to increase or decrease time in multiples of 10mins )

While I’m at it, it would be really cool to display the speed setting on the LCD. (percentage or graph) using serial input from the potentiometer controlling the motor.

Please note that I’ve never used or programmed arduino in my life until now…So please be patient with me


#include <Servo.h>

Servo myservo;

int potpin = A0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin

int listo = 13;

void setup() {
pinMode(listo, OUTPUT); digitalWrite(listo, LOW);

myservo.attach(9); //pin de control al ESC

arm(); // Función para armar el esc


void loop() {
digitalWrite(listo, HIGH); //Sierra preparada LED intermitente


digitalWrite(listo, LOW);


// reads the value of the potent. (value between 0 and 1023)

val = analogRead(potpin);

// scale it to use it with motor. Limitado a 100.

val = map(val, 0, 1023, 55, 140);



void arm() { //Función de armado






Please see circuit diagram attached or here :

I'm no expert but a RTC would be something to look at

also why not try a remote to control it

good luck...