This guide of mine is old - Like 3 years old at the time of posting. I prefer to keep it up, but I don't think it very highly - It should still work though.
I might make a new one in the future.
I'm doing some alterations at least to make it more readable.
It doesn't teach why things are done very well is my primary issue with it.
Here we will find the position of a touch on the touchscreen.
It is very simple to do this.
## Getting the touch position
To find the touch position, we need to request the touchPosition type from the OS, and read from that.
We must first create a touchPosition like so:
```c
// Check for input
// ...
// Will contain the position of the touch
touchPosition touch;
// Will obtain that information
hidTouchRead(&touch);
// Exit program if START is pressed
// ...
```
Then, we must read from it like so:
The touch position is stored in our touchPosition as 'px' and 'py'.
## Printing the information to the screen
To print the position so we may see it, we should, instead of spamming the console with it, overwrite the X and Y position output by setting the position of the output first.
This would make it much easier to read, although we would need some whitespace after it to prevent anything getting printed without overwriting: