Basic functions related to Time and Interrupts in Arduino

Let’s see some basic functions related to time and interrupts that are frequently used in Arduino IDE. Time Functions a)  millis() This function returns the number of milliseconds passed since the Arduino board started running the current program. This number overflows (rolls back to zero) after approximately 50 days. Value returned by millis is an unsignedContinue reading “Basic functions related to Time and Interrupts in Arduino”

Basic functions related to Serial Communication in Arduino

Let’s see some basic functions related to serial communication that are frequently used in Arduino IDE. USART a)  Serial.begin(baud_rate) baud_rate: The baud rate that will be used for serial communication. Can be 4800, 9600, 14400, 19200, etc. This function is used to define the baud rate that will be used for serial communication. For communicatingContinue reading “Basic functions related to Serial Communication in Arduino”

Basic functions related to startup and GPIO in Arduino

Let’s see some basic functions related to Startup and GPIO that are frequently used in Arduino IDE. Functions at startup a)  setup() This function is called at the beginning of the sketch. It is used for initializing variables, pin modes etc. It runs only once after each power up, or when the Arduino board resets.Continue reading “Basic functions related to startup and GPIO in Arduino”

Adding a New Library to Arduino IDE and Using It

Let’s see how to add a library for MPU6050 (Gyroscope + Accelerometer + Temperature) module. Here, we will be using Korneliusz Jarzebski’s MPU6050 library from GitHub. Download this library from here. Download and extract the library and add its folder in the libraries folder of Arduino IDE. Example : See the image given below. TheContinue reading “Adding a New Library to Arduino IDE and Using It”

Arduino I2C

Intoduction I2C (Inter-Integrated Circuit) is serial bus interface connection protocol. It is also called as TWI (two wire interface) since it uses only two wires for communication. Those two wires are SDA (serial data) and SCL (serial clock). I2C is an acknowledgment-based communication protocol i.e. transmitter checks for an acknowledgment from the receiver after transmittingContinue reading “Arduino I2C”

PWM in Arduino

Introduction Pulse Width Modulation (PWM) is a technique by which width of a pulse is varied while keeping the frequency of the wave constant. It is a method for generating an analog signal using a digital source. A PWM signal consists of two main components that define its behaviour: a duty cycle and a frequency. Duty Cycle of Signal AContinue reading “PWM in Arduino”

ADC in Arduino

Introduction When we interface sensors to the microcontroller, the output of the sensor many of the times is analog in nature. But microcontroller processes digital signals. Hence, we use ADC in between sensor and microcontroller. It converts an analog signal into digital and gives it to the microcontroller. There are many applications of ADC likeContinue reading “ADC in Arduino”

USART in Arduino Uno

Introduction USART (Universal Serial Asynchronous Receiver Transmitter) is a serial communication protocol used to transmit/receive data serially at a specific baud rate. Several devices such as GPS, GSM, RFID, sensors, etc need to communicate with the microcontroller for transmitting or receiving information. To communicate with the microcontroller, several communication protocols are used such as RS232, SPI,Continue reading “USART in Arduino Uno”

Design a site like this with WordPress.com
Get started