File tree Expand file tree Collapse file tree
Papawai/Papawai_Transmissions/Papawai-Transmissions.turbidity Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments