Get 2 BONUS GPIO Pins on the ESP-01!
The ESP-01 is a super cheap but quite powerful WiFi module which is perfect for adding internet control to an existing project or for small home automation projects. But a major disadvantage of this nifty little board is that it has only 2 GPIO pins. However, with this little trick, you can use the RX and TX pins as GPIOs, thus giving you two extra GPIO pins and 4 GPIOs in total.
Add one or both of the below lines to the void setup() of your Arduino sketch, followed by a pinMode() declaration for input/output. And voila, you have 4 GPIOs now!
A lot can be done with 4 pins, and I2C can be used if more are needed. More about that here.