Archive

Archive for 08:42 AM

Trying Arduino Leonardo with Arafruit 32U4 breakout board+

Thursday September 22nd, 2011 morecat_lab 13 comments

1.Introduction

Last week a set of new Arduino is introduced at Open Hardware Summit.

I’m interested in Arduino Leonardo, which is the low end board with ATMega32U4 micro processor with USB. Although the schematic of Leonardo is not published at this point, the design of Leonrdo must be straight forward, except the assignment of digital and analog pins.

The firmware and core codes for Arduino Leonardo are already in Arduino 1.0 RC1, which was published in September 17.

I decide to try Leonardo with Arafruit 32U4 breakout board+, as it also uses ATmega32U4.

32U4 breakout board

2.Requrements

3. Burning the boot loader

You need to burn boot loader from Arduino 1.0 RC1. I use ISP programmer with the following steps.

  • solder an ISP connector on 32U4 Breakout board. Connect ISP programmer with the connector.
  • On Arduino 1.0 RC1, choose ‘Tools’ ->’ Board’ -> ‘Arduino Leonardo’
  • Choose ‘Tools’ -> ‘Programmer’ -> ‘USBTinyISP’
  • Choose ‘Tools’ ->’BurnBootloader’, then wait a couple of minutes
Burn Bootloader 'Arduino Leonard' to 32U4 breakout board

Burn Bootloader 'Arduino Leonard' to 32U4 breakout board

4. Try Blink example

After burning firmware, I connected the breakout board to Mac with USB port.  From Mac, the board is recognized as ‘Arduino Leonardo’

I open an example sketch named blink, then download the program to Leonardo.

Connect a LED to Pin13 (PC7) for blink example

Connect a LED to Pin13 (PC7) for blink example

5.Human Interface Device (Mouse)

The most interesting feature of Arduino Leonardo is the emulation of Mouse and Keyboard. One can make USB-HID class device with Leonardo.

I tried one of example sketch named JoystickMouseControl for the next step.

The following hardware setting is used for my trial.

  • Connect two 10K Ohm pods to A1(PF6) and  A2(PF5).
  • Connect a tact switch to D6(PD7) and GND
  • Connect a LED and register to D5(PC6)

wires to run JoystickMouseControl example

wires to run JoystickMouseControl example

The following pins are assigned on Arduino Leonardo, according to the file (hardware/arduino/variants/leonardo/pins_arduino.h)


// ATMEL ATMEGA32U4 / ARDUINO LEONARDO
//
// D0                 PD2                    RXD1/INT2
// D1                 PD3                    TXD1/INT3
// D2                 PD1        SDA         SDA/INT1
// D3#                PD0        PWM8/SCL    OC0B/SCL/INT0
// D4        A6       PD4        ADC8
// D5#                PC6        ???         OC3A/#OC4A
// D6#       A7       PD7       FastPWM      #OC4D/ADC10
// D7                 PE6                    INT6/AIN0
//
// D8                 PB4                    ADC11/PCINT4
// D9#       A8       PB5       PWM16        OC1A/#OC4B/ADC13/PCINT5
// D10#      A9       PB6       PWM16        OC1B/0c4B/ADC12/PCINT6
// D11#               PB7       PWM8/16      0C0A/OC1C/#RTS/PCINT7
// D12       A10      PD6                    T1/#OC4D/ADC9
// D13#               PC7       PWM10        CLK0/OC4A
//
//           A0        PF7                    ADC7
//           A1        PF6                    ADC6
//           A2        PF5                    ADC5
//           A3        PF4                    ADC4
//           A4        PF1                    ADC1
//           A5        PF0                    ADC0
//
// New pins D14..D17 to map SPI port to digitial pins
//
// D14                 PB0                    RXLED,SS/PCINT0
// D15                 PB1                    SCK,PCINT1
// D16                 PB2                    MOSI,PCINT2
// D17                 PB3                    MISO,PCINT3
//
// TXLED               PD5
// RXLED               PB0
// HWB                 PE2                    HWB

EOF

Read more…

Categories: Arduino Tags:

Talk on IPSJ SIG-KSN

Monday September 12th, 2011 morecat_lab Comments off

I’ll talk on the following JSAI(The Japanese Society of Artificial Intelligence)  study group on September 16.

http://www4.atpages.jp/sigksn/conf09/index.html

Categories: unclassfied Tags:

Installation of qTranslate

morecat_lab Comments off

I installed qTranslate in this Web page.

Currently no translation is posted and Japanese articles are displayed, even if you choose English.

Categories: unclassfied Tags: