diff --git a/docs/LearningProcessBram/documentatie/FirstDocumentation.md b/docs/LearningProcessBram/documentatie/FirstDocumentation.md index 4f2778a..4496ae1 100644 --- a/docs/LearningProcessBram/documentatie/FirstDocumentation.md +++ b/docs/LearningProcessBram/documentatie/FirstDocumentation.md @@ -11,34 +11,34 @@ Then I came across a teaching site (https://www.codingkids.nl/arduino-buzzer.htm I watched a video about using Arduino and took a lot of op notes along the way. The link is: (https://www.youtube.com/watch?v=BLrHTHUjPuw). ``` -\/\/Arduino information: +// $Arduino information: -\/pinnumber(locatie, in-/output) +//pinnumber(locatie, in-/output) -\/digitalwrite(locatie, high/low) +//digitalwrite(locatie, high/low) -\/delay(time in millisec) +//delay(time in millisec) -\/int... <- variable +//int... <- variable -\/with a decimal its a double -> 1,2 +//with a decimal its a double -> 1,2 -\/a character is a char -> "a" +//a character is a char -> "a" -\/\/serial communications: +// $serial communications: -\/setup: +setup: Serial.begin(9600) -> the text speed Serial.sprintLn(text) -\/Loop: +Loop: Serial.print("text") Serial.printLn(....) -> variable because no " -\/Ctrl + shift + M = serial monitor. +//Ctrl + shift + M = serial monitor. The text speed needs to be the same as given. -\/\/If Statements: +// $If Statements: if(condition){ @@ -50,9 +50,9 @@ if(condition){ } -\/&& = "and" +// && = "and" -\/|| = "or" +// || = "or" \/\/For loops: @@ -62,11 +62,11 @@ For(int*i; i <= 10 ; i++){ } -\/The fading of led's: +// The fading of led's: examples, basics, fade -\/ servo's +// servo's examples, servo, sweep ``` @@ -176,16 +176,18 @@ The code is short and simple: int button = 20; int buzzerone = 12; int buzzertwo = 11; - +``` +Now we set the pins up to either input or output a signal. +``` void setup() { //put down some pins that will output , and some that input. pinMode(button, INPUT); pinMode(buzzerone, OUTPUT); pinMode(buzzertwo, OUTPUT); } - - - +``` +Here the button pin will seek a signal, when it is given it will send signals to the other given pins in he if-statement. +``` void loop() { //read is there is input on the button pin, if so send output to the other pins, otherwise keep them off. if(digitalRead(button) == HIGH){