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
Articles on Trending Technologies
Technical articles with clear explanations and examples
Check if a character is alphanumeric in Arduino
Depending on your use case, you may need to check if a character is alphanumeric or not in Arduino. One example can be validating password strings, wherein you’ve allowed only alphanumeric characters for passwords. Or checking file names for storage in SD Card (sometimes some special characters are not allowed in file names). Arduino has an inbuilt function which checks whether a given character is alphanumeric or not. As you would have guessed, the function is isAlphaNumeric() and it takes in a character as the argument, and returns a Boolean.Examplevoid setup() { // put your setup code here, to ...
Read MoreLogical NOT in Arduino
Logical NOT is performed using the ! operator. The truth table is given below −ExpressionOutputTFFTAs you can see, the logical NOT inverts the truth value of the expression.ExampleThe usage can be understood from the example given below −void setup() { // put your setup code here, to run once: Serial.begin(9600); Serial.println(); int i = 10; if (!(i > 10)) { Serial.println("i is NOT greater than 10"); } else { Serial.println("i is greater than 10"); } } void loop() { // put your ...
Read MoreBitwise NOT in Arduino
Unlike logical NOT, which inverts the truth value of an expression, the bitwise NOT applies to each bit of a number and inverts its value (0 to 1 and 1 to 0). The operator is ~.The syntax thus is ~a, where a is the number on which this operator has to apply.Please note, that all the leading 0s in the number’s representation are also converted to 1. For example, if your board uses 16 bits to represent an integer, then here’s what ~10 will look like0000000000001010101111111111110101~10=-11As you can see, each bit of 10 got inverted. This number corresponds to, using ...
Read MoreLogical AND and OR in Arduino
The logical AND is denoted by the && operator, while the logical OR is denoted by the || operator.SyntaxExpression1 && Expression2ORExpression1 || Expression2Where expression1 and expression2 evaluate to Boolean values (true or false). The output of these statements is determined by the truth tables of logical AND and OR.The truth table for AND is given below −Expression1Expression2OutputTTTFTFTFFFFFAs you can see, both the expressions have to be true for the AND statement to output true.The truth table for OR is given below −Expression1Expression2OutputTTTFTTTFTFFFAs you can see, even if one of the expressions is true, the OR statement will output true.ExampleThe following ...
Read MoreElectrical Units and Metric Prefixes
A unit of measurement can be defined as a quantity chosen as a standard in terms of which other quantities may be expressed.Engineering is an applied science dealing with a variety of physical quantities (a physical quantity is one which can be measured) like time, speed, voltage, resistance etc. Hence, for the measurement of these quantities standard units are defined.There are a number of electrical units defined which are based on the SI system of units.Standard Electrical Units of MeasurementElectrical QuantitySymbol for QuantityMeasuring UnitSymbol for UnitChargeQ or qCoulombCVoltageV or vVoltVEMFE or eVoltVCurrentI or iAmpereAResistanceR or rOhmΩInductanceLHenryHCapacitanceCFaradFConductanceGMho or Siemen℧ or Ω-1or ...
Read MoreBand Pass Filter Frequency Response
A band pass filter (BPF) is a circuit that passes frequencies within a certain range and rejects all the frequencies outside the range. This range of band pass filter is known as Bandwidth of the filter.The Bandwidth of band pass filter is given by, $$Bandwidth=f_{high}-f_{low}$$Where, fhigh and flow are the higher and lower cut off frequencies.The values of fhigh and flow are given by, $$f_{high}=\frac{1}{2\pi\:R_{2}C_{2}}$$$$f_{low}=\frac{1}{2\pi\:R_{1}C_{1}}$$In the frequency response curve or bode plot of the band pass filter, the signal is blocked(attenuated) at low frequencies with the output increasing at the rate of +20dB/Decadeuntil the frequency reaches the Lower Cut off ...
Read MoreElectrodynamometer Wattmeter – Construction and Working Principle
An electrodynamometer or simply Dynamometer wattmeter is an instrument that is universally used for the measurement of DC as well as AC electric power.It works on the principle of dynamometer i.e. a mechanical force acts between two current carrying conductors.Construction of ElectrodynamometerThe electrodynamometer wattmeter has a fixed coil divided into two parts and is connected in series with the load and caries the load current (I1). The moving coil is connected across the load through a series multiplier resistance (R) and carries a current (I2) proportional to the load voltage. The fixed coil is called as Current Coil and the ...
Read MoreElectromagnets and Their Uses
A magnet whose magnetic field is created by an electric current is known as Electromagnet. An electromagnet consists of a soft iron core wound with a coil of conductor wires.When a direct electric current is passed through the coil of the electromagnet a magnetic field is created around it. Since the magnetic field of electromagnet is a function of electric current flowing through the coil hence, the magnetic field can be alter by changing the amount of electric current. And its polarity can be changed by changing the direction of electric current.Electromagnets are temporary magnets because they can be demagnetized ...
Read MoreFirst Order System Transient Response
To understand the transient response of the first order system, consider the block diagram of a closed loop system with unity negative feedback.The open loop gain G(s) of the system with unity negative feedback is given by, $$G(s)=\frac{1}{s\tau}$$And the closed loop transfer function of the system with unity negative feedback is, $$\frac{C(s)}{R(s)}=\frac{G(s)}{1+G(s)}=\frac{1}{s\tau+1}\:\:\:...(1)$$Where, R(s) = Laplace transform of the input signal r(t), C(s) = Laplace transform of the output signal c(t), τ = Time Constant of the system.As we can see, the power of s is one in the denominator term of the closed loop transfer equation. Hence, the system is said to ...
Read MoreHow does Static Electricity Work?
The static electricity is the result of an imbalance between the positive and negative charges of an object.To understand the phenomena of static electricity, first we need to understand the basics of atoms and charges.The Structure of AtomAll the physical objects are made up of atoms. The atoms in turn made up of electrons, protons and neutrons. The electrons are negatively charges, protons are positively charged and the neutrons does not possess any charge. Therefore, all the physical objects are made up of charges.The opposite charges (positive and negative) attract each other while the like charges (positive and positive or ...
Read More