Skip to content

Instantly share code, notes, and snippets.

View HectorTorres's full-sized avatar

Hector Torres HectorTorres

View GitHub Profile
@HectorTorres
HectorTorres / control-temperatura-pic.c
Created May 12, 2017 17:21
Control de temperatura con PIC PIC16F887
//Mendez Cruz Juan Daniel
//Carlos Chavez
//Control de temperatura por medio de dos sensores LM35 controlados por PIC16F887
//Rangos de Temperatura baja>10 grados C,Temperatura media[10,30] grados C
//Temperatura alta> 40 grados C, para temperatura media se acciona un ventilador
//Para Temperatura alta se acciona segundo ventilador se dispara una alarma
#include <16F887.h>
#device ADC=10 //Resolución de 10 bits para ADC
#fuses INTRC_IO,NOCPD,NOWDT,NOPUT,NOLVP,NOBROWNOUT,MCLR
@HectorTorres
HectorTorres / sensor-temperatura-contro.c
Created May 12, 2017 17:58
Sensor de temperatura y control con un PIC PIC16F887
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Diagnostics;
using System.Threading;
// Ejemplo: contador binario
void setup()
{
DDRD=255; //se declara todo el puerto como salida
}
void loop()
{
@HectorTorres
HectorTorres / lcd_EW162B0YMY
Created May 15, 2017 16:25
LCD16x2 EW162B0YMY
#include <LiquidCrystal.h>
// iniciamos la libreria con el nimero de pines de la interfas
LiquidCrystal lcd(11, 10, 9, 4, 5, 6, 7);
//estos números indican lo siguiente (RS, R/W, E, DB4, DB5, DB6, DB7)
void setup() {
//indicamos a la LCD el número de columnas y filas
lcd.begin(16, 2);
// imprime un mensaje en la LCD
lcd.print("HetPro!");
int button =13;
void setup()
{
Serial.begin(9600);
pinMode(button,INPUT);
}
void loop()
{
int switchEstado = digitalRead(button);
Serial.print(switchEstado);
@HectorTorres
HectorTorres / style.css
Created May 15, 2017 18:38
BackupWPTUTO
/*
Theme Name: Sparkling
Theme URI: http://colorlib.com/wp/themes/sparkling
Author: Colorlib
Author URI: http://colorlib.com/
Description: Sparkling is a clean minimal and responsive WordPress theme well suited for travel, health, business, finance, portfolio, design, art, photography, personal, ecommerce and any other creative websites and blogs. Developed using Bootstrap 3 that makes it mobile and tablets friendly. Theme comes with full-screen slider, social icon integration, author bio, popular posts widget and improved category widget. Sparkling incorporates latest web standards such as HTML5 and CSS3 and is SEO friendly thanks to its clean structure and codebase. It has dozens of Theme Options based on WordPress Customizer to change theme layout, colors, fonts, slider settings and much more. Theme is also translation and multilingual ready, compatible with WPML and is available in Spanish, French, Dutch, Polish, Russian, German, Brazilian Portuguese, Portuguese (Portugal), Persian (Iranian language), Rom
@HectorTorres
HectorTorres / Contador-7segmentos
Created May 15, 2017 21:30
Contador 7segmentos
void setup()
{
DDRD=255; //Se declara todo el puerto como salida
}
void loop()
{
//Al puerto "D" le asignamos los valores obtenidos haciendo una pausa de 1segundo entre cada numero
PORTD=0x7E; //0
delay(1000);
@HectorTorres
HectorTorres / sensor-de-luz.c
Created May 16, 2017 04:22
Programa de Sensor de luz TSL2560
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_TSL2561_U.h>
/* This driver uses the Adafruit unified sensor library (Adafruit_Sensor),
which provides a common 'type' for sensor data and some helper functions.
To use this driver you will also need to download the Adafruit_Sensor
library and include it in your libraries folder.
You should also assign a unique ID to this sensor for use with
@HectorTorres
HectorTorres / rfid-rc522.c
Last active April 27, 2018 02:27
rfid-rc522 Arduino uno
//https://www.hetpro-store.com/TUTORIALES/rc522-rfid-escritura-lectura
#include <SPI.h>
#include <MFRC522.h>
#define RST_PIN 9 // Pin configurable, puedes cambiarlo a tus necesidades
#define SS_PIN 10 // Pin configurable, puedes cambiarlo a tus necesidades
MFRC522 mfrc522(SS_PIN, RST_PIN); // Crear instancia MFRC522
#include <SPI.h>
#include <MFRC522.h>
#define RST_PIN 9 // Configurable
#define SS_PIN 10 // Configurable
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
MFRC522::MIFARE_Key key;