Skip to main content

digital signal processing using ardunio

Today i'm going to explain,How to control any electronics equipment by switch using Arduino.
for these we need some hardware which are mentioned below
 1> Computer
 2> Cable
 3> Arduino
 4> Switch
 5> Resistor
This project is based on the reading of the digital signal.Write  the code shown below to your Arduino ide software in your computer,the connect the Arduino to your PC & upload the program to your arduino by using the botton in your ide.


code :-
int led=12;//input pin of led
int signal=7;//input pin of signal via switch

void setup() {
  pinMode(led,OUTPUT);//declare the led is for output
  pinMode(signal,INPUT);//declare the signal as input
  }
void loop() {
 int val=digitalRead(signal);//measure input signal value 
if (val==1)//if measure value is equal to 1
digitalWrite(led,HIGH);//led pin is on
else 
digitalWrite(led,LOW); //led is off
}
connect one pin of switch to the ground(GND) and another pin to the port no 7 of arduino.

Popular posts from this blog

warm clothes distribution program

‘ Small step can make a big difference ’ Rural Women Development Centre from morang,Nepal distributed the warm clothes to the needy people. They manage it possible by collecting fund from working staffs and management committe. Here is the video link of the distribution program. https://youtu.be/AxaHbivcQUM

SMPS of computer

                                            fig:- working principle of SMPS       fig :- SMPS of computer From the above figure, we came to know that the function of SMPS in computer which is to convert  the high 220V-AC to 0-12V DC.SMPS contain several color of wires which carry the different voltage to the different parts of the computer.The following table shows the different color cables and its carrying voltage.      

Multiple mcp23017 interfacing with Arduino

MCP23017 is the I/O port extender that runs on 12C. It is 16-bit I/O expender.in this tutorial we are going to interface the single and multiple  mcp23017 with arduino.  fig:- mcp32017 module IT has 16 I/O ports from PA0 to PA7 and PB0 to PB7. first of all we are going to interface the single mcp23017 with Arduino. For this  connect the circuit as shown on figure. Download the library for mcp23017  from  sketch-- include library -- manage libraries.