Page 1 of 1

C Code

Posted: Sun Feb 11, 2024 8:11 am
by Amrat
Dear All,

Can anyone give me example of C Code used in Flowcode ? I try use Blinking LED C Code to Blink LED on Pin 13 when debug run it say error. Anyone please explain
Thanks

Re: C Code

Posted: Sun Feb 11, 2024 8:22 am
by kersing
Please post your existing flowchart so we can see what you are trying and which controller you are using.

Re: C Code

Posted: Tue Feb 13, 2024 3:08 pm
by Amrat
Thanks

Here file attached

Re: C Code

Posted: Tue Feb 13, 2024 4:33 pm
by mnfisher
Hi Amrat,

Looks like you are trying to use Arduino IDE library code in Flowcode -and it's not going to work as is (would need to include the Arduino headers - but it might be a bit of a task)

For blinking an LED - just use a 'single digital pin' property (say LED) and a boolean variable (on) and then Loop - LED = on, on = !on delay(some) end loop

There are quite a few examples using C code dotted around. What are you trying to achieve - generally use FC - it's easier - and reserve C for a few more 'specialised' tasks.

Martin

Re: C Code

Posted: Wed Feb 14, 2024 3:27 pm
by Amrat
Dear Martin,

Yes for most program better to use FC in fact I am not good at C at all but I try use ChatGTP create blink for Arduino by C n I want to test try use C code in C Icon.

Thanks for explaining now I know to use C in C Icon is not that simple.

Thanks again
Amrat