Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DATA{
- public:
- DATA(int A);
- void Sensor();
- }
- DATA::DATA(int A){
- MPU6050 mpu(A);
- }
- void Sensor(){
- mpu.setFullScaleAccelRange(3);
- // the problem is here, "mpu" object is not declared for this friend function
- }
- int main(){
- DATA mpu1(0x68)
- /* I'm using two MPU6050 on I2C bus so I need to address them.
- this example contains only one MPU6050 object*/
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement