With the use of these tips and tricks you will be able to use the Arduino development board effectively in your coding. Use logical programming to get the most out of it…!
To work on this project, just connect Arduino UNO with data cable to your PC or laptop. Then upload the given program in it. Press Ctrl-Shift-M to open Serial Monitor window. Enter two numbers with required mathematical operator, and press Enter.
This code is used count the number of objects passing in front of the IR sensor. It displays the count of the object on serial monitor in Arduino IDE software.
In new type of Arduino boards with the ATMeaga168 chip, the pins 3, 5, 6, 9, 10, and 11 work as PWM pins. Older Arduino board with an ATMega8 chip has only pins 9, 10, and 11 as PWM pins. The value can be specified as a variable or constant with a value from 0-255.
A variable is a way of naming and storing a numerical value for later use by the program. As per its meaning variable is actually assigned to a value which may constantly change.
In programming, datatype is a classification which specifies which type of value a variable is assigned with and what type of mathematical, relational or logical operations can be applied to it.
In this code when the button is pressed, the servo motor starts rotating smoothly from 0 – 90 and then 90 – 0. When the button is released, the motor restores back to angle 0.
In this code the LED display shows counting from 9 – 0. When 0 appears on the display it produces buzzer sound. The pin configuration of LED display and connection diagram is given below.