Now that your code is set up, let’s build the device itself. The first thing to do is make sure that your LaunchPad firmware is up to date, and that your board is appropriately configured to run a sketch from Energia. There are instructions on how to do that on the Energia website here.
Next, let’s attach the BoosterPack and moisture sensor to the LaunchPad. The pins of the BoosterPack align neatly with those on the CC3200, so attaching the two is fairly simple. Thanks to the modular connections built into the Grove Base BoosterPack and sensors, wiring up the moisture sensor is equally straightforward—we’ve chosen to attach it to the plug with pins 24 and 25.
Finally, we need to attach the motor. It’s a basic three wire interface; red should go to the 3.3V power supply on the board, black/brown to ground, and the third wire (it’s probably yellow or orange) should go to the pin you’re reading from. We’ve chosen P59 (note that on the CC3200, there are two connections to pin 59; use the one in the outer row of pins). Then, hook your motor up to your water tank so that when it turns, the valve opens; every individual arrangement will be different, but in the example we built, we simply taped the motor to the valve and positioned it over our plant.