Skip to content

Commit aad0711

Browse files
committed
first commit prototype turbidity
1 parent a17e430 commit aad0711

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// _ _ _ _ _ _ _
2+
// (_) | | | | | | (_) (_)
3+
// __ ___| | __| | |_| |__ _ _ __ __ _ ___ _ ___
4+
// \ \ /\ / / | |/ _` | __| '_ \| | '_ \ / _` / __| | |/ _ \
5+
// \ V V /| | | (_| | |_| | | | | | | | (_| \__ \_| | (_) |
6+
// \_/\_/ |_|_|\__,_|\__|_| |_|_|_| |_|\__, |___(_)_|\___/
7+
__/ |
8+
|___/
9+
10+
// Papawai Transmissions
11+
// 1st Prototype for Wemos D1 mini for measuring turbidity
12+
//
13+
// wildthings.io - Birgit Bachler, Aotearoa/New Zealand, 2019
14+
//
15+
16+
17+
18+
int sensorPin = A0; // select the input pin for the LDR
19+
int sensorValue = 0; // variable to store the value coming from the sensor
20+
int ledPin = D1; // select output pin for LED
21+
int ledValue = 64; // low light LED
22+
23+
boolean debug = true;
24+
void setup() {
25+
Serial.begin(9600);
26+
pinMode(ledPin, OUTPUT);
27+
}
28+
29+
void loop() {
30+
// read the value from the sensor:
31+
analogWrite(ledPin, ledValue);
32+
delay(10);
33+
sensorValue = analogRead(sensorPin);
34+
Serial.println(sensorValue);
35+
36+
delay(500);
37+
38+
}

0 commit comments

Comments
 (0)