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

record_ogg example does not support multiple recordings without reset #55

Open
till-h opened this issue Apr 12, 2019 · 2 comments
Open

Comments

@till-h
Copy link

till-h commented Apr 12, 2019

The record_ogg.ino example does not seem to support recording more than one .ogg file without hard-resetting the board in between recordings. The first file (RECORD00.ogg) is recorded fine and plays back in Audacity etc., of subsequent recordings only the first 1024 bytes make it to the SD card.

Steps to reproduce:

  • Open record_ogg.ino, change the following to the music maker shield pins:

    // define the pins used
    #define RESET -1 // VS1053 reset pin (output)
    #define CS 7 // VS1053 chip select pin (output)
    #define DCS 6 // VS1053 Data/command select pin (output)
    #define CARDCS 4 // Card chip select pin
    #define DREQ 3 // VS1053 Data request, ideally an Interrupt pin

  • Load record_ogg.ino to the Uno

  • Press the REC_BUTTON to do multiple recordings

  • Inspect recordings on PC

If the Arduino is reset in between recordings, this issue does not occur. The plugin datasheet states that the plugin does need to be reloaded between recordings (e.g., Sec 2.3.5, point 6), so maybe the only way around it is to do complete board resets between recordings.

Drawback: It takes around 6 seconds to reload the plugin, which delays the start of subsequent recordings from when the button is pressed.

(Music Maker board on Uno, IDE v1.8.9)

@kmccaffr
Copy link

kmccaffr commented Jun 9, 2019

Resetting the board each time between recordings seems like it would be hard on the IC.

Just reload the plugin after you have closed the sd file, then give a notification sound when it's ready to record (add a delay before notification if you're additionally worried). Doesn't really seem like an issue unless you want instantaneous multiple recordings, then you should be looking at a beefier device.

@caternuson
Copy link
Contributor

Does seem like an issue with the example sketch. It's only loading the plugin in setup() and then never again in loop().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants