I am using the altSerial library on an Uno and I get an error when I try to write a zero.
altSerial.write (0)
or
altSerial.write (0x00)
Assigning a zero to a variable and then writing the variable works.
Writing any value other than zero also works.
Is this a bug in the altSerial library or am I missing something?
Sorry if this is a noob question but I am a noob
edit: ya, I guess the error message would be nice DOH!
Arduino: 1.6.5 (Linux), Board: "Arduino Uno"
IO_Expander_2.ino: In function 'void loop()':
IO_Expander_2:1479: error: call of overloaded 'write(int)' is ambiguous
IO_Expander_2.ino:1479:35: note: candidates are:
In file included from IO_Expander_2.ino:2:0:
/home/jim/Arduino/libraries/AltSoftSerial/AltSoftSerial.h:53:9: note: virtual size_t AltSoftSerial::write(uint8_t)
size_t write(uint8_t byte) { writeByte(byte); return 1; }
^
In file included from /home/jim/Arduino/hardware/arduino/avr/cores/arduino/Stream.h:26:0,
from /home/jim/Arduino/hardware/arduino/avr/cores/arduino/HardwareSerial.h:29,
from /home/jim/Arduino/hardware/arduino/avr/cores/arduino/Arduino.h:224,
from /home/jim/Arduino/libraries/AltSoftSerial/AltSoftSerial.h:30,
from IO_Expander_2.ino:2:
/home/jim/Arduino/hardware/arduino/avr/cores/arduino/Print.h:49:12: note: size_t Print::write(const char*)
size_t write(const char *str) {
^
call of overloaded 'write(int)' is ambiguous