Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Examples

In this directory, you will find examples that guide you through building various firmware applications.

Before you start, read this page to ensure you are familiar with PlatformIO and have the correct IDE setup.

IDE Preparation

When using PlatformIO, no additional setup is required, and you don't need to install the Arduino IDE separately. This library can be used with the Arduino IDE, though it may be suboptimal.

image

Opening existing projects

  • If properly configured, the project should contain a platformio.ini file in its main directory.
  • To open a project, use the Open Folder option from the File menu.
  • Dependencies will be automatically installed, which may take some time.

Creating your first application

  1. Open PlatformIO UI.
  2. Click on New project, and select your ESP version. Then click Finish.

image

  1. Open the platformio.ini file:

image

  1. Add the following code and save the file:
# Define library dependencies.
lib_deps = 
	ksIotFrameworkLib=https://github.com/cziter15/ksIotFrameworkLib
  1. Platformio will download required dependencies. Please be patient as it may take some time.
  2. Now open main.cpp file and replace the code with the following listing and save the file.
#include <ksIotFrameworkLib.h>

class MyApplication : public ksf::ksApplication
{
  public:
    bool init() override 
    {
	return true;
    }
    bool loop() override 
    {
	return true;
    }
};

KSF_IMPLEMENT_APP_ROTATOR
(
	MyApplication
)
  1. Now you are able to build the application stub.

image

  1. Now all that's left to do is implement the components and logic of your device.

Examples

This application demonstrates how create most typical application stack. One ksApplication is responsible for device logic and the another is the application that is used to configure the device.