Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arduino-block-course
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stefan Gehr
arduino-block-course
Commits
345792cc
Commit
345792cc
authored
Oct 13, 2022
by
Stefan Gehr
Browse files
Options
Downloads
Patches
Plain Diff
moved setup down
parent
3212e9ec
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
solarpump/mp3.ino
+1
-1
1 addition, 1 deletion
solarpump/mp3.ino
solarpump/pins.h
+2
-2
2 additions, 2 deletions
solarpump/pins.h
solarpump/solarpump.ino
+13
-13
13 additions, 13 deletions
solarpump/solarpump.ino
with
16 additions
and
16 deletions
solarpump/mp3.ino
+
1
−
1
View file @
345792cc
#include
"pins.h"
#include
<SoftwareSerial.h>
static
SoftwareSerial
mp3
(
mp
3RX
,
mp
3TX
);
static
SoftwareSerial
mp3
(
MP
3RX
,
MP
3TX
);
void
mp3Setup
(
void
)
{
mp3
.
begin
(
4800
);
...
...
...
...
This diff is collapsed.
Click to expand it.
solarpump/pins.h
+
2
−
2
View file @
345792cc
...
...
@@ -8,6 +8,6 @@ const uint8_t T2DOWN = 5;
const
uint8_t
PUMP1
=
8
;
const
uint8_t
PUMP2
=
9
;
const
uint8_t
BUTTON
=
10
;
const
uint8_t
mp
3TX
=
12
;
const
uint8_t
mp
3RX
=
13
;
const
uint8_t
MP
3TX
=
12
;
const
uint8_t
MP
3RX
=
13
;
#endif
This diff is collapsed.
Click to expand it.
solarpump/solarpump.ino
+
13
−
13
View file @
345792cc
...
...
@@ -8,19 +8,6 @@
// LCD display at address 0x27 with 16 columns and 2 rows
static
LiquidCrystal_I2C
lcd
(
0x27
,
16
,
2
);
void
setup
(
void
)
{
lcd
.
init
();
Serial
.
begin
(
9600
);
// for debugging
// start the relevant libraries used by temperature.cpp
temperatureBegin
();
mp3Setup
();
pinMode
(
PUMP1
,
OUTPUT
);
pinMode
(
PUMP2
,
OUTPUT
);
pinMode
(
BUTTON
,
INPUT_PULLUP
);
}
// custom possibility for digital input
static
const
int8_t
B_UNCHANGED
=
-
1
;
// return whether the button changed to HIGH, LOW, or was B_UNCHANGED
...
...
@@ -153,6 +140,19 @@ void displayLight(bool turnOn) {
}
}
void
setup
(
void
)
{
lcd
.
init
();
Serial
.
begin
(
9600
);
// for debugging
// start the relevant libraries used by temperature.cpp
temperatureBegin
();
mp3Setup
();
pinMode
(
PUMP1
,
OUTPUT
);
pinMode
(
PUMP2
,
OUTPUT
);
pinMode
(
BUTTON
,
INPUT_PULLUP
);
}
void
loop
(
void
)
{
static
float
t1up_C
=
0.0
;
static
float
t1down_C
=
0.0
;
...
...
...
...
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
sign in
to comment