Skip to content
Snippets Groups Projects
Commit 0869943b authored by Maciej Naskręt's avatar Maciej Naskręt :headphones:
Browse files

week

parent 0891ae2b
No related branches found
No related tags found
No related merge requests found
Pipeline #198285 passed
......@@ -132,36 +132,35 @@ Free for personal and commercial use under the CCA 3.0 license (html5up.net/lice
<span class="image main" ><img src="images/assig/week11/hero_shot.jpg" style="width:60%;height:60%;padding-bottom:0;"><br>
Arduino code
</p>
<pre>
<code>
Arduino code
int led = 7;
float photo = A7;
void setup()
{
pinMode(led, OUTPUT); // Declare the LED as an output
pinMode(photo, INPUT); //declare the photo as an input
}
</p>
<pre>
<code>
void loop()
{
float photo = analogRead(A3);
const int redPin = 7;
const int greenPin = 6;
const int bluePin = 5;
if (photo > 0)
{
digitalWrite(led, HIGH);
} else {
digitalWrite(led, LOW);
void setup() {}
}
void loop() {
analogWrite(redPin, random(0,255));
analogWrite(greenPin, random(0,255));
analogWrite(bluePin, random(0,255));
delay(500);
}
}
</pre>
</code>
<br><br>
<iframe width="560" height="315" src="https://www.youtube.com/embed/RlJEDVejdmM" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<br><br>
<p><h3><a href="https://drive.google.com/drive/folders/1s6BoQJIU1qz_aRZVKfWgthQgMH4MEY93?usp=sharing"> all files from projects</a></h3>
</p>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment