Leonardo / Pro Micro
From sudomod
Description
The cheap alternative to the Teensy LC.
official Website
https://www.sparkfun.com/products/12640
Guide/How To
The user IAmOrion wrote a guide on how to use the board. It can be found in the forum.
Guide for dummies
For people who are in no way experienced in programming an Arduino there's a detailed guide:
- Download and install the Arduino IDE from the official website
- Connect your pro micro to your PC via micro-USB cable (a red LED should light up)
- Open the Arduino software, click on 'tools' and select the correct Board ("Arduino Leonardo") and Port (it should display a COM-Port with the description (Arduino Leonardo) after the Com-Port number)
- Now you can Copy/Paste the following code into the provided area:
#include <Keyboard.h> #define BUTTONS 15 int pin_arr[]={2,4,3,5,14,16,9,8,A0,A1,6,7,A2,A3,15}; int keycode_arr[]={218,217,216,215,128,130,32,129,122,176,53,49,112,177,179}; // UP,DOWN,LEFT,RIGHT,LEFT-CTRL (Button 1), LEFT-ALT (Button 2),SPACEBAR (Button 3), LEFT-SHIFT (Button 4), Z (Button 5), ENTER (Button 6) (Enter instead of X so can use with other RPi things like raspi-config), Coin/Credit, 1P Start, P (Pause), ESC, TAB int key_state[BUTTONS]; void setup() { Keyboard.begin(); for (int i=0;i<BUTTONS;i++) { pinMode(pin_arr[i], INPUT_PULLUP); key_state[i] = digitalRead(pin_arr[i]); } } void loop() { for (int i=0;i<BUTTONS;i++) { key_state[i]=digitalRead(pin_arr[i]); if (key_state[i]==LOW) { Keyboard.press(keycode_arr[i]); if (keycode_arr[i] == 49) { delay(100); } } else { Keyboard.release(keycode_arr[i]); } } }
- at last, check and upload the code by clicking the according buttons
Details
Price |
~3€ |
---|---|
Chip |
ATmega32u4 |
I/O Pins |
16 (18) |
Size |
~33x18mm |
Buy it |
aliexpressbanggoodamazon.comamazon.de |