8000 GitHub - joric/ts100tris at accelerometer
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

joric/ts100tris

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

ts100tris

This branch adds to Tetris accelerometer controls. Download precompiled firmware here.

Accelerometer

Stock 2.17 firmware has a bug with accelerometer (it only returns X values). Here's a fix:

@@ -170,8 +185,8 @@
                 gY_value.Byte.lo = value[3];
                 gZ_value.Byte.hi = value[4];
                 gZ_value.Byte.lo = value[5];
-                return 1;
             }
+            return 1;
         } else
             return 0;
     }

Mind that Update_X/Y/Z return unsigned values, so you also need a sign to determine left or right tilt:

int GetTilt_Y(void)
{
    return gY_value.Byte.hi>0x7f ? -1 : 1;
}

About

Tetris for TS100 soldering iron (and a few feature branches)

Resources

Stars

Watchers

Forks

Packages

No packages published
0