GithubHelp home page GithubHelp logo

saran7d / logical-operation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anishkumar-embedded/logical-operation

0.0 0.0 0.0 18 KB

To perform logical operation using Arduino Controller

License: GNU General Public License v3.0

logical-operation's Introduction

Logical Operation

AIM:

To Perform logical operation using Arduino UNO Controller.

Software required:

Arduino IDE
Proteous

PROCEDURE:

Arduino IDE

Step1:Open the Arduino IDE
Step2: Go to file and select new file option
Step3:Type the program
Step4:Go to file and select save option to save the program
Step5:Go to sketch and select verify or compile options
Step6:If no error Hex file will be generated in the temporary folder

Proteus

Step7:Open the Proteus software
Step8:Go to file select new design and click ok button
Step9:Select component mode and click pick devices from the library
Step10:Type the component name in the keyword to select the components and click ok button
Step11:Design the circuit as per the diagram
Step12:Double click the Arduino controller and upload the hex file generated by Arduino IDE
Step13:Click start button and check the output

THEORY:

Logic gates are the basic building blocks of any digital system. It is an electronic circuit having one or more than one input and only one output. The relationship between the input and the output is based on a certain logic. Based on this, logic gates are named as AND gate, OR gate, NOT gate etc.

image

image

image

image

image

image

image

PROGRAM:

int bs0 = 0;         // variable for reading the pushbutton status
int bs1 = 0;
int bs2 = 0;         // variable for reading the pushbutton status
int bs3 = 0;
int bs4 = 0;         // variable for reading the pushbutton status
int bs5 = 0;
void setup() {
  pinMode(13, OUTPUT);
  pinMode(0, INPUT);
  pinMode(1, INPUT);
  pinMode(2, INPUT);
  pinMode(3, INPUT);
  pinMode(4, INPUT);
  pinMode(5, INPUT);
}
void loop() {

  bs0 = digitalRead(0);
  bs1 = digitalRead(1);
  bs2 = digitalRead(2);
  bs3 = digitalRead(3);
  bs4 = digitalRead(4);
  bs5 = digitalRead(5);

  if (bs4 == 0 && bs5 == 0) 
  {
      digitalWrite(13, bs0);
  } 
  else if (bs4 == 0 && bs5 == 1) 
  {
    
    digitalWrite(13, bs1);
  }
   else if (bs4 == 1 && bs5 == 0) 
  {
    
    digitalWrite(13, bs2);
  }
   else   if (bs4 == 1 && bs5 == 1) 
  {
      digitalWrite(13, bs3);
  } 
}

CIRCUIT DIAGRAM:

image

OUTPUT:

image

RESULT:

Thus the logical operation was performed by Arduino UNO controller

logical-operation's People

Contributors

anishkumar-embedded avatar saran7d avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.