Show Posts
Pages: [1]
1  Development / Other Software Development / Re: serial.write(0x00); gives an error on: March 20, 2012, 06:25:40 pm
Thanks for the practical solution for my problem, for the theory behind it I have to start studying:
what I do not understand is that sending 0x01 (or other hex-values) does not give a problem (as being a hex-value for data) while 0x00 is not accepted as hex-data.
As PaulS stated ''The value 0x00 is not typed'', my (study)problem is then why is 0x01 ''typed''
or differently: if I have to declare 0x00 to be a byte ((byte)0x00),
why is it not necessary to have 0x01 also to be declared to be a byte ((byte)0x01).
I have just read the answer of PaulS on Professor Chaos: I have to admit it is above my knowledge-level.
Therefore again: thanks for the help.   Jan.
2  Development / Other Software Development / serial.write(0x00); gives an error on: March 19, 2012, 06:24:41 pm
In my programm I have to sent a byte 0x00 to a serial device, I do so with the command: Ser1.write(0x00);

However the upoad-button of Arduino 1.0 generates the error message:
call of overloaded 'write(int)' is ambigious
serialtest00.cpp: In function 'void setup()':
serialtest00:11: error: call of overloaded 'write(int)' is ambiguous
E:\arduino-1.0\libraries\SoftwareSerial/SoftwareSerial.h:92: note: candidates are: virtual size_t SoftwareSerial::write(uint8_t)
E:\arduino-1.0\hardware\arduino\cores\arduino/Print.h:49: note:                 size_t Print::write(const char*)

Because according to the Syntax of Serial.write(val), in which -val: a value to send as a single byte- , it should be possible
to sent the byte 00 ( or 0 or 0x00), I therefore think that there is a bug in this piece of software.

Can somebody help me out because I have to sent data (incuding 0x00) to my serial device.      Jan.
Pages: [1]