Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Charlotte Vandenbulcke
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Academany
Fab Academy
2024
Fab Academy 2024 Labs
fab-c
fab-c students
Charlotte Vandenbulcke
Commits
2ea4a033
Commit
2ea4a033
authored
11 months ago
by
Charlotte Vandenbulcke
Browse files
Options
Downloads
Patches
Plain Diff
adding missing code for water sensor on week11 page
parent
17460b25
No related branches found
No related tags found
No related merge requests found
Pipeline
#450311
passed
11 months ago
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/assignments/week11.html
+30
-1
30 additions, 1 deletion
public/assignments/week11.html
with
30 additions
and
1 deletion
public/assignments/week11.html
+
30
−
1
View file @
2ea4a033
...
...
@@ -234,7 +234,36 @@
<pre>
<code>
/*
* 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);
}
</code>
</pre>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment