Saturday 24 December 2016

Arduino based remote control



#include <SPIRremote.h>
SPIRrecv remote(9);
int ledpin = 3;
int irValue;
int i = 0;
void setup()
{
  remote.enableIR();
  pinMode(ledpin, OUTPUT);
}
void loop()
{
   int irValue = remote.getIRValue();
switch (irValue)
  {
    case 1:
    if(digitalRead(ledpin) == HIGH)
    {
      digitalWrite(ledpin,LOW);
    }
    else
    {
      digitalWrite(ledpin,HIGH);
    }
    break;
    }
    }








Thursday 22 December 2016

Micro pic


Using old camera lence I got this pic ...DIY

3 PIN TOP

You know why Earth pin in 3 pin top is larger than line and nutral?
Ans:
     When you plug in, Earth pin   first to connect,after that line and nutral connect, if any short circuit is in device Earth will helpful to trip.