Need help. Nextion. SOS.

We have a Board of Arduino. There is a code. There is a touch screen. You should print the readings from the sensor and buttons for relay.
To write code from scratch present practices, to alter other code goes.

When is the assignment due?
If it is real soon, you are going to have to give a lot more info than "There is a code. There is a touch screen".

Pete

Here is the code that works 50%:
#include <SoftwareSerial.h>
#include <Nextion.h>
#include “DHT.h”
#define SI !1
#define NO !0
#define DHTPIN 9
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
byte rele = {2,3,4,5,6,7,8};
const int ledPin = 13;
int i,a; int recv; int trxv;
String message;
const byte ReceivePin = 11;
const byte TransmtPin = 10;
SoftwareSerial nextion(ReceivePin,TransmtPin);
Nextion myNextion(nextion,9600);
boolean button1State = 0; boolean button2State = 0; boolean button3State = 0; boolean button4State = 0;
boolean button5State = 0; boolean button6State = 0; boolean button7State = 0; boolean button8State = 0;
void setup() {
Serial.begin(9600);
myNextion.init();
dht.begin();
pinMode(ledPin, OUTPUT);
for (i = 0; i < 8; i++)
{ pinMode((rele_),OUTPUT); digitalWrite((rele*),NO); }_
_
while (!Serial) {};}_
void loop() {
_
message = myNextion.listen();_
if (message !="") { Serial.println(message);}
if (message == “65 1 2 0 ffff ffff ffff”) {digitalWrite((rele[0]),button1State); button1State = !(button1State); }
if (message == “65 1 3 0 ffff ffff ffff”) {digitalWrite((rele[1]),button2State); button2State = !(button2State); }
if (message == “65 1 4 0 ffff ffff ffff”) {digitalWrite((rele[2]),button3State); button3State = !(button3State); }
if (message == “65 1 5 0 ffff ffff ffff”) {digitalWrite((rele[3]),button4State); button4State = !(button4State); }
if (message == “65 2 2 0 ffff ffff ffff”) {digitalWrite((rele[4]),button5State); button5State = !(button5State); }
if (message == “65 2 3 0 ffff ffff ffff”) {digitalWrite((rele[5]),button6State); button6State = !(button6State); }
if (message == “65 2 4 0 ffff ffff ffff”) {digitalWrite((rele[6]),button7State); button7State = !(button7State); }
if (message == “65 2 5 0 ffff ffff ffff”) {digitalWrite((rele[7]),button8State); button8State = !(button8State); }
_
float t = dht.readTemperature();_
_
myNextion.setComponentText(“t0”, String(t));_
_
}*_
It displays temperature, but the buttons don’t work for the relay.

You’ve got a lot of learning to do. You can start by reading this How to post code properly and fix up your code with code tags so that it is readable.

When is the assignment due?

Pete