Understanding Sensor Emulation for YOGA Home App Development
By Jonas Hendrickx, LenovoDev Technical Expert
April 11, 2016
1Understanding sensors
Multi-mode,all-in-one computers like the YOGA Home 900 or convertibles like the X1 Tablet, Helix and YOGA series have various sensors, which allows the engineers at Lenovo to define various modes or presets that optimize the user experience for that particular mode. Such a mode is defined by constraints of sensor values that have to be in a specific range.
1.1Defining modes
This allows us to have a flat mode or table mode; in this mode, the YOGA Home 900 is laid completely flat and can be used to play board games. In this scenario, several people would sit around the Lenovo YOGA Home 900 and be able to follow and participate in the game.
Then we have stand mode with the YOGA Home series, which means that several users sit in front of the display. In this mode it’s considerably harder to have several users use the YOGA Home at the same time, so it would generally be better to take turns, also known as “hot seat mode.”
Both modes are great, but can also come with limitations, as we’ve shown above. Designing the app launcher Aura was a challenge at first, because, as you can see, it’s designed for flat mode being viewable in 360 degrees, but can make it difficult for a person to see the applications that are not correctly rotated to their position. The benefits arethat this allows us to have all users choose what application they want to open or what game they want to play, rather than putting a single person in charge.
1.2Using sensors actively
In addition to using the sensors to define different modes which optimize the end-user experience for different scenarios, sensors can also be used actively. For example, there are various racing games available already that allow you to steer using the acceleration sensor and the gyroscope. Whether the car steers left or right depends on the angle at which the user is holding their Windows tablet.
Obviously, we cannot employ this techniqueon the 22-pound. YOGA Home 900 due to its size and weight. But you could theoretically turn the YOGA Home into a dashboard to view statistics, or a split-screen display used in conjunction with your favorite smartphone or tablet as the gaming controller using the Lenovo Yoga Home Phygital - Device Collaboration Reference Design. It allows more people to play together or collaborate using a single YOGA Home 900.
If you are using the smartphone or tablet for latency-sensitive actions such as “whoever presses the button first wins,” you will need to take into account that there is a one to two minute delay on a local network with occasional delays and/or spikes. Also, not every device on the same network uses the same amount of time to send something over the network. 1.3 Sensor hardware implementation guidelines
The Windows API reports the X, Y and Z axes following the HTML5 and Android standards. Another name for this is the ENU system:
- X faces ‘East’
- Y faces virtual ‘North’
- Z faces ‘Up’
To discover the direction of the rotation, the “Right Hand Rule” is used. The thumb of your right hand is pointed in the direction of one of the axes, and the positive angle rotation around that axis will follow the curve of your fingers.
On the picture above, we can see the X, Y and Z axes for a tablet form-factor or PC on the left and a clamshell PC (like the Lenovo Yoga) on the right.
Read more about using sensors and new features on Windows 10 at Microsoft Blog.
Questions? Go to our thread on Lenovo Forums or email the Devpost Manager and put Multi-touch in the subject line.