-
-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ene9ba-feature/ll-add-sound-and-neopixel' into development
- Loading branch information
Showing
23 changed files
with
343 additions
and
44 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// Created by Elmar Elflein on 18/07/22. | ||
// Copyright (c) 2022 Elmar Elflein. All rights reserved. | ||
// | ||
// This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. | ||
// | ||
// Feel free to use the design in your private/educational projects, but don't try to sell the design or products based on it without getting my consent first. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
// | ||
// | ||
#ifndef _SOUND_SYSTEM_H_ | ||
#define _SOUND_SYSTEM_H_ | ||
|
||
//#include <Arduino.h> | ||
#include <stdint.h> | ||
#include <list> | ||
|
||
#include <pins.h> | ||
#include <DFPlayerMini_Fast.h> | ||
#include <soundsystem.h> | ||
|
||
|
||
#define BUFFERSIZE 100 | ||
|
||
#define NR_SOUNDFILES 15 // Number of Soundfiles on SD-card | ||
|
||
|
||
|
||
class MP3Sound | ||
{ | ||
|
||
|
||
|
||
|
||
public: | ||
|
||
uint32_t anzSoundfiles; // number of files stored on the SD-card | ||
bool playing; | ||
|
||
MP3Sound(); | ||
|
||
bool begin(int anzsoundsOnSD); // init serial stream and soundmodule, anzsoundOnSD : maximum number of available soundfiles on the SD-card | ||
|
||
void playSound(int soundNr); // play soundfile number. This method writes soundfile nr in a list, the method processSounds() (has to run in loop) will play | ||
// the sounds according to the list | ||
|
||
void playSoundAdHoc(int soundNr); // play soundfile number immediately whithout waiting until the end of sound | ||
|
||
void setvolume(int vol); // scales loudness from 0 to 100 % | ||
|
||
int sounds2play(); // returns the number if sounds to play in the list | ||
|
||
int processSounds(); // play all sounds from the list. This method has to be calles cyclic, e.g. every second. | ||
|
||
|
||
private: | ||
std::list <int> active_sounds; | ||
bool sound_available; | ||
|
||
|
||
|
||
|
||
}; | ||
|
||
|
||
#endif // _SOUND_SYSTEM_H_ HEADER_FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-- file leading nr -- ------ string to convert ------------ | ||
|
||
0001 Hi, I am Steve, your open mower green care is my profession | ||
0002 open mower start up successful | ||
0003 Initializing robot operating system | ||
0004 Starting map area recording | ||
0005 waiting for rtk gps signal | ||
0006 calculating map dimensions | ||
0007 initiate mowing sequence | ||
0008 emergency stop button triggered | ||
0009 emergency wheel lift sensor triggered | ||
0010 rain detected, heading back to base | ||
0011 open mower has completed mowing the lawn, heading back to charging station | ||
0012 stay back, autononous robot mower in use | ||
0013 ups, I did it again | ||
0014 Hallo, ich bin Tobi, dein intelligenter Rasemäher, Rasenpflege ist mein Beruf | ||
0015 Hello, I am Tobi, your smart mower, green care ist my profession | ||
|
Oops, something went wrong.