Forum >Replies by JackFerretti
userhead JackFerretti
Replies (3)
  • You Reply:

    Ok, I solved it.

    The problem was that in line 26 of the code: “#define Mics_I2C_ADDRESS ADDRESS_0”, the last ADDRESS_0 must be substituted literally by “0x75” which is the I2C address.

    The instructions are misleading for anyone that is not an expert… a simple comment would have been sufficient to make things more clear….like: “if the I2C address is ADDRESS_0, then substitute ADDRESS_0 with 0x75”….  

    Anyway, I hope this will help other people to solve similar problems.

  • You Reply:

    Hi, 

    thanks a lot for your answer.

     

    I've run I2Cscanner and it returned me this:

     

    --- Scan started ---I2C device found at address 0x75  !--- Scan finished ---

     

    So the address should be the ADDRESS_0 right?

     

    However, if I copy-paste the code from the wiki it always returns me an error at line 26 (even changing #define Mics_I2C_ADDRESS ADDRESS_3 with #define Mics_I2C_ADDRESS ADDRESS_0 and vice versa).

    The error is this:

     

    'ADDRESS_3' was not declared in this scope#define Mics_I2C_ADDRESS ADDRESS_3                         ^C:\Users\Jack_PC\OneDrive - unife.it\Documents\Arduino\nh3\nh3.ino:27:30: note: in expansion of macro 'Mics_I2C_ADDRESS'DFRobot_MICS_I2C mics(&Wire, Mics_I2C_ADDRESS);                             ^~~~~~~~~~~~~~~~C:\Users\Jack_PC\OneDrive - unife.it\Documents\Arduino\nh3\nh3.ino:26:26: note: suggested alternative: 'MICS_ADDRESS_3'#define Mics_I2C_ADDRESS ADDRESS_3                         ^C:\Users\Jack_PC\OneDrive - unife.it\Documents\Arduino\nh3\nh3.ino:27:30: note: in expansion of macro 'Mics_I2C_ADDRESS'DFRobot_MICS_I2C mics(&Wire, Mics_I2C_ADDRESS);                             ^~~~~~~~~~~~~~~~exit status 1'ADDRESS_3' was not declared in this scope 

     

     

  • You Reply: