Search found 6 matches

Return

by Benj
Mon Aug 06, 2018 12:27 pm
Jump to forum
Jump to topic

Re: Component for Hx711

Thanks to all on this, some great comments and suggestions there :D

I've now pushed the Hx711 component to the Flowcode v8 update system.

Any problems then please let me know.
by jgu1
Thu Aug 23, 2018 6:11 pm
Jump to forum
Jump to topic

Re: Component for Hx711

Hi again.

Ok, thought you have managed to get it run. I misunderstod. :wink:

Br .jorgen
by mnf
Thu Oct 25, 2018 6:08 pm
Jump to forum
Jump to topic

Re: IO pin as variable

Unfortunately (I think it would be a useful feature) - FC doesn't seem to support this directly. However it is pretty easy to implement a macro to do it for you: SetPortPin.fcfx Note that this is specific for AVR (328p) processors - with ports B, C and D - and would need to be tweaked for other MCUs...
by mnf
Thu Oct 25, 2018 8:23 pm
Jump to forum
Jump to topic

Re: IO pin as variable

The Input/Output blocks don't accept/use the variables - however using them in a calculation works perfectly.

Code: Select all

TXpin = .flag
.flag = TXpin


generates:

Code: Select all

   
    SET_PORT_PIN(B, 1, FCL_FLAG);
    FCL_FLAG = GET_PORT_PIN(B, 1);


(With TXpin set to port B1)

Martin
by Steve
Fri Oct 26, 2018 11:36 am
Jump to forum
Jump to topic

Re: IO pin as variable

Another thing you could do if you wanted to preserve the look of your flowchart is to use an input or output icon and customize the C code appropriately.
by Benj
Fri Oct 26, 2018 11:46 am
Jump to forum
Jump to topic

Re: IO pin as variable

For dynamic pins where you want easy configuration but fixed at compile time use a pin property and calculation icons. For dynamic pins where you need dynamic functionality on the embedded device use a function like Martin created. The I/O icons are not currently dynamic and will always target a fix...