Launch Visual Studio, create a new project (File / New project ) of type “Gadgeteer”
Select the “FEZ Cerberus” mainboard with the .NET Micro Framework 4.3
The Gadgeteer designer should be displayed now
Open the Visual Studio Toolbox then search and add the modules we need: “Button”, “LED 7C”, “Ethernet ENC28”, “USB Client SP”
You should have 5 components that need to be connected together. Visual Studio will help you : Right-click on the design surface and use the “connect all modules” command.
You now have a clear plan for your object.
Plug the modules to the mainboard, following rigourosly the plan. You can use the numbers on the board to double check.
Your object should lokk like this one. Ready to load some code.
Open the “Program.cs” that Visual Studio automatically created with the Gadgeteer project.
You will have to type some code but with the help of “IntelliSense” it will be a real pleasure 😉
Create a variable to store the LED’s state.
Each time the device starts, the “ProgramStarted” method is called. We’ll ensure that the LED is switched off and respond to button interactions.
When the button is pressed (button_ButtonPressed) we invert the LED’s state and change its color accordingly.
We choose a green color here but feel free to express your own taste. The LED 7C got its name from the fact that it supports 7 colors
Congratulation, your objet is now functional. Connect USB module to your PC using the provided USB cable. Hit F5 in Visual Studio. The code will be deployed to the device and the device will reboot. If you click the button, the light should light on and off.
Your project should look like this.
Now let’s code the server side of the project.