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
C Code
-
- Valued Contributor
- Posts: 972
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 104 times
- Been thanked: 515 times
Re: C Code
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
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
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
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