From 85bf8bb429f0a118ec8c2e4b20802deb4034b9f8 Mon Sep 17 00:00:00 2001 From: "jp.av.dev" Date: Mon, 4 Apr 2022 01:11:04 -0400 Subject: [PATCH] proyectos renombrados, reestructuracion pendientes crear, indexar y linkear readmes --- EEPROM/README.md | 0 .../read_write.ino} | 0 README.md | 18 +- RTC/README.md | 497 ++++++++++++++++++ .../ejmRTC.ino} | 0 .../hora-y-lcd.ino => rtc_lcd/rtc_lcd.ino} | 0 .../rtc_lcd_BT.ino} | 0 .../set_hora.ino} | 12 +- .../set_segun_hora_compilado.ino} | 0 .../set_segun_hora_compilado2.ino} | 16 +- .../Bluetooth1/Bluetooth1.ino | 0 .../Bluetooth2/Bluetooth2.ino | 0 .../Bluetooth3/Bluetooth3.ino | 0 .../Bluetooth4/Bluetooth4.ino | 0 .../Btt-hc06/Btt-hc06.ino | 0 {BlueTooth => bluetooth}/README.md | 0 buzzer/README.md | 44 ++ .../graduacion/graduacion.ino | 0 .../himno/himno.ino | 0 {American_Anthem => buzzer/himno}/pitches.h | 0 .../Mario.ino => buzzer/mario1/mario1.ino | 0 .../mario-git.ino => buzzer/mario2/mario2.ino | 0 .../otro/otro.ino => buzzer/mario3/mario3.ino | 0 .../PARLANTE.ino => buzzer/mario4/mario4.ino | 0 {Buzzer/PARLANTE => buzzer/mario4}/pitches.h | 0 .../midi_to_ino/midi_to_ino.ino | 0 .../stereo_2pots_2spkr/stereo_2pots_2spkr.ino | 0 grblUpload/README.md | 0 {LCD => lcd}/Autoscroll/Autoscroll.ino | 0 .../ContadorLopps_X10/ContadorLopps_X10.ino | 0 .../Custom-Character/Custom-Character.ino | 0 .../LCD-8-bits-metodo/LCD-8-bits-metodo.ino | 0 {LCD => lcd}/i2c/i2c_Scanner/i2c_Scanner.ino | 0 {LCD => lcd}/i2c/i2c_ok_20x4/i2c_ok_20x4.ino | 0 .../marquesina-desplazandose-xd.ino | 0 .../Baliza_2Led_PWM/Baliza_2Led_PWM.ino | 0 .../EncendidoProgresivoLed_PWM.ino | 0 {LEDs => leds}/PWM_x2/PWM_x2.ino | 0 .../Potentiometro_blink_led.ino | 0 {LEDs => leds}/RGBx2/RGBx2.ino | 0 {LEDs => leds}/Semaforo/Semaforo.ino | 0 .../scanner_party/scanner_party.ino | 0 .../scanner_party_x3/scanner_party_x3.ino | 0 {LEDs => leds}/test-ilumin/test-ilumin.ino | 0 .../testSerial2Leds/testSerial2Leds.ino | 0 .../Matriz_8x8.ino => matriz8x8/matriz8x8.ino | 0 motores/brushless/README.md | 0 .../brushless/esc_serial/esc_serial.ino | 0 motores/dc/README.md | 0 .../dc/bateria9v/bateria9v.ino | 0 .../dc/l298n_joystick/l298n_joystick.ino | 0 .../dc/puente_H/puente_H.ino | 0 .../dc/puente_H_isr/puente_H_isr.ino | 0 motores/pap/README.md | 1 + .../Motores PaP => motores/pap}/StepStick.png | Bin .../pap/control_pap/control_pap.ino | 0 .../control_pap_ajuste_veloc.ino | 0 .../pap/paso_a_paso/paso_a_paso.ino | 0 .../pap/step_5v/step_5v.ino | 0 .../stepper_keystudio/stepper_keystudio.ino | 0 motores/servo/README.md | 0 .../servo/servo_joystick/servo_joystick.ino | 0 .../servo/servo_led/servo_led.ino | 0 .../servo/servo_termo/servo_termo.ino | 0 .../servo/servos_y_pots/servos_y_pots.ino | 0 PWM_pin9/PWM_pin9.ino => pwm/pwm.ino | 0 .../DHT11-Temp-hum/DHT11-Temp-hum.ino | 0 .../DHT11-Temp-hum/test/test.ino | 0 {Sensores => sensores}/DHT21/DHT21.ino | 0 .../Distancia-GP2Y0A21YK0F.ino | 0 .../Distancia-HC-SR04/Distancia-HC-SR04.ino | 0 .../HUMEDAD/humedad/humedad.ino | 0 .../HUMEDAD/humedad_LCD/humedad_LCD.ino | 0 .../IR/IR_-_Remote/IR_-_Remote.ino | 0 .../IR_Lector_pagArd.cc.ino.ino | 0 .../IR/IR_lector/IR_lector.ino | 0 .../Sensor-Movimiento/Sensor-Movimiento.ino | 0 .../Sensor-Movimiento2/Sensor-Movimiento2.ino | 0 .../sensor_distancia/sensor_distancia.ino | 0 .../serialRX/serialRX.ino | 0 .../serialTX/serialTX.ino | 0 {TEST => tests}/OK_DHT_LCD/OK_DHT_LCD.ino | 0 {TEST => tests}/OK_ESP01/OK_ESP01.ino | 0 {TEST => tests}/OK_ESP_php/OK_ESP_php.ino | 0 {TEST => tests}/OK_LCD-2004/OK_LCD-2004.ino | 0 .../OK_Oled-0.91_Graphs.ino | 0 {TEST => tests}/OK_RTC/OK_RTC.ino | 0 {TEST => tests}/OK_RTC_DHT/OK_RTC_DHT.ino | 0 {TEST => tests}/OK_RTC_LCD/OK_RTC_LCD.ino | 0 {TEST => tests}/OK_RTC_SD_wr/OK_RTC_SD_wr.ino | 0 {TEST => tests}/OK_RTCx4_LCD/OK_RTCx4_LCD.ino | 0 {TEST => tests}/OK_Relay_x4/OK_Relay_x4.ino | 0 {TEST => tests}/OK_SD_rd_wr/OK_SD_rd_wr.ino | 0 .../OK_Serial_Joystick_map.ino | 0 {TEST => tests}/TEST_ESP8266/TEST_ESP8266.ino | 0 {TEST => tests}/TEST_ESP_php/TEST_ESP_php.ino | 0 {TEST => tests}/TEST_Mega/TEST_Mega.ino | 0 .../TEST_MegaESP_helloServer.ino | 0 .../TEST_SerialCom-1_datos_a_serie.ino | 0 .../TEST_SerialCom-2_serie_a_datos.ino | 0 .../TEST_UART_ESP01_helloServer.ino | 0 .../prueba_mod}/prueba_MOD.ino | 0 102 files changed, 562 insertions(+), 26 deletions(-) create mode 100644 EEPROM/README.md rename EEPROM/{Rd-Wr-EEPROM/Rd-Wr-EEPROM.ino => read_write/read_write.ino} (100%) create mode 100644 RTC/README.md rename RTC/{ejemplo-basico-RTC/ejemplo-basico-RTC.ino => ejmRTC/ejmRTC.ino} (100%) rename RTC/{hora-y-lcd/hora-y-lcd.ino => rtc_lcd/rtc_lcd.ino} (100%) rename RTC/{hora-lcd-BT/hora-lcd-BT.ino => rtc_lcd_BT/rtc_lcd_BT.ino} (100%) rename RTC/{ajustar-hora/ajustar-hora.ino => set_hora/set_hora.ino} (89%) rename RTC/{Ajuste-hora-x-compilacion/Ajuste-hora-x-compilacion.ino => set_segun_hora_compilado/set_segun_hora_compilado.ino} (100%) rename RTC/{hora-x-compilacion/hora-x-compilacion.ino => set_segun_hora_compilado2/set_segun_hora_compilado2.ino} (78%) rename {BlueTooth => bluetooth}/Bluetooth1/Bluetooth1.ino (100%) rename {BlueTooth => bluetooth}/Bluetooth2/Bluetooth2.ino (100%) rename {BlueTooth => bluetooth}/Bluetooth3/Bluetooth3.ino (100%) rename {BlueTooth => bluetooth}/Bluetooth4/Bluetooth4.ino (100%) rename {BlueTooth => bluetooth}/Btt-hc06/Btt-hc06.ino (100%) rename {BlueTooth => bluetooth}/README.md (100%) create mode 100644 buzzer/README.md rename Buzzer/gradaucionPOMP/gradaucionPOMP.ino => buzzer/graduacion/graduacion.ino (100%) rename American_Anthem/American_Anthem.ino => buzzer/himno/himno.ino (100%) rename {American_Anthem => buzzer/himno}/pitches.h (100%) rename Buzzer/Mario/Mario.ino => buzzer/mario1/mario1.ino (100%) rename Buzzer/mario-git/mario-git.ino => buzzer/mario2/mario2.ino (100%) rename Buzzer/otro/otro.ino => buzzer/mario3/mario3.ino (100%) rename Buzzer/PARLANTE/PARLANTE.ino => buzzer/mario4/mario4.ino (100%) rename {Buzzer/PARLANTE => buzzer/mario4}/pitches.h (100%) rename Buzzer/midi-to-arduino/midi-to-arduino.ino => buzzer/midi_to_ino/midi_to_ino.ino (100%) rename Buzzer/2Parlantes_4Pots/2Parlantes_4Pots.ino => buzzer/stereo_2pots_2spkr/stereo_2pots_2spkr.ino (100%) create mode 100644 grblUpload/README.md rename {LCD => lcd}/Autoscroll/Autoscroll.ino (100%) rename {LCD => lcd}/ContadorLopps_X10/ContadorLopps_X10.ino (100%) rename {LCD => lcd}/Custom-Character/Custom-Character.ino (100%) rename {LCD => lcd}/LCD-8-bits-metodo/LCD-8-bits-metodo.ino (100%) rename {LCD => lcd}/i2c/i2c_Scanner/i2c_Scanner.ino (100%) rename {LCD => lcd}/i2c/i2c_ok_20x4/i2c_ok_20x4.ino (100%) rename {LCD => lcd}/marquesina-desplazandose-xd/marquesina-desplazandose-xd.ino (100%) rename {LEDs => leds}/Baliza_2Led_PWM/Baliza_2Led_PWM.ino (100%) rename {LEDs => leds}/EncendidoProgresivoLed_PWM/EncendidoProgresivoLed_PWM.ino (100%) rename {LEDs => leds}/PWM_x2/PWM_x2.ino (100%) rename {LEDs => leds}/Potentiometro_blink_led/Potentiometro_blink_led.ino (100%) rename {LEDs => leds}/RGBx2/RGBx2.ino (100%) rename {LEDs => leds}/Semaforo/Semaforo.ino (100%) rename {LEDs => leds}/scanner_party/scanner_party.ino (100%) rename {LEDs => leds}/scanner_party_x3/scanner_party_x3.ino (100%) rename {LEDs => leds}/test-ilumin/test-ilumin.ino (100%) rename {LEDs => leds}/testSerial2Leds/testSerial2Leds.ino (100%) rename Matriz_8x8/Matriz_8x8.ino => matriz8x8/matriz8x8.ino (100%) create mode 100644 motores/brushless/README.md rename Motores/Motores Brusless/ESC_Motor_Serial/ESC_Motor_Serial.ino => motores/brushless/esc_serial/esc_serial.ino (100%) create mode 100644 motores/dc/README.md rename Motores/Motores DC/motor_9V_Bat_/motor_9V_Bat_.ino => motores/dc/bateria9v/bateria9v.ino (100%) rename Motores/Motores DC/Motor_L298N_Joystick/Motor_L298N_Joystick.ino => motores/dc/l298n_joystick/l298n_joystick.ino (100%) rename Motores/Motores DC/Motor-puente-H/Motor-puente-H.ino => motores/dc/puente_H/puente_H.ino (100%) rename Motores/Motores DC/Motor-ISR-pteH/Motor-ISR-pteH.ino => motores/dc/puente_H_isr/puente_H_isr.ino (100%) create mode 100644 motores/pap/README.md rename {Motores/Motores PaP => motores/pap}/StepStick.png (100%) rename Motores/Motores PaP/Stepper Motor Control.ino => motores/pap/control_pap/control_pap.ino (100%) rename Motores/Motores PaP/Stepper Motor Control_Adj Speed.ino => motores/pap/control_pap_ajuste_veloc/control_pap_ajuste_veloc.ino (100%) rename Motores/Motores PaP/MotorPaP/MotorPaP.ino => motores/pap/paso_a_paso/paso_a_paso.ino (100%) rename Motores/Motores PaP/step5vDEMO/step5vDEMO.ino => motores/pap/step_5v/step_5v.ino (100%) rename Motores/Motores PaP/stepper_key_pagina/stepper_key_pagina.ino => motores/pap/stepper_keystudio/stepper_keystudio.ino (100%) create mode 100644 motores/servo/README.md rename Motores/Motores Servo/Servo-Joystick/Servo-Joystick.ino => motores/servo/servo_joystick/servo_joystick.ino (100%) rename Motores/Motores Servo/mov-servo-led/mov-servo-led.ino => motores/servo/servo_led/servo_led.ino (100%) rename Motores/Motores Servo/Servo-termo/Servo-termo.ino => motores/servo/servo_termo/servo_termo.ino (100%) rename Motores/Motores Servo/2_servos_2_pot/2_servos_2_pot.ino => motores/servo/servos_y_pots/servos_y_pots.ino (100%) rename PWM_pin9/PWM_pin9.ino => pwm/pwm.ino (100%) rename {Sensores => sensores}/DHT11-Temp-hum/DHT11-Temp-hum.ino (100%) rename {Sensores => sensores}/DHT11-Temp-hum/test/test.ino (100%) rename {Sensores => sensores}/DHT21/DHT21.ino (100%) rename {Sensores => sensores}/Distancia-GP2Y0A21YK0F/Distancia-GP2Y0A21YK0F.ino (100%) rename {Sensores => sensores}/Distancia-HC-SR04/Distancia-HC-SR04.ino (100%) rename {Sensores => sensores}/HUMEDAD/humedad/humedad.ino (100%) rename {Sensores => sensores}/HUMEDAD/humedad_LCD/humedad_LCD.ino (100%) rename {Sensores => sensores}/IR/IR_-_Remote/IR_-_Remote.ino (100%) rename {Sensores => sensores}/IR/IR_Lector_pagArd.cc.ino/IR_Lector_pagArd.cc.ino.ino (100%) rename {Sensores => sensores}/IR/IR_lector/IR_lector.ino (100%) rename {Sensores => sensores}/Sensor Proximidad/Sensor-Movimiento/Sensor-Movimiento.ino (100%) rename {Sensores => sensores}/Sensor Proximidad/Sensor-Movimiento2/Sensor-Movimiento2.ino (100%) rename {Sensores => sensores}/Sensor Proximidad/sensor_distancia/sensor_distancia.ino (100%) rename Comunicacion/ejemplo_JAVAduinoREAD/ejemplo_JAVAduinoREAD.ino => serialCom/serialRX/serialRX.ino (100%) rename Comunicacion/ejemplo_JAVArduinoTRANS/ejemplo_JAVArduinoTRANS.ino => serialCom/serialTX/serialTX.ino (100%) rename {TEST => tests}/OK_DHT_LCD/OK_DHT_LCD.ino (100%) rename {TEST => tests}/OK_ESP01/OK_ESP01.ino (100%) rename {TEST => tests}/OK_ESP_php/OK_ESP_php.ino (100%) rename {TEST => tests}/OK_LCD-2004/OK_LCD-2004.ino (100%) rename {TEST => tests}/OK_Oled-0.91_Graphs/OK_Oled-0.91_Graphs.ino (100%) rename {TEST => tests}/OK_RTC/OK_RTC.ino (100%) rename {TEST => tests}/OK_RTC_DHT/OK_RTC_DHT.ino (100%) rename {TEST => tests}/OK_RTC_LCD/OK_RTC_LCD.ino (100%) rename {TEST => tests}/OK_RTC_SD_wr/OK_RTC_SD_wr.ino (100%) rename {TEST => tests}/OK_RTCx4_LCD/OK_RTCx4_LCD.ino (100%) rename {TEST => tests}/OK_Relay_x4/OK_Relay_x4.ino (100%) rename {TEST => tests}/OK_SD_rd_wr/OK_SD_rd_wr.ino (100%) rename {TEST => tests}/OK_Serial_Joystick_map/OK_Serial_Joystick_map.ino (100%) rename {TEST => tests}/TEST_ESP8266/TEST_ESP8266.ino (100%) rename {TEST => tests}/TEST_ESP_php/TEST_ESP_php.ino (100%) rename {TEST => tests}/TEST_Mega/TEST_Mega.ino (100%) rename {TEST => tests}/TEST_MegaESP_helloServer/TEST_MegaESP_helloServer.ino (100%) rename {TEST => tests}/TEST_SerialCom-1_datos_a_serie/TEST_SerialCom-1_datos_a_serie.ino (100%) rename {TEST => tests}/TEST_SerialCom-2_serie_a_datos/TEST_SerialCom-2_serie_a_datos.ino (100%) rename {TEST => tests}/TEST_UART_ESP01_helloServer/TEST_UART_ESP01_helloServer.ino (100%) rename {prueba_MOD => tests/prueba_mod}/prueba_MOD.ino (100%) diff --git a/EEPROM/README.md b/EEPROM/README.md new file mode 100644 index 0000000..e69de29 diff --git a/EEPROM/Rd-Wr-EEPROM/Rd-Wr-EEPROM.ino b/EEPROM/read_write/read_write.ino similarity index 100% rename from EEPROM/Rd-Wr-EEPROM/Rd-Wr-EEPROM.ino rename to EEPROM/read_write/read_write.ino diff --git a/README.md b/README.md index 5a52081..22a7592 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -# Apuntes arduino +# Apuntes arduino -### Apuntes de implementación de librerias utilizadas frecuentemente. +### Apuntes de implementación de librerias de uso frecuente. -Son fragmentos de proyectos que usan objetos y metodos de librerias. +Fragmentos de proyectos que usan instancias, metodos y funciones de librerias +de uso frecuente en proyectos con Arduino. El fin de este respositorio es encontrar una guia rápida de como implementar -alguna solución a una futura necesidad, sin necesidad de volver a navegar -entre videos, guias, documentación nuevamente. -Esta repo es el producto de la actividad antes mencionada. - +alguna solución a una futura necesidad. + + Implementaciones : - - Buzzers/Parlantes + - [Buzzers/Speakers](./buzzer/README.md) - [BlueTooth](./BlueTooth/README.md) - Serial Com - EEPROM @@ -19,6 +19,6 @@ Implementaciones : - Leds - Distintos tipos de motores - PWM - - RTC + - [Real Time Clock](./RTC/README.md) - Sensores - otros Tests diff --git a/RTC/README.md b/RTC/README.md new file mode 100644 index 0000000..6683512 --- /dev/null +++ b/RTC/README.md @@ -0,0 +1,497 @@ +# RTC +## Real Time Clock + +DS3231 + +- [Ejm Básico](#funciones-para-hora-y-fecha) +- [Ajuste Hora y Fecha](#ajuste-hora-y-fecha) +- [Ajuste Hora y Fecha según tiempo de compilación](#set-hora-y-fecha-segun-datos-de-compilacion) +- [Conexiones](#conexiones) +- [RTC LCD y Bluetooth](#rtc-lcd-y-bluetooth) + + + +### Funciones para hora y fecha +**RTC DS3231** conectado por **I2C** y libreria **Wire** +```c +#include +#include "RTClib.h" + +RTC_DS3231 rtc; + +char daysOfTheWeek[7][12] = { + "Domingo", "Lunes", "Martes", + "Miercoles", "Jueves", "Viernes", + "Sabado"}; + +void setup () { +#ifndef ESP8266 + while (!Serial); // for Leonardo/Micro/Zero +#endif + Serial.begin(9600); + delay(3000); // wait for console opening + + if (! rtc.begin()) { + Serial.println("Couldn't find RTC"); + while (1); + } + if (rtc.lostPower()) { + Serial.println("RTC lost power, lets set the time!"); + // following line sets the RTC to the date & time this sketch was compiled + rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); + // This line sets the RTC with an explicit date & time, for example to set + // January 21, 2014 at 3am you would call: + // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0)); + } +} + +void loop () { + DateTime now = rtc.now(); + Serial.print(daysOfTheWeek[now.dayOfTheWeek()]); + Serial.print(" "); + Serial.print(now.day(), DEC); + Serial.print('/'); + Serial.print(now.month(), DEC); + Serial.print('/'); + Serial.print(now.year(), DEC); + Serial.print(" "); + Serial.print(now.hour(), DEC); + Serial.print(':'); + Serial.print(now.minute(), DEC); + Serial.print(':'); + Serial.print(now.second(), DEC); + Serial.println(); + + Serial.print(" desde medianoche del 1/1/1970 = "); + Serial.print(now.unixtime()); + Serial.print("s = "); + Serial.print(now.unixtime() / 86400L); + Serial.println("d"); + /* + // calculate a date which is 7 days and 30 seconds into the future + DateTime future (now + TimeSpan(7,12,30,6)); + + Serial.print(" hoy +7d +30s: "); + Serial.print(future.year(), DEC); + Serial.print('/'); + Serial.print(future.month(), DEC); + Serial.print('/'); + Serial.print(future.day(), DEC); + Serial.print(' '); + Serial.print(future.hour(), DEC); + Serial.print(':'); + Serial.print(future.minute(), DEC); + Serial.print(':'); + Serial.print(future.second(), DEC); + Serial.println(); + */ + Serial.println(); + delay(3000); +} +``` + +---- + +### Ajuste Hora y Fecha +Usando un RX8025 RTC conectado via I2C y libreria Wire +```c +#include +#include "RTClib.h" + +RTC_DS3231 RTC; //Create the DS3231 object + +char weekDay[][4] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; + +//year, month, date, hour, min, sec and week-day(starts from 0 and goes to 6) +//writing any non-existent time-data may interfere with normal operation of the RTC. +//Take care of week-day also. +DateTime dt(2018, 3, 20, 21, 51, 0); + +void setup(){ + Serial.begin(57600); + Wire.begin(); + RTC.begin(); + RTC.adjust(dt); //Adjust date-time as defined 'dt' above +} + +void loop(){ + DateTime now = RTC.now(); //get the current date-time + Serial.print(now.year(), DEC); + Serial.print('/'); + Serial.print(now.month(), DEC); + Serial.print('/'); + //Serial.print(now.date(), DEC); + Serial.print(' '); + Serial.print(now.hour(), DEC); + Serial.print(':'); + Serial.print(now.minute(), DEC); + Serial.print(':'); + Serial.print(now.second(), DEC); + Serial.println(); + //Serial.print(weekDay[now.dayOfWeek()]); + Serial.println(); + delay(1000); +} +``` + +### Set hora y fecha segun datos de compilacion + +```c +#include +#include +#include + +// Pines del chip I2C al LCD: +// (addr,en,rw,rs,d4,d5,d6,d7,BackLight, BLstatus) +LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address [0x27 o 0x3F] +RTC_DS3231 reloj; +bool alarma = true; +DateTime fecha; + +void setup() { + Serial.begin(9600); + lcd.begin(20,4); + if(!reloj.begin()) { + Serial.println("Modulo RTC no encontrado!!"); + while(1); // 1 = true - blucle infito si no hay modulo + } + //reloj.adjust(DateTime(__DATE__, __TIME__)); // Descomentar para ajustar fecha y hora +} + +void loop() { + fecha = reloj.now(); + getFecha(); + lcd.clear(); + lcd.home(); + mostrarHora(); + delay(1000); +} + +void getFecha() { + Serial.print(fecha.day()); + Serial.print("/"); + Serial.print(fecha.month()); + Serial.print("/"); + Serial.print(fecha.year()); + Serial.print(" "); + Serial.print(fecha.hour()); + Serial.print(":"); + Serial.print(fecha.minute()); + Serial.print(":"); + Serial.println(fecha.second()); +} + +String getHora(char var) { + switch (var) { + case 'h': + if(fecha.hour() < 10) { + return ('0'+(String)fecha.hour()); break; + } else { + return (String)fecha.hour();break; + } + case 'm': + if(fecha.minute() <10) { + return ('0'+(String)fecha.minute()); break; + } else { + return (String)fecha.minute();break; + } + case 's': + if(fecha.second() <10) { + return ('0'+(String)fecha.second()); break; + } else { + return (String)fecha.second();break; + } + } +} + +void mostrarHora() { + lcd.print("La hora es: "); + lcd.print(getHora('h')); + lcd.print(":"); + lcd.print(getHora('m')); + lcd.print(":"); + lcd.print(getHora('s')); + lcd.setCursor(0, 1); +} +``` + +### Set hora y fecha segun datos de compilacion + +`reloj.adjust(DateTime(__DATE__, __TIME__));` +```c +#include + +RTC_DS3231 reloj; +bool alarma = true; +DateTime fecha; + +void setup(){ + Serial.begin(9600); + if(!reloj.begin()){ + Serial.println("Modulo RTC no encontrado!!"); + while(1); // 1 = true - blucle infito si no hay modulo + } + // Ajustes fecha y hora según tiempo de compilación + reloj.adjust(DateTime(__DATE__, __TIME__)); +} + +void loop() { + fecha = reloj.now(); + getFecha(); + delay(1000); +} +/* + if(fecha.hour() == 13 && fecha.minute() == 00) { + if(alarma == true) { + Serial.println("Alarma 1 PM"); + alarma = false; + } + } + getFecha(); + delay(1000); + if(fecha.hour() == 12 && fecha.minute() ==30) { + alarma = true; + } +} +*/ + +void getFecha() { + Serial.print(fecha.day()); + Serial.print("/"); + Serial.print(fecha.month()); + Serial.print("/"); + Serial.print(fecha.year()); + Serial.print(" "); + Serial.print(fecha.hour()); + Serial.print(":"); + Serial.print(fecha.minute()); + Serial.print(":"); + Serial.println(fecha.second()); +} + +String getHora(char var) { + switch (var) { + case 'h': + if(fecha.hour() < 10) { + return ('0'+(String)fecha.hour()); break; + } else { + return (String)fecha.hour();break; + } + case 'm': + if(fecha.minute() <10) { + return ('0'+(String)fecha.minute()); break; + } else { + return (String)fecha.minute();break; + } + case 's': + if(fecha.second() <10) { + return ('0'+(String)fecha.second()); break; + } else { + return (String)fecha.second();break; + } + } +} +``` + +---- + +## RTC LCD y Bluetooth + +### Conexiones + +|HC - 06|ARDUINO| +|-|-| +|**`VCC`** | **`5V`**| +|**`GND`** | **`GND`**| +|**`TXD`** | **`10`**| +|**`RXD`** | **`11`**| + +> Pines del chip I2C al LCD: +> (addr,en,rw,rs,d4,d5,d6,d7,BackLight, BLstatus) + +```c +#include +#include +#include +#define relLuz 13 +#define relVent 12 +#define sHum1 A0 +#define sHum2 A1 +#define sHum3 A2 +#define sHum4 A3 +byte hum1, hum2, hum3; +// (addr,en,rw,rs,d4,d5,d6,d7,BackLight, BLstatus) +LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address [0x27 o 0x3F] +RTC_DS3231 reloj; +bool alarma = true; +DateTime fecha; + +void setup() { + Serial.begin(9600); + lcd.begin(20,4); + if(!reloj.begin()) { + Serial.println("Modulo RTC no encontrado!!"); + while(1); // 1 = true - blucle infito si no hay modulo + } + //reloj.adjust(DateTime(__DATE__, __TIME__)); // Descomentar para ajustar fecha y hora +} + +void loop() { + lcd.clear(); + lcd.home(); + fecha = reloj.now(); + mostrarFechaSerie(); + horaLCD(); + delay(1000); +} + +//En caso de ser necesario mostrar hora, este codigo añade un 0 a los valores menores a 10 +String getHora(char var) { + switch (var) { + case 'h': + if(fecha.hour() < 10) { + return ('0'+(String)fecha.hour()); break; + } else { + return (String)fecha.hour();break; + } + case 'm': + if(fecha.minute() <10) { + return ('0'+(String)fecha.minute()); break; + } else { + return (String)fecha.minute();break; + } + case 's': + if(fecha.second() <10) { + return ('0'+(String)fecha.second()); break; + } else { + return (String)fecha.second();break; + } + } +} + +//Hora en LCD +void horaLCD() { + lcd.print("La hora es: "); + lcd.print(getHora('h')); + lcd.print(":"); + lcd.print(getHora('m')); + lcd.print(":"); + lcd.print(getHora('s')); +} + +// Enviar hora y fecha por puerto serie +void mostrarFechaSerie() { + Serial.print(fecha.day()); + Serial.print("/"); + Serial.print(fecha.month()); + Serial.print("/"); + Serial.print(fecha.year()); + Serial.print(" "); + Serial.print(getHora('h')); + Serial.print(":"); + Serial.print(getHora('m')); + Serial.print(":"); + Serial.println(getHora('s')); +} +``` +---- + +```c +#include +#include +#include +#include +SoftwareSerial miBT(10,11); +// Pines del chip I2C al LCD: +// (addr,en,rw,rs,d4,d5,d6,d7,BackLight, BLstatus) +LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address [0x27 o 0x3F] +RTC_DS3231 reloj; +bool alarma = true; +DateTime fecha; + +void setup() { + Serial.begin(9600); + lcd.begin(20,4); + miBT.begin(9600); + if(!reloj.begin()) { + Serial.println("Modulo RTC no encontrado!!"); + while(1); // 1 = true - blucle infito si no hay modulo + } + //reloj.adjust(DateTime(__DATE__, __TIME__)); // Descomentar para ajustar fecha y hora +} + +void loop(){ + fecha = reloj.now(); + getFecha(); + lcd.clear(); + lcd.home(); + mostrarHora(); + comBT(); + delay(1000); +} + +//En caso de ser necesario mostrar hora, este codigo añade un 0 a los valores menores a 10 +String getHora(char var) { + switch (var) { + case 'h': + if(fecha.hour() < 10) { + return ('0'+(String)fecha.hour()); break; + } else { + return (String)fecha.hour(); break; + } + case 'm': + if(fecha.minute() <10) { + return ('0'+(String)fecha.minute()); break; + } else { + return (String)fecha.minute();break; + } + case 's': + if(fecha.second() <10) { + return ('0'+(String)fecha.second()); break; + } else { + return (String)fecha.second();break; + } + } +} + +//Hora en LCD +void mostrarHora() { + lcd.print("La hora es: "); + lcd.print(getHora('h')); + lcd.print(":"); + lcd.print(getHora('m')); + lcd.print(":"); + lcd.print(getHora('s')); +} + +// Enviar hora y fecha por puerto serie +void getFecha() { + Serial.print(fecha.day()); + Serial.print("/"); + Serial.print(fecha.month()); + Serial.print("/"); + Serial.print(fecha.year()); + Serial.print(" "); + Serial.print(fecha.hour()); + Serial.print(":"); + Serial.print(fecha.minute()); + Serial.print(":"); + Serial.println(fecha.second()); +} + +void comBT() { + if(miBT.available()) { + lcd.setCursor(0, 1); + while(miBT.available() > 0) { + lcd.print((char)miBT.read()); //lee BT y envia a Arduino + } + delay(1000); + } + if(Serial.available()) { + while(Serial.available() > 0) { + miBT.write(Serial.read()); // lee Arduino y envia a BT + } + } +} +``` + diff --git a/RTC/ejemplo-basico-RTC/ejemplo-basico-RTC.ino b/RTC/ejmRTC/ejmRTC.ino similarity index 100% rename from RTC/ejemplo-basico-RTC/ejemplo-basico-RTC.ino rename to RTC/ejmRTC/ejmRTC.ino diff --git a/RTC/hora-y-lcd/hora-y-lcd.ino b/RTC/rtc_lcd/rtc_lcd.ino similarity index 100% rename from RTC/hora-y-lcd/hora-y-lcd.ino rename to RTC/rtc_lcd/rtc_lcd.ino diff --git a/RTC/hora-lcd-BT/hora-lcd-BT.ino b/RTC/rtc_lcd_BT/rtc_lcd_BT.ino similarity index 100% rename from RTC/hora-lcd-BT/hora-lcd-BT.ino rename to RTC/rtc_lcd_BT/rtc_lcd_BT.ino diff --git a/RTC/ajustar-hora/ajustar-hora.ino b/RTC/set_hora/set_hora.ino similarity index 89% rename from RTC/ajustar-hora/ajustar-hora.ino rename to RTC/set_hora/set_hora.ino index 6651cdc..b662fba 100755 --- a/RTC/ajustar-hora/ajustar-hora.ino +++ b/RTC/set_hora/set_hora.ino @@ -1,5 +1,4 @@ -// Date and time functions using a RX8025 RTC connected via I2C and Wire lib - +// Funciones de Hora y Fecha usando un RX8025 RTC conectado via I2C y libreria Wire #include #include "RTClib.h" @@ -12,17 +11,14 @@ char weekDay[][4] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; //Take care of week-day also. DateTime dt(2018, 3, 20, 21, 51, 0); - -void setup () -{ +void setup (){ Serial.begin(57600); Wire.begin(); RTC.begin(); RTC.adjust(dt); //Adjust date-time as defined 'dt' above } -void loop () -{ +void loop (){ DateTime now = RTC.now(); //get the current date-time Serial.print(now.year(), DEC); Serial.print('/'); @@ -39,4 +35,4 @@ void loop () //Serial.print(weekDay[now.dayOfWeek()]); Serial.println(); delay(1000); -} +} diff --git a/RTC/Ajuste-hora-x-compilacion/Ajuste-hora-x-compilacion.ino b/RTC/set_segun_hora_compilado/set_segun_hora_compilado.ino similarity index 100% rename from RTC/Ajuste-hora-x-compilacion/Ajuste-hora-x-compilacion.ino rename to RTC/set_segun_hora_compilado/set_segun_hora_compilado.ino diff --git a/RTC/hora-x-compilacion/hora-x-compilacion.ino b/RTC/set_segun_hora_compilado2/set_segun_hora_compilado2.ino similarity index 78% rename from RTC/hora-x-compilacion/hora-x-compilacion.ino rename to RTC/set_segun_hora_compilado2/set_segun_hora_compilado2.ino index 44e956b..6e53fc5 100755 --- a/RTC/hora-x-compilacion/hora-x-compilacion.ino +++ b/RTC/set_segun_hora_compilado2/set_segun_hora_compilado2.ino @@ -1,19 +1,17 @@ - #include RTC_DS3231 reloj; - bool alarma = true; - DateTime fecha; void setup() { - Serial.begin(9600); - if(!reloj.begin()) { - Serial.println("Modulo RTC no encontrado!!"); - while(1); // 1 = true - blucle infito si no hay modulo - } - reloj.adjust(DateTime(__DATE__, __TIME__)); // Descomentar para ajustar fecha y hora + Serial.begin(9600); + if(!reloj.begin()){ + Serial.println("Modulo RTC no encontrado!!"); + while(1); // 1 = true - blucle infito si no hay modulo + } + // Ajustes fecha y hora según tiempo de compilación + reloj.adjust(DateTime(__DATE__, __TIME__)); } void loop() { diff --git a/BlueTooth/Bluetooth1/Bluetooth1.ino b/bluetooth/Bluetooth1/Bluetooth1.ino similarity index 100% rename from BlueTooth/Bluetooth1/Bluetooth1.ino rename to bluetooth/Bluetooth1/Bluetooth1.ino diff --git a/BlueTooth/Bluetooth2/Bluetooth2.ino b/bluetooth/Bluetooth2/Bluetooth2.ino similarity index 100% rename from BlueTooth/Bluetooth2/Bluetooth2.ino rename to bluetooth/Bluetooth2/Bluetooth2.ino diff --git a/BlueTooth/Bluetooth3/Bluetooth3.ino b/bluetooth/Bluetooth3/Bluetooth3.ino similarity index 100% rename from BlueTooth/Bluetooth3/Bluetooth3.ino rename to bluetooth/Bluetooth3/Bluetooth3.ino diff --git a/BlueTooth/Bluetooth4/Bluetooth4.ino b/bluetooth/Bluetooth4/Bluetooth4.ino similarity index 100% rename from BlueTooth/Bluetooth4/Bluetooth4.ino rename to bluetooth/Bluetooth4/Bluetooth4.ino diff --git a/BlueTooth/Btt-hc06/Btt-hc06.ino b/bluetooth/Btt-hc06/Btt-hc06.ino similarity index 100% rename from BlueTooth/Btt-hc06/Btt-hc06.ino rename to bluetooth/Btt-hc06/Btt-hc06.ino diff --git a/BlueTooth/README.md b/bluetooth/README.md similarity index 100% rename from BlueTooth/README.md rename to bluetooth/README.md diff --git a/buzzer/README.md b/buzzer/README.md new file mode 100644 index 0000000..3fcb8da --- /dev/null +++ b/buzzer/README.md @@ -0,0 +1,44 @@ +## Parlantes, Buzzers + +- [2 potenciometros y 2 parlantes](#2-pots-2-speakers) +- [ejm. Graduación](./graduacion/graduacion.ino) +- [ejm. midi-to-arduino](./midi_to_ino/midi_to_ino.ino) +- [ejm. Mario1](./mario1/mario1.ino) +- [ejm. Mario2](./mario2/mario2.ino) +- [ejm. Mario3](./mario3/mario3.ino) +- [ejm. Mario4](./mario4/mario4.ino) +- [ejm. himno](./himno/himno.ino) + + +## 2 pots 2 speakers + +Control de tiempo y tono +```c +#define pot1 A0 +#define pot2 A1 +#define pot3 A2 +#define pot4 A3 + +#define spkrL 2 +#define spkrR 1 + +void setup() { + //pinMode(spkrL, OUTPUT); + //pinMode(spkrR, OUTPUT); +} + +void loop() { + // tone(pin, frequency, duration) + int duracionL=map(analogRead(pot3), 0, 1023, 10, 1000); + int duracionR=map(analogRead(pot4), 0, 1023, 10, 1000); + int tonoL=map(analogRead(pot1),0, 1023, 60, 5000); + int tonoR=map(analogRead(pot2),0, 1023, 60, 5000); + tone(spkrL, tonoL, duracionL); + delay(duracionL); + tone(spkrR, tonoR, duracionR); + delay(duracionR); + delay(30); +} +``` +[Descargar](./stereo_2pots_2spkr/stereo_2pots_2spkr.ino) + diff --git a/Buzzer/gradaucionPOMP/gradaucionPOMP.ino b/buzzer/graduacion/graduacion.ino similarity index 100% rename from Buzzer/gradaucionPOMP/gradaucionPOMP.ino rename to buzzer/graduacion/graduacion.ino diff --git a/American_Anthem/American_Anthem.ino b/buzzer/himno/himno.ino similarity index 100% rename from American_Anthem/American_Anthem.ino rename to buzzer/himno/himno.ino diff --git a/American_Anthem/pitches.h b/buzzer/himno/pitches.h similarity index 100% rename from American_Anthem/pitches.h rename to buzzer/himno/pitches.h diff --git a/Buzzer/Mario/Mario.ino b/buzzer/mario1/mario1.ino similarity index 100% rename from Buzzer/Mario/Mario.ino rename to buzzer/mario1/mario1.ino diff --git a/Buzzer/mario-git/mario-git.ino b/buzzer/mario2/mario2.ino similarity index 100% rename from Buzzer/mario-git/mario-git.ino rename to buzzer/mario2/mario2.ino diff --git a/Buzzer/otro/otro.ino b/buzzer/mario3/mario3.ino similarity index 100% rename from Buzzer/otro/otro.ino rename to buzzer/mario3/mario3.ino diff --git a/Buzzer/PARLANTE/PARLANTE.ino b/buzzer/mario4/mario4.ino similarity index 100% rename from Buzzer/PARLANTE/PARLANTE.ino rename to buzzer/mario4/mario4.ino diff --git a/Buzzer/PARLANTE/pitches.h b/buzzer/mario4/pitches.h similarity index 100% rename from Buzzer/PARLANTE/pitches.h rename to buzzer/mario4/pitches.h diff --git a/Buzzer/midi-to-arduino/midi-to-arduino.ino b/buzzer/midi_to_ino/midi_to_ino.ino similarity index 100% rename from Buzzer/midi-to-arduino/midi-to-arduino.ino rename to buzzer/midi_to_ino/midi_to_ino.ino diff --git a/Buzzer/2Parlantes_4Pots/2Parlantes_4Pots.ino b/buzzer/stereo_2pots_2spkr/stereo_2pots_2spkr.ino similarity index 100% rename from Buzzer/2Parlantes_4Pots/2Parlantes_4Pots.ino rename to buzzer/stereo_2pots_2spkr/stereo_2pots_2spkr.ino diff --git a/grblUpload/README.md b/grblUpload/README.md new file mode 100644 index 0000000..e69de29 diff --git a/LCD/Autoscroll/Autoscroll.ino b/lcd/Autoscroll/Autoscroll.ino similarity index 100% rename from LCD/Autoscroll/Autoscroll.ino rename to lcd/Autoscroll/Autoscroll.ino diff --git a/LCD/ContadorLopps_X10/ContadorLopps_X10.ino b/lcd/ContadorLopps_X10/ContadorLopps_X10.ino similarity index 100% rename from LCD/ContadorLopps_X10/ContadorLopps_X10.ino rename to lcd/ContadorLopps_X10/ContadorLopps_X10.ino diff --git a/LCD/Custom-Character/Custom-Character.ino b/lcd/Custom-Character/Custom-Character.ino similarity index 100% rename from LCD/Custom-Character/Custom-Character.ino rename to lcd/Custom-Character/Custom-Character.ino diff --git a/LCD/LCD-8-bits-metodo/LCD-8-bits-metodo.ino b/lcd/LCD-8-bits-metodo/LCD-8-bits-metodo.ino similarity index 100% rename from LCD/LCD-8-bits-metodo/LCD-8-bits-metodo.ino rename to lcd/LCD-8-bits-metodo/LCD-8-bits-metodo.ino diff --git a/LCD/i2c/i2c_Scanner/i2c_Scanner.ino b/lcd/i2c/i2c_Scanner/i2c_Scanner.ino similarity index 100% rename from LCD/i2c/i2c_Scanner/i2c_Scanner.ino rename to lcd/i2c/i2c_Scanner/i2c_Scanner.ino diff --git a/LCD/i2c/i2c_ok_20x4/i2c_ok_20x4.ino b/lcd/i2c/i2c_ok_20x4/i2c_ok_20x4.ino similarity index 100% rename from LCD/i2c/i2c_ok_20x4/i2c_ok_20x4.ino rename to lcd/i2c/i2c_ok_20x4/i2c_ok_20x4.ino diff --git a/LCD/marquesina-desplazandose-xd/marquesina-desplazandose-xd.ino b/lcd/marquesina-desplazandose-xd/marquesina-desplazandose-xd.ino similarity index 100% rename from LCD/marquesina-desplazandose-xd/marquesina-desplazandose-xd.ino rename to lcd/marquesina-desplazandose-xd/marquesina-desplazandose-xd.ino diff --git a/LEDs/Baliza_2Led_PWM/Baliza_2Led_PWM.ino b/leds/Baliza_2Led_PWM/Baliza_2Led_PWM.ino similarity index 100% rename from LEDs/Baliza_2Led_PWM/Baliza_2Led_PWM.ino rename to leds/Baliza_2Led_PWM/Baliza_2Led_PWM.ino diff --git a/LEDs/EncendidoProgresivoLed_PWM/EncendidoProgresivoLed_PWM.ino b/leds/EncendidoProgresivoLed_PWM/EncendidoProgresivoLed_PWM.ino similarity index 100% rename from LEDs/EncendidoProgresivoLed_PWM/EncendidoProgresivoLed_PWM.ino rename to leds/EncendidoProgresivoLed_PWM/EncendidoProgresivoLed_PWM.ino diff --git a/LEDs/PWM_x2/PWM_x2.ino b/leds/PWM_x2/PWM_x2.ino similarity index 100% rename from LEDs/PWM_x2/PWM_x2.ino rename to leds/PWM_x2/PWM_x2.ino diff --git a/LEDs/Potentiometro_blink_led/Potentiometro_blink_led.ino b/leds/Potentiometro_blink_led/Potentiometro_blink_led.ino similarity index 100% rename from LEDs/Potentiometro_blink_led/Potentiometro_blink_led.ino rename to leds/Potentiometro_blink_led/Potentiometro_blink_led.ino diff --git a/LEDs/RGBx2/RGBx2.ino b/leds/RGBx2/RGBx2.ino similarity index 100% rename from LEDs/RGBx2/RGBx2.ino rename to leds/RGBx2/RGBx2.ino diff --git a/LEDs/Semaforo/Semaforo.ino b/leds/Semaforo/Semaforo.ino similarity index 100% rename from LEDs/Semaforo/Semaforo.ino rename to leds/Semaforo/Semaforo.ino diff --git a/LEDs/scanner_party/scanner_party.ino b/leds/scanner_party/scanner_party.ino similarity index 100% rename from LEDs/scanner_party/scanner_party.ino rename to leds/scanner_party/scanner_party.ino diff --git a/LEDs/scanner_party_x3/scanner_party_x3.ino b/leds/scanner_party_x3/scanner_party_x3.ino similarity index 100% rename from LEDs/scanner_party_x3/scanner_party_x3.ino rename to leds/scanner_party_x3/scanner_party_x3.ino diff --git a/LEDs/test-ilumin/test-ilumin.ino b/leds/test-ilumin/test-ilumin.ino similarity index 100% rename from LEDs/test-ilumin/test-ilumin.ino rename to leds/test-ilumin/test-ilumin.ino diff --git a/LEDs/testSerial2Leds/testSerial2Leds.ino b/leds/testSerial2Leds/testSerial2Leds.ino similarity index 100% rename from LEDs/testSerial2Leds/testSerial2Leds.ino rename to leds/testSerial2Leds/testSerial2Leds.ino diff --git a/Matriz_8x8/Matriz_8x8.ino b/matriz8x8/matriz8x8.ino similarity index 100% rename from Matriz_8x8/Matriz_8x8.ino rename to matriz8x8/matriz8x8.ino diff --git a/motores/brushless/README.md b/motores/brushless/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Motores/Motores Brusless/ESC_Motor_Serial/ESC_Motor_Serial.ino b/motores/brushless/esc_serial/esc_serial.ino similarity index 100% rename from Motores/Motores Brusless/ESC_Motor_Serial/ESC_Motor_Serial.ino rename to motores/brushless/esc_serial/esc_serial.ino diff --git a/motores/dc/README.md b/motores/dc/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Motores/Motores DC/motor_9V_Bat_/motor_9V_Bat_.ino b/motores/dc/bateria9v/bateria9v.ino similarity index 100% rename from Motores/Motores DC/motor_9V_Bat_/motor_9V_Bat_.ino rename to motores/dc/bateria9v/bateria9v.ino diff --git a/Motores/Motores DC/Motor_L298N_Joystick/Motor_L298N_Joystick.ino b/motores/dc/l298n_joystick/l298n_joystick.ino similarity index 100% rename from Motores/Motores DC/Motor_L298N_Joystick/Motor_L298N_Joystick.ino rename to motores/dc/l298n_joystick/l298n_joystick.ino diff --git a/Motores/Motores DC/Motor-puente-H/Motor-puente-H.ino b/motores/dc/puente_H/puente_H.ino similarity index 100% rename from Motores/Motores DC/Motor-puente-H/Motor-puente-H.ino rename to motores/dc/puente_H/puente_H.ino diff --git a/Motores/Motores DC/Motor-ISR-pteH/Motor-ISR-pteH.ino b/motores/dc/puente_H_isr/puente_H_isr.ino similarity index 100% rename from Motores/Motores DC/Motor-ISR-pteH/Motor-ISR-pteH.ino rename to motores/dc/puente_H_isr/puente_H_isr.ino diff --git a/motores/pap/README.md b/motores/pap/README.md new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/motores/pap/README.md @@ -0,0 +1 @@ + diff --git a/Motores/Motores PaP/StepStick.png b/motores/pap/StepStick.png similarity index 100% rename from Motores/Motores PaP/StepStick.png rename to motores/pap/StepStick.png diff --git a/Motores/Motores PaP/Stepper Motor Control.ino b/motores/pap/control_pap/control_pap.ino similarity index 100% rename from Motores/Motores PaP/Stepper Motor Control.ino rename to motores/pap/control_pap/control_pap.ino diff --git a/Motores/Motores PaP/Stepper Motor Control_Adj Speed.ino b/motores/pap/control_pap_ajuste_veloc/control_pap_ajuste_veloc.ino similarity index 100% rename from Motores/Motores PaP/Stepper Motor Control_Adj Speed.ino rename to motores/pap/control_pap_ajuste_veloc/control_pap_ajuste_veloc.ino diff --git a/Motores/Motores PaP/MotorPaP/MotorPaP.ino b/motores/pap/paso_a_paso/paso_a_paso.ino similarity index 100% rename from Motores/Motores PaP/MotorPaP/MotorPaP.ino rename to motores/pap/paso_a_paso/paso_a_paso.ino diff --git a/Motores/Motores PaP/step5vDEMO/step5vDEMO.ino b/motores/pap/step_5v/step_5v.ino similarity index 100% rename from Motores/Motores PaP/step5vDEMO/step5vDEMO.ino rename to motores/pap/step_5v/step_5v.ino diff --git a/Motores/Motores PaP/stepper_key_pagina/stepper_key_pagina.ino b/motores/pap/stepper_keystudio/stepper_keystudio.ino similarity index 100% rename from Motores/Motores PaP/stepper_key_pagina/stepper_key_pagina.ino rename to motores/pap/stepper_keystudio/stepper_keystudio.ino diff --git a/motores/servo/README.md b/motores/servo/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Motores/Motores Servo/Servo-Joystick/Servo-Joystick.ino b/motores/servo/servo_joystick/servo_joystick.ino similarity index 100% rename from Motores/Motores Servo/Servo-Joystick/Servo-Joystick.ino rename to motores/servo/servo_joystick/servo_joystick.ino diff --git a/Motores/Motores Servo/mov-servo-led/mov-servo-led.ino b/motores/servo/servo_led/servo_led.ino similarity index 100% rename from Motores/Motores Servo/mov-servo-led/mov-servo-led.ino rename to motores/servo/servo_led/servo_led.ino diff --git a/Motores/Motores Servo/Servo-termo/Servo-termo.ino b/motores/servo/servo_termo/servo_termo.ino similarity index 100% rename from Motores/Motores Servo/Servo-termo/Servo-termo.ino rename to motores/servo/servo_termo/servo_termo.ino diff --git a/Motores/Motores Servo/2_servos_2_pot/2_servos_2_pot.ino b/motores/servo/servos_y_pots/servos_y_pots.ino similarity index 100% rename from Motores/Motores Servo/2_servos_2_pot/2_servos_2_pot.ino rename to motores/servo/servos_y_pots/servos_y_pots.ino diff --git a/PWM_pin9/PWM_pin9.ino b/pwm/pwm.ino similarity index 100% rename from PWM_pin9/PWM_pin9.ino rename to pwm/pwm.ino diff --git a/Sensores/DHT11-Temp-hum/DHT11-Temp-hum.ino b/sensores/DHT11-Temp-hum/DHT11-Temp-hum.ino similarity index 100% rename from Sensores/DHT11-Temp-hum/DHT11-Temp-hum.ino rename to sensores/DHT11-Temp-hum/DHT11-Temp-hum.ino diff --git a/Sensores/DHT11-Temp-hum/test/test.ino b/sensores/DHT11-Temp-hum/test/test.ino similarity index 100% rename from Sensores/DHT11-Temp-hum/test/test.ino rename to sensores/DHT11-Temp-hum/test/test.ino diff --git a/Sensores/DHT21/DHT21.ino b/sensores/DHT21/DHT21.ino similarity index 100% rename from Sensores/DHT21/DHT21.ino rename to sensores/DHT21/DHT21.ino diff --git a/Sensores/Distancia-GP2Y0A21YK0F/Distancia-GP2Y0A21YK0F.ino b/sensores/Distancia-GP2Y0A21YK0F/Distancia-GP2Y0A21YK0F.ino similarity index 100% rename from Sensores/Distancia-GP2Y0A21YK0F/Distancia-GP2Y0A21YK0F.ino rename to sensores/Distancia-GP2Y0A21YK0F/Distancia-GP2Y0A21YK0F.ino diff --git a/Sensores/Distancia-HC-SR04/Distancia-HC-SR04.ino b/sensores/Distancia-HC-SR04/Distancia-HC-SR04.ino similarity index 100% rename from Sensores/Distancia-HC-SR04/Distancia-HC-SR04.ino rename to sensores/Distancia-HC-SR04/Distancia-HC-SR04.ino diff --git a/Sensores/HUMEDAD/humedad/humedad.ino b/sensores/HUMEDAD/humedad/humedad.ino similarity index 100% rename from Sensores/HUMEDAD/humedad/humedad.ino rename to sensores/HUMEDAD/humedad/humedad.ino diff --git a/Sensores/HUMEDAD/humedad_LCD/humedad_LCD.ino b/sensores/HUMEDAD/humedad_LCD/humedad_LCD.ino similarity index 100% rename from Sensores/HUMEDAD/humedad_LCD/humedad_LCD.ino rename to sensores/HUMEDAD/humedad_LCD/humedad_LCD.ino diff --git a/Sensores/IR/IR_-_Remote/IR_-_Remote.ino b/sensores/IR/IR_-_Remote/IR_-_Remote.ino similarity index 100% rename from Sensores/IR/IR_-_Remote/IR_-_Remote.ino rename to sensores/IR/IR_-_Remote/IR_-_Remote.ino diff --git a/Sensores/IR/IR_Lector_pagArd.cc.ino/IR_Lector_pagArd.cc.ino.ino b/sensores/IR/IR_Lector_pagArd.cc.ino/IR_Lector_pagArd.cc.ino.ino similarity index 100% rename from Sensores/IR/IR_Lector_pagArd.cc.ino/IR_Lector_pagArd.cc.ino.ino rename to sensores/IR/IR_Lector_pagArd.cc.ino/IR_Lector_pagArd.cc.ino.ino diff --git a/Sensores/IR/IR_lector/IR_lector.ino b/sensores/IR/IR_lector/IR_lector.ino similarity index 100% rename from Sensores/IR/IR_lector/IR_lector.ino rename to sensores/IR/IR_lector/IR_lector.ino diff --git a/Sensores/Sensor Proximidad/Sensor-Movimiento/Sensor-Movimiento.ino b/sensores/Sensor Proximidad/Sensor-Movimiento/Sensor-Movimiento.ino similarity index 100% rename from Sensores/Sensor Proximidad/Sensor-Movimiento/Sensor-Movimiento.ino rename to sensores/Sensor Proximidad/Sensor-Movimiento/Sensor-Movimiento.ino diff --git a/Sensores/Sensor Proximidad/Sensor-Movimiento2/Sensor-Movimiento2.ino b/sensores/Sensor Proximidad/Sensor-Movimiento2/Sensor-Movimiento2.ino similarity index 100% rename from Sensores/Sensor Proximidad/Sensor-Movimiento2/Sensor-Movimiento2.ino rename to sensores/Sensor Proximidad/Sensor-Movimiento2/Sensor-Movimiento2.ino diff --git a/Sensores/Sensor Proximidad/sensor_distancia/sensor_distancia.ino b/sensores/Sensor Proximidad/sensor_distancia/sensor_distancia.ino similarity index 100% rename from Sensores/Sensor Proximidad/sensor_distancia/sensor_distancia.ino rename to sensores/Sensor Proximidad/sensor_distancia/sensor_distancia.ino diff --git a/Comunicacion/ejemplo_JAVAduinoREAD/ejemplo_JAVAduinoREAD.ino b/serialCom/serialRX/serialRX.ino similarity index 100% rename from Comunicacion/ejemplo_JAVAduinoREAD/ejemplo_JAVAduinoREAD.ino rename to serialCom/serialRX/serialRX.ino diff --git a/Comunicacion/ejemplo_JAVArduinoTRANS/ejemplo_JAVArduinoTRANS.ino b/serialCom/serialTX/serialTX.ino similarity index 100% rename from Comunicacion/ejemplo_JAVArduinoTRANS/ejemplo_JAVArduinoTRANS.ino rename to serialCom/serialTX/serialTX.ino diff --git a/TEST/OK_DHT_LCD/OK_DHT_LCD.ino b/tests/OK_DHT_LCD/OK_DHT_LCD.ino similarity index 100% rename from TEST/OK_DHT_LCD/OK_DHT_LCD.ino rename to tests/OK_DHT_LCD/OK_DHT_LCD.ino diff --git a/TEST/OK_ESP01/OK_ESP01.ino b/tests/OK_ESP01/OK_ESP01.ino similarity index 100% rename from TEST/OK_ESP01/OK_ESP01.ino rename to tests/OK_ESP01/OK_ESP01.ino diff --git a/TEST/OK_ESP_php/OK_ESP_php.ino b/tests/OK_ESP_php/OK_ESP_php.ino similarity index 100% rename from TEST/OK_ESP_php/OK_ESP_php.ino rename to tests/OK_ESP_php/OK_ESP_php.ino diff --git a/TEST/OK_LCD-2004/OK_LCD-2004.ino b/tests/OK_LCD-2004/OK_LCD-2004.ino similarity index 100% rename from TEST/OK_LCD-2004/OK_LCD-2004.ino rename to tests/OK_LCD-2004/OK_LCD-2004.ino diff --git a/TEST/OK_Oled-0.91_Graphs/OK_Oled-0.91_Graphs.ino b/tests/OK_Oled-0.91_Graphs/OK_Oled-0.91_Graphs.ino similarity index 100% rename from TEST/OK_Oled-0.91_Graphs/OK_Oled-0.91_Graphs.ino rename to tests/OK_Oled-0.91_Graphs/OK_Oled-0.91_Graphs.ino diff --git a/TEST/OK_RTC/OK_RTC.ino b/tests/OK_RTC/OK_RTC.ino similarity index 100% rename from TEST/OK_RTC/OK_RTC.ino rename to tests/OK_RTC/OK_RTC.ino diff --git a/TEST/OK_RTC_DHT/OK_RTC_DHT.ino b/tests/OK_RTC_DHT/OK_RTC_DHT.ino similarity index 100% rename from TEST/OK_RTC_DHT/OK_RTC_DHT.ino rename to tests/OK_RTC_DHT/OK_RTC_DHT.ino diff --git a/TEST/OK_RTC_LCD/OK_RTC_LCD.ino b/tests/OK_RTC_LCD/OK_RTC_LCD.ino similarity index 100% rename from TEST/OK_RTC_LCD/OK_RTC_LCD.ino rename to tests/OK_RTC_LCD/OK_RTC_LCD.ino diff --git a/TEST/OK_RTC_SD_wr/OK_RTC_SD_wr.ino b/tests/OK_RTC_SD_wr/OK_RTC_SD_wr.ino similarity index 100% rename from TEST/OK_RTC_SD_wr/OK_RTC_SD_wr.ino rename to tests/OK_RTC_SD_wr/OK_RTC_SD_wr.ino diff --git a/TEST/OK_RTCx4_LCD/OK_RTCx4_LCD.ino b/tests/OK_RTCx4_LCD/OK_RTCx4_LCD.ino similarity index 100% rename from TEST/OK_RTCx4_LCD/OK_RTCx4_LCD.ino rename to tests/OK_RTCx4_LCD/OK_RTCx4_LCD.ino diff --git a/TEST/OK_Relay_x4/OK_Relay_x4.ino b/tests/OK_Relay_x4/OK_Relay_x4.ino similarity index 100% rename from TEST/OK_Relay_x4/OK_Relay_x4.ino rename to tests/OK_Relay_x4/OK_Relay_x4.ino diff --git a/TEST/OK_SD_rd_wr/OK_SD_rd_wr.ino b/tests/OK_SD_rd_wr/OK_SD_rd_wr.ino similarity index 100% rename from TEST/OK_SD_rd_wr/OK_SD_rd_wr.ino rename to tests/OK_SD_rd_wr/OK_SD_rd_wr.ino diff --git a/TEST/OK_Serial_Joystick_map/OK_Serial_Joystick_map.ino b/tests/OK_Serial_Joystick_map/OK_Serial_Joystick_map.ino similarity index 100% rename from TEST/OK_Serial_Joystick_map/OK_Serial_Joystick_map.ino rename to tests/OK_Serial_Joystick_map/OK_Serial_Joystick_map.ino diff --git a/TEST/TEST_ESP8266/TEST_ESP8266.ino b/tests/TEST_ESP8266/TEST_ESP8266.ino similarity index 100% rename from TEST/TEST_ESP8266/TEST_ESP8266.ino rename to tests/TEST_ESP8266/TEST_ESP8266.ino diff --git a/TEST/TEST_ESP_php/TEST_ESP_php.ino b/tests/TEST_ESP_php/TEST_ESP_php.ino similarity index 100% rename from TEST/TEST_ESP_php/TEST_ESP_php.ino rename to tests/TEST_ESP_php/TEST_ESP_php.ino diff --git a/TEST/TEST_Mega/TEST_Mega.ino b/tests/TEST_Mega/TEST_Mega.ino similarity index 100% rename from TEST/TEST_Mega/TEST_Mega.ino rename to tests/TEST_Mega/TEST_Mega.ino diff --git a/TEST/TEST_MegaESP_helloServer/TEST_MegaESP_helloServer.ino b/tests/TEST_MegaESP_helloServer/TEST_MegaESP_helloServer.ino similarity index 100% rename from TEST/TEST_MegaESP_helloServer/TEST_MegaESP_helloServer.ino rename to tests/TEST_MegaESP_helloServer/TEST_MegaESP_helloServer.ino diff --git a/TEST/TEST_SerialCom-1_datos_a_serie/TEST_SerialCom-1_datos_a_serie.ino b/tests/TEST_SerialCom-1_datos_a_serie/TEST_SerialCom-1_datos_a_serie.ino similarity index 100% rename from TEST/TEST_SerialCom-1_datos_a_serie/TEST_SerialCom-1_datos_a_serie.ino rename to tests/TEST_SerialCom-1_datos_a_serie/TEST_SerialCom-1_datos_a_serie.ino diff --git a/TEST/TEST_SerialCom-2_serie_a_datos/TEST_SerialCom-2_serie_a_datos.ino b/tests/TEST_SerialCom-2_serie_a_datos/TEST_SerialCom-2_serie_a_datos.ino similarity index 100% rename from TEST/TEST_SerialCom-2_serie_a_datos/TEST_SerialCom-2_serie_a_datos.ino rename to tests/TEST_SerialCom-2_serie_a_datos/TEST_SerialCom-2_serie_a_datos.ino diff --git a/TEST/TEST_UART_ESP01_helloServer/TEST_UART_ESP01_helloServer.ino b/tests/TEST_UART_ESP01_helloServer/TEST_UART_ESP01_helloServer.ino similarity index 100% rename from TEST/TEST_UART_ESP01_helloServer/TEST_UART_ESP01_helloServer.ino rename to tests/TEST_UART_ESP01_helloServer/TEST_UART_ESP01_helloServer.ino diff --git a/prueba_MOD/prueba_MOD.ino b/tests/prueba_mod/prueba_MOD.ino similarity index 100% rename from prueba_MOD/prueba_MOD.ino rename to tests/prueba_mod/prueba_MOD.ino