Entradas

CLASIFICADOR DE COLORES CON SENSOR TCS3200 CON ARDUINO NANO

Imagen
  #include <LiquidCrystal.h> #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd ( 0x 27 , 16 , 2 ) ;  // #include <Servo.h> #define S0 4 #define S1 5 #define S2 6 #define S3 7 #define salidaSensor 8 Servo servotop; Servo servorampa;   // Para guardar las frecuencias de los fotodiodos int frecuenciaRojo = 0 ; int frecuenciaVerde = 0 ; int frecuenciaAzul = 0 ; int colorRojo; int colorVerde; int colorAzul; int test = 110 ; //Posicion en grados del servo superior para hacer test de color (110, 80) int recoge = 160 ; //Posicion en grados del servo superior para recoger pelota (160, 145) int rampa = 67 ; //Posicion en grados del servo superior para dejar pelota en rampa (67, 30) int pos1 = 50 ; //Posicion rampa color 1 (50, 30) int pos2 = 87 ; //Posicion rampa color 2 (87, 90) int pos3 = 130 ; //Posicion rampa color 3 (130, 150) int t = 300 ; int t1 = 100 ;   void setup () {   // Definie...

CLASIFICADOR DE COLORES CON SENSOR TCS3472 (I2C) CON ARDUINO NANO

Imagen
  #include <Wire.h>     // libreria para bus I2C #include <Adafruit_GFX.h>   // libreria para pantallas graficas #include <Adafruit_SSD1306.h>   // libreria para controlador SSD1306 #include "Adafruit_TCS34725.h" Adafruit_TCS34725 tcs = Adafruit_TCS34725 ( TCS34725_INTEGRATIONTIME_300MS, TCS34725_GAIN_1X ) ; //614   #define ANCHO 128     // reemplaza ocurrencia de ANCHO por 128 #define ALTO 32       // reemplaza ocurrencia de ALTO por 64 #define OLED_RESET 4      // necesario por la libreria pero no usado Adafruit_SSD1306 oled ( ANCHO, ALTO, & Wire , OLED_RESET ) ;  // crea objeto #include <Servo.h> Servo servotop; Servo servorampa;   // Para guardar las frecuencias de los fotodiodos int test = 80 ; //Posicion en grados del servo superior para hacer test de color (110, 80) int recoge = 145 ; //Posicion en grados del servo superior para recoger pelota (160, 1...