1x Programmable Serial Port (USART): Use Digital Pin 0 for RX and Digital Pin 1 for TX or the USB connection (for communicating with the PC such as loading program).We can use pinMode(A0-A5, INPUT/OUTPUT) to set its I/O mode, and and digitalRead(A0-A5) or digitalWrite(A0-A5, HIGH|LOW) to read or write. However, these pins can also function exactly like digital pins 0-13 for digital input/output. The primary purpose of the analog input pins A0-A5 is to read analog input. We can use pinMode(A0-A5, INPUT) (optional but nice to have) and analogRead(A0-A5) to read the 10-bit analog input. These analog pins are labeled A0 to A5 (whereas digital pins are labeled 0 to 13). The upper range can beĬhanged using the AREF pin and analogReference() function. 6x Analog INPUT pins (A0 to A5): By default, each pin can measureīetween 0V to 5V with 10-bit of resolution via a analog-to-digital converter (ADC).Is 980Hz on pins 5 and 6 and 490Hz (half) for other pins. Various duty cycles (as illustrated below) can be used to simulate "analog" output (e.g., toĬontrol the brightness of LED or speed of motor). With duty cycle between 0 (off) to 255 (on). PWM Output: 6 of the pins (pins 3, 5, 6, 9, 10 and 11, marked with ~) can produce PWM (Pulse Width Modulated) output (i.e., square wave) via function analogWrite(3|5|6|9|10|11, dut圜ycle).Pin 13: There is a built-in LED connected to Pin 13, under Pin 13.Total current for the chipset shall not exceed 200mA, i.e., driving 10 single-color LEDs 20mA.It can provide or receive a maximum current of 40mA, but only 20mA continuous, which is merely sufficient to drive a single-color LED 20mA for full brightness continuously. Each pin operates at 5V at HIGH and 0V at LOW. ![]() Use function pinMode(0-13, INPUT|OUTPUT) to configure the pin for input or output and digitalRead(0-13) or digitalWrite(0-13, HIGH|LOW) to read or write.14x Digital INPUT/OUTPUT pins (numbered from 0 to 13):.Reset Button: to reset/restart the program.Flicker during sketch upload and serial communication. TX and RX LEDs: indicate communication between the Arduino board and your computer.Also connected to Digital Pin 13 for program testing and debugging. Load cum Pin-13 LED: Flicker during sketch upload.Power-on LED: indicate that the Arduino board is receiving power.On-board Built-in LEDs: These LEDs are useful in debugging.The current available at 3.3V pin is 50mA. ![]() If the board is powered via USB, the total current available for "on-board" and "external use via the 5V power out pin" is 500mA (and much less for the other power sources).Power OUT (5V and 3.3V pins): The board regulated 5V and 3.3V output for powering external components.USB connector is better than the crappy header pins and you can't mess up the polarity. Get an old USB cable, cut the plug off the other end, and connect Red wire to 5V supply and Black wire to GND. A better way is to connect your 5V power supply to the USB connector. This is not recommended because you could get the polarity and voltage wrong and damage your arduino. Power by 5V supply: Although the 5V pin is meant for powering external components, you could power the Arduino via the 5V/GND pins.DC Power Jack (7-12V via AC-to-DC adapter or battery pack). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |