Skip to content

Arduino Robot: #include <Wire.h> not Compiling #1599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yeti5 opened this issue Sep 30, 2013 · 3 comments
Closed

Arduino Robot: #include <Wire.h> not Compiling #1599

yeti5 opened this issue Sep 30, 2013 · 3 comments
Labels
Board: Arduino Robot Applies only to the Arduino Robot Component: Core Related to the code for the standard Arduino API Type: Duplicate Another item already exists for this topic
Milestone

Comments

@yeti5
Copy link

yeti5 commented Sep 30, 2013

Including the libraries like:

# include <Wire.h>
# include <ArduinoRobot.h>

gives "Error compiling"

stating: " multiple definition of `TwoWire::TwoWire()' ".

If you delete the Folder "Wire" from "C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries" it is Compiling and running correct.
This Issue is present in IDE 1.05 and 1.54

@cmaglie
Copy link
Member

cmaglie commented Oct 9, 2013

The ArduinoRobot already include a variant of the Wire library optimized for the robot.

You should remove the #include <Wire.h> line from your sketch to avoid including the library twice (the one bundled in the ArduinoRobot lib and the real Wire lib).

C

@matthijskooijman
Copy link
Collaborator

@cmaglie, the problem is that if you don't include Wire.h in the main sketch, you can't actually use the Wire functions in the sketch.

Note that this is essentially a duplicate of #1709, which contains a bit more analysis. That issue talks about SPI instead of Wire, but the cause and effects of the problem are exactly the same.

@cmaglie
Copy link
Member

cmaglie commented Feb 21, 2014

Fixed in 1.5.6

@cmaglie cmaglie closed this as completed Feb 21, 2014
oriregev added a commit to oriregev/Arduino that referenced this issue Feb 27, 2014
* 'master' of https://github.com/arduino/Arduino:
  Corrected repeated 'less' in checkName's message
  Removed unused code, fixed indentation.
  Local (user installed) libraries have priority over system libraries
  Update README.md
  Added license for Client, IPAddressm and Server (master branch)
  Added license for Arduino.h, binary.h and main.cpp (master branch)
  Added some friendly messages for Arduino Robot include errors on old sketches
  Revert "Changed pins definition in variants from constants to #defines."
  Fixed issue arduino#1478, arduino#1599, arduino#1709, motors being opposite, updated turning algorithm
  If 2 libs have same .h file, use the lib with same dir name
  WiFi Shield examples: added the firmware version check
  Updated Listfiles SD example
  Rename README.mkdn to README.md
  Update and rename readme.txt to README.mkdn
  Update readme.txt
  Minor changes to Communication Examples
@cmaglie cmaglie removed the Waiting for feedback More information must be provided before we can proceed label Oct 18, 2016
@per1234 per1234 added the Type: Duplicate Another item already exists for this topic label Jul 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Board: Arduino Robot Applies only to the Arduino Robot Component: Core Related to the code for the standard Arduino API Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

No branches or pull requests

4 participants