Cheapest microcontroller+wi-fi solution?

skimask:
Microcontroller - Irrelevant. They’re so cheap compared to the wifi module it won’t make much difference at all.

WiFi module - about the cheapest you’re going to get it one of the WiFly module at about $30.

Question is…can you write code for microcontroller X and build up a circuit to fit?

You didn’t understand me at all.

I was looking for a device like https://www.spark.io

But that one is too expensive…