ESP32-Cheap-Yellow-Display
ESP32-Cheap-Yellow-Display copied to clipboard
Use the Gyro inside the Nunchuck for TetrisWithNunchuck game control with your wrist
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 :-)