Abdellazizhammami / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

Class Conflict between default classes and Wire Lbrary #743

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.#Include <Wire.h>
2. Place a call to Wire.write(xx) in loop function
3. Compiler returns error:

What is the expected output? What do you see instead?

7SEGClock.cpp: In function 'void loop()':
_7SEGClock:37: error: call of overloaded 'write(int)' is ambiguous
/Applications/Arduino.app/Contents/Resources/Java/libraries/Wire/Wire.h:55: 
note: candidates are: virtual size_t TwoWire::write(uint8_t)
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino
/Print.h:49: note:                 size_t Print::write(const char*)

What version of the Arduino software are you using? On what operating
system?  Which Arduino board are you using?

Using Arduino Version 1 running on Mac OS 10.6.8

The Arduino board is a Duemilanove

Please provide any additional information below.

Original issue reported on code.google.com by PVLopre...@gmail.com on 7 Dec 2011 at 4:34

GoogleCodeExporter commented 8 years ago
I see that this was reported earlier as Defect 527. The problem still exists, 
as of December 6, on the Mac version of Arduino 1.

Original comment by PVLopre...@gmail.com on 7 Dec 2011 at 4:56

GoogleCodeExporter commented 8 years ago
The fix will be in the next release of the software.

Original comment by dmel...@gmail.com on 7 Dec 2011 at 11:29

GoogleCodeExporter commented 8 years ago
Next release?  So is there a workaround we can use until then?

Original comment by sge...@gmail.com on 9 Dec 2011 at 2:37

GoogleCodeExporter commented 8 years ago
You can explicitly cast the number to a byte, e.g.: Wire.write(byte(0));

Original comment by dmel...@gmail.com on 9 Dec 2011 at 10:31