Add analog read function