// resever uno
#include <SoftwareSerial.h>
#define led1 8
#define led2 9
#define led3 10
#define led4 11
#define led5 13
char state = ' ' ;
void setup() {
pinMode (led1 , OUTPUT );
pinMode (led2 , OUTPUT );
pinMode (led3 , OUTPUT );
pinMode (led4 , OUTPUT );
pinMode (led5 , OUTPUT );
Serial.begin (115200);
}
void loop() {
if (Serial.available()>0)
{
state = Serial.read ();
Serial.write (state);
}
digitalWrite (led1 , HIGH );
digitalWrite (led2 , HIGH );
digitalWrite (led3 , HIGH );
digitalWrite (led4 , HIGH );
digitalWrite (led5,HIGH );
if (state =='&')
{
digitalWrite (led1 , HIGH );
digitalWrite (led2 , HIGH );
digitalWrite (led3 , HIGH );
digitalWrite (led4 , HIGH );
digitalWrite (led5,HIGH );
}
if (state==']')
{
digitalWrite (led1 , LOW );//ON
digitalWrite (led2 , HIGH );//OFF
digitalWrite (led3 , HIGH );//OFF
digitalWrite (led4 ,LOW);//ON
digitalWrite (led5,LOW );
delay(60000);
digitalWrite (led1 , HIGH );
digitalWrite (led2 , HIGH );
digitalWrite (led3 , HIGH );
digitalWrite (led4 , HIGH );
digitalWrite (led5,HIGH );
}
if ( state == '*');
{
digitalWrite (led1 , HIGH );
digitalWrite (led2 , HIGH );
digitalWrite (led3 , HIGH );
digitalWrite (led4 ,HIGH );
digitalWrite (led5,HIGH );
delay(60000);
}
if (state=='/')
{
digitalWrite (led1 , HIGH);
digitalWrite (led2 , LOW );
digitalWrite (led3 , LOW );
digitalWrite (led4 ,HIGH);
digitalWrite (led5,LOW );
delay(60000);
digitalWrite (led1 , HIGH );
digitalWrite (led2 , HIGH );
digitalWrite (led3 , HIGH );
digitalWrite (led4 , HIGH );
digitalWrite (led5,HIGH );
}
}