Hi Peter I found a solution
I try to connect my arduino and shield to a serial COM3 and with another serial converter COM4, I monitor the COM4 and I show that the arduino send correctly the string!!!
This code work!
#include <SoftwareSerial.h>
//New serial port for my shield
SoftwareSerial Mx3232Serial = SoftwareSerial(7, 8);
//variabile
//char EchoChar = 'A';
char Str1[ ] = "s";
//String Str1 = " s";
//String Str1 = String(' s',HEX);
String Buffer; unsigned long T;
void setup() {
//pin7(RX) Input
pinMode(7, INPUT);
//pin8(TX) Output
pinMode(8, OUTPUT);
Mx3232Serial.begin(9600);
Serial.begin(9600);
}
void loop() {
//leggo dalla seriale(pin7)
//EchoChar = PortaSeriale.read();
//invio il dato letto
Mx3232Serial.print(Str1);
//Serial.println(Mx3232Serial.read());
Buffer = "";
T = millis();
while (millis() - T < 10) { // read all the chars on the serial
while (Mx3232Serial.available() > 0) {
Buffer += char(Mx3232Serial.read());
}
}
if (Buffer.length() > 0) { // transmit to Serial Monitor
Serial.print(Buffer);
}
delay(1000);
Serial.print(Str1);
}
Now the problem is, how to send the HEX 01 73 string to my weigher and receive the weight?
If with my serial monitor I send this HEX string it work, with arduino NO!
I try to send this
Mx3232Serial.print(0x01,HEX);
Mx3232Serial.print(0x73,HEX);
but dosen't work! Now my question is how to dend in HEX this string?
thanks
Fabio