C Code

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Amrat
Posts: 26
http://meble-kuchenne.info.pl
Joined: Sun Jan 31, 2021 11:25 am

C Code

Post 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

kersing
Valued Contributor
Posts: 158
Joined: Wed Dec 02, 2020 7:28 pm
Has thanked: 66 times
Been thanked: 58 times

Re: C Code

Post by kersing »

Please post your existing flowchart so we can see what you are trying and which controller you are using.

Amrat
Posts: 26
Joined: Sun Jan 31, 2021 11:25 am

Re: C Code

Post by Amrat »

Thanks

Here file attached
Attachments
Test C Code.fcfx
(9 KiB) Downloaded 21 times

mnfisher
Valued Contributor
Posts: 963
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 511 times

Re: C Code

Post 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

Amrat
Posts: 26
Joined: Sun Jan 31, 2021 11:25 am

Re: C Code

Post 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

Post Reply