Commit 9f856fe9 authored by Tomos Fearn's avatar Tomos Fearn

updated arduino tutorials

parent 50a51513
......@@ -71,7 +71,7 @@
\item{
\cy{Mae'r testun hwn yn Gymraeg.}
\en{\textbf{Connect the long leg of teh LED (the positive leg, called the anode) to the other end of the resistor.}}}
\en{\textbf{Connect the long leg of the LED (the positive leg, called the anode) to the other end of the resistor.}}}
\item{
\cy{Mae'r testun hwn yn Gymraeg.}
......
......@@ -180,15 +180,15 @@
int pushButton = 2; // digital pin 2 has a pushbutton attached to it.
void setup() {
Serial.begin(9600);//initialize serial communication at 9600 bits per second:
Serial.begin(9600);//initialize serial comms at 9600 bits per second:
pinMode(pushButton, INPUT); // make the pushbutton's pin an input:
}
}
void loop() { // the loop function runs over and over again forever
int buttonState = digitalRead(pushButton); // read the input pin:
Serial.println(buttonState); // print out the state of the button:
delay(1); // delay in between reads for stability
}
}
\end{lstlisting}
\end{document}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment