Skip to content
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

USIWire issue? #7

Closed
pawsnizzy opened this issue Feb 24, 2020 · 6 comments
Closed

USIWire issue? #7

pawsnizzy opened this issue Feb 24, 2020 · 6 comments

Comments

@pawsnizzy
Copy link

Hi,
I am intent on implementing this device on my RPi, but am getting the following errors in the Arduino IDE:

`In file included from C:\Users\Dave\Documents\Arduino\libraries\USIWire\src\USI_TWI_Master/USI_TWI_Master.h:76:0,

             from C:\Users\Dave\Documents\Arduino\libraries\USIWire\src\USIWire.cpp:27:

C:\Users\Dave\Documents\Arduino\libraries\USIWire\src\USI_TWI_Master/usi_io.h:1:1: error: expected unqualified-id before '.' token

../USI_TWI_Slave/usi_io.h

^

C:\Users\Dave\Documents\Arduino\libraries\USIWire\src\USIWire.cpp: In member function 'void USIWire::begin()':

C:\Users\Dave\Documents\Arduino\libraries\USIWire\src\USIWire.cpp:55:3: error: 'USI_TWI_Master_Initialise' was not declared in this scope

USI_TWI_Master_Initialise();

^~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\Dave\Documents\Arduino\libraries\USIWire\src\USIWire.cpp:55:3: note: suggested alternative: 'USI_TWI_Slave_Initialise'

USI_TWI_Master_Initialise();

^~~~~~~~~~~~~~~~~~~~~~~~~

USI_TWI_Slave_Initialise

Multiple libraries were found for "USIWire.h"
Used: C:\Users\Dave\Documents\Arduino\libraries\USIWire
Multiple libraries were found for "EEPROM.h"
Used: C:\Program
exit status 1
Error compiling for board ATtiny25/45/85.
`
Can you suggest where I went wrong - these error messages might as well be in greek:(

Thanks

@jbaumann
Copy link
Owner

jbaumann commented Feb 25, 2020 via email

@pawsnizzy
Copy link
Author

pawsnizzy commented Mar 15, 2020

No multiple libaries at all - I've even gone so far as to delete EVERY library except the 2 above - and it's still the same

@adrianmihalko
Copy link

I have same problem. Arduino 1.8.12. Without Usiwire library I get error about missing library (as expected)

In file included from /Users/adrianmihalko/Downloads/attiny_daemon-master/firmware/ATTinyDaemon/ATTinyDaemon.ino:1:0:
ATTinyDaemon.h:1:10: fatal error: USIWire.h: No such file or directory
 #include <USIWire.h>
          ^~~~~~~~~~~
compilation terminated.
exit status 1
USIWire.h: No such file or directory

Now, I install library as Sketch - Include Library - Add .ZIP Library and I choose USIWire-0.1.0.zip.

I click Very/Compile and I get the same error:

In file included from /Users/adrianmihalko/Documents/Arduino/libraries/USIWire-0.1.0/src/USI_TWI_Master/USI_TWI_Master.h:76:0,
                 from /Users/adrianmihalko/Documents/Arduino/libraries/USIWire-0.1.0/src/USIWire.cpp:27:
/Users/adrianmihalko/Documents/Arduino/libraries/USIWire-0.1.0/src/USI_TWI_Master/usi_io.h:1:1: error: expected unqualified-id before '.' token
 ../USI_TWI_Slave/usi_io.h
 ^
/Users/adrianmihalko/Documents/Arduino/libraries/USIWire-0.1.0/src/USIWire.cpp: In member function 'void USIWire::begin()':
/Users/adrianmihalko/Documents/Arduino/libraries/USIWire-0.1.0/src/USIWire.cpp:55:3: error: 'USI_TWI_Master_Initialise' was not declared in this scope
   USI_TWI_Master_Initialise();
   ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/adrianmihalko/Documents/Arduino/libraries/USIWire-0.1.0/src/USIWire.cpp:55:3: note: suggested alternative: 'USI_TWI_Slave_Initialise'
   USI_TWI_Master_Initialise();
   ^~~~~~~~~~~~~~~~~~~~~~~~~
   USI_TWI_Slave_Initialise
exit status 1
Error compiling for board ATtiny25/45/85.

@jbaumann
Copy link
Owner

Ok, I'm not sure how this happens, but if you use "Sketch - Include Library - Add .ZIP Library", then the file contains only the following: "../USI_TWI_Slave/usi_io.h". This is clearly wrong and two possible explanations are on the top of my mind:

  • The original author uses a symbolic link that is interpreted wrongly by the Arduino IDE when unpacking the files
  • The Zip-Archive knows that both files are the same and saves only a reference, which again is interpreted wrongly by the Arduino IDE
    In both case I would see the problem in the Arduino IDE.

Two simple possible fixes:

  • Copy the file from the TWI_Slave over to the TWI_Master
  • Remove the directory, unpack the library manually and copy it to your libraries folder

I suggest the second way as the general way to install libraries. This ensures that everything that goes wrong comes from your own errors.

@puuu
Copy link

puuu commented Mar 24, 2020

Hello, I am the original author of USIWire. Please note that I have released version 0.2.0, which no longer contains symbolic links. It is also back in the Arduino Library Manager.

PS: @jbaumann very amazing project! I had something like this in mind when developing USIWire. I will give it a try!

@adrianmihalko
Copy link

Thank you guys, release 0.2.0 solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants