Hardware components | ||||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
Software apps and online services | ||||||
| ||||||
| ||||||
| ||||||
Hand tools and fabrication machines | ||||||
| ||||||
|
Giving a new atmosphere to one’s home without investing in a new equipment for the living room, or making a social gathering more enjoyable without missing it, in order to accomodate the guests the best you can, presents a challange. Due to this, the solution that will facilitate our relation with the einvironment and that will somehow simplify our lives was born.
EndFragment
�� �1*!
Untitled file
C/C++#include "derivative.h"
#include "PLL.h" /* Funciones para el manejo del PLL */
#define deshab_COPD CONFIG1_COPD = 1
int g = 0;
int h = 0;
int indic, indic_2 = 1;
int figura = 0;
int digito_1 = 0;
int digito_2 = 0;
int medida = 0;
int cont = 0;
int pasos_H, pasos_V = 0;
char dig_1, dig_2, di_1, di_2 = 0;
int base, altura = 0;
void V_abj (int N_rutinas1)
{
int w = 0;
for (w=0; w<=(N_rutinas1 - 1); w++)
{
PTC = 0x50;
Delay (50);
PTC = 0x60;
Delay (50);
PTC = 0xA0;
Delay (50);
PTC = 0x90;
Delay (50);
}
}
void V_arr (int N_rutinas2)
{
int z = 0;
for (z=0; z<=(N_rutinas2 - 1); z++)
{
PTC = 0xA0;
Delay (50);
PTC = 0x60;
Delay (50);
PTC = 0x50;
Delay (50);
PTC = 0x90;
Delay (50);
}
}
void H_der (int N_rutinas3)
{
int y = 0;
for (y=0; y<=(N_rutinas3 - 1); y++)
{
PTC = 0x04;
PTB_PTB1 = 0;
PTB_PTB0 = 1;
Delay (50);
PTC = 0x04;
PTB_PTB1 = 1;
PTB_PTB0 = 0;
Delay (50);
PTC = 0x08;
PTB_PTB1 = 1;
PTB_PTB0 = 0;
Delay (50);
PTC = 0x08;
PTB_PTB1 = 0;
PTB_PTB0 = 1;
Delay (50);
}
}
void H_izq (int N_rutinas4)
{
int x = 0;
for (x=0; x<=(N_rutinas4 - 1); x++)
{
PTC = 0x08;
PTB_PTB1 = 0;
PTB_PTB0 = 1;
Delay (50);
PTC = 0x08;
PTB_PTB1 = 1;
PTB_PTB0 = 0;
Delay (50);
PTC = 0x04;
PTB_PTB1 = 1;
PTB_PTB0 = 0;
Delay (50);
PTC = 0x04;
PTB_PTB1 = 0;
PTB_PTB0 = 1;
Delay (50);
}
}
void main(void)
{
deshab_COPD;
INIT_PLL ();
DDRA = 0xFF; /* PTA como SALIDAS (bus de datos de la LCD) */
DDRD = 0x0F; /* PTD0 AL PTD3 como salidas */
DDRC = 0xFF; /* PTC como salida */
DDRB = 0x33; /* PTB0 AL PTB1 & PTB4 Y PTB5 como salidas (RS y EN) */
PTC = 0xFF;
PTB_PTB0 = 1;
PTB_PTB1 = 1;
LCD_INI ();
INIT_KBI (0xF0); /* PTD4 AL PTD7 como interrupciones de KBI */
for (g=0; g<13; g++)
{
LCD_Write (Mensaje_1[g]);
}
for (;;)
{
EnableInterrupts;
while (indic)
{
PTD = 0x07;
Delay (50);
PTD = 0x0B;
Delay (50);
PTD = 0x0D;
Delay (50);
PTD = 0x0E;
Delay (50);
}
indic = 1;
DisableInterrupts;
if (figura == 1) /*INICIO CUADRADO*/
{
h = 0;
LCD_W_INI (0x01);
LCD_W_INI (0x80);
for (h=0; h<16; h++)
{
LCD_Write (Mensaje_Cuadrado[h]);
}
EnableInterrupts;
while (indic_2)
{
PTD = 0x07;
Delay (50);
PTD = 0x0B;
Delay (50);
PTD = 0x0D;
Delay (50);
PTD = 0x0E;
Delay (50);
}
indic_2 = 1;
h = 0;
DisableInterrupts;
BLUE_W_INI (0x01);
BLUE_W_INI (0x80);
for (h=0; h<8; h++)
{
BLUE_Write (Mensaje_imp_cuad[h]);
}
medida = digito_1 + digito_2;
pasos_H = ( (medida*10) / (5/2) );
H_der (pasos_H);
Delay (500);
V_arr (pasos_H*4);
Delay (500);
H_izq (pasos_H);
Delay (500);
V_abj (pasos_H*4);
PTC = 0xFF;
PTB_PTB0 = 1;
PTB_PTB1 = 1;
} /*FIN CUADRADO*/
if (figura == 2) /*INICIO RECTANGULO*/
{
h = 0;
LCD_W_INI (0x01);
LCD_W_INI (0x80);
for (h=0; h<16; h++)
{
LCD_Write (Mensaje_Rect_1[h]);
}
EnableInterrupts;
while (indic_2)
{
PTD = 0x07;
Delay (50);
PTD = 0x0B;
Delay (50);
PTD = 0x0D;
Delay (50);
PTD = 0x0E;
Delay (50);
}
indic_2 = 1;
h = 0;
cont = 0;
DisableInterrupts;
base = digito_1 + digito_2;
di_1 = dig_1;
di_2 = dig_2;
pasos_H = ( (base*10) / (5/2) );
LCD_W_INI (0x01);
LCD_W_INI (0x80);
for (h=0; h<15; h++)
{
LCD_Write (Mensaje_Rect_2[h]);
}
EnableInterrupts;
while (indic_2)
{
PTD = 0x07;
Delay (50);
PTD = 0x0B;
Delay (50);
PTD = 0x0D;
Delay (50);
PTD = 0x0E;
Delay (50);
}
indic_2 = 1;
h = 0;
cont = 0;
DisableInterrupts;
LCD_W_INI (0x01);
LCD_W_INI (0x80);
for (h=0; h<10; h++)
{
LCD_Write (Mensaje_imp_rect[h]);
}
LCD_W_INI (0xC0);
LCD_Write ('A');
LCD_Write ('=');
LCD_Write (dig_1);
LCD_Write (dig_2);
LCD_Write ('c');
LCD_Write ('m');
LCD_Write (0x20);
LCD_Write (0x20);
LCD_Write ('B');
LCD_Write ('=');
LCD_Write (di_1);
LCD_Write (di_2);
LCD_Write ('c');
LCD_Write ('m');
altura = digito_1 + digito_2;
pasos_V = 4 * ( (altura*10) / (5/2) );
H_der (pasos_H);
Delay (500);
V_arr (pasos_V);
Delay (500);
H_izq (pasos_H);
Delay (500);
V_abj (pasos_V);
PTC = 0xFF;
PTB_PTB0 = 1;
PTB_PTB1 = 1;
}
if (figura == 3)
{
LCD_W_INI (0x80);
LCD_Write ('T');
LCD_Write ('r');
LCD_Write ('i');
LCD_Write ('a');
}
if (figura == 4)
{
LCD_W_INI (0x80);
LCD_Write ('H');
LCD_Write ('e');
LCD_Write ('x');
LCD_Write ('a');
}
}
}
//image Analisis in matlab
imagen = imread('instrumental.png');
LA DIVIDES EN SUS COMPONENTES
im_r =(imagen(:,:,1)) ;
im_g =(imagen(:,:,2)) ;
im_b =(imagen(:,:,3)) ;
if Count% im_r>im_b
useful _cycle==50% // ilumination for a picture with more red color
Comments