I have a similar project and my issue is when I m trying the write the send_meters to serial. The hex data {0x80, 0x01, 0x1C} is arriving to machine in a different format.
If I m sending 80 01 1C from Hercules using HEX it works on the machine.
Show your receiver codes. Is receiver another Arduino or a stand-alone machine? Does receiver expect ASCII codes instead of 'natural binary' being sent by Serial.Write(?
ArduProim:
I have a similar project and my issue is when I m trying the write the send_meters to serial. The hex data {0x80, 0x01, 0x1C} is arriving to machine in a different format.
Connect your device with a Software Serial Port of ESP having a RS232<--->TTL converter i between and then try these codes: (Keep RX/TX Port being connected only with Serial Monitor).
Note: We don't see (except a foreign character) in your following Hercules Receiver what you are receiving from the machine. Are you sending space character in between the bytes of 80 01 1C? Why are they not like 80011C?
Somebody recently posted the below SoftwareSerial function which apparently inverts for TTL/RS232 communication, assuming the RS232 device uses a 5v line voltage.
There is the following constructor with three arguments -- what is the actual meaning and implementation of the 3rd argument? Normally, we declare/define the first two arguments; in that case, what is the default value of the 3rd argument -- is it 0?
You do not need to know what gets stored for false, just use false
What does it matter if the value is 0, 123 or even -99 ? You should not rely on false being a particular value and don't need to as long as you compare it with true or false.
It most certainly is not stored as "false"
If you really are interested in the value of false then you could take the radical step of printing it
When I now look back to Reply #5 I realise I don't know how to interpret the pieces under the headings "Machine answer" and "Expected answer from machine must be:" Perhaps you can explain them in more detail.
I have never used anything other than "no parity" so I wonder if the SoftwareSerial even parity is being misunderstood. It would be nice to be able to compare a logic analyzer trace from your Hercules program and from the Arduino. What would happen if you set it for ODD parity ?
If there is anyone interested to help me with some paid consultation via skype I m open. I spent over one week and I didn't manage to communicate properly.
Thanks.
ArduProim:
If there is anyone interested to help me with some paid consultation via skype I m open. I spent over one week and I didn't manage to communicate properly.
Thanks.
You need to ask that in the Gigs and Collaborations section. Perhaps click Report to Moderator and ask to have the entire Thread moved there. I don't do paid work myself.
Hello, I'm looking to find someone to offer me paid consultation via skype in order to help me to fix this communication issue. Is someone interested?
Thanks.