hx711-begin

support/stm32avr-hx711/hx711-begin

No description
hx711-begin
@/hx711-begin
UPDpulse
pd_sckport
doutport
hx711-begin
END_PROCESS_1
ERR
UPD
pd_sck
dout
ERRpulse
END_PROCESS_1pulse
To use the node in your project you should have the support/stm32avr-hx711 library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

struct State {
};

{{ GENERATED_CODE }}


void evaluate(Context ctx) {
    //auto inValue = getValue<input_IN>(ctx);
    //emitValue<output_OUT>(ctx, inValue);
    
       
       
    if (!isInputDirty<input_UPD>(ctx))
    {   
        
       return;
    }
    
    const uint8_t PD_SCK = getValue<input_pd_sck>(ctx);
    const uint8_t DOUT = getValue<input_dout>(ctx);
    
    
    if ( (!isValidDigitalPort(PD_SCK)) || (!isValidDigitalPort(DOUT)) )
    {
        emitValue<output_ERR>(ctx, 1);
         
        return; 
    }

    pinMode(PD_SCK, OUTPUT);
	pinMode(DOUT, INPUT);
   
   emitValue<output_END_PROCESS_1>(ctx, 1);

    
}