A simple event-based PID controller