Hi "OBW0549Use the pinmode() function.
void setup() {
pinMode(13, INPUT); // sets the digital pin 13 as input switch
pinMode(14, OUTPUT); // sets the digital pin 14 as output led
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(14, HIGH); // sets the digital pin 14 on
delay(1000); // waits for a second
digitalWrite(14, LOW); // sets the digital pin 14 off
delay(1000); // waits for a second
}
I only started using Arduino about 9 months ago and I did the same. As soon as the Arduino Uno arrived, I had some code to upload and run.I do not have board I am practicing on IDE
I wrote it code