In this paper we describe a pen-based user interface for easy and natural user interaction with a wall projection display. VisualPen is a vision-based system for real-time detection and tracking of a pen that completely replaces mouse and keyboard. The low computational complexity of its algorithms renders it easy to implement with low-cost, low-power embedded hardware, thus allowing portability and integrability. The architecture of the system is described, and experimental results are presented and commented.