kotaproj / -Hands-on_ElectronicWork

3 stars 0 forks source link

Hi kotaproj #1

Closed tribunskiysm closed 7 months ago

tribunskiysm commented 7 months ago

Hi kotaproj i need help)

I made it https://zenn.dev/kotaproj/articles/esp32_ledmat_fallingsand

but may pixel not move, process freezes on

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0030,len:1344 load:0x40078000,len:13964 load:0x40080400,len:3600 entry 0x400805f0 Initialize MPU6050

I usе this library https://github.com/witnessmenow/Arduino-MPU6050

I tried to change Arduino-MPU6050/MPU6050.cpp but I did not find such a function in the library:

// Read 8-bit from register uint8_t MPU6050::readRegister8(uint8_t reg) { uint8_t value;

Wire.beginTransmission(mpuAddress);
Wire.write(reg);
Wire.endTransmission();

Wire.beginTransmission(mpuAddress);
Wire.requestFrom(mpuAddress, 1);
while (!Wire.available())
{
};
value = Wire.read();
Wire.endTransmission();

return value;

}

In place of this there:

// Read 8-bit from register uint8_t MPU6050::readRegister8(uint8_t reg) { uint8_t value;

Wire.beginTransmission(mpuAddress);

if ARDUINO >= 100

Wire.write(reg);

else

Wire.send(reg);

endif

Wire.endTransmission();

Wire.beginTransmission(mpuAddress);
Wire.requestFrom(mpuAddress, 1);
while (!Wire.available())
{
};

if ARDUINO >= 100

value = Wire.read();

else

value = Wire.receive();

endif;

Wire.endTransmission();

return value;

}

need any help to run this beautiful sand game thanks

fallingSand.zip santrix bacboard

kotaproj commented 7 months ago

MPU6050.cpp and MPU6050.h running here are attached. Could you please put the two files in the same directory as fallingSand.ino and check them? The paths will be the same as the environment checked here, as those in the same directory will be given priority. mpu6050.zip

tribunskiysm commented 7 months ago

どうもありがとう! everything works amazing, my child is delighted)) incredibly beautiful fallingSand_ESP32_MPU6050.zip

https://github.com/kotaproj/-Hands-on_ElectronicWork/assets/77104683/56125422-99f0-45ba-8a86-ea067b1c2654

sand sand2 sand clock

kotaproj commented 7 months ago

I'm glad to see it resolved.