sensebox / React-Ardublockly

This repository contains the new senseBox learn- and programming environment powered by google Blockly and React
Apache License 2.0
2 stars 6 forks source link

[Blockly][Codegenerator] Implementation MPU6050 #250

Closed mariopesch closed 6 months ago

mariopesch commented 8 months ago

Problem

Fix Code for the MPU6050

Error Message

{"exit":"Command failed: 1: Uncaught Fatal Exception","process":"/tmp/52af81b066f2402930b06734227ce88f/sketch/sketch.ino: In function 'void setup()':\n/tmp/52af81b066f2402930b06734227ce88f/sketch/sketch.ino:15:22: error: no matching function for call to 'Adafruit_MPU6050::begin(int, TwoWire&)'\n mpu.begin(0x68, Wire1);\n ^\nIn file included from /tmp/52af81b066f2402930b06734227ce88f/sketch/sketch.ino:1:\n/root/Arduino/libraries/Adafruit_MPU6050/Adafruit_MPU6050.h:211:8: note: candidate: 'bool Adafruit_MPU6050::begin(uint8_t, TwoWire*, int32_t)'\n bool begin(uint8_t i2c_addr = MPU6050_I2CADDR_DEFAULT, TwoWire *wire = &Wire,\n ^~~~~\n/root/Arduino/libraries/Adafruit_MPU6050/Adafruit_MPU6050.h:211:8: note: no known conversion for argument 2 from 'TwoWire' to 'TwoWire*'\n/tmp/52af81b066f2402930b06734227ce88f/sketch/sketch.ino: In function 'void loop()':\n/tmp/52af81b066f2402930b06734227ce88f/sketch/sketch.ino:24:15: error: 'a' was not declared in this scope\n mpu.getEvent(&a, &g, &temp);\n ^\n/tmp/52af81b066f2402930b06734227ce88f/sketch/sketch.ino:24:19: error: 'g' was not declared in this scope\n mpu.getEvent(&a, &g, &temp);\n ^\n/tmp/52af81b066f2402930b06734227ce88f/sketch/sketch.ino:24:23: error: 'temp' was not declared in this scope\n mpu.getEvent(&a, &g, &temp);\n ^~~~\n/tmp/52af81b066f2402930b06734227ce88f/sketch/sketch.ino:24:23: note: suggested alternative: 'time'\n mpu.getEvent(&a, &g, &temp);\n ^~~~\n time\n\nError during build: exit status 1\n"}