Giter Club home page Giter Club logo

opcua-pubsub-esp32's Introduction

OPC UA Publisher on ESP32

It is aimed to compile OPC UA publisher on ESP32 board (xtensa toolchain). Published data is the ambient temperature, measured with a DHT-22 Sensor. You can see the sensor code at /components/DHT22.c lines 233 - 245.

  float ReadTemperature(int sensor_gpio){
    float temperatureFromSensor, error;
      int ret_ReadDHT = readDHT();
      if (ret_ReadDHT != DHT_OK){
      error = 100;
      return error;
    }
      else {
      setDHTgpio(4);
      temperatureFromSensor = getTemperature();
      return temperatureFromSensor;
    }
  }

Getting Started

It is required to have ESP-IDF (https://github.com/espressif/esp-idf) and this repo can be directly cloned under examples. Open62541 stack functionaliy is provided by open62541.c and open62541.h files. If you want to dive into OPC UA part you should check Open62541 project.

Also, if you want to build open62541.c/.h/.lib from source, beware of the changes on https://github.com/cmbahadir/opcua-pubsub-esp32/blob/master/components/open62541lib/README.md in order to be xtensa-toolchain compatible.

  • I haven't analyzed the required modifications on open62541.c/.h files, these are just a result of trial and error process, so an explanatory contribution would be great. :)

Prerequisites

License

This project is licensed under the Mozilla Public License Version 2.0 which is inherited from Open62541 project - see the LICENSE.md file for details

Caution

This code is written for experimental purposes.It is NOT suggested to use it on a real industrial application. Also ı do not claim any reponsibility for the consequences.

opcua-pubsub-esp32's People

Contributors

cmbahadir avatar ghsecuritylab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.