Hello!
We are upping the complexity of the examples with today’s example using the Arduino WiFi shield. The Pioneer kit uses the WiFi shield to create a webserver with AJAX-like capabilities. If you connect to the kit using a web browser (PC or Phone) you will be able to control the LED brightness. You will be able to do this without reloading the web page.
- CY8CKit-042 BUY NOW!BUY NOW!
- Arduino WiFi Shield BUY NOW!BUY NOW!
Forum Post Attachments:
At the bottom of this post we are including the following items:
- Example Project Zip File
- Zip File of Images
- Project Schematic
- Component Configurations
Components Used:
The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:
- SPI
- PWM
- CyClock
- CyPin
The components are configured by right clicking on the component in your Top Design schematic view and selecting Configure. Please enable the following selections in the Configuration windows for the listed components above.
Firmware Description:
The main.c firmware is included in the example project. Please review the commented sections for more details.
In this example our code uses example code from the following web site:
Also for your reference take a look at the following Arduino WiFi shield web pages:
In our example the Pioneer kit controls the WiFi processor on the WiFi shield to connect to a wireless network. On the IP address we create a small web page that can send inputs to our Pioneer kit through the wireless shield. We then take those inputs to control LEDs on the Pioneer board.
In this example we have used a number of .c and .h files from the CooCox web page example. Please review those files and web page for more information on the communication process with the WiFi shield. These files are analogous to the RGB LED and tinyprintf modules we used in previous examples and should be used to give you easy access to predefined and developed APIs and routines for this specific shield.
Feel free to expand on this example to control more elements of your design. This gives you additional freedom over the XBee wireless examples described earlier in this series.
Hardware Connections:
For this example the user will need to populate the six pin J12 header. This header is located near the CapSense slider on the Pioneer board. The Arduino WiFi shield uses the 6 pin connector for the SPI communications with the WiFi processor. You will need to populate this header to use this shield board.
For more information on the 6 pin header and part number please reference the Pioneer Kit Bill of Materials (BOM) section of the User Guide.
Once the shield is connected power the board using the USB connector.
Test Your Project:
Once you have connected your hardware please power up your Pioneer kit. Then on a PC or wireless mobile device connect to the IP address of your device. The browser will display three sliders for the three LED colors. Either click and drag or use your finger on a touchscreen device to control the LEDs. For an example please see the youtube video below.
I hope this example can help you in your design.
Best,
Matt