Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. class DATA{
  2. public:
  3. DATA(int A);
  4. void Sensor();
  5. }
  6.  
  7. DATA::DATA(int A){
  8. MPU6050 mpu(A);
  9. }
  10.  
  11. void Sensor(){
  12. mpu.setFullScaleAccelRange(3);
  13. // the problem is here, "mpu" object is not declared for this friend function
  14. }
  15.  
  16. int main(){
  17. DATA mpu1(0x68)
  18. /* I'm using two MPU6050 on I2C bus so I need to address them.
  19. this example contains only one MPU6050 object*/
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement