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
e87fae30
Commit
e87fae30
authored
2 years ago
by
Stefan Gehr
Browse files
Options
Downloads
Patches
Plain Diff
add option to respect busy pin in playFile
parent
c229826e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
solarpump/mp3.h
+1
-1
1 addition, 1 deletion
solarpump/mp3.h
solarpump/mp3.ino
+6
-2
6 additions, 2 deletions
solarpump/mp3.ino
with
7 additions
and
3 deletions
solarpump/mp3.h
+
1
−
1
View file @
e87fae30
...
...
@@ -2,7 +2,7 @@
#define MP3_H
void
mp3Setup
(
void
);
void
playFile
(
uint8_t
fileNumber
);
void
playFile
(
uint8_t
fileNumber
,
bool
respectBusyPin
);
void
mp3Loop
(
void
);
void
playFileQueue
(
uint8_t
fileNumber
);
...
...
This diff is collapsed.
Click to expand it.
solarpump/mp3.ino
+
6
−
2
View file @
e87fae30
...
...
@@ -14,8 +14,12 @@ void mp3Setup(void) {
//mp3.sendCommand(CMD_SEL_DEV, 0, 2); //select sd-card
}
// immediately play a file, ignoring any queue or BUSY pin
void
playFile
(
uint8_t
fileNumber
)
{
// immediately play a file
void
playFile
(
uint8_t
fileNumber
,
bool
respectBusyPin
)
{
// do nothing if we want to wait for the BUSY pin
if
(
respectBusyPin
&&
digitalRead
(
MP3BUSY
))
{
return
;
}
mp3
.
write
(
fileNumber
);
}
...
...
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
register
or
sign in
to comment