Entradas

Mostrando entradas de septiembre, 2010

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

Imagen
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

Lectura de ficheros INI sin secciones con Inno Setup desde código (continuación)

Este post es una continuación del anterior y voy a añadir un nuevo método, el cual se encarga de comprobar si una etiqueta existe en el fichero. function ExisteEtiqueta (Etiqueta: String): Boolean; var     I:        LongInt;     L:        LongInt;     S:        String; begin     S := Etiqueta + '=';     L := Length (S);     For I := 0 to GetArrayLength (ConfigValues) - 1 do     begin         if (copy (ConfigValues [I], 1, L) = S) then         begin             Result := TRUE;             Exit;         end;     end;     Result := FALSE; end; Saludos.

Lectura de ficheros INI sin secciones con Inno Setup desde código

En este post voy a poner un código de ejemplo en el cual se parsea un fichero INI sin secciones (fichero INI estilo UNIX) desde el Inno Setup. Para esto hay que crear el código en la sección [Code] de este programa. [Code] var     ConfigValues:    TArrayOfString; function LeeFicheroConfiguracion (FileName: String): Boolean; begin     Result := LoadStringsFromFile (FileName, ConfigValues); end; function ObtieneValorEtiqueta (Etiqueta: String; var Value: String): Boolean; var     I:        LongInt;     L:        LongInt;     S:        String; begin     S := Etiqueta + '=';     L := Length (S);     For I := 0 to GetArrayLength (ConfigValues) - 1 do     begin         if (copy (ConfigValues [I], 1, L) = S) then         begin             Value := copy (ConfigValues [I], L + 1,                 Length (ConfigValues [I]) - L);             Result := TRUE;             Exit;         end;     end;     Result := FALSE; end; function EscribeValorEtiqueta (Etiq