Sunteți pe pagina 1din 10

2011

Blinky breakout user manual

Author: Manoj.j Reviewer: Ram Revision: 1.2 Tenet Technetronics 1/8/2011

Contents
Introduction
Introduction to Blinky

Hardware Overview
Blinky features Components overview Schematic

Software Overview
Code Pseudo code

Demo Application References and further reading

Introduction
Whenever we think of creating some patterns using LEDs many things come out of mind one such idea is set in mind to design a breakout using SMD LEDs. This breakout is artistic and it looks similar to bulb This breakout consists of eight SMD LEDs connected in series with SMD resistor. The LED array can be programmed by the data lines connected to LEDs that is extended through berg connectors. The breakout can be operated with normal 5 volts supply. The breakout can be screwed to fit into the surface by the holes provided on the breakout. This breakout finds applications artistically in the way user make use of.

Hardware Overview

Figure1: The Blinky breakout

Blinky features
Data lines are extended through berg connectors. Looks very artistic. The breakout can be screwed to surface. The breakout is designed with SMD LEDs and SMD resistor.

Components overview

Components SMD led

Brief specification The voltage rating is 2 to 3.5 volts and current rating is 20ma 10 kohm

References http://en.wikipedia.org/wiki/Lightemitting_diode http://en.wikipedia.org/wiki/Surfacemount_technology http://en.wikipedia.org/wiki/Resistor http://en.wikipedia.org/wiki/Surfacemount_technology

SMD resistor

Table1: components overview

Schematic

Figure 2: loadcell breakout schematic

Note: Symbol for LED

Figure 3: Symbol for LED

Software overview
Code
/* Blinky pattern1 Turns on Alternate LEDs on for one second, then off for one second, repeatedly. */ void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, OUTPUT); pinMode(6, OUTPUT); pinMode(7, OUTPUT); pinMode(8, OUTPUT); pinMode(9, OUTPUT); } void loop() { digitalWrite(2, HIGH); // set the LEDs on digitalWrite(4, HIGH); digitalWrite(6, HIGH); digitalWrite(8, HIGH); delay(1000); // wait for a second digitalWrite(3, LOW); // set the LED off digitalWrite(5, LOW); digitalWrite(7, LOW); digitalWrite(9, LOW); }

/* Blinky pattern2 Initially the odd LEDs is set to high and Brightness of Alternate LEDs gradually increases to maximum mean while the brightness of odd LEDs decreases, repeatedly. */ void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, OUTPUT); pinMode(6, OUTPUT); pinMode(7, OUTPUT); pinMode(8, OUTPUT); pinMode(9, OUTPUT);

} void loop() { Int PWMpin1 = 3; int PWMpin2 =6; int PWMpin3 = 9; PWMpin4 =11; digitalWrite(2, HIGH); //set the LEDs on digitalWrite(4, HIGH); digitalWrite(5, HIGH); digitalWrite(7, HIGH); For(int i=0; i<=255; i++) // brightness of the LEDs increases { analogWrite (PWMpin1, i); analogWrite (PWMpin2, i); analogWrite (PWMpin3, i); analogWrite (PWMpin4, i); delay(50); //wait for half second }

For(int i=255; i>=0; i--) {

// brightness of the LEDs decreases analogWrite (PWMpin1, i); analogWrite (PWMpin2, i); analogWrite (PWMpin3, i); analogWrite (PWMpin4, i); delay(50);

} digitalWrite(2, LOW); // set the LED off digitalWrite(4, LOW); digitalWrite(5, LOW); digitalWrite(7, LOW); }

Pseudo code
Include header files Function name : setup Return type : void Description : initialization Body : variables initialization for different LEDS. Calling PINMODE function for digital pins utilization.

Function name : loop Return type : void Description : infinite loop Body : digital write operation. Delay operation. Analog Write operation.

Demo Application
Blinky breakout

Figure4: The Blinky breakout

Proto shield which is used to connect some basic interfaces like LEDs, switches etc.. is mounted on Comet

Figure5: The Blinky breakout with proto shield

Blinky breakout is interfaced with comet through proto shield

Figure6: The Blinky connected to Comet

Different Patterns are generated once you uploading the code to microcontroller .

Figure7: different LED patterns

References and Further Reading


www.arduino.cc www.tenettech.com/comet http://www.youtube.com/user/tenetworld?blend=2&ob=5#p/u/0/attQcrrRWLE http://www.tenettech.com/product.php?id_product=1494

S-ar putea să vă placă și