KNoT Logo
  • Introduction
    • Why KNoT?
    • Features
      • Avoid reinventing the wheel
      • Open source
      • Distributed cloud
      • Semantic data model
      • Space-time data sharing
      • From prototype to product
    • Architecture
  • Quick Start Guide
    • Configuring the KNoT Gateway
      • Flashing the KNoT Gateway
      • Adding Gateway to KNoT Cloud
    • Thing’s Development Environment
    • Programming the KNoT Thing
      • Compiling project
      • Flashing board
    • Configuring the Thing network
    • See connected Things
    • Representing an Application on KNoT Cloud
    • Interacting with an Application through KNoT Cloud SDK
  • KNoT Cloud
    • Introduction
      • What is KNoT Cloud?
      • Features
        • Distributed Messaging
        • Data Storage
        • Incorporated Protocol
      • Architecture
    • Deploy
      • Installation and usage
        • Download
      • Development only preparation
        • Build and install CLI tool
      • Choose the stack
        • Development
        • Production
      • Initialize Swarm mode
      • Configure DNS
      • Deploy: stage 1
        • Configure services
        • Deploy
        • Verify
      • Deploy: stage 2 bootstrap
        • Deploy
        • Bootstrap
        • Tear down
      • Deploy: stage 2
        • Configure services
        • Configure mail service
        • Configure reset address
        • Deploy
        • Access
    • API Reference
      • WebSocket SDK
        • Quick Start
        • Methods
        • Events
      • Authenticator SDK
        • Quick Start
        • Methods
      • Storage SDK
        • Quick Start
        • Methods
  • KNoT Gateway
    • Hardware Architecture
    • Software Architecture
  • KNoT Thing
    • Requirements
      • Linux based OS
      • Zephyr
        • Update Your Operating System
        • Install Requirements and Dependencies
        • Install the Zephyr SDK
        • Set up the Zephyr Environment
      • nRF5x Command Line Tools and Segger JLink
      • Set up the KNoT SDK Environment
      • Add support to the KNoT command line interface
      • Add USB access to your user
      • Apply changes to profile
    • Using CLI
      • Set default target board
      • Set external OpenThread path
      • Clear project and building
      • Compile for your target board
      • Use an external DTS overlay file
      • Flash board when done
      • Flash bootloader
      • Other commands
    • Using Docker
      • Building image
      • Running the container
      • Compile for your target board
      • Flashing
        • Using nRF Connect
        • Using KNoT CLI on Linux
      • Using other knot commands
    • Create an Application
      • CMakeLists.txt
      • prj.conf
      • setup.conf
      • <board>.overlay (optional)
      • src/<app-name>.c
    • Samples
      • Basic Samples
        • blink
        • button
        • multisensor
        • plate
        • tank
        • thermo
        • toggle
      • Sensor Samples
        • analog-alert
        • digital-counter
    • API Reference
      • setup() & loop()
      • Data
      • knot_data_register()
      • knot_data_config()
      • knot_callback_t
    • Supported Boards
      • KNoT Dongle
        • Overview
        • Supported Features
        • Connections and IOs
        • Flash instructions
        • Suggested examples
      • KNoT DK
        • Overview
        • Supported Features
        • Connections and IOs
        • Flash instructions
        • Suggested examples
  • KNoT Setup App
    • Features
      • Device configuration
      • The device’s list
      • Find the gateways
      • Bluetooth Device
  • Source Code
    • KNoT Gateway
    • KNoT Thing
    • KNoT Cloud
    • KNoT Setup App
    • KNoT Hardware
  • Releases
  • Contact
KNoT
  • Docs »
  • KNoT Thing »
  • Samples »
  • Basic Samples »
  • blink

blink¶

Overview¶

The blink example uses the on-board LED 2 to blink every 2 seconds. The purpose of this sample is to show how to register an LED as a boolean sensor using the KNoT Zephyr SDK.


Building¶

This sample can be built for your board in two different ways.

  • Using the KNoT Zephyr SDK installed on your machine:

    Follow the steps described on KNoT CLI compile section.

  • Using the KNoT Docker:

    Follow the steps described on KNoT Docker compile section.


Flashing¶

Note

For specific board flash instructions please check on Supported Boards section.

This sample can be flashed to a board as follows:

  • Using the KNoT Zephyr SDK on your machine:

    Follow the steps described on KNoT CLI flash section.

  • Using the KNoT Docker:

    Follow the steps described on KNoT Docker flash section.


Configuring¶

After flashing, use the Android KNoT Setup App for configuring the Gateway credentials on your thing.

Next Previous

© Copyright 2019, CESAR