Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pause playback when card is removed #56

Open
wants to merge 47 commits into
base: DEV
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c95cc8a
first version of a make file
AlexanderWillner Jan 3, 2020
66f74d2
Fix causes of compiler warnings
DerTomm Jan 1, 2020
8661367
added support for PlatformIO
AlexanderWillner Jan 3, 2020
95e072b
added dependencies to platformio configuration
AlexanderWillner Jan 3, 2020
cb05de7
pio: added monitor speed
AlexanderWillner Jan 3, 2020
3b883ab
fixing long press with three buttons - see http://discourse.voss.eart…
AlexanderWillner Jan 3, 2020
70a9a77
testing GitHub Actions support
AlexanderWillner Jan 3, 2020
a4995e5
Added GitHub Actions support
AlexanderWillner Jan 3, 2020
9d406ae
slow-down for volume buttons (http://discourse.voss.earth/t/757/20, h…
AlexanderWillner Jan 3, 2020
6cb8485
Merge pull request #1 from AlexanderWillner/volume-speed-change
AlexanderWillner Jan 3, 2020
2eddbd7
also clean pio files
AlexanderWillner Jan 4, 2020
37026c6
started to add unit testing support
AlexanderWillner Jan 4, 2020
64aa257
added 'make help' to open the community forum
AlexanderWillner Jan 4, 2020
ad71097
documentation of changes
AlexanderWillner Jan 4, 2020
d6c24fd
Adding make install
AlexanderWillner Jan 4, 2020
64f55bb
Updated Badge
AlexanderWillner Jan 4, 2020
a931062
adding local platformio configuation
AlexanderWillner Jan 4, 2020
cbc71ae
Merge branch 'DEV' of https://github.com/alexanderwillner/TonUINO int…
AlexanderWillner Jan 4, 2020
f93ab70
make: fix help
junkdna Jan 4, 2020
8bfe3cd
make: add check target to run c++ check
junkdna Jan 4, 2020
a13b51f
fix merge conflict
AlexanderWillner Jan 4, 2020
de51b33
merging
AlexanderWillner Jan 4, 2020
f9ab5ae
moving to ubuntu-latest also to avoid API rate limit https://github.c…
AlexanderWillner Jan 4, 2020
6ebbfab
make: enhanced installation
AlexanderWillner Jan 4, 2020
36e9cf1
make: add some dependencies in order to get a rebuild if required
junkdna Jan 6, 2020
c0e0a52
fix wheel installation
AlexanderWillner Jan 10, 2020
0309750
initial version of new documentation
AlexanderWillner Jan 12, 2020
30e46af
updated links and description
AlexanderWillner Jan 12, 2020
cfb27e4
added Bluetooth
AlexanderWillner Jan 12, 2020
83c7a18
removed reference
AlexanderWillner Jan 13, 2020
e512d12
added badget ; moved to releases
AlexanderWillner Jan 15, 2020
04b725f
added downloads badge
AlexanderWillner Jan 15, 2020
749098e
merged badges to dev
AlexanderWillner Jan 15, 2020
ac8da0d
Merge pull request #2 from AlexanderWillner/guide
AlexanderWillner Jan 22, 2020
16e7e78
Move to GitHub Releases
AlexanderWillner Jan 22, 2020
3ea887c
Added table with PINs
AlexanderWillner Feb 9, 2020
6d0e8f2
Merge branch 'DEV' of https://github.com/alexanderwillner/TonUINO int…
AlexanderWillner Feb 9, 2020
f4139be
added some pictures
AlexanderWillner Feb 9, 2020
0b130b1
Kurzanleitung zum Aufspielen der Firmware
AlexanderWillner Feb 11, 2020
10ed922
Merge branch 'DEV' of https://github.com/AlexanderWillner/TonUINO int…
AlexanderWillner Feb 11, 2020
df323a5
allow overriding variables
AlexanderWillner Feb 11, 2020
9380769
Video: Kurzanleitung zum Aufspielen der Firmware
AlexanderWillner Feb 11, 2020
ba07aa6
Pause playback when card is removed
awesome-michael Feb 9, 2020
6b7b05e
Merge branch 'DEV' of https://github.com/AlexanderWillner/TonUINO int…
AlexanderWillner Feb 16, 2020
d91f4a9
added a few more links, added some lessons learned, fixed markdown va…
AlexanderWillner Feb 16, 2020
5d6f1b4
added 'make feedback'
AlexanderWillner Feb 16, 2020
33fc03a
Merge branch 'DEV' into DEV
AlexanderWillner Feb 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This is the name of the workflow, visible on GitHub UI.
name: building

# Here we tell GitHub to run the workflow when a commit
# is pushed or a Pull Request is opened.
on: [push, pull_request]

# This is the list of jobs that will be run concurrently.
# Since we use a build matrix, the actual number of jobs
# started depends on how many configurations the matrix
# will produce.
jobs:
# This is the name of the job - can be whatever.
test-matrix:

# Here we tell GitHub that the jobs must be determined
# dynamically depending on a matrix configuration.
strategy:
matrix:
# The matrix will produce one job for each configuration
# parameter of type `arduino-platform`, in this case a
# total of 2.
arduino-platform: ["arduino:avr"]
# This is usually optional but we need to statically define the
# FQBN of the boards we want to test for each platform. In the
# future the CLI might automatically detect and download the core
# needed to compile against a certain FQBN, at that point the
# following `include` section will be useless.
include:
# This works like this: when the platformn is "arduino:samd", the
# variable `fqbn` is set to "arduino:samd:nano_33_iot".
- arduino-platform: "arduino:avr"
fqbn: "arduino:avr:nano:cpu=atmega328old"

# This is the platform GitHub will use to run our workflow, we
# pick Windows for no particular reason.
runs-on: ubuntu-latest

# This is the list of steps this job will run.
steps:
# First of all, we clone the repo using the `checkout` action.
- name: Checkout
uses: actions/checkout@v2
with:
ref: DEV

# We use the `arduino/setup-arduino-cli` action to install and
# configure the Arduino CLI on the system.
- name: Setup Arduino CLI
uses: arduino/[email protected]

- name: Install Python
uses: actions/setup-python@v1
with:
python-version: 3.8

# We then install the platform, which one will be determined
# dynamically by the build matrix.
- name: Install platform
run: make install init

# Finally, we compile the sketch, using the FQBN that was set
# in the build matrix.
- name: Test Sketch
run: make test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ Temporary Items

# TonUINO
/tools/*.pyc
Tonuino

# Platform.io
.pio/
.vscode/
platformio_local.ini
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Change Log

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased] - Lokale Änderungen
- Unterstützung für GitHub Actions, um jede eingespielte Änderung zu testen (siehe Badge oben).
- Integration von PlatformIO inklusive initiale Unterstützung von Unit Tests und eigenen Konfigurationsdateien.
- Entfernung einiger [Compiler-Warnungen](https://github.com/xfjx/TonUINO/pull/54).
- Kleinen Fehler bei Erstinbetriebnahme [gefixt](http://discourse.voss.earth/t/version-2-1dev-lautstaerke-durch-langes-druecken-der-tasten-geht-nicht/4523/23).
- Verzögerung für Lautstärkeregelung [hinzugefügt](http://discourse.voss.earth/t/lautstaerke-kleinschrittiger-erhoehen/3022/5).
- Make-Datei hinzugefügt

## [Unreleased] - 2.1dev
- Partymodus hat nun eine Queue -> jedes Lied kommt nur genau 1x vorkommt
- Neue Wiedergabe-Modi "Spezialmodus Von-Bis" - Hörspiel, Album und Party -> erlaubt z.B. verschiedene Alben in einem Ordner zu haben und je mit einer Karte zu verknüpfen
- Admin-Menü
- Maximale, Minimale und Initiale Lautstärke
- Karten werden nun über das Admin-Menü neu konfiguriert
- die Funktion der Lautstärketasten (lauter/leiser oder vor/zurück) kann im Adminmenü vertauscht werden
- Shortcuts können konfiguriert werden!
- Support für 5 Knöpfe hinzugefügt
- Reset der Einstellungen ins Adminmenü verschoben
- Modikationskarten (Sleeptimer, Tastensperre, Stopptanz, KiTa-Modus)
- Admin-Menü kann abgesichert werden

## [2.0.1] - 2018-11-01
- kleiner Fix um die Probleme beim Anlernen von Karten zu reduzieren

## [2.0] - 2018-08-26
- Lautstärke wird nun über einen langen Tastendruck geändert
- bei kurzem Tastendruck wird der nächste / vorherige Track abgespielt (je nach Wiedergabemodus nicht verfügbar)
- Während der Wiedergabe wird bei langem Tastendruck auf Play/Pause die Nummer des aktuellen Tracks angesagt
- Neuer Wiedergabemodus: **Einzelmodus**
Eine Karte kann mit einer einzelnen Datei aus einem Ordner verknüpft werden. Dadurch sind theoretisch 25000 verschiedene Karten für je eine Datei möglich
- Neuer Wiedergabemodus: **Hörbuch-Modus**
Funktioniert genau wie der Album-Modus. Zusätzlich wir der Fortschritt im EEPROM des Arduinos gespeichert und beim nächsten mal wird bei der jeweils letzten Datei neu gestartet. Leider kann nur der Track, nicht die Stelle im Track gespeichert werden
- Um mehr als 100 Karten zu unterstützen wird die Konfiguration der Karten nicht mehr im EEPROM gespeichert sondern direkt auf den Karten - die Karte muss daher beim Anlernen aufgelegt bleiben!
- Durch einen langen Druck auf Play/Pause kann **eine Karte neu konfiguriert** werden
- In den Auswahldialogen kann durch langen Druck auf die Lautstärketasten jeweils um 10 Ordner oder Dateien vor und zurück gesprungen werden
- Reset des MP3 Moduls beim Start entfernt - war nicht nötig und hat "Krach" gemacht

97 changes: 97 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#
# TonUINO Makefile
#
# Author: Alexander Willner
# Date: 2020-01-03

# Config
## Arduino Nano (old bootloader)
MCU ?= arduino:avr:nano:cpu=atmega328old
BOARD ?= arduino:avr
SERIAL ?= /dev/cu.usbserial-1420
## Main
SKETCH ?= Tonuino
## Helper
OS = $(shell uname -s)
.PHONY: help

info:
$(info TonUINO Makefile)
$(info ================)
$(info )
$(info Configured to use MCU "$(MCU)" attached to port "$(SERIAL)".)
$(info )
$(info Available commands:)
$(info - help : get support from the community)
$(info - install : installation of required binaries (arduino-cli))
$(info - init : initialize environment (arduino-cli))
$(info - compile : create binary)
$(info - upload : store binary on board flash)
$(info - find : get information about the pluged-in board)
$(info - test : run some basic tests on the code)
$(info - clean : delete temporary files)
$(info - feedback : provide feedback and report issues)
@true

help:
@python -m webbrowser "http://discourse.voss.earth"

install:
ifeq ($(OS),Darwin)
ifeq (, $(shell which brew))
$(error "No brew in PATH, consider installing http://brew.sh")
else
@brew install platformio arduino-cli
endif
endif
ifeq ($(OS),Linux)
ifeq (, $(shell which arduino-cli))
@curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
endif
ifeq (, $(shell which platformio))
@pip install setuptools wheel
@pip install -U platformio
endif
endif

init:
@arduino-cli config init
@arduino-cli core update-index
@arduino-cli core install $(BOARD)
@arduino-cli lib install "DFPlayer Mini Mp3 by Makuna"
@arduino-cli lib install "MFRC522"
@arduino-cli lib install "JC_Button"
@platformio lib install 1561 # DFPlayer Mini Mp3 by Makuna
@platformio lib install 2284 # EEPROM
@platformio lib install 77 # JC_Button
@platformio lib install 63 # MFRC522

prepare:
@mkdir -p "$(SKETCH)" ; echo "folder is only for backwards compatibility" > "$(SKETCH)/DO-NOT-EDIT"
@if [ "$(SKETCH)/$(SKETCH).ino" -nt "./$(SKETCH).ino" ]; then echo "ERROR: do not edit files in TonUINO/!"; exit 1; fi;
@cp -p "./$(SKETCH).ino" "$(SKETCH)/$(SKETCH).ino"

compile: prepare *.ino
@arduino-cli compile --fqbn $(MCU) --warnings none "$(SKETCH)"

find:
@arduino-cli board list

upload: compile
@arduino-cli upload -p $(SERIAL) --fqbn $(MCU) --verify "$(SKETCH)"

test: prepare
@arduino-cli compile --fqbn $(MCU) --warnings more "$(SKETCH)"
ifneq (, $(shell which pio))
@pio test -e native
endif

check: *.ino
@cppcheck --enable=all --std=c++20 --language=c++ *.ino *.h

clean:
@rm -rf "$(SKETCH)"
@rm -rf ".pio/build/"

feedback:
@python -m webbrowser "https://github.com/alexanderwillner/tonuino/issues"
Loading