Example updated, use CButton to replace the CPin.