varun332

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. varun332

    Pmod CMPS2

    Hi @jpeyron, I tried that and it still didn't work. I even downloaded version 2 of the code and that doesn't work either. These are all the errors I'm receiving: sketch/CMPS2.cpp: In member function ‘void CMPS2::removeOffset()’: sketch/CMPS2.cpp:63:48: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [enabled by default] temp = Wire.requestFrom(this->deviceID, 1); ^ In file included from sketch/CMPS2.h:4:0, from sketch/CMPS2.cpp:3: /Users/varunbhandari/Library/Arduino15/packages/Intel/hardware/arc32/2.0.4/libraries/Wire/src/Wire.h:44:10: note: candidate 1: uint8_t TwoWire::requestFrom(int, int) uint8_t requestFrom(int, int); ^ /Users/varunbhandari/Library/Arduino15/packages/Intel/hardware/arc32/2.0.4/libraries/Wire/src/Wire.h:42:10: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t) uint8_t requestFrom(uint8_t, uint8_t); ^ sketch/CMPS2.cpp:69:39: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [enabled by default] Wire.requestFrom(this->deviceID, 6); //request data from 6 registers ^ In file included from sketch/CMPS2.h:4:0, from sketch/CMPS2.cpp:3: /Users/varunbhandari/Library/Arduino15/packages/Intel/hardware/arc32/2.0.4/libraries/Wire/src/Wire.h:44:10: note: candidate 1: uint8_t TwoWire::requestFrom(int, int) uint8_t requestFrom(int, int); ^ /Users/varunbhandari/Library/Arduino15/packages/Intel/hardware/arc32/2.0.4/libraries/Wire/src/Wire.h:42:10: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t) uint8_t requestFrom(uint8_t, uint8_t); ^ sketch/CMPS2.cpp:97:48: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [enabled by default] temp = Wire.requestFrom(this->deviceID, 1); ^ In file included from sketch/CMPS2.h:4:0, from sketch/CMPS2.cpp:3: /Users/varunbhandari/Library/Arduino15/packages/Intel/hardware/arc32/2.0.4/libraries/Wire/src/Wire.h:44:10: note: candidate 1: uint8_t TwoWire::requestFrom(int, int) uint8_t requestFrom(int, int); ^ /Users/varunbhandari/Library/Arduino15/packages/Intel/hardware/arc32/2.0.4/libraries/Wire/src/Wire.h:42:10: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t) uint8_t requestFrom(uint8_t, uint8_t); ^ sketch/CMPS2.cpp:103:39: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [enabled by default] Wire.requestFrom(this->deviceID, 6); //request data from 6 registers ^ In file included from sketch/CMPS2.h:4:0, from sketch/CMPS2.cpp:3: /Users/varunbhandari/Library/Arduino15/packages/Intel/hardware/arc32/2.0.4/libraries/Wire/src/Wire.h:44:10: note: candidate 1: uint8_t TwoWire::requestFrom(int, int) uint8_t requestFrom(int, int); ^ /Users/varunbhandari/Library/Arduino15/packages/Intel/hardware/arc32/2.0.4/libraries/Wire/src/Wire.h:42:10: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t) uint8_t requestFrom(uint8_t, uint8_t); ^ sketch/CMPS2.cpp: In member function ‘int CMPS2::getMeasurement()’: sketch/CMPS2.cpp:148:46: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [enabled by default] temp = Wire.requestFrom(this->deviceID, 1); ^ In file included from sketch/CMPS2.h:4:0, from sketch/CMPS2.cpp:3: /Users/varunbhandari/Library/Arduino15/packages/Intel/hardware/arc32/2.0.4/libraries/Wire/src/Wire.h:44:10: note: candidate 1: uint8_t TwoWire::requestFrom(int, int) uint8_t requestFrom(int, int); ^ /Users/varunbhandari/Library/Arduino15/packages/Intel/hardware/arc32/2.0.4/libraries/Wire/src/Wire.h:42:10: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t) uint8_t requestFrom(uint8_t, uint8_t); ^ sketch/CMPS2.cpp:154:37: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [enabled by default] Wire.requestFrom(this->deviceID, 6); //request data from 6 registers ^ In file included from sketch/CMPS2.h:4:0, from sketch/CMPS2.cpp:3: /Users/varunbhandari/Library/Arduino15/packages/Intel/hardware/arc32/2.0.4/libraries/Wire/src/Wire.h:44:10: note: candidate 1: uint8_t TwoWire::requestFrom(int, int) uint8_t requestFrom(int, int); ^ /Users/varunbhandari/Library/Arduino15/packages/Intel/hardware/arc32/2.0.4/libraries/Wire/src/Wire.h:42:10: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t) uint8_t requestFrom(uint8_t, uint8_t); ^ /Users/varunbhandari/Desktop/Fourth Year 2017 - 2018/Second Semester/Capstone Design/CMPS2/CMPS2.ino: In function ‘void loop()’: /Users/varunbhandari/Desktop/Fourth Year 2017 - 2018/Second Semester/Capstone Design/CMPS2/CMPS2.ino:30:11: warning: array subscript is above array bounds [-Warray-bounds] numStr = '\0';
  2. varun332

    Pmod CMPS2

    Hi, I am working with the Pmod CMPS2 and an Arduino Uno to get an accurate reading of the direction a user is facing for a personal project. I am having trouble writing the code since the code on the website on Reference Materials is giving me a lot of errors. Is there any other code I can try?