Posts

ESP 8266- External LED Blink

Image
  #define LED D0             void setup()   { pinMode(LED, OUTPUT);     } void loop() { digitalWrite(LED, HIGH);                         delay(1000);             digitalWrite(LED, LOW); delay(1000); }

ESP 8266- Servo Motor Interfacing

Image
#include <Servo.h> #define servopin D0 Servo myservo;                  // create servo object to control a servo void setup()  {   myservo.attach(servopin,400,2500);  // attaches the servo on D0 }   void loop() {   int pos;     for (pos = 0; pos <= 180; pos += 1) {  // goes from 0 degrees to 180 degrees     // in steps of 1 degree     myservo.write(pos);  // tell servo to go to position in variable 'pos'     delay(15);           // waits 15ms for the servo to reach the position   }   for (pos = 180; pos >= 0; pos -= 1) {  // goes from 180 degrees to 0 degrees     myservo.write(pos);                  // tell servo...

ESP 8266- Ultrasonic Sensor Interfacing

Image
  #define trigPin D0 #define echoPin D1 long duration; int distance;   void setup() {   Serial.begin(9600); // Starts the serial communication   pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output   pinMode(echoPin, INPUT); // Sets the echoPin as an Input }   void loop() {   // Clears the trigPin   digitalWrite(trigPin, LOW);   delayMicroseconds(2);   // Sets the trigPin on HIGH state for 10 micro seconds   digitalWrite(trigPin, HIGH);   delayMicroseconds(10);   digitalWrite(trigPin, LOW);     // Reads the echoPin, returns the sound wave travel time in microseconds   duration = pulseIn(echoPin, HIGH);     // Calculate the distance   distance = duration * 0.034/2;   // 0.034 means velocity of sound in cm/us         // Prints the distance on the Serial Monitor   Serial.print("Distance: "); ...

ESP8266- Proximity Sensor Interfacing

Image
  #define proximity D0   #define buzzer D1 int val=0; void setup() {    pinMode(proximity, INPUT);    pinMode(buzzer, OUTPUT); }   void loop() {    val = digitalRead(proximity);    if (val == LOW)    {       digitalWrite(buzzer, HIGH);       }    else    {       digitalWrite(buzzer, LOW);      } }

ESP8266- Inbuilt LED Blink

Image
 void setup() {   // initialize digital pin LED_BUILTIN as an output.   pinMode(LED_BUILTIN, OUTPUT); } // the loop function runs over and over again forever void loop() {   digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)   delay(1000);                       // wait for a second   digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW   delay(1000);                       // wait for a second }

BIOS

Image
BIOS (Basic Input Output System) Bios or the basic input output system is a set of programs stored inside a PROM chip and put on the motherboard. The main job of the program stored into this ROM is, as its name suggests is to provide the computer user the set of standard routines, to take care of input/output from the front input, output and the storage devices connected to the computer. This BIOS ROM is always available in the computer. So any user program can access these routines for their input/output requirements. The first PC BIOS was made by IBM for their PC range of computers. A PC system can be described as a series of layers-some hardware and some software-that interface with each other. Figure shows the four layers in a typical PC. The purpose of the layered design is to enable a given operating system and applications to run on different hardware. Fig shows how two different machines with different hardware can each use different sets of drivers (BIOS) to interf...

System Bus Types, Functions, and Features

Image
                                    System Bus Types, Functions, and Features The heart of any motherboard is the various buses that carry signals between the components. A bus is a common pathway across which data can travel within a computer. This pathway is used for communication and can be established between two or more computer elements. The PC has a hierarchy of different buses. Most modern PCs have at least three buses; some have four or more. They are hierarchical because each slower bus is connected to the faster one above it. Each device in the system is connected to one of the buses, and some devices (primarily chipset) act as bridges between the various buses. The Processor Bus (Front-side Bus) The processor bus (also called the front-side bus or FSB) is the communication pathway between the CPU an...