Skip to main content

Ardiono Projects



follow the links below to get all the arduino projects you need with ready made codes :) :)

cdn.oreillystatic.com/oreilly/booksamplers/9781449360665_sampler.pdf

tutorial.cytron.com.my/wp-content/uploads/2011/08/User-Manual1.pdf

BasicTutorial


1. Pot Controlled LED's

 void setup() {

  Serial.begin(9600);
  pinMode(0,OUTPUT);
  pinMode(1,OUTPUT);
  pinMode(2,OUTPUT);
  pinMode(3,OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(6,OUTPUT);
  pinMode(7,OUTPUT);
 
 
}
void loop() {

  int sensorValue = analogRead(A0);

  Serial.println(sensorValue);
  delay(1); 
  if(sensorValue==1023)
  {
    digitalWrite(0,LOW);
    digitalWrite(1,LOW);
    digitalWrite(2,LOW);
    digitalWrite(3,LOW);
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
    digitalWrite(6,LOW);
    digitalWrite(7,LOW);
   
  }
  else if( sensorValue == 20)
 
  {
    digitalWrite(0,HIGH);
    digitalWrite(1,HIGH);
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,HIGH);
    digitalWrite(5,HIGH);
    digitalWrite(6,LOW);
    digitalWrite(7,HIGH);
 
  }
  else if( sensorValue == 50)
  {
    digitalWrite(0,HIGH);
    digitalWrite(1,HIGH);
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,HIGH);
    digitalWrite(5,LOW);
    digitalWrite(6,LOW);
    digitalWrite(7,HIGH);
  }
 
  else if( sensorValue == 100)
  {
    digitalWrite(0,HIGH);
    digitalWrite(1,HIGH);
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,HIGH);
    digitalWrite(5,LOW);
    digitalWrite(6,LOW);
    digitalWrite(7,LOW);
  }
  else if(sensorValue == 200)
  {
    digitalWrite(0,HIGH);
    digitalWrite(1,HIGH);
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
    digitalWrite(6,HIGH);
    digitalWrite(7,LOW);
  }
  else if(sensorValue == 300)
  {
    digitalWrite(0,HIGH);
    digitalWrite(1,HIGH);
    digitalWrite(2,HIGH);
  digitalWrite(3,HIGH);
  digitalWrite(4,LOW);
  digitalWrite(5,HIGH);
  digitalWrite(6,LOW);
  digitalWrite(7,LOW);
  }
  else if (sensorValue == 500)
  {
    digitalWrite(0,HIGH);
    digitalWrite(1,HIGH);
    digitalWrite(2,HIGH);
  digitalWrite(3,HIGH);
  digitalWrite(4,LOW);
  digitalWrite(5,LOW);
  digitalWrite(6,LOW);
  digitalWrite(7,HIGH);
  }
  else if (sensorValue == 700)
  {
    digitalWrite(0,HIGH);
    digitalWrite(1,HIGH);
    digitalWrite(2,LOW);
  digitalWrite(3,LOW);
  digitalWrite(4,HIGH);
  digitalWrite(5,HIGH);
  digitalWrite(6,LOW);
  digitalWrite(7,LOW);
  }
  else if( sensorValue == 900)
  {
    digitalWrite(0,HIGH);
    digitalWrite(1,LOW);
    digitalWrite(2,LOW);
  digitalWrite(3,LOW);
  digitalWrite(4,HIGH);
  digitalWrite(5,HIGH);
  digitalWrite(6,LOW);
  digitalWrite(7,LOW);
  }
  else if ( sensorValue == 990 )
  {
    digitalWrite(0,LOW);
    digitalWrite(1,LOW);
    digitalWrite(2,LOW);
  digitalWrite(3,LOW);
  digitalWrite(4,LOW);
  digitalWrite(5,LOW);
  digitalWrite(6,LOW);
  digitalWrite(7,HIGH);
  }
else
{
  digitalWrite(0,HIGH);
    digitalWrite(1,HIGH);
    digitalWrite(2,HIGH);
  digitalWrite(3,HIGH);
  digitalWrite(4,HIGH);
  digitalWrite(5,HIGH);
  digitalWrite(6,HIGH);
  digitalWrite(7,LOW);
}
}

2. Dancing Led's

void setup()
{
  pinMode(0,OUTPUT);
  pinMode(1,OUTPUT);
  pinMode(3,INPUT);
  pinMode(5,INPUT);
}

void loop()
{
  int sw= digitalRead(3);
  int sw1= digitalRead(5);
 
  if (sw == LOW)
  {
    digitalWrite(0,HIGH);
    digitalWrite(1,LOW);
  }
  else if (sw1 == LOW)
  {
      digitalWrite(0,LOW);
      digitalWrite(1,HIGH);
  }
  else
  {
    delay(10000);
    digitalWrite(0,HIGH);
    delay(10000);
    digitalWrite(0,LOW);
    delay(10000);
    digitalWrite(1,HIGH);
    delay(10000);
    digitalWrite(1,LOW);
  }
}


3. Digital Voltmeter Arduino way

int sensorValue = 0;


void setup()
{
   pinMode( 0 ,HIGH );
   pinMode( 1 ,HIGH );
   pinMode( 2 ,HIGH );
   pinMode( 3 ,HIGH );
   pinMode( 4 ,HIGH );
   pinMode( 5 ,HIGH );
   pinMode( 6 ,HIGH );
   pinMode( 7 ,HIGH );
   pinMode( 8,LOW );
}

