Tuesday 16 August 2016

Arduino Leonardo

Introduction

The Arduino Leonardo is a microcontroller board based on the ATmega32u4. It has 20 digital input/output pins (of which 7 can be used as PWM outputs and 12 as analog inputs), a 16 MHz crystal oscillator, a micro USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.The Leonardo differs from all preceding boards in that the ATmega32u4 has built-in USB communication, eliminating the need for a secondary processor. This allows the Leonardo to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port.

Technical specifications

Arduino Leonardo
  1. Microcontroller: ATmega32u4
  2. Operating Voltage: 5V
  3. Input Voltage (recommended): 7-12V
  4. Input Voltage (limits): 6-20V
  5. Digital I/O Pins: 20
  6. PWM Channels: 7
  7. Analog Input Channels: 12
  8. DC Current per I/O Pin: 40 mA
  9. DC Current for 3.3V Pin: 50 mA
  10. Flash Memory: 32 KB (ATmega32u4) of which 4 KB used by bootloader
  11. SRAM: 2.5 KB (ATmega32u4)
  12. EEPROM: 1 KB (ATmega32u4)
  13. Clock Speed: 16 MHz

How to Program Arduino Leonardo

Hardware and Software Required

  • Arduino Leonardo
  • Arduino IDE(1.0.6V)

Program to turn on the Led

void setup() 
{
pinMode(13, OUTPUT);// initialize digital pin 13 as an output.
}
void loop()// the loop function runs over and over again forever
{
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

No comments:

Post a Comment