diff options
author | Jonas Smedegaard <dr@jones.dk> | 2025-04-01 22:18:26 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2025-04-01 22:18:26 +0200 |
commit | 223894c7305a084130edfba75108c87b2c453691 (patch) | |
tree | 24c6110430cabc81c27584425e5fcca51c4e387b /mussel3 | |
parent | aaf35ec4d317224b6fa9a226479f0d56fc266eb0 (diff) |
add library as appendix; add diagrams to library; drop individual mussel sketches
Diffstat (limited to 'mussel3')
-rw-r--r-- | mussel3/mussel3.ino | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/mussel3/mussel3.ino b/mussel3/mussel3.ino deleted file mode 100644 index 0777b01..0000000 --- a/mussel3/mussel3.ino +++ /dev/null @@ -1,46 +0,0 @@ -/// mussel3 - mussel voter influenced by Humidity -/// -/// SPDX-License-Identifier: GPL-3.0-or-later -/// SPDX-FileCopyrightText: 2025 Noor Ahmad <noora@ruc.dk> - - -#include <DHT.h> -#include <Arduino.h> - - -#define DHTPIN 15 // Digital pin connected to the DHT sensor - red -#define DHTTYPE DHT11 -#define ESC_SIGNAL_PIN 19 //white -DHT dht(DHTPIN, DHTTYPE); - - -void setup() { - Serial.begin(9600); - dht.begin(); -} - -void loop() { - // Wait a few seconds between measurements - delay(1000); - - vote(); - - - - delay(1000); // Delay between sensor readings -} -void vote() { - - float temperature = dht.readTemperature(); // Read temperature as Celsius - - // Print temperature - Serial.print("Temperature: "); - Serial.print(temperature); - Serial.println("°C"); - - int lightValue = analogRead(34); // GPIO34 (analog pin) - blue - - // Print the light sensor value to Serial Monitor - Serial.print("Light Sensor Value: "); - Serial.println(lightValue); -}
\ No newline at end of file |