ESP32-Cheap-Yellow-Display icon indicating copy to clipboard operation
ESP32-Cheap-Yellow-Display copied to clipboard

Use the Gyro inside the Nunchuck for TetrisWithNunchuck game control with your wrist

Open ReinerZ opened this issue 6 months ago • 0 comments

Inside TetrisWithNunchuck.ino after line 412 ... add

// Read the accelerometer (0-1023) int accelX = nchuk.accelX(); if (accelX > 600) joyX = 255; if (accelX < 400) joyX = 0; int accelY = nchuk.accelY(); if (accelY > 600) joyY = 255; if (accelY < 400) joyY = 0; // int accelZ = nchuk.accelZ(); not used ...

Now you can also control the Nunchuck with your wrist, have fun :-)

ReinerZ avatar Aug 17 '24 12:08 ReinerZ