freespace / SBWire

Modified Arduino Wire library which implements basic timeout.
GNU General Public License v2.0
7 stars 6 forks source link

SBWire not compatible with Real Time Clock code #3

Closed arjfca closed 4 years ago

arjfca commented 4 years ago

Hello

I did test SBWire with an I2C Scanner and it work flawlessly. Now I'm testing it with an I2C RTC (real time clock) module and the code won't compile. I'm quite green with Arduino and all stuff around it.

I did include a copy of both code and a copy of the error reported by the compiler

For both code, I only modified the #include for #include

Board Arduino Mega 2560

Code RTC (won't compile)

`#include <SBWire.h>
#include "RTClib.h"

RTC_DS1307 rtc;

char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};

void setup () 
{
  Serial.begin(9600);
  delay(3000); // wait for console opening

  if (! rtc.begin()) {
    Serial.println("Couldn't find RTC");
    while (1);
  }

  if (!rtc.isrunning()) {
    Serial.println("RTC lost power, lets set the time!");

  // Comment out below lines once you set the date & time.
    // Following line sets the RTC to the date & time this sketch was compiled
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));

    // Following line sets the RTC with an explicit date & time
    // for example to set January 27 2017 at 12:56 you would call:
    // rtc.adjust(DateTime(2017, 1, 27, 12, 56, 0));
  }
}

void loop () 
{
    DateTime now = rtc.now();

    Serial.println("Current Date & Time: ");
    Serial.print(now.year(), DEC);
    Serial.print('/');
    Serial.print(now.month(), DEC);
    Serial.print('/');
    Serial.print(now.day(), DEC);
    Serial.print(" (");
    Serial.print(daysOfTheWeek[now.dayOfTheWeek()]);
    Serial.print(") ");
    Serial.print(now.hour(), DEC);
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();

    Serial.println("Unix Time: ");
    Serial.print("elapsed ");
    Serial.print(now.unixtime());
    Serial.print(" seconds/");
    Serial.print(now.unixtime() / 86400L);
    Serial.println(" days since 1/1/1970");

    // calculate a date which is 7 days & 30 seconds into the future
    DateTime future (now + TimeSpan(7,0,0,30));

    Serial.println("Future Date & Time (Now + 7days & 30s): ");
    Serial.print(future.year(), DEC);
    Serial.print('/');
    Serial.print(future.month(), DEC);
    Serial.print('/');
    Serial.print(future.day(), DEC);
    Serial.print(' ');
    Serial.print(future.hour(), DEC);
    Serial.print(':');
    Serial.print(future.minute(), DEC);
    Serial.print(':');
    Serial.print(future.second(), DEC);
    Serial.println();

    Serial.println();
    delay(1000);
}`

Code scanner (Do compile) ` // -------------------------------------- //http://playground.arduino.cc/Main/I2cScanner // i2c_scanner // // Version 1 // This program (or code that looks like it) // can be found in many places. // For example on the Arduino.cc forum. // The original author is not know. // Version 2, Juni 2012, Using Arduino 1.0.1 // Adapted to be as simple as possible by Arduino.cc user Krodal // Version 3, Feb 26 2013 // V3 by louarnold // Version 4, March 3, 2013, Using Arduino 1.0.3 // by Arduino.cc user Krodal. // Changes by louarnold removed. // Scanning addresses changed from 0...127 to 1...119, // according to the i2c scanner by Nick Gammon // http://www.gammon.com.au/forum/?id=10896 // Version 5, March 28, 2013 // As version 4, but address scans now to 127. // A sensor seems to use address 120. // Version 6, November 27, 2015. // Added waiting for the Leonardo serial communication. // // // This sketch tests the standard 7-bit addresses // Devices with higher bit address might not be seen properly. // Watch Video explainign I2C address: https://www.youtube.com/watch?v=bqMMIbmYJS0 //

include

void setup() { Wire.begin();

Serial.begin(9600); while (!Serial); // Leonardo: wait for serial monitor Serial.println("I2C Scanner"); }

void loop() { byte error, address; int nDevices;

Serial.println("Scanning...");

nDevices = 0; for(address = 1; address < 127; address++ ) { // The i2c_scanner uses the return value of // the Write.endTransmisstion to see if // a device did acknowledge to the address. Wire.beginTransmission(address); error = Wire.endTransmission();

if (error == 0)
{
  Serial.print("I2C device found at address 0x");
  if (address<16)
    Serial.print("0");
  Serial.print(address,HEX);
  Serial.println("  !");

  nDevices++;
}
else if (error==4)
{
  Serial.print("Unknown error at address 0x");
  if (address<16)
    Serial.print("0");
  Serial.println(address,HEX);
}    

} if (nDevices == 0) Serial.println("No I2C devices found"); else Serial.println("done");

delay(5000); // wait 5 seconds for next scan } `

Copy of the error message

Arduino: 1.8.13 Hourly Build 2020/03/25 03:33 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

java.io.IOException: Accès refusé at java.io.WinNTFileSystem.createFileExclusively(Native Method) at java.io.File.createTempFile(File.java:2024) at processing.app.BaseNoGui.saveFile(BaseNoGui.java:886) at processing.app.SketchFile.save(SketchFile.java:287) at processing.app.Sketch.save(Sketch.java:138) at processing.app.SketchController.save(SketchController.java:352) at processing.app.Editor.handleSave2(Editor.java:1908) at processing.app.Editor.handleSave(Editor.java:1883) at processing.app.Editor.handleRun(Editor.java:1592) at processing.app.Editor.handleRun(Editor.java:1587) at processing.app.EditorToolbar.handleSelectionPressed(EditorToolbar.java:465) at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:448) at java.awt.Component.processMouseEvent(Component.java:6536) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4532) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Accès refusé

