Skip to content
Snippets Groups Projects
Commit 33372a37 authored by Charlotte Vandenbulcke's avatar Charlotte Vandenbulcke
Browse files

adding oscillioscope video and fail comment on week 11 page

parent 2ea4a033
No related branches found
No related tags found
No related merge requests found
Pipeline #450403 passed
......@@ -128,6 +128,12 @@
</code>
</pre>
<span class="object">
<video width="600" height="300" controls>
<source src="../images/oscilloscope-measure-distance-sensor.mp4" type="video/mp4">
</video>
</span>
<p>Link to our <a href="https://fabacademy.org/2024/labs/fabc/group-assignment/week011/" target="_blank">Group page</a></p>
</section>
......@@ -321,29 +327,16 @@
<img src="../images/soil-humidity-sensor-test.jpg" alt="...">
</span>
<p>
<blockquote>
I failed this week in saving the different codes. When I started documenting my work I discovered that I saved all my Arduino files with the wrong name of sensor... So I had to play "puzzle" with the files and some are missing at the end, like this one.
I will have to start again on this one to be able to share the code.
</blockquote>
</p>
<pre>
<code>
#define solPin 4 // Sensor conection port
#define ledPin 26 // LED connection port
int sol;
void setup(){
Serial.begin(9600);
pinMode(solPin, INPUT);
pinMode(ledPin, OUTPUT);
}
void loop(){
Serial.print("sol = ");
Serial.println(digitalRead(solPin)); // show variable
if (digitalRead(solPin) == LOW) { digitalWrite(ledPin, LOW); }
if (digitalRead(solPin) == HIGH) { digitalWrite(ledPin, HIGH); }
delay(1000);
}
Will come soon...
</code>
</pre>
......@@ -491,7 +484,8 @@
<p><strong>My files</strong></p>
<ul>
<li><a href="../files/humidity_and_temperature.ino" target="_blank">Humidity and Temperature Arduino file</a></li>
<li><a href="../files/SoilHumidity.ino" target="_blank">Soil Moisture Arduino file</a></li>
<li><a href="../files/water-sensor.ino" target="_blank">Water Sensor Arduino file</a></li>
<li><a href="../files/BigSound.ino" target="_blank">Big Sound Arduino file</a></li>
<li><a href="../files/HallMagnetic.ino" target="_blank">Hall Magnetic Arduino file</a></li>
</ul>
......
/*
* Created by ArduinoGetStarted.com
*
* This example code is in the public domain
*
* Tutorial page: https://arduinogetstarted.com/tutorials/arduino-water-sensor
*/
#define POWER_PIN 14
#define SIGNAL_PIN A0
int value = 0; // variable to store the sensor value
void setup() {
Serial.begin(9600);
pinMode(POWER_PIN, OUTPUT); // configure D7 pin as an OUTPUT
digitalWrite(POWER_PIN, LOW); // turn the sensor OFF
}
void loop() {
digitalWrite(POWER_PIN, HIGH); // turn the sensor ON
delay(10); // wait 10 milliseconds
value = analogRead(SIGNAL_PIN); // read the analog value from sensor
digitalWrite(POWER_PIN, LOW); // turn the sensor OFF
Serial.print("Sensor value: ");
Serial.println(value);
delay(1000);
}
\ No newline at end of file
File added
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