Domi04151309

Arduino Board

What is Arduino?

Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs and turn it into an output. You can tell your board what to do by sending a set of instructions to the microcontroller on the board.

To the Arduino Homepage

About the Library

This library adds logic gate functions to your Arduino. It was developed by Dominik Reichl in 2018 and designed for the Arduino Uno.
This library is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation.

You can download the library here

How to Install

1. Download the repository from GitHub
2. Unzip it
3. Copy the "Arduino-Logic-Gates-master" folder into your library folder
4. Open the Arduino IDE
5. Click on Sketch > Include Library > Logic Gates
Done!

Functions

bool NotGate(bool param1)

NOT gate.

bool AndGate(bool param1,bool param2)

AND gate.

bool NandGate(bool param1,bool param2)

NAND gate.

bool OrGate(bool param1,bool param2)

OR gate.

bool NorGate(bool param1,bool param2)

NOR gate.

bool XorGate(bool param1,bool param2)

XOR gate.

bool XnorGate(bool param1,bool param2)

XNOR gate.

Example

bool a;
bool b;
bool c;
bool d;
bool e;
bool f;
bool g;

#include <LogicGates.h>

void setup() {
  Serial.begin(9600);
  a=NotGate(true);
  Serial.println(a);
  b=AndGate(true,true);
  Serial.println(b);
  c=NandGate(true,true);
  Serial.println(c);
  d=OrGate(true,true);
  Serial.println(d);
  e=NorGate(true,true);
  Serial.println(e);
  f=XorGate(true,true);
  Serial.println(f);
  g=XnorGate(true,true);
  Serial.println(g);
}

void loop() {
}