G:\Arduino\arduino-nightly\arduino-builder -dump-prefs -logger=machine -hardware G:\Arduino\arduino-nightly\hardware -hardware C:\Users\Utilisateur\AppData\Local\Arduino15\packages -tools G:\Arduino\arduino-nightly\tools-builder -tools G:\Arduino\arduino-nightly\hardware\tools\avr -tools C:\Users\Utilisateur\AppData\Local\Arduino15\packages -built-in-libraries G:\Arduino\arduino-nightly\libraries -libraries C:\Users\Utilisateur\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=1A86_7523 -ide-version=10813 -build-path g:\temp\arduino_build_568261 -warnings=none -build-cache g:\temp\arduino_cache_781909 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=G:\Arduino\arduino-nightly\hardware\tools\avr -verbose g:\temp\arduino_modified_sketch_829772\RTC_4.ino G:\Arduino\arduino-nightly\arduino-builder -compile -logger=machine -hardware G:\Arduino\arduino-nightly\hardware -hardware C:\Users\Utilisateur\AppData\Local\Arduino15\packages -tools G:\Arduino\arduino-nightly\tools-builder -tools G:\Arduino\arduino-nightly\hardware\tools\avr -tools C:\Users\Utilisateur\AppData\Local\Arduino15\packages -built-in-libraries G:\Arduino\arduino-nightly\libraries -libraries C:\Users\Utilisateur\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=1A86_7523 -ide-version=10813 -build-path g:\temp\arduino_build_568261 -warnings=none -build-cache g:\temp\arduino_cache_781909 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=G:\Arduino\arduino-nightly\hardware\tools\avr -verbose g:\temp\arduino_modified_sketch_829772\RTC_4.ino Using board 'mega' from platform in folder: G:\Arduino\arduino-nightly\hardware\arduino\avr Using core 'arduino' from platform in folder: G:\Arduino\arduino-nightly\hardware\arduino\avr Detecting libraries used... "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "g:\temp\arduino_build_568261\sketch\RTC_4.ino.cpp" -o nul Alternatives for SBWire.h: [SBWIRE-Master@1.0] ResolveLibrary(SBWire.h) -> candidates: [SBWIRE-Master@1.0] "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "g:\temp\arduino_build_568261\sketch\RTC_4.ino.cpp" -o nul Alternatives for RTClib.h: [RTClib@1.3.3 RTCLib_by_NeiroN@1.5.4] ResolveLibrary(RTClib.h) -> candidates: [RTClib@1.3.3 RTCLib_by_NeiroN@1.5.4] "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-IC:\Users\Utilisateur\Documents\Arduino\libraries\RTClib" "g:\temp\arduino_build_568261\sketch\RTC_4.ino.cpp" -o nul Using cached library dependencies for file: G:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src\SBWire.cpp Using cached library dependencies for file: G:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src\utility\twi.c Using cached library dependencies for file: C:\Users\Utilisateur\Documents\Arduino\libraries\RTClib\RTClib.cpp Alternatives for Wire.h: [Wire@1.0] ResolveLibrary(Wire.h) -> candidates: [Wire@1.0] Using cached library dependencies for file: G:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire\src\Wire.cpp Using cached library dependencies for file: G:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire\src\utility\twi.c Generating function prototypes... "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-IC:\Users\Utilisateur\Documents\Arduino\libraries\RTClib" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire\src" "g:\temp\arduino_build_568261\sketch\RTC_4.ino.cpp" -o "g:\temp\arduino_build_568261\preproc\ctags_target_for_gcc_minus_e.cpp" "G:\Arduino\arduino-nightly\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "g:\temp\arduino_build_568261\preproc\ctags_target_for_gcc_minus_e.cpp" Compiling sketch... "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-IC:\Users\Utilisateur\Documents\Arduino\libraries\RTClib" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire\src" "g:\temp\arduino_build_568261\sketch\RTC_4.ino.cpp" -o "g:\temp\arduino_build_568261\sketch\RTC_4.ino.cpp.o" Compiling libraries... Compiling library "SBWIRE-Master" Using previously compiled file: g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o Using previously compiled file: g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o Compiling library "RTClib" Using previously compiled file: g:\temp\arduino_build_568261\libraries\RTClib\RTClib.cpp.o Compiling library "Wire" Using previously compiled file: g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o Using previously compiled file: g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o Compiling core... Using precompiled core: g:\temp\arduino_cache_781909\core\core_arduino_avr_mega_cpu_atmega2560_67f481c3a5b3f22b3e6bf34f2c5baee4.a Linking everything together... "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections,--relax -mmcu=atmega2560 -o "g:\temp\arduino_build_568261/RTC_4.ino.elf" "g:\temp\arduino_build_568261\sketch\RTC_4.ino.cpp.o" "g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o" "g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o" "g:\temp\arduino_build_568261\libraries\RTClib\RTClib.cpp.o" "g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o" "g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o" "g:\temp\arduino_build_568261/..\arduino_cache_781909\core\core_arduino_avr_mega_cpu_atmega2560_67f481c3a5b3f22b3e6bf34f2c5baee4.a" "-Lg:\temp\arduino_build_568261" -lm g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::available()'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:/arduino/arduino-nightly/hardware/tools/avr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::rxBufferLength'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::rxBufferIndex'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::read()'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::rxBuffer'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::peek()'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::flush()'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::onReceiveService(unsigned char*, int)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::user_onReceive'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::onRequestService()'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::user_onRequest'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::txBufferIndex'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::txBufferLength'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `Wire'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::write(unsigned char)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::transmitting'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::txBuffer'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::write(unsigned char const*, unsigned int)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::TwoWire()'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::TwoWire()'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::begin()'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::begin(unsigned char)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::begin(int)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::end()'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::setClock(unsigned long)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::beginTransmission(unsigned char)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::txAddress'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::beginTransmission(int)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::endTransmission(unsigned char)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(unsigned char, unsigned char, unsigned long, unsigned char, unsigned char)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(unsigned char, unsigned char, unsigned char)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(unsigned char, unsigned char)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(int, int)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(int, int, int)'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::endTransmission()'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::onReceive(void (*)(int))'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::onRequest(void (*)())'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_init'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_disable'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_setAddress'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_setFrequency'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_readFrom'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_writeTo'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_transmit'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_attachSlaveRxEvent'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_attachSlaveTxEvent'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_reply'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_stop'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

Multiple libraries were found for "RTClib.h" g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

Used: C:\Users\Utilisateur\Documents\Arduino\libraries\RTClib (.text+0x0): multiple definition of `twi_releaseBus'

