You’re declaring data as a local variable in your void loop, so it’s not available in your myTimerEvent function. if you declare it at the top of your code it will be global, so available to any function. If you don’t understand the concept of variable scope then google it to find out more.
Also, you may find that having this code in your void loop:
could cause you problems with Blynk disconnections.
I didn’t say that you should move this line to the top of your code:
int data=hm10.read();
I said that you should declare the variable “data” at the top of your code and not re-declare it locally every time void loop runs.
I’d fix it for you. except that things are worse than I originally thought because you’re also re-declaring the same variable as a byte variable type later on in your void loop.
Google variable scope for Arduino and/or look at some of the coding examples in sketch builder so that you understand how to declare a global variable then re-use it art various places within your code without re-declaring it.
I realise why it’s there, but it may cause Blynk disconnection issues and you should be aware of that.