A schematic diagram of a triboelectric sensor 1100 attached on a human arm 1101 is shown in Figure 11(a). Figure 11(b) shows a schematic of a sensor 1100 with L S coding, with all the grid lines (electrodes) being connected together to form a single grid structure electrode. As can be seen in Figure 11(b), the device 1100 includes a grid 1102 having eight directions, each direction being characterised by a different pattern of grid lines. Each pattern differs in number of grid lines, and widths of the respective grid lines, from each other pattern. The device 1100 may comprise only three thin layers, for example, an Ecoflex substrate, a patterned Al electrode 1102, and a polytetrafluoroethylene (PTFE) friction layer, similarly to device 200, providing a very compact device configuration. The Al electrode 1102 is buried between the substrate and the friction layer, with the exception of contact pad 1104 which is exposed to connect the electrode 1102 to an external circuit. With the L/S coding design, a large output peak is generated when sliding across a grid line with large width, and similarly, a small output peak is generated when sliding across a grid line with small width. Then the output peaks with relative large and small amplitude can be analysed to interpret the coding information on the electrodes. The operating principle of the single-electrode sensor 1100 with Lys coding is illustrated in the schematic of Figure 11(c), and is similar to the operating principle of the sensor 200 of Figures 5 and 6, except that the heights of the output peaks differ due to the relative widths of the grid lines of grid 1102. When finger F slides on the area of the first strip electrode (large), a large amount of positive charges in that electrode are forced to flow into ground due to the generation of an electric potential difference, resulting in a large positive peak in the external circuit. Next, when the finger F slides out of the area of the first strip electrode, a large amount of positive charge is forced to flow back to the electrode. Then a large negative peak is generated in the external circuit. Similarly, when finger F slides across (i.e., on and out of) the second strip electrode (small) and the third strip electrode (large), a small output peak and a large output peak are then generated correspondingly, as shown in Figure 11(c).