Not used: C:\Users\Utilisateur\Documents\Arduino\libraries\RTCLib_by_NeiroN g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_568261\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `__vector_39'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

Using library SBWIRE-Master at version 1.0 in folder: G:\Arduino\arduino-nightly\libraries\SBWIRE-Master Using library RTClib at version 1.3.3 in folder: C:\Users\Utilisateur\Documents\Arduino\libraries\RTClib Using library Wire at version 1.0 in folder: G:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire exit status 1 Error compiling for board Arduino Mega or Mega 2560.

freespace commented 4 years ago

@arjfca If I am reading the error correctly the issue is that the Arduino editor could not save the file:

java.io.IOException: Accès refusé
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(File.java:2024)
at processing.app.BaseNoGui.saveFile(BaseNoGui.java:886)
at processing.app.SketchFile.save(SketchFile.java:287)
at processing.app.Sketch.save(Sketch.java:138)

The issue is Arduino related not with SBWire. Try saving the file to a different place and try again.

arjfca commented 4 years ago

Wow!, Steve thanks for the fast reply I saved under a different path and got same error.   Is it possible that  one the two other libraries  Time.h and/or DS1307RTC.h also need Wire.h Wish you to stay safe through this crisis. Martin TheriaultMontreal, Canada

Le dimanche 19 avril 2020 10 h 29 min 21 s HAE, Steve Bian <notifications@github.com> a écrit :  

@arjfca If I am reading the error correctly the issue is that the Arduino editor could not save the file: java.io.IOException: Accès refusé at java.io.WinNTFileSystem.createFileExclusively(Native Method) at java.io.File.createTempFile(File.java:2024) at processing.app.BaseNoGui.saveFile(BaseNoGui.java:886) at processing.app.SketchFile.save(SketchFile.java:287) at processing.app.Sketch.save(Sketch.java:138)

The issue is Arduino related not with SBWire. Try saving the file to a different place and try again.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Arduino: 1.8.13 Hourly Build 2020/03/25 03:33 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

G:\Arduino\arduino-nightly\arduino-builder -dump-prefs -logger=machine -hardware G:\Arduino\arduino-nightly\hardware -hardware C:\Users\Utilisateur\AppData\Local\Arduino15\packages -tools G:\Arduino\arduino-nightly\tools-builder -tools G:\Arduino\arduino-nightly\hardware\tools\avr -tools C:\Users\Utilisateur\AppData\Local\Arduino15\packages -built-in-libraries G:\Arduino\arduino-nightly\libraries -libraries c:\Users\Utilisateur\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=1A86_7523 -ide-version=10813 -build-path g:\temp\arduino_build_222327 -warnings=none -build-cache g:\temp\arduino_cache_400792 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=G:\Arduino\arduino-nightly\hardware\tools\avr -verbose g:\temp\arduino_modified_sketch_986750\TimeRTCSet.ino G:\Arduino\arduino-nightly\arduino-builder -compile -logger=machine -hardware G:\Arduino\arduino-nightly\hardware -hardware C:\Users\Utilisateur\AppData\Local\Arduino15\packages -tools G:\Arduino\arduino-nightly\tools-builder -tools G:\Arduino\arduino-nightly\hardware\tools\avr -tools C:\Users\Utilisateur\AppData\Local\Arduino15\packages -built-in-libraries G:\Arduino\arduino-nightly\libraries -libraries c:\Users\Utilisateur\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=1A86_7523 -ide-version=10813 -build-path g:\temp\arduino_build_222327 -warnings=none -build-cache g:\temp\arduino_cache_400792 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=G:\Arduino\arduino-nightly\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=G:\Arduino\arduino-nightly\hardware\tools\avr -verbose g:\temp\arduino_modified_sketch_986750\TimeRTCSet.ino Using board 'mega' from platform in folder: G:\Arduino\arduino-nightly\hardware\arduino\avr Using core 'arduino' from platform in folder: G:\Arduino\arduino-nightly\hardware\arduino\avr Detecting libraries used... "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "g:\temp\arduino_build_222327\sketch\TimeRTCSet.ino.cpp" -o nul Alternatives for TimeLib.h: [Time@1.6] ResolveLibrary(TimeLib.h) -> candidates: [Time@1.6] "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "g:\temp\arduino_build_222327\sketch\TimeRTCSet.ino.cpp" -o nul Alternatives for SBWire.h: [SBWIRE-Master@1.0] ResolveLibrary(SBWire.h) -> candidates: [SBWIRE-Master@1.0] "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "g:\temp\arduino_build_222327\sketch\TimeRTCSet.ino.cpp" -o nul Alternatives for DS1307RTC.h: [DS1307RTC@1.4.1] ResolveLibrary(DS1307RTC.h) -> candidates: [DS1307RTC@1.4.1] "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC" "g:\temp\arduino_build_222327\sketch\TimeRTCSet.ino.cpp" -o nul "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC" "c:\Users\Utilisateur\Documents\Arduino\libraries\Time\DateStrings.cpp" -o nul "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC" "c:\Users\Utilisateur\Documents\Arduino\libraries\Time\Time.cpp" -o nul "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC" "G:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src\SBWire.cpp" -o nul "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC" "G:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src\utility\twi.c" -o nul "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC" "c:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC\DS1307RTC.cpp" -o nul Alternatives for Wire.h: [Wire@1.0] ResolveLibrary(Wire.h) -> candidates: [Wire@1.0] "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire\src" "c:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC\DS1307RTC.cpp" -o nul "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire\src" "G:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire\src\Wire.cpp" -o nul "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire\src" "G:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire\src\utility\twi.c" -o nul Generating function prototypes... "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire\src" "g:\temp\arduino_build_222327\sketch\TimeRTCSet.ino.cpp" -o "g:\temp\arduino_build_222327\preproc\ctags_target_for_gcc_minus_e.cpp" "G:\Arduino\arduino-nightly\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "g:\temp\arduino_build_222327\preproc\ctags_target_for_gcc_minus_e.cpp" Compiling sketch... "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire\src" "g:\temp\arduino_build_222327\sketch\TimeRTCSet.ino.cpp" -o "g:\temp\arduino_build_222327\sketch\TimeRTCSet.ino.cpp.o" Compiling libraries... Compiling library "Time" Using previously compiled file: g:\temp\arduino_build_222327\libraries\Time\DateStrings.cpp.o Using previously compiled file: g:\temp\arduino_build_222327\libraries\Time\Time.cpp.o Compiling library "SBWIRE-Master" "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire\src" "G:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src\SBWire.cpp" -o "g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o" "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\variants\mega" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\Time" "-IG:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src" "-Ic:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC" "-IG:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire\src" "G:\Arduino\arduino-nightly\libraries\SBWIRE-Master\src\utility\twi.c" -o "g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o" Compiling library "DS1307RTC" Using previously compiled file: g:\temp\arduino_build_222327\libraries\DS1307RTC\DS1307RTC.cpp.o Compiling library "Wire" Using previously compiled file: g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o Using previously compiled file: g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o Compiling core... Using precompiled core: g:\temp\arduino_cache_400792\core\core_arduino_avr_mega_cpu_atmega2560_67f481c3a5b3f22b3e6bf34f2c5baee4.a Linking everything together... "G:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections,--relax -mmcu=atmega2560 -o "g:\temp\arduino_build_222327/TimeRTCSet.ino.elf" "g:\temp\arduino_build_222327\sketch\TimeRTCSet.ino.cpp.o" "g:\temp\arduino_build_222327\libraries\Time\DateStrings.cpp.o" "g:\temp\arduino_build_222327\libraries\Time\Time.cpp.o" "g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o" "g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o" "g:\temp\arduino_build_222327\libraries\DS1307RTC\DS1307RTC.cpp.o" "g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o" "g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o" "g:\temp\arduino_build_222327/..\arduino_cache_400792\core\core_arduino_avr_mega_cpu_atmega2560_67f481c3a5b3f22b3e6bf34f2c5baee4.a" "-Lg:\temp\arduino_build_222327" -lm g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::available()'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:/arduino/arduino-nightly/hardware/tools/avr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::rxBufferLength'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::rxBufferIndex'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::read()'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::rxBuffer'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::peek()'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::flush()'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::onReceiveService(unsigned char*, int)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::user_onReceive'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::onRequestService()'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::user_onRequest'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::txBufferIndex'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::txBufferLength'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `Wire'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::write(unsigned char)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::transmitting'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::txBuffer'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::write(unsigned char const*, unsigned int)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::TwoWire()'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::TwoWire()'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::begin()'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::begin(unsigned char)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::begin(int)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::end()'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::setClock(unsigned long)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::beginTransmission(unsigned char)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::txAddress'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::beginTransmission(int)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::endTransmission(unsigned char)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(unsigned char, unsigned char, unsigned long, unsigned char, unsigned char)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(unsigned char, unsigned char, unsigned char)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(unsigned char, unsigned char)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(int, int)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(int, int, int)'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::endTransmission()'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::onReceive(void (*)(int))'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::onRequest(void (*)())'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_init'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_disable'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_setAddress'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_setFrequency'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_readFrom'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_writeTo'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_transmit'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_attachSlaveRxEvent'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_attachSlaveTxEvent'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_reply'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_stop'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `twi_releaseBus'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

