Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.

Commit

Permalink
added read-from-sensor4w-delay program with substructure
Browse files Browse the repository at this point in the history
  • Loading branch information
realdcre authored Jan 17, 2024
1 parent c2eacb7 commit 44f3cb4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions read/read_from_sensor3/read_from_sensor3.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ void loop() {
float voltage = sensorValue * (5.0 / 1023.0);
// print out the value you read:
Serial.println(voltage);
delay(1000);
}

// sign:arduinonwt/realdcre
9 changes: 9 additions & 0 deletions read/read_from_sensor4w-delay/Seal of Working Code
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
THIS CODE WORKS

it has been checked and Demo-ed

Ready to push to prod.

code-revision 4

Signatur: realdcre
17 changes: 17 additions & 0 deletions read/read_from_sensor4w-delay/read_from_sensor4w-delay.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(74880);
}

// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float voltage = sensorValue * (5.0 / 1023.0);
// print out the value you read:
Serial.println(voltage);
}

// sign:arduinonwt/realdcre

0 comments on commit 44f3cb4

Please sign in to comment.