I thought I’d write a guide about how to use virtual pins with app widgets such as buttons, to control physical devices such as relays, LEDs etc… Why use virtual pins anyway? I’d always recommend using virtual pins over physical pins when developing your code. There are a number of reasons, but here are what I consider to be the main ones: Virtual pins are hardware independent. This means that it’s far easier to port your code from one hardware platform to another in future (when you realise…