5. Code Examples
This chapter demonstrates the functionality of CYW43907 devices using CYW943907AEVAL1F EVK code examples. The
code examples are already bundled with the SDK, which can be found in
<InstallationFolder>\ModusToolbox_1.0\libraries\wiced_base-1.0\examples\apps\snips.
Code examples can be compiled after creating the ModusToolbox project. Refer to
CYW943907AEVAL1F in
5.1 AWSIOTPubSub Project
This project demonstrates publishing a message to a Thing in the Amazon Web Services (AWS) cloud and subscribing to the
same messages. A Thing is a representation of a specific device or logical entity. For more information, refer to the
Documentation.
On
startup,
the
AWSIOTPubSub
/AWSIOTPubSub_mainapp/src/wifi_config_dct. file, connects to AWS, subscribes to the specified topic, and then alternately
tries to publish and subscribe messages.
The project consists of the following files:
▪
aws_app.c: This file contains the main application function application_start() which is the entry point and
execution of the firmware application. It also contains function definitions for initializing, publishing, and subscribing to
AWSaws_config.h: This file contains all the necessary macro definitions such as WICED_TOPIC and
WICED_MESSAGESTR.
▪
wifi_config_dct.h: This file contains the Wi-Fi access point credentials (SSID and pass phrase key) and soft AP
credentials. You should enter the client access point name and password credentials before building the application.
These are specified as CLIENT_AP_SSID and CLIENT_AP_PASSPHRASE. Note that the security type may also have
to be changed if the access point does not use WPA2 security. The Wi-Fi access point must have access to the internet
to connect with AWS.
5.1.1 Hardware Connections
No specific hardware connections are required for this project because all connections are hardwired on the
CYW943907AEVAL1F EVK.
CYW943907AEVAL1F Evaluation Kit User Guide, Doc. No. 002-18703 Rev. *B
for details on creating, building, and downloading projects.
code
example
Building and Programming a Project for
joins
a
Wi-Fi
access
AWS
point
specified
in
the
39
Need help?
Do you have a question about the CYW943907AEVAL1F and is the answer not in the manual?
Questions and answers