There are two sensors built-in to WiThumb
- Temperature sensor: It is MCP9808 from Microchip
- Gyroscope and Accelerometer: It is MPU6050 from InvenSense
The program first initializes the serial port to 115200 baud. It is for printing messages for debug purposes.
Next, it initializes the temperature sensor and takes 10 readings from the sensor. If the average temperature is between 40 and 120 degree Fahrenheit, this part of the test passes.
In the 2nd part of the test, it reads the X, Y, Z orientation from the gyroscope. In order to pass this test, the user needs to rotate WiThumb in all 3 axes within the time limit.
Please refer to the GitHub page here for the full source code.