Elevators with dnyarduino

0
2759

INTRODUCTION

Limit for the determination often times the image Again this article in our numbers floor of a system dnyarduino set on the application if the  application how much lift the engine, etc. elements application aims to lift the system that we are used to seeing and hearing through life with 7 Segmend display switches or infrared some sensors preference  all  it with the button on the application dnyarduino kit. to so we stop button Considering the button logic 0 when the same logic to give you time to logic 1 command field and sensors to see this job application logic 0 when a fall the previous value so there are still many code . this code traffic from well able to perform the sealing logic on the PLC courses sealing logic foreground we are accustomed to from dnyarduino to provide i status show that we are on the 1st floor mixed you can come but I tried to simplify the business can be written in different types of programs that can solve the different aspects I think in this respect.

7 SEGMEND DISPLAY (dnyarduino)

4x7 arduinoWe know we can easily afford to displace with our 7 segmend displace dnyarduino design as can be seen outside.

Normally the display and we have summer  our application on the basis of common  and is located in the display on the  set of common cathode common  end to logic 0 after giving we send a logic 1 value to any of the characters that character  logic.

The circuit diagram:

elevator with arduinoThe Arduino circuit Code:

int lastbutton1=LOW;
int lastbutton2=LOW;
int lastbutton3=LOW;
void setup() {
// put your setup code here, to run once:
pinMode(2, OUTPUT);//7 segment display çıkışları
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, INPUT);//b1
pinMode(10, INPUT);//b2
pinMode(11, INPUT);//b3
}
void loop() {
// put your main code here, to run repeatedly:
int buttonState1,buttonState2,buttonState3;
buttonState1 = digitalRead(9);
buttonState2 = digitalRead(10);
buttonState3 = digitalRead(11);
if(buttonState2== LOW && buttonState3==LOW){
if((buttonState1!=lastbutton1)||(buttonState1==HIGH)){
digitalWrite(2,LOW);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
lastbutton1=HIGH;
lastbutton3=LOW;
lastbutton2=LOW;
}}
if(buttonState3 ==LOW && buttonState1==LOW){
if((buttonState2!=lastbutton2)||(buttonState2==HIGH)){
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,LOW);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,LOW);
digitalWrite(8,HIGH);
lastbutton2=HIGH;
lastbutton1=LOW;
lastbutton3=LOW;
}}
if(buttonState2 == LOW && buttonState1==LOW){
if((buttonState3!=lastbutton3)||(buttonState3==HIGH)){
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,HIGH);
lastbutton3=HIGH;
lastbutton2=LOW;
lastbutton1=LOW;
}}}

Expression of the Arduino code:

Friends for first use arduino pin digital state of the button after  input and output control .button and first floor, second and third floors will be activated and the first case, the logic of the state of the buttons 0 made my case Substitutions me he and button 1 pressed me he would check first When the conditions are met we displace 1 if we had to enter our solid  passed even that limit switch and the second floor’re coming even while still in the first case so  show the 1st floor is logic 0. go even 1. I’m doing the status of the button logic 1 and is consistently 1st floor we  situation applies to the 2nd floor and 3rd floor.
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments