Commit b9050ff4 authored by Alisson Claudino's avatar Alisson Claudino
Browse files

Separação de classes em arquivos e config. serial na interface

parent ffbf973f
#include "HX711.h"
// HX711.DOUT - pin #A1
// HX711.PD_SCK - pin #A0
HX711 channelA(A1, A0,32); //Instancia um objeto da classe HX711 vinculado ao canal A
HX711 channelB(A1, A0,128); //Instancia um objeto da classe HX711 vinculado ao canal B
void setup() {
Serial.begin(115200); //Inicia a Serial com taxa de tranferência de 115200 bps
channelA.set_scale(); //Reseta a escala do canal A
channelA.tare(); //
channelB.set_scale(); //Reseta a escala do canal B
channelB.tare();
Serial.print("Primeira Leitura do Canal A: \t\t");
Serial.print(channelA.read()); // Primeira leitura do canal A
Serial.print("\n\n");
Serial.print("Primeira Leitura do Canal B: \t\t");
Serial.print(channelB.read()); // Primeira leitura do canal B
Serial.print("\n\n");
Serial.print("Primeira média do canal A (20): \t\t");
Serial.print(channelA.read_average(20)); // Imprime a média de 20 leituras do canal A
Serial.print("\n\n");
Serial.print("Primeira média do canal B (20): \t\t");
Serial.print(channelB.read_average(20)); // Imprime a média de 20 leituras do canal B
Serial.print("\n\n");
}
void loop() {
Serial.print("Leitura (Canal A):"); //Realiza uma leitura do canal A e imprime na serial
Serial.print(channelA.read());
Serial.print("\n\n");
delay(200);
Serial.print("Leitura (Canal B):"); //Realiza uma leitura do canal B e imprime na serial
Serial.print(channelB.read());
Serial.print("\n\n");
delay(500);
}
#include "HX711.h"
double a=0,b=0;
// HX711.DOUT - pin #A1
// HX711.PD_SCK - pin #A0
HX711 channelA(A1, A0,32); //Instancia um objeto da classe HX711 vinculado ao canal A
//HX711 channelB(A1, A0,128); //Instancia um objeto da classe HX711 vinculado ao canal B
void setup() {
Serial.begin(9600); //Inicia a Serial com taxa de tranferência de 115200 bps
channelA.set_scale(); //Reseta a escala do canal A
channelA.tare(); //
//channelB.set_scale(); //Reseta a escala do canal B
//channelB.tare();
//channelA.set_offset(0);
//channelB.set_offset(0);
Serial.print("Primeira Leitura do Canal A: \t\t");
Serial.print(channelA.read()); // Primeira leitura do canal A
Serial.print("\n\n");
/*Serial.print("Primeira Leitura do Canal B: \t\t");
Serial.print(channelB.read()); // Primeira leitura do canal B
Serial.print("\n\n");*/
/* Serial.print("Primeira média do canal A (20): \t\t");
Serial.print(channelA.read_average(20)); // Imprime a média de 20 leituras do canal A
Serial.print("\n\n");
Serial.print("Primeira média do canal B (20): \t\t");
Serial.print(channelB.read_average(20)); // Imprime a média de 20 leituras do canal B
Serial.print("\n\n");*/
}
void loop() {
//channelA.set_gain(128);
//Serial.print("\nLeitura (Canal A):"); //Realiza uma leitura do canal A e imprime na serial
a=channelA.read();
Serial.println(a);
while(!channelA.is_ready())
{}
/*if(a<b)
{Serial.print("\n\n");
Serial.print("ESSE:");
Serial.print(b);
Serial.print("\n\n");}*/
//while(millis()%100!=0);
//Serial.println(millis());
/*Serial.print(" ");
Serial.print(millis());
Serial.println();*/
//Serial.print("\n\n");
/*channelA.set_gain(32);
Serial.print("Leitura (Canal B):"); //Realiza uma leitura do canal B e imprime na serial
Serial.print(channelA.read_average(5));*/
/*Serial.print("\n\n");
a=analogRead(A3);
a=a*5/1023;
Serial.println(a);
Serial.println(channelA.get_scale());
//Serial.println(channelB.get_scale());
Serial.println(channelA.get_offset());
//Serial.println(channelB.get_offset());*/
/*channelA.power_down();
delay(500);
channelA.power_up();*/
}
#include <Arduino.h>
#include <HX711.h>
#if ARDUINO_VERSION <= 106
// "yield" is not implemented as noop in older Arduino Core releases, so let's define it.
// See also: https://stackoverflow.com/questions/34497758/what-is-the-secret-of-the-arduino-yieldfunction/34498165#34498165
void yield(void) {};
#endif
HX711::HX711(byte dout, byte pd_sck, byte gain) {
begin(dout, pd_sck, gain);
}
HX711::HX711() {
}
HX711::~HX711() {
}
void HX711::begin(byte dout, byte pd_sck, byte gain) {
PD_SCK = pd_sck;
DOUT = dout;
pinMode(PD_SCK, OUTPUT);
pinMode(DOUT, INPUT);
set_gain(gain);
}
bool HX711::is_ready() {
return digitalRead(DOUT) == LOW;
}
void HX711::set_gain(byte gain) {
switch (gain) {
case 128: // channel A, gain factor 128
GAIN = 1;
break;
case 64: // channel A, gain factor 64
GAIN = 3;
break;
case 32: // channel B, gain factor 32
GAIN = 2;
break;
}
digitalWrite(PD_SCK, LOW);
read();
}
long HX711::read() {
// wait for the chip to become ready
while (!is_ready()) {
// Will do nothing on Arduino but prevent resets of ESP8266 (Watchdog Issue)
yield();
}
unsigned long value = 0;
uint8_t data[3] = { 0 };
uint8_t filler = 0x00;
// pulse the clock pin 24 times to read the data
data[2] = shiftIn(DOUT, PD_SCK, MSBFIRST);
data[1] = shiftIn(DOUT, PD_SCK, MSBFIRST);
data[0] = shiftIn(DOUT, PD_SCK, MSBFIRST);
// set the channel and the gain factor for the next reading using the clock pin
for (unsigned int i = 0; i < GAIN; i++) {
digitalWrite(PD_SCK, HIGH);
digitalWrite(PD_SCK, LOW);
}
// Replicate the most significant bit to pad out a 32-bit signed integer
if (data[2] & 0x80) {
filler = 0xFF;
} else {
filler = 0x00;
}
// Construct a 32-bit signed integer
value = ( static_cast<unsigned long>(filler) << 24
| static_cast<unsigned long>(data[2]) << 16
| static_cast<unsigned long>(data[1]) << 8
| static_cast<unsigned long>(data[0]) );
return static_cast<long>(value);
}
long HX711::read_average(byte times) {
long sum = 0;
for (byte i = 0; i < times; i++) {
sum += read();
yield();
}
return sum / times;
}
double HX711::get_value(byte times) {
return read_average(times) - OFFSET;
}
float HX711::get_units(byte times) {
return get_value(times) / SCALE;
}
void HX711::tare(byte times) {
double sum = read_average(times);
set_offset(sum);
}
void HX711::set_scale(float scale) {
SCALE = scale;
}
float HX711::get_scale() {
return SCALE;
}
void HX711::set_offset(long offset) {
OFFSET = offset;
}
long HX711::get_offset() {
return OFFSET;
}
void HX711::power_down() {
digitalWrite(PD_SCK, LOW);
digitalWrite(PD_SCK, HIGH);
}
void HX711::power_up() {
digitalWrite(PD_SCK, LOW);
}
#ifndef HX711_h
#define HX711_h
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
class HX711
{
private:
byte PD_SCK; // Power Down and Serial Clock Input Pin
byte DOUT; // Serial Data Output Pin
byte GAIN; // amplification factor
long OFFSET = 0; // used for tare weight
float SCALE = 1; // used to return weight in grams, kg, ounces, whatever
public:
// define clock and data pin, channel, and gain factor
// channel selection is made by passing the appropriate gain: 128 or 64 for channel A, 32 for channel B
// gain: 128 or 64 for channel A; channel B works with 32 gain factor only
HX711(byte dout, byte pd_sck, byte gain = 128);
HX711();
virtual ~HX711();
// Allows to set the pins and gain later than in the constructor
void begin(byte dout, byte pd_sck, byte gain = 128);
// check if HX711 is ready
// from the datasheet: When output data is not ready for retrieval, digital output pin DOUT is high. Serial clock
// input PD_SCK should be low. When DOUT goes to low, it indicates data is ready for retrieval.
bool is_ready();
// set the gain factor; takes effect only after a call to read()
// channel A can be set for a 128 or 64 gain; channel B has a fixed 32 gain
// depending on the parameter, the channel is also set to either A or B
void set_gain(byte gain = 128);
// waits for the chip to be ready and returns a reading
long read();
// returns an average reading; times = how many times to read
long read_average(byte times = 10);
// returns (read_average() - OFFSET), that is the current value without the tare weight; times = how many readings to do
double get_value(byte times = 1);
// returns get_value() divided by SCALE, that is the raw value divided by a value obtained via calibration
// times = how many readings to do
float get_units(byte times = 1);
// set the OFFSET value for tare weight; times = how many times to read the tare value
void tare(byte times = 10);
// set the SCALE value; this value is used to convert the raw data to "human readable" data (measure units)
void set_scale(float scale = 1.f);
// get the current SCALE
float get_scale();
// set OFFSET, the value that's subtracted from the actual reading (tare weight)
void set_offset(long offset = 0);
// get the current OFFSET
long get_offset();
// puts the chip into power down mode
void power_down();
// wakes up the chip after power down mode
void power_up();
};
#endif /* HX711_h */
const int tensao = A0;
int sensorValue = 0;
void setup()
{
Serial.begin(9600);
}
void loop()
{
while(millis()%20!=0)
{}
sensorValue = analogRead(tensao);
Serial.print("\nSensor_1 :");
Serial.print(sensorValue);
Serial.print(",");
Serial.print(millis());
delay(1);
}
help:
@echo 'Help details:'
@echo 'hex: compile hex file'
@echo 'flash: install hex file'
@echo 'program: compile hex and install'
hex:
avr-gcc -Os -DF_CPU=16000000 -mmcu=atmega328p -c main.cpp
avr-gcc -DF_CPU=16000000 -mmcu=atmega328p -o main.elf main.o
avr-objcopy -O ihex main.elf main.hex
rm main.o
rm main.elf
flash:
avrdude -c arduino -p atmega328p -P /dev/ttyUSB0 -U flash:w:main.hex
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'Resources/CalibracaoP.ui' # Form implementation generated from reading ui file 'Resources/CalibracaoP.ui'
# #
# Created: Fri Nov 10 15:32:01 2017 # Created: Tue Nov 14 12:27:19 2017
# by: PyQt5 UI code generator 5.2.1 # by: PyQt5 UI code generator 5.2.1
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
...@@ -11,6 +11,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets ...@@ -11,6 +11,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object): class Ui_MainWindow(object):
def setupUi(self, MainWindow): def setupUi(self, MainWindow):
self.MainWindow=MainWindow
MainWindow.setObjectName("MainWindow") MainWindow.setObjectName("MainWindow")
MainWindow.resize(1366, 695) MainWindow.resize(1366, 695)
MainWindow.setMinimumSize(QtCore.QSize(817, 0)) MainWindow.setMinimumSize(QtCore.QSize(817, 0))
...@@ -41,9 +42,12 @@ class Ui_MainWindow(object): ...@@ -41,9 +42,12 @@ class Ui_MainWindow(object):
self.escalaBox.setObjectName("escalaBox") self.escalaBox.setObjectName("escalaBox")
self.forcaBox = QtWidgets.QGroupBox(self.escalaBox) self.forcaBox = QtWidgets.QGroupBox(self.escalaBox)
self.forcaBox.setGeometry(QtCore.QRect(10, 30, 181, 101)) self.forcaBox.setGeometry(QtCore.QRect(10, 30, 181, 101))
self.forcaBox.setStyleSheet("background-color:rgb(53, 53, 53)")
self.forcaBox.setObjectName("forcaBox") self.forcaBox.setObjectName("forcaBox")
self.f_max = QtWidgets.QLineEdit(self.forcaBox) self.f_max = QtWidgets.QLineEdit(self.forcaBox)
self.f_max.setGeometry(QtCore.QRect(80, 30, 61, 21)) self.f_max.setGeometry(QtCore.QRect(80, 30, 61, 21))
self.f_max.setStyleSheet("color:rgb(0,0,0);\n"
"background-color: rgb(158, 151, 151);")
self.f_max.setObjectName("f_max") self.f_max.setObjectName("f_max")
self.f_max_label = QtWidgets.QLabel(self.forcaBox) self.f_max_label = QtWidgets.QLabel(self.forcaBox)
self.f_max_label.setGeometry(QtCore.QRect(20, 30, 57, 21)) self.f_max_label.setGeometry(QtCore.QRect(20, 30, 57, 21))
...@@ -55,12 +59,17 @@ class Ui_MainWindow(object): ...@@ -55,12 +59,17 @@ class Ui_MainWindow(object):
self.f_min_label.setObjectName("f_min_label") self.f_min_label.setObjectName("f_min_label")
self.f_min = QtWidgets.QLineEdit(self.forcaBox) self.f_min = QtWidgets.QLineEdit(self.forcaBox)
self.f_min.setGeometry(QtCore.QRect(80, 60, 61, 21)) self.f_min.setGeometry(QtCore.QRect(80, 60, 61, 21))
self.f_min.setStyleSheet("color:rgb(0,0,0);\n"
"background-color: rgb(158, 151, 151);")
self.f_min.setObjectName("f_min") self.f_min.setObjectName("f_min")
self.pressaoBox = QtWidgets.QGroupBox(self.escalaBox) self.pressaoBox = QtWidgets.QGroupBox(self.escalaBox)
self.pressaoBox.setGeometry(QtCore.QRect(200, 30, 181, 101)) self.pressaoBox.setGeometry(QtCore.QRect(200, 30, 181, 101))
self.pressaoBox.setStyleSheet("background-color:rgb(53, 53, 53)")
self.pressaoBox.setObjectName("pressaoBox") self.pressaoBox.setObjectName("pressaoBox")
self.p_max = QtWidgets.QLineEdit(self.pressaoBox) self.p_max = QtWidgets.QLineEdit(self.pressaoBox)
self.p_max.setGeometry(QtCore.QRect(80, 30, 61, 21)) self.p_max.setGeometry(QtCore.QRect(80, 30, 61, 21))
self.p_max.setStyleSheet("color:rgb(0,0,0);\n"
"background-color: rgb(158, 151, 151);")
self.p_max.setObjectName("p_max") self.p_max.setObjectName("p_max")
self.p_max_label = QtWidgets.QLabel(self.pressaoBox) self.p_max_label = QtWidgets.QLabel(self.pressaoBox)
self.p_max_label.setGeometry(QtCore.QRect(20, 30, 57, 21)) self.p_max_label.setGeometry(QtCore.QRect(20, 30, 57, 21))
...@@ -72,26 +81,33 @@ class Ui_MainWindow(object): ...@@ -72,26 +81,33 @@ class Ui_MainWindow(object):
self.p_min_label.setObjectName("p_min_label") self.p_min_label.setObjectName("p_min_label")
self.p_min = QtWidgets.QLineEdit(self.pressaoBox) self.p_min = QtWidgets.QLineEdit(self.pressaoBox)
self.p_min.setGeometry(QtCore.QRect(80, 60, 61, 21)) self.p_min.setGeometry(QtCore.QRect(80, 60, 61, 21))
self.p_min.setStyleSheet("color:rgb(0,0,0);\n"
"background-color: rgb(158, 151, 151);")
self.p_min.setObjectName("p_min") self.p_min.setObjectName("p_min")
self.forcaBox_2 = QtWidgets.QGroupBox(self.escalaBox) self.tempoGBox = QtWidgets.QGroupBox(self.escalaBox)
self.forcaBox_2.setGeometry(QtCore.QRect(100, 140, 171, 81)) self.tempoGBox.setGeometry(QtCore.QRect(100, 140, 171, 81))
self.forcaBox_2.setObjectName("forcaBox_2") self.tempoGBox.setStyleSheet("background-color:rgb(53, 53, 53)")
self.f_max_2 = QtWidgets.QLineEdit(self.forcaBox_2) self.tempoGBox.setObjectName("tempoGBox")
self.f_max_2.setGeometry(QtCore.QRect(100, 30, 61, 21)) self.t_max = QtWidgets.QLineEdit(self.tempoGBox)
self.f_max_2.setObjectName("f_max_2") self.t_max.setGeometry(QtCore.QRect(100, 30, 61, 21))
self.f_max_label_2 = QtWidgets.QLabel(self.forcaBox_2) self.t_max.setStyleSheet("color:rgb(0,0,0);\n"
self.f_max_label_2.setGeometry(QtCore.QRect(10, 30, 81, 21)) "background-color: rgb(158, 151, 151);")
self.f_max_label_2.setStyleSheet("border: rgb(255,255,255)") self.t_max.setObjectName("t_max")
self.f_max_label_2.setObjectName("f_max_label_2") self.t_max_label = QtWidgets.QLabel(self.tempoGBox)
self.t_max_label.setGeometry(QtCore.QRect(10, 30, 81, 21))
self.t_max_label.setStyleSheet("border: rgb(255,255,255)")
self.t_max_label.setObjectName("t_max_label")
self.amostragemBox = QtWidgets.QGroupBox(self.centralWidget) self.amostragemBox = QtWidgets.QGroupBox(self.centralWidget)
self.amostragemBox.setGeometry(QtCore.QRect(20, 250, 181, 71)) self.amostragemBox.setGeometry(QtCore.QRect(20, 250, 181, 71))
self.amostragemBox.setStyleSheet("border:1px solid rgb(255, 83, 0);\n" self.amostragemBox.setStyleSheet("background-color:rgb(53, 53, 53);\n"
"border:1px solid rgb(255, 83, 0);\n"
"color: rgb(255,255,255);") "color: rgb(255,255,255);")
self.amostragemBox.setObjectName("amostragemBox") self.amostragemBox.setObjectName("amostragemBox")
self.amostragemCBox = QtWidgets.QComboBox(self.amostragemBox) self.amostragemCBox = QtWidgets.QComboBox(self.amostragemBox)
self.amostragemCBox.setGeometry(QtCore.QRect(50, 30, 101, 27)) self.amostragemCBox.setGeometry(QtCore.QRect(50, 30, 101, 27))
self.amostragemCBox.setStyleSheet("border-color: rgb(255,255,255);\n" self.amostragemCBox.setStyleSheet("border-color: rgb(0,0,0);\n"
"background-color: rgb(169, 169, 169);\n" "background-color: rgb(169, 169, 169);\n"
"\n"
"") "")
self.amostragemCBox.setObjectName("amostragemCBox") self.amostragemCBox.setObjectName("amostragemCBox")
self.amostragemCBox.addItem("") self.amostragemCBox.addItem("")
...@@ -109,40 +125,56 @@ class Ui_MainWindow(object): ...@@ -109,40 +125,56 @@ class Ui_MainWindow(object):
self.cronometroBox.setObjectName("cronometroBox") self.cronometroBox.setObjectName("cronometroBox")
self.timerOptionButton = QtWidgets.QPushButton(self.cronometroBox) self.timerOptionButton = QtWidgets.QPushButton(self.cronometroBox)
self.timerOptionButton.setGeometry(QtCore.QRect(140, 130, 61, 31)) self.timerOptionButton.setGeometry(QtCore.QRect(140, 130, 61, 31))
self.timerOptionButton.setStyleSheet("background-color:rgb(53, 53, 53)")
self.timerOptionButton.setObjectName("timerOptionButton") self.timerOptionButton.setObjectName("timerOptionButton")
self.initTimerButton = QtWidgets.QPushButton(self.cronometroBox) self.initTimerButton = QtWidgets.QPushButton(self.cronometroBox)
self.initTimerButton.setGeometry(QtCore.QRect(140, 30, 61, 31)) self.initTimerButton.setGeometry(QtCore.QRect(140, 30, 61, 31))
self.initTimerButton.setStyleSheet("background-color:rgb(53, 53, 53)")
self.initTimerButton.setObjectName("initTimerButton") self.initTimerButton.setObjectName("initTimerButton")
self.cronometroGBox = QtWidgets.QGroupBox(self.cronometroBox) self.cronometroGBox = QtWidgets.QGroupBox(self.cronometroBox)
self.cronometroGBox.setGeometry(QtCore.QRect(10, 30, 120, 131)) self.cronometroGBox.setGeometry(QtCore.QRect(10, 30, 120, 131))
self.cronometroGBox.setStyleSheet("background-color:rgb(53, 53, 53)")
self.cronometroGBox.setObjectName("cronometroGBox") self.cronometroGBox.setObjectName("cronometroGBox")
self.cronometroLabel = QtWidgets.QLabel(self.cronometroGBox) self.cronometroLabel = QtWidgets.QLabel(self.cronometroGBox)
self.cronometroLabel.setGeometry(QtCore.QRect(20, 60, 81, 31)) self.cronometroLabel.setGeometry(QtCore.QRect(20, 60, 81, 31))
self.cronometroLabel.setStyleSheet("background-color: rgb(158, 151, 151);\n"
"color:rgb(0, 0, 0);\n"
"font: 75 12pt \"Noto Serif\";")
self.cronometroLabel.setObjectName("cronometroLabel") self.cronometroLabel.setObjectName("cronometroLabel")
self.horaInicGBox = QtWidgets.QGroupBox(self.cronometroBox) self.horaInicGBox = QtWidgets.QGroupBox(self.cronometroBox)
self.horaInicGBox.setGeometry(QtCore.QRect(220, 10, 151, 71)) self.horaInicGBox.setGeometry(QtCore.QRect(220, 10, 151, 71))
self.horaInicGBox.setStyleSheet("background-color:rgb(53, 53, 53)")
self.horaInicGBox.setObjectName("horaInicGBox") self.horaInicGBox.setObjectName("horaInicGBox")
self.horaInicLabel = QtWidgets.QLabel(self.horaInicGBox) self.horaInicLabel = QtWidgets.QLabel(self.horaInicGBox)
self.horaInicLabel.setGeometry(QtCore.QRect(30, 30, 91, 31)) self.horaInicLabel.setGeometry(QtCore.QRect(30, 30, 91, 31))
self.horaInicLabel.setStyleSheet("font: 14pt \"Noto Serif\";") self.horaInicLabel.setStyleSheet("background-color: rgb(158, 151, 151);\n"
"color:rgb(0, 0, 0);\n"
"font: 14pt \"Noto Serif\";")
self.horaInicLabel.setObjectName("horaInicLabel") self.horaInicLabel.setObjectName("horaInicLabel")
self.horaAtualGBox = QtWidgets.QGroupBox(self.cronometroBox) self.horaAtualGBox = QtWidgets.QGroupBox(self.cronometroBox)
self.horaAtualGBox.setGeometry(QtCore.QRect(220, 90, 151, 71)) self.horaAtualGBox.setGeometry(QtCore.QRect(220, 90, 151, 71))
self.horaAtualGBox.setStyleSheet("background-color:rgb(53, 53, 53)")
self.horaAtualGBox.setObjectName("horaAtualGBox") self.horaAtualGBox.setObjectName("horaAtualGBox")
self.horaAtualLabel = QtWidgets.QLabel(self.horaAtualGBox) self.horaAtualLabel = QtWidgets.QLabel(self.horaAtualGBox)
self.horaAtualLabel.setGeometry(QtCore.QRect(30, 30, 91, 31)) self.horaAtualLabel.setGeometry(QtCore.QRect(30, 30, 91, 31))
self.horaAtualLabel.setStyleSheet("font: 14pt \"Noto Serif\";") self.horaAtualLabel.setStyleSheet("background-color: rgb(158, 151, 151);\n"
"color:rgb(0, 0, 0);\n"
"font: 14pt \"Noto Serif\";")
self.horaAtualLabel.setObjectName("horaAtualLabel") self.horaAtualLabel.setObjectName("horaAtualLabel")
self.stopTimerButton = QtWidgets.QPushButton(self.cronometroBox) self.stopTimerButton = QtWidgets.QPushButton(self.cronometroBox)
self.stopTimerButton.setGeometry(QtCore.QRect(140, 80, 61, 31)) self.stopTimerButton.setGeometry(QtCore.QRect(140, 80, 61, 31))
self.stopTimerButton.setStyleSheet("background-color:rgb(53, 53, 53)")
self.stopTimerButton.setObjectName("stopTimerButton") self.stopTimerButton.setObjectName("stopTimerButton")
self.prensaNameGBox = QtWidgets.QGroupBox(self.centralWidget) self.prensaNameGBox = QtWidgets.QGroupBox(self.centralWidget)
self.prensaNameGBox.setGeometry(QtCore.QRect(210, 250, 191, 71)) self.prensaNameGBox.setGeometry(QtCore.QRect(210, 250, 191, 71))
self.prensaNameGBox.setStyleSheet("border: 1px solid rgb(27, 144, 0);") self.prensaNameGBox.setStyleSheet("border: 1px solid rgb(27, 144, 0);\n"
"background-color:rgb(53, 53, 53)")
self.prensaNameGBox.setObjectName("prensaNameGBox") self.prensaNameGBox.setObjectName("prensaNameGBox")
self.prensaName = QtWidgets.QLineEdit(self.prensaNameGBox) self.prensaName = QtWidgets.QLineEdit(self.prensaNameGBox)
self.prensaName.setGeometry(QtCore.QRect(50, 20, 111, 31)) self.prensaName.setGeometry(QtCore.QRect(50, 20, 111, 31))
self.prensaName.setStyleSheet("font: 12pt \"Noto Serif\";") self.prensaName.setStyleSheet("font: 12pt \"Noto Serif\";\n"
"color:rgb(0,0,0);\n"
"background-color: rgb(158, 151, 151);")
self.prensaName.setObjectName("prensaName") self.prensaName.setObjectName("prensaName")
self.valAbsolGBox = QtWidgets.QGroupBox(self.centralWidget) self.valAbsolGBox = QtWidgets.QGroupBox(self.centralWidget)
self.valAbsolGBox.setGeometry(QtCore.QRect(20, 510, 381, 111)) self.valAbsolGBox.setGeometry(QtCore.QRect(20, 510, 381, 111))
...@@ -150,17 +182,23 @@ class Ui_MainWindow(object): ...@@ -150,17 +182,23 @@ class Ui_MainWindow(object):
self.valAbsolGBox.setObjectName("valAbsolGBox") self.valAbsolGBox.setObjectName("valAbsolGBox")
self.forcaGBox = QtWidgets.QGroupBox(self.valAbsolGBox) self.forcaGBox = QtWidgets.QGroupBox(self.valAbsolGBox)
self.forcaGBox.setGeometry(QtCore.QRect(20, 30, 161, 71)) self.forcaGBox.setGeometry(QtCore.QRect(20, 30, 161, 71))
self.forcaGBox.setStyleSheet("background-color:rgb(53, 53, 53)")
self.forcaGBox.setObjectName("forcaGBox") self.forcaGBox.setObjectName("forcaGBox")
self.forcaLabel = QtWidgets.QLabel(self.forcaGBox) self.forcaLabel = QtWidgets.QLabel(self.forcaGBox)
self.forcaLabel.setGeometry(QtCore.QRect(20, 30, 121, 31)) self.forcaLabel.setGeometry(QtCore.QRect(20, 30, 121, 31))
self.forcaLabel.setStyleSheet("font: 14pt \"Noto Serif\";") self.forcaLabel.setStyleSheet("background-color: rgb(158, 151, 151);\n"
"color:rgb(0, 0, 0);\n"
"font: 14pt \"Noto Serif\";")