B4R Question Modify program to eliminate inline C

Discussion in 'B4R Questions' started by Lakshmy, Apr 12, 2019.

  1. Lakshmy

    Lakshmy New Member


    I am trying to extract temperature from a thinxtra xkit shield connected to an arduino. Can anyone please help me to eliminate the inline C part in the below code.

    #Region Project Attributes
    #AutoFlushLogs: True
    #CheckArrayBounds: True
    #StackBufferSize: 300
    #End Region
    Sub Process_Globals

    Public Serial1 As Serial
    Private temperature As Float
    Private tmrTemperature As Timer

    End Sub
    Private Sub AppStart
    tmrTemperature.Initialize("tmrTemperature_Tick", 1000)
    tmrTemperature.Enabled = True
    End Sub
    private Sub tmrTemperature_Tick
    End Sub
    #if C
    #include <WISOL.h>
    #include <Tsensors.h>
    #include <Wire.h>
    #include <math.h>
    Isigfox *Isigfox = new WISOL();
    Tsensors *tSensors = new Tsensors();
    void Include(B4R::Object* o)
    b4r_main::_temperature = round(tSensors->getTemp() * 10) / 10.0;
    #End If
  2. Erel

    Erel Administrator Staff Member Licensed User

    Please use [code]code here...[/code] tags when posting code.

    You will not be able to remove the inline C without writing a wrapper for this library.
    Lakshmy likes this.
  3. Lakshmy

    Lakshmy New Member

    Thanks Erel.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice