This forum isn’t a code factory. Most of the regulars here will help to point you in the right direction, but you’ll have to do most of the work.
There are a few Legacy examples here…
and here…
but these will need some modification to work with Blynk IoT, and presumably to meet your requirements (which you’ve not shared yet).
Pete.