Greetings FLOWCODE Forum,
As a FLOWCODE novice I am trying to perform the following using the Command Icons:
Arduino PORT------ Pins-------------- I/O Condition
PORTD--------- D2, D1, D0 ------------ inputs;
PORTD--------- D7, D6, D5, D4, D3 ---- Outputs.
I hope I have been able to illustrate my request.
Thanks to everyone for reading the above.
Best regards,
Rolando
Programing invidual Arduino ports I/O pins
-
- Posts: 2
- http://meble-kuchenne.info.pl
- Joined: Wed Feb 10, 2021 11:35 pm
-
- Valued Contributor
- Posts: 1142
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 115 times
- Been thanked: 598 times
Re: Programing invidual Arduino ports I/O pins
Hi RolGiv,
There are several ways to do what you want.
You can use input and output macros.
You can add properties (ie d0 single digital pin) then use a calculation block
x= d0 (input)
d0 = 1
You can set the direction registers using a C block
DDRD = 0b11111000;
Then set or read multiple or single pins by writing or reading PORTD.
Using d0 and d 1 makes life a bit harder on a uno
Martin
There are several ways to do what you want.
You can use input and output macros.
You can add properties (ie d0 single digital pin) then use a calculation block
x= d0 (input)
d0 = 1
You can set the direction registers using a C block
DDRD = 0b11111000;
Then set or read multiple or single pins by writing or reading PORTD.
Using d0 and d 1 makes life a bit harder on a uno
Martin
Re: Programing invidual Arduino ports I/O pins
Hello Martin, thank you so much for your reply. Thanks to the information included in your reply I have become more aware how powerful Flowcode can be. Thank you once again. Rolando