Accessing the Examples
You can access all examples by cloning the official repository and using theanx run command. The examples repo contains the complete source code, a config.json template, and any required assets for each project.
Example Categories
Each example targets a specific area of the ANX SDK. Start with Blinky if this is your first time on the platform, then work your way through the categories that match your project needs.Blinky
The canonical first program for any hardware platform. Blink the onboard LED and confirm your toolchain is correctly set up.
Sensor Data
Read analog values over ADC and temperature/humidity data over I2C. Log readings to the serial monitor in real time.
Connectivity
Connect to Wi-Fi and publish sensor readings to an MQTT broker over TLS — the foundation for any cloud-connected IoT project.
More Examples
Additional examples are in active development. See the note below for what’s coming next.
Three more example categories are on the way and will be added to this library soon:
- BLE Beacon — Advertise custom BLE packets and scan for nearby devices using the ANX BLE stack.
- PWM Motor Control — Drive DC motors and servos using the hardware PWM peripheral.
- File System — Read and write files to the onboard flash file system using the ANX FS API.
Running Any Example
Every example in the library follows the same workflow. Use these steps as your starting point regardless of which example you choose to run.1
Get the example source
Clone the full repository or fetch only the example you need:
2
Edit config.json for your environment
Open the Examples that don’t require network access (such as Blinky) ship with a minimal
config.json file inside the example directory and fill in any environment-specific values such as Wi-Fi credentials, MQTT broker details, or pin assignments:config.json that needs no changes.3
Flash the application
Build and flash the example to your connected ANX dev module with one command:The CLI automatically detects the connected module over USB, compiles the application, and flashes the firmware image.
4
Open the serial monitor
Once the module resets after flashing, open the serial monitor to view log output and confirm the example is running:Press
Ctrl+C to exit the monitor at any time.