How to sample a analog data like sine wave and send to the cloud?

Welcome to the community.

Post what code you have and we can try and help.

Secondly - searching first is always a good thing - so if you search ubidots - this great thread is there which seems to do pretty much what you want ...