660 likes | 1.47k Views
Arduino Tutorial. Chapter 1 Eng. Hazem W. Marar. What is Arduino ?. Arduino is an open-source single-board microcontroller using Atmel AVR processor and an on-board I/O support.
E N D
Arduino Tutorial Chapter 1 Eng. Hazem W. Marar
What is Arduino? • Arduino is an open-source single-board microcontroller using Atmel AVR processor and an on-board I/O support. • The Arduinointegrated development environment (IDE) is a cross-platform application written in Java, and is derived from the IDE for the Processing programming language
Assigning Ports • Using the pinMode statement: • pinMode (pin_number, State) • digitalWrite|analogWrite(Pin_number, Value); • digitalRead|analogRead(Pin_number);
Your First Program • Turning an LED On/Off
Using an Input Signal • A simple push button input signal
Using an Input Signal • Push button toggling an LED
Bounce Effect • Solution ?
Controlling an LED using PWM • Usually, PWM ports are marked with a Tilde symbol. • Values can range from 0 up to 1023 for analog and 0 up to 255 for PWM. • Use the “analogwrite(pin_number, Value);” statement.
Serial Port Introduction • Simple serial communication with digital data
Serial Port Introduction • Simple serial communication with analog data • Recall Potentiometers and voltage dividers