Setting digital pins as output / input

292 views
Skip to first unread message

RobynD

unread,
Dec 17, 2013, 5:42:08 AM12/17/13
to s4a-co...@googlegroups.com
Great program. Used it to make LCDs blink and change and respond to Scratch. I can see lots of uses for it.
I could not see how to turn a digital pin to input / output. I know for the Uno that is important because it turns on the pull up resistors. It's useful anyway.

Can you help?

Robyn


Gary Chung

unread,
Dec 18, 2013, 5:29:42 AM12/18/13
to RobynD, s4a-co...@googlegroups.com

Robyn,

 

Turining on the digital output is simple :

 

Select either Pin 10, 11 or 13 as follows :

 

 

Use the if loop to detect the digital input :

 

 

Hope that helps

 

Regards

Gary

--
You received this message because you are subscribed to the Google Groups "S4A Community Mail List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to s4a-communit...@googlegroups.com.
To post to this group, send email to s4a-co...@googlegroups.com.
Visit this group at http://groups.google.com/group/s4a-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/s4a-community/6f2d6c13-5ce6-4ad8-b1d5-31d8e6ab6ed6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

image001.png
image002.png

Víctor Casado

unread,
Feb 7, 2014, 7:18:06 AM2/7/14
to Gary Chung, RobynD, s4a-co...@googlegroups.com
Hi Robyn,

Did you mean how to set up a pin to input or output in S4A or turn it on? You can't do the first thing, because the pin mapping is set up both in the Arduino "firmware" as in the S4A sourcecode. You could change it in both but pitifully is not as simple.


Regards,


2013-12-18 Gary Chung <gary....@live.com.my>:

For more options, visit https://groups.google.com/groups/opt_out.



--
Víctor Casado
Equip de recerca (Edutec)
vict...@citilab.eu

FUNDACIÓ PEL FOMENT DE LA
SOCIETAT DEL CONEIXEMENT
CORNELLÀ


Citilab Cornellà | http://citilab.eu | Pl. Can Suris s/n | 08940 Cornellà de Llobregat | Barcelona
image002.png
image001.png
Reply all
Reply to author
Forward
0 new messages