You are on page 1of 4

https://www.youtube.com/watch?

v=x7l_OyI3fog

Censar la humedad y temperatura del ambiente

https://www.youtube.com/watch?v=zzPGxGvEOBw

https://www.youtube.com/watch?v=QD7jy7ZA9pc

video como crear proyecto en MPLAB

https://www.youtube.com/watch?v=vNB_c55QJrs

https://www.youtube.com/watch?v=x7l_OyI3fog

https://www.youtube.com/watch?v=pm8ikGqN79U

https://www.youtube.com/watch?v=9ugbhuGXBo4

C:\Users\Public\Documents\Mikroelektronika\mikroC PRO for PIC

Descargar e instalar micro c pro

https://www.youtube.com/watch?v=TBHzBwDG9OY
sbit LCD_RS at RB2_bit; //conexion LCD

sbit LCD_EN at RB3_bit;

sbit LCD_D4 at RB4_bit;

sbit LCD_D5 at RB5_bit;

sbit LCD_D6 at RB6_bit;

sbit LCD_D7 at RB7_bit;

sbit LCD_RS_Direction at TRISB2_bit;

sbit LCD_EN_Direction at TRISB3_bit;

sbit LCD_D4_Direction at TRISB4_bit;

sbit LCD_D5_Direction at TRISB5_bit;

sbit LCD_D6_Direction at TRISB6_bit;

sbit LCD_D7_Direction at TRISB7_bit;

//Declaracion de variables

int valor,lux;

float voltaje;

char valor1[10];

void main() {

ADCON1= 0b00001110;

TRISA = 0X01;

TRISB = 0X00;
PORTB = 0X00;

lcd_init();

Lcd_Cmd(_LCD_CURSOR_OFF);

Lcd_Cmd(_LCD_CLEAR);

Lcd_out(1,1,"por(%):");

Lcd_out(2,1,"bombillo:");

Lcd_out(2,12,"off");

while(1){

valor = Adc_read(0);

delay_ms(10);

voltaje = (valor*5)/1024;

lux = (100*voltaje)/5;

intToStr(lux,valor1);

Lcd_out(1,7,valor1);

if(lux <= 40){

RB0_bit = 1;

delay_ms(10);

Lcd_out(2,12,"ON");

if(lux >= 80){

RB0_bit = 0;

delay_ms(10);

Lcd_out(2,12,"off");
}

https://docplayer.es/10724599-Laura-gonzalo-abril-03-curso-modulaciones-digitales.html