Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Hardware Articles
Page 24 of 32
Difference between Firewall and Anti-virus
Both Firewall and Antivirus are security tools that protect the computer systems as well as the network infrastructure from virus, worms, Trojans, and other such cyber-threats. Firewalls scan and evaluate the data packets before they enter into a network, and then they either allow or deny the data packets based on certain predefined rules setup by the network protocols. Firewalls can be implemented both at the software and hardware levels, while an antivirus program can be implemented only at the software level. Read through this article to know more about Firewall and Antivirus and how they are different from each ...
Read MoreDifference between Interrupt and Exception
Although interrupt and exception are two distinct ideas, they are related in the sense that they both force the central processing unit (CPU) to halt the normal flow of execution of instructions and instead begin executing another programme in the kernel space in order to deal with the issue at hand. This is true even though interrupt and exception are distinct ideas. The primary distinction lies in the manner in which they deal with unforeseen occurrences that may take place anywhere in the system, the processor, or even within the programme itself.What is an Interrupt?An interruption is a signal that ...
Read MoreArduino Time Library Introduction
The Time library provides you with timekeeping functionality on the Arduino. The latest version of the library is documented here.To install it, search for Time in the Library Manager and install the library by Michael Margolis.You’ll have to scroll a bit to find this library.Once the library is installed, if you go to File → Examples → Time, you will be able to see several examples of integrating this library with various sources: GPS, NTP, RTC, etc.The basic idea is that you can set time using the functions −setTime(hours, minutes, seconds, days, months, years);OR, setTime(t);where t is the special time_t ...
Read MoreBrowse Arduino libraries by Category on Arduino Website
Follow the steps given below to browse Arduino libraries by category on Arduino website −Go to http://arduino.cc/Click Documentation → ReferenceClick Libraries from the left menu.The libraries can now be found in the categorized form on this pageClick the category of your interest and explore the available libraries.
Read MoreReference and dereference operator in Arduino
The reference (&) and dereference operators (*) in Arduino are similar to C. Referencing and dereferencing are used with pointers.If x is a variable, then its address is represented by &x.Similarly, if p is a pointer, then the value contained in the address pointed to by p is represented by &p.Examplevoid setup() { // put your setup code here, to run once: Serial.begin(9600); Serial.println(); int x = 10; int *p; p = &x; //p now contains the address of x Serial.print("The value stored in the address pointed by p is: ");Serial.println(*p); } ...
Read MoreDeep sleep in Arduino
The equivalent of deep sleep in Arduino would be the Power Down mode, which consumes the least power out of all the sleep modes. While this has already been covered in another article, but for the sake of completeness, here’s a brief on the sleep modes in Arduino.Arduino’s microcontroller, ATmega328P has 6 sleep modes, of which 5 are available with the avr/sleep.h library.Idle modeADC Noise ReductionPower-downPower-saveStandbyExtended StandbyEach mode has different wake-up modes and different power consumption.The Idle mode is easiest to wake up from and the Standby and Power down mode is the most difficult to wake up from (you ...
Read MoreMake the Arduino sleep and then wake up
In this article, we will, as the title suggests, make the Arduino sleep, and wake it up using an interrupt. Arduino’s microcontroller, ATmega328P has 6 sleep modes, of which 5 are available with the avr/sleep.h library. Each mode has different wake-up modes and different power consumption.Arduino’s microcontroller, ATmega328P has 6 sleep modes, of which 5 are available with the avr/sleep.h library.Idle modeADC Noise ReductionPower-downPower-saveStandbyExtended StandbyEach mode has different wake-up modes and different power consumption.The Idle mode is easiest to wake up from and the Standby and Power down mode is the most difficult to wake up from (you can only ...
Read MoreReal Time Clock (RTC) with Arduino
An RTC module keeps track of time once an initial time input is provided to it. This input can come from several sources (NTP, GPS, etc.). The RTC module usually comes with its own crystal oscillator, and even its own battery, so that the timekeeping continues, even if there is a power disturbance on the Arduino.Circuit Diagram −We will use the DS3231 module. It uses I2C for communication (SDA and SCL lines). The circuit diagram is shown below −As you can see, the Vcc pin of DS3231 is connected to 5V, GND to GND, SDA to A4 (SDA) and SCL ...
Read MoreCompound operators in Arduino
Compound operators in Arduino work just like in C, and they help save you some writing time, and also reduce the number of lines in your code. As the name seems to suggest, compound operators combine multiple operators.The following table lists the compound operators in Arduino.Assume that a and b are integers having values a = 5 and b = 2 in all the following examples −OperatorDescriptionExampleOutput++Incrementa++a=6--Decrementa--a=4+=Compound Additiona+=ba=7-=Compound subtractiona-=ba=3*=Compound multiplicationa*=ba=10/=Compound divisiona/=ba=2%=Compound remaindera%=ba=1&=Compound bitwise ANDa&=ba=0|=Compound bitwise ORa|=ba=7^=Compound bitwise XORa^=ba=7
Read MoreConvert variables from one type to another in Arduino
In order to convert variables from one type to another, you use the CAST operator. The syntax is −(type) var;Where var is the variable to be casted, and type is the new type to which you wish to convert it. For example, if you have a variable of type float, and wish to cast it as an int.ExampleHere’s how you can do it −float f; int i; void setup() { // put your setup code here, to run once: f = 5.6; i = (int) f; Serial.println(f); Serial.println(i); } void loop() { ...
Read More