The concept should be the same even through the line, but I do not use WPI, I leave you in good hands, someone here in the threads will give you the right solution.
Il concetto dovrebbe essere lo stesso anche tramite riga, ma io non uso WPI, ti lascio in buone mani, qualcuno qui nel threads saprą darti la giusta soluzione.