You can start by copying and modifying the code from the documentation. If you have any questions, do not hesitate to ask me, cheers.