g:\temp\arduino_build_222327\libraries\Wire\utility\twi.c.o (symbol from plugin): In function `twi_init':

(.text+0x0): multiple definition of `__vector_39'

g:\temp\arduino_build_222327\libraries\SBWIRE-Master\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

Using library Time at version 1.6 in folder: c:\Users\Utilisateur\Documents\Arduino\libraries\Time Using library SBWIRE-Master at version 1.0 in folder: G:\Arduino\arduino-nightly\libraries\SBWIRE-Master Using library DS1307RTC at version 1.4.1 in folder: c:\Users\Utilisateur\Documents\Arduino\libraries\DS1307RTC Using library Wire at version 1.0 in folder: G:\Arduino\arduino-nightly\hardware\arduino\avr\libraries\Wire exit status 1 Error compiling for board Arduino Mega or Mega 2560.

/*

include

include

include // a basic DS1307 library that returns time as a time_t

void setup() { Serial.begin(9600); while (!Serial) ; // Needed for Leonardo only setSyncProvider(RTC.get); // the function to get the time from the RTC if (timeStatus() != timeSet) Serial.println("Unable to sync with the RTC"); else Serial.println("RTC has set the system time");
}

void loop() { if (Serial.available()) { time_t t = processSyncMessage(); if (t != 0) { RTC.set(t); // set the RTC and the system time to the received value setTime(t);
} } digitalClockDisplay();
delay(1000); }

void digitalClockDisplay(){ // digital clock display of the time Serial.print(hour()); printDigits(minute()); printDigits(second()); Serial.print(" "); Serial.print(day()); Serial.print(" "); Serial.print(month()); Serial.print(" "); Serial.print(year()); Serial.println(); }

void printDigits(int digits){ // utility function for digital clock display: prints preceding colon and leading 0 Serial.print(":"); if(digits < 10) Serial.print('0'); Serial.print(digits); }

/ code to process time sync messages from the serial port /

define TIME_HEADER "T" // Header tag for serial time sync message

unsigned long processSyncMessage() { unsigned long pctime = 0L; const unsigned long DEFAULT_TIME = 1357041600; // Jan 1 2013

if(Serial.find(TIME_HEADER)) { pctime = Serial.parseInt(); return pctime; if( pctime < DEFAULT_TIME) { // check the value is a valid time (greater than Jan 1 2013) pctime = 0L; // return 0 to indicate that the time is not valid } } return pctime; }

freespace commented 4 years ago

@arjfca a further reading shows the problem is that the project is using both the standard Wire library AND SBWire.

g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::available()'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

Most likely reason is that another library you are using is using Wire.h. You need to edit those libraries to also use SBWire.h.

arjfca commented 4 years ago

Thank you Steve. That is what I had conclude to, but I don't have enough knowledge with the programming language to resolve that.  I will try to get some help and learn more at the same time Have a great day. Martin TheriaultMontreal, canada Le mardi 21 avril 2020 05 h 15 min 32 s HAE, Steve Bian notifications@github.com a écrit :

@arjfca a further reading shows the problem is that the project is using both the standard Wire library AND SBWire. g:\temp\arduino_build_568261\libraries\Wire\Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::available()'

g:\temp\arduino_build_568261\libraries\SBWIRE-Master\SBWire.cpp.o (symbol from plugin):(.text+0x0): first defined here

Most likely reason is that another library you are using is using Wire.h. You need to edit those libraries to also use SBWire.h.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

freespace commented 4 years ago

You should be able to find the library files on your computer and if you open them in a text editor and replace all reference to Wire.h to SBWire.h it should work.

arjfca commented 4 years ago

Hello Steve I did install a new RTC library that is not itself linked to Wire.Problem is resolved.

Many thanks and good luck to go trough this health crisis without problem. Martin Le mercredi 29 avril 2020 10 h 05 min 39 s HAE, Steve Bian notifications@github.com a écrit :

You should be able to find the library files on your computer and if you open them in a text editor and replace all reference to Wire.h to SBWire.h it should work.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

mjeveritt commented 4 years ago

Fixed in https://github.com/paynterf/RTClib/commit/8a86040113baef37357cf32c59e23c4ecee568c0

freespace commented 4 years ago

Thank you @mjeveritt @paynterf