I send data from arduino by method following. Configure the value : byte message[ ];
#include <SoftwareSerial.h>
#define RX 2
#define TX 3
int incomingByte = 0;
SoftwareSerial mySerial(RX, TX);
void setup()
{
pinMode(5, OUTPUT);
Serial.begin(9600);
mySerial.begin(9600);
}
void loop()
{
incomingByte = Serial.read();
if (incomingByte == 's')
{
digitalWrite(5, HIGH);
byte message[] = {0x01, 0x06, 0x00, 0x01, 0x02, 0x58, 0xD8, 0x90} ;
mySerial.write(message1, sizeof(message1));
}
}
It works. But I want to input from "Serial monitor" to set the temperature. It does not work when input from "Serial monitor".