void loop()

   
  int sensorValue=analogRead(A0);
  Serial.println(sensorValue);
 
  if (sensorValue==20)
  {
      delay(1000);
      PORTD=0b11000000;
  }
  else if (sensorValue==50)
  { delay(1000);
      PORTD=0b11000000;
  }
  else if (sensorValue==50)
  { delay(1000);
      PORTD=0b11000000;
  }
  else if (sensorValue==50)
  { delay(1000);
      PORTD=0b11000000;
  }
  else if (sensorValue==50)
  { delay(1000);
      PORTD=0b11000000;
  }
  else if (sensorValue==50)
  { delay(1000);
      PORTD=0b11000000;
  }
  else if (sensorValue==50)
  { delay(1000);
      PORTD=0b11000000;
  }
  else if (sensorValue==50)
  { delay(1000);
      PORTD=0b11000000;
  }
}
   
 
4. Arduino Based Shadow Alarm

// SHADOW ALARM USING ARDUINO //


int rlyPin = 12; // Relay Output Pin
int sensPin = 2; // Sensor Input Pin
int ledPin = 8; // Reminder LED Output Pin
int pzSpeaker = 10; //Piezo-speaker Output Pin
int val = 0; // variable for reading the Input Pin status

void setup() {
  pinMode(rlyPin, OUTPUT); // Set Relay as output
  pinMode(sensPin, INPUT); // Set Shadow Sensor as input
  pinMode(ledPin, OUTPUT); // Set LED as output
  pinMode(pzSpeaker, OUTPUT); // Set Piezo-Speaker as output

}

void loop(){
  val = digitalRead(sensPin); // read input value
  if (val == HIGH) { // check if the input is HIGH
    digitalWrite(rlyPin, HIGH); // turn Relay ON

    digitalWrite(ledPin,HIGH); // turn LED ON

    playTone(500, 600);
    delay(100);
    playTone(500, 800);
    delay(100);

  }
  else {
    digitalWrite(rlyPin, LOW); // turn Relay OFF
    playTone(0, 0);
    delay(300);

  }
}
// duration in mSecs, frequency in hertz
void playTone(long duration, int freq) {
  duration *= 1000;
  int period = (1.0 / freq) * 1000000;
  long elapsed_time = 0;
  while (elapsed_time < duration) {
    digitalWrite(pzSpeaker,HIGH);
    delayMicroseconds(period / 2);
    digitalWrite(pzSpeaker, LOW);
    delayMicroseconds(period / 2);
    elapsed_time += (period);
  }
}



5. Pulse Counter using Arduino


void setup()
{
  pinMode(0,HIGH);
  pinMode(1,HIGH);
  pinMode(2,HIGH);
  pinMode(3,HIGH);
  pinMode(4,HIGH);
  pinMode(5,HIGH);
  pinMode(6,HIGH);
  pinMode(7,HIGH);
  pinMode(8,LOW);
}
void loop()
{
  delay(1000);
  PORTD=0b11000000;
  delay(1000);
  PORTD=0b11111001;
  delay(1000);
  PORTD=0b10100100;
  delay(1000);
  PORTD=0b10110000;
  delay(1000);
  PORTD=0b10011001;
  delay(1000);
  PORTD=0b10010010;
  delay(1000);
  PORTD=0b10000010;
  delay(1000);
  PORTD=0b11111000;
  delay(1000);
  PORTD=0b10000000;
  delay(1000);
  PORTD=0b10011000;
}
 




Comments

Popular posts from this blog

Microsoft BizTalk Server - Schemas - Things you should know!

Schema In BizTalk - What are they? - Schema is a structure of XML in BizTalk - it is stored in XSD format, meaning XML schema Definition - Used to handle messages that are coming in XML format or sending out in XML format TIP: BizTalk Editor saves schema files using utf-16 character encoding.  * Wiki defines*  Messages inside BizTalk are implemented through the XML documents and defined with the XML schemas in XSD standard  Some tips -     That's what it looks when you add a schema item to the project. Let's quickly wrap up some important properties, select the schema node and press F4: 1. Data Type - We have many options, from string to bool it defines what type of data the field would handle. 2. Default value -  If the field receives no input, we can a default value here 3. Min/Max occurs - This property decides the occurrence of field. If no value inserted it takes 1-Min and 1-Max meaning the field is mandatory. ...

VLSI viva compilation

All the below stuff is a compiled post from google of all the viva questions asked on vlsi and avlsi , do take a look  I've actually made this for me :P ( Last minute Reading Stuff :) ;) ) 1. Why does the present VLSI circuits use MOSFETs instead of BJTs? Compared to BJTs, MOSFETs can be made very small as they occupy very small silicon area on IC chip and are relatively simple in terms of manufacturing. Moreover digital and memory ICs can be implemented with circuits that use only MOSFETs i.e. no resistors, diodes, etc. 2. What are the various regions of operation of MOSFET? How are those regions used? MOSFET has three regions of operation: the cut-off region, the triode region, and the saturation region. The cut-off region and the triode region are used to operate as switch. The saturation region is used to operate as amplifier. 3. What is threshold voltage? The value of voltage between Gate and Source i.e. V GS at which a sufficient number of mobile e...

What will you need?

       So to start up, first you'll need to get the following software in your pc installed and running properly. Arduino Uno Software from the link http://arduino.cc/en/main/software Processing Software from here https://processing.org/download/ Cracked Proteus Software from here  https://kickass.to/proteus-8-full-with-crack-working-t7621781.html Eagle if you need the pcb designing stuff https://drive.google.com/file/d/0B0kiqAIRyB0peDF5eldKRFJDTmM/edit Psipce for simulation   http://pspice.en.malavida.com/       After setting up your pc with all the above software you are ready to follow the projects. :)