The LilyTiny is a diminutive, programmable microcontroller board designed for integrating into wearable electronics and small projects. Its compact size and flexibility make it ideal for applications where space is at a premium and simplicity is key. The LilyTiny is often used in DIY e-textiles, interactive artwork, and educational projects to add functionality without the bulk of larger microcontroller boards.
Pin Number | Name | Description |
---|---|---|
1 | PB5 | Reset and digital I/O, PWM |
2 | PB3 | Analog input A3 and digital I/O, PWM |
3 | PB4 | Analog input A2 and digital I/O |
4 | GND | Ground |
5 | PB0 | Analog input A0 and digital I/O, PWM |
6 | PB1 | Analog input A1 and digital I/O |
7 | VCC | Positive supply voltage |
8 | PB2 | Analog input A1 and digital I/O |
Powering the LilyTiny: Connect a power supply of 2.7V to 5.5V to the VCC and GND pins. Ensure that the power supply is stable and within the recommended voltage range to prevent damage.
Programming the LilyTiny: The LilyTiny can be programmed using an external programmer. Connect the programmer to the ISP header pins on the LilyTiny, ensuring correct orientation and pin alignment.
Connecting I/O Pins: Use the digital I/O pins to connect sensors, actuators, or other components. Remember that the LilyTiny can source or sink up to 40 mA per I/O pin.
Using PWM and Analog Inputs: Some pins offer PWM functionality for controlling devices like LEDs or motors with variable power. Analog input pins can be used to read signals from sensors.
// Blink an LED connected to pin 0 of the LilyTiny
int ledPin = 0; // LED connected to digital pin 0
void setup() {
pinMode(ledPin, OUTPUT); // Set the LED pin as an output
}
void loop() {
digitalWrite(ledPin, HIGH); // Turn the LED on
delay(1000); // Wait for a second
digitalWrite(ledPin, LOW); // Turn the LED off
delay(1000); // Wait for a second
}
Q: Can I use the Arduino IDE to program the LilyTiny? A: Yes, you can program the LilyTiny using the Arduino IDE by selecting the ATtiny25/45/85 board and choosing the appropriate programmer.
Q: What is the maximum voltage that can be applied to the LilyTiny? A: The maximum voltage that should be applied to the VCC pin is 5.5V.
Q: How can I extend the number of I/O pins on the LilyTiny? A: You can use multiplexers or shift registers to increase the number of I/O pins available for your project.
Q: Can the LilyTiny be used in commercial products? A: Yes, the LilyTiny is suitable for use in commercial products, but ensure that your design adheres to all relevant safety and regulatory standards.