You are reading a single comment by @stephaneAG and its replies. Click here to read the full conversation.
  • Hi there !

    [Also, see last post on Esptruino SD card]

    Yup, it's getting somewhere, but the "OUT OF MEMORY" messages from the audio part is sometimes driving me crazy ;p

    -> For +Sacha's posts about the Pico flash stuff, this is truly great, and as you say it could be pretty interesting for my needs ..

    .. now, what could be totally worth it 'd be being able to read a file from the SD to the free flash, ( maybe using a littl' buffer but not consuming all of Espruino's memory ) & then play it "directly" from the flash ? => aka use the flash's stuff as Waveform buffer ?

    My point is: while I'm testing playing random audio files off the SD, I have two "issues"
    1: can't use w.on("finish", function(buf) { .. }); when using 'readFile()' ? ( it doesn't seem triggered .. )

    2: "OUT OF MEMORY" error -> may be overcome by using said-"double-buffer" ?
    -> the code throwing the said "OUT OF MEMORY" error is the one attached ( used for testing the audio files )

    -> I'll be testing the code that triggers the ground floor door's optotriac in few minutes, & then the two last steps be mixing it with the morse-like patterns matching code & finalizing the schematic part with the added RC timing circuit ( .. )

    -> right after checking the optotriac's code, I'll give few tries to the buffered audio, and if I got time in the evening, I'll be digging what can be done to easily play audio from the flash ( .. )

    => Nb: what could be done, if nothing else could allow bypassing that "OUT OF MEMORY" error,is just: on code match => select appropriate random audio/load it/play it/open door/reboot ( via "save()" )
    -> since rebooting the device is quite quick, it is not that cumbersome to reboot after each door lock ( nb: also, if I don't add the RC circuit, the Espruino 'll be powered off then on whener the ground floor door is opened, but in other situations, this is not considered a "feature" ;p )


    1 Attachment

About

Avatar for stephaneAG @stephaneAG started