Mostrando entradas de julio, 2014

Material density detection system used to create wet wipes with Arduino 2/2

Construction of the final prototype Components used The components used have been, per module: Density Bar 1 - Arduino Pro Mini 5v 4 - LDRs 4 - Resistors 1k 2 - PCB Terminal Blocks Communication bar 1 - Arduino Pro Mini 5v 1 - LM2596s DC-DC step down power supply module 2 - PCB Terminal Blocks 1 - Voltage regulator TIP220 1 - Heat Sink for TIP220 1 - Rectangular LED 6W 630lm 6500K COB 170 x 15 mm. Industruino 1 - Industruino PROTO kit 1 - Relay module Keyes_SR1 Arduino with screen 1 - Arduino UNO R3 1 - 16x2 Character LCD module with I2C 3 - Resistors 10k 2 - Resistors 220 1 - LED Red 1 - LED Green 3 - Buttons 1 - Relay module Keyes_SR1 Assembly of the circuit The Fritzing scheme is as follows: Density bar Circuit that manages the density bar This circuit is responsible for obtaining the measurements and send notifications to the communications bar for redirection. Communication bar Circuit that manages the c

Líneas mínimas a añadir al código del Industruino para usar las librerías m2tklib

Según mi experiencia creando menús y formularios dentro del Industruino usando las librerías m2tklib, el código mínimo a añadir a un fichero de código es el siguiente: Includes mínimos #include < U8glib.h > #include < M2tk.h > #include < utility/m2ghu8g.h > Declaración del tipo de pantalla Esta declaración se ha de descomentar, si ya está o añadir al código. U8GLIB_MINI12864 u8g(21, 20, 19, 22); Gestión de botones uint8_t uiKeyUpPin = 7; uint8_t uiKeyDownPin = 3; uint8_t uiKeySelectPin = 2; uint8_t uiKeyExitPin = 0; int adc_key_in = 0; int read_LCD_buttons_original() //routine to check button inputs and pass the correct button event to GUI { adc_key_in = analogRead(A5); // read the value from the sensor delay(5); //switch debounce delay. Increase this delay if incorrect switch selections are returned. if (adc_key_in < 100) return M2_KEY_NONE; // We make this the 1st option for speed reasons since it will be the most likely result if (a