#include <Servo.h>
Servo Ton;
#define But1 13
#define But2 12
void ML ()
{
Ton.write (0);
}
void MR()
{
Ton.write(180);
}
void setup(){
// put your setup code here, to run once:
Ton.attach(3);
pinMode (But1 ,INPUT );
pinMode (But2 ,INPUT );
}
void loop() {
int Fabio = digitalRead(But1);
int Facon = digitalRead (But2);
if (Fabio==1)
{
ML();
}
if (Facon==1)
{
MR();
}
}