Forum Rule: Always post complete source code & details to reproduce any issue!
Page 18 of 18 FirstFirst ... 8 16 17 18
Results 426 to 450 of 450

Thread: Teensy 4.0 - based Audio Guestbook

  1. #426
    Excellent guidance. I may have succeeded. I deleted everything and even deleted them from the Recycle BIN. Could not reboot since the wife has 30 folders open in Chrome. *%### Amazon!

    Extracted all of the arduino-1.8.19-windows.zip file to C:/ and waited. A C:/Arduino/arduino-1.8.19 folder was created with 3866 files and 843 folders and 539 MB. A C:/arduino-1.8.19 folder was also created of the same mix.
    I deleted the nested folder and left the C:/arduino-1.18.19 folder as my working IDE.

    The unzipping process again created a C:/Users//AppData/Local/Arduino15 that was 36 MB with 10 files and 4 folders.

    Copied the guestbook boards.local.txt into the C:/arduino-1.8.19/hardware/arduino/avr folder. Am not comfortable modifying the 1.8.3 Arduino platform.txt with the 1.8.5 Teensy.txt so left the Arduino there for now.

    Opened the IDE with its default "sketch" and noted that there was no Teensy boards in the drop downs. Just Arduino in the menu.

    Added the https://www.pjrc/teensy/package_teensy_index.json to the Board Manager URL and then searched for "Teensy" which brought me to Paul's 1.58 Install. Step 1 of 2 took 15 seconds and Step 2 of 2 took 10 minutes. I thought it might be hung up but was patient.

    My C:/Users//AppData/Arduino15 folder now is 696 MB and has 8897 files in 1689 folders. Arduino15/packages/teensy/hardware/1.58.1 has a 94 KB Boards.txt file that says it is the "Solution for Arduino IDE 2.0..." but it has a crap load of teensy2 to teensy41 menu keys in it so I trust that my teensy40 is in there. The platform.txt is version 1.8.5 but does not appear to have the Audio call ins that we need for the Audio Tweaks. Again, not a comfortable coder. See "virgin" above.

    Ran the "Verify" to the same code that gave me the FQBN error above and got the message below and the loader popped up.

    Warning: Board arduino:avr:teensy40 doesn't define a 'build.board' preference. Auto-set to: AVR_TEENSY40
    Warning: Board arduino:avr:teensy41 doesn't define a 'build.board' preference. Auto-set to: AVR_TEENSY41
    Opening Teensy Loader...
    teensy_size: Memory Usage on Teensy 4.0:
    teensy_size: FLASH: code:120736, data:12592, headers:9004 free for files:1889284
    teensy_size: RAM1: variables:19744, code:118200, padding:12872 free for local variables:373472
    teensy_size: RAM2: variables:45440 free for malloc/new:478848

    I did not send it to the phone to check if it loads yet. I know the chip works because I got the Blink Programs to load last week.

    I believe that I stumbled my way to getting the software into my Teensy 4.0 and Audio Shield. I will load it tomorrow and see what hardware, speaker, microphone, falling/rising edge problems I have then.

    Third time configuring the software is the charm!!! Gotta love it!! Thanks for all of the help getting me this far. Wedding is in 2 weeks.

  2. #427
    Senior Member h4yn0nnym0u5e's Avatar
    Join Date
    Apr 2021
    Location
    Cambridgeshire, UK
    Posts
    895
    Nice call on the cleanup thread, Mark - thanks!

    That's looking a whole lot better .. at least it's compiling, and the sizes all look about right (I'm using Teensyduino 1.59 beta 3 here, and also tried with 1.58, neither of which give the same results but all in the ballpark).

    You may not need the edits to boards.local.txt and platform.txt, they're associated with glitchy / fast recordings due to slow(er) SD cards.

  3. #428
    Back at it again. Ran the same verify this evening and it compiled and when it brought up the loader I pushed the button on the Teensy and this is all I see.


    Warning: Board arduino:avr:teensy40 doesn't define a 'build.board' preference. Auto-set to: AVR_TEENSY40
    Warning: Board arduino:avr:teensy41 doesn't define a 'build.board' preference. Auto-set to: AVR_TEENSY41
    Opening Teensy Loader...
    teensy_size: Memory Usage on Teensy 4.0:
    teensy_size: FLASH: code:120736, data:12592, headers:9004 free for files:1889284
    teensy_size: RAM1: variables:19744, code:118200, padding:12872 free for local variables:373472
    teensy_size: RAM2: variables:45440 free for malloc/new:478848

    The loader is flashing on and off showing the board and then the "Press Button" and making noise. I have pressed the button multiple times and all I see is at the bottom of the loader it shows "audio-guestbook.ino.hex 7% used.
    LED on the Audio board is on solid. Momentary button press or 3 second button press. Nothing (I think).

    I expected to see some type of "load complete" type message or loading status bar. I loaded the Blink Fast and Blink Slow just to verify that my USB Cable is good.

    Hoping for anything. I have a "greeting.wav" file on the SD Card. Tried earphones just in case the speaker on my 1960s era phone was bad. Nothing.

    Any ideas?? Again, wedding is in 2 weeks. I am praying for clicking or dead spots or rising/falling edge issues. Instead I am at a loss as to what to look for next.

  4. #429
    Verbose Loader keeps beeping and providing the below "Verbose Information". Over and over again for about 5 minutes.

    23:50:41.545 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    23:50:41.554 (loader): HID/win32: vid:046D pid:C52B ver:1201 usb:0/140000/0/1/2
    23:50:41.559 (loader): HID/win32: vid:046D pid:C52B ver:1201 usb:0/140000/0/1/2
    23:50:41.571 (loader): HID/win32: vid:0000 pid:0000 ver:0000
    23:50:42.428 (ports 2): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    23:50:42.429 (ports 2): nothing new, skipping HID & Ports enum
    23:50:42.509 (ports 2): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    23:50:42.510 (ports 2): nothing new, skipping HID & Ports enum
    23:50:42.722 (ports 2): WM_DEVICECHANGE DBT_DEVICEARRIVAL
    23:50:42.724 (ports 2): found_usb_device, id=\\?\usb#vid_16c0&pid_0478#0015b9d6#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
    23:50:42.724 (ports 2): found_usb_device, loc=usb:0/140000/0/2 Port_#0002.Hub_#0001
    23:50:42.724 (ports 2): found_usb_device, hwid=USB\VID_16C0&PID_0478&REV_0108
    23:50:42.724 (ports 2): found_usb_device, devinst=00000007
    23:50:42.724 (ports 2): add: loc=usb:0/140000/0/2, class=HID, vid=16C0, pid=0478, ver=0108, serial=0015b9d6, dev=\\?\usb#vid_16c0&pid_0478#0015b9d6#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
    23:50:42.726 (ports 2): hiddev_from_devinst_list: iface=0
    23:50:42.732 (ports 2): found_usb_device complete
    23:50:42.737 (ports 2): hid, found devinst=0000000B
    23:50:42.737 (ports 2): hid, path=\\?\hid#vid_16c0&pid_0478#6&a4c0df&0&0000#{4d 1e55b2-f16f-11cf-88cb-001111000030}
    23:50:42.737 (ports 2): hid, opened handle
    23:50:42.737 (ports 2): devinst=0000000B, location=usb:0/140000/0/2
    23:50:42.737 (ports 2): vid=16C0, pid=0478, ver=0108, usepage=FF9C, use=0024
    23:50:42.737 (ports 2): devpath=\\?\hid#vid_16c0&pid_0478#6&a4c0df&0&0000# {4d1e55b2-f16f-11cf-88cb-001111000030}
    23:50:42.738 (ports 2): usb_add: usb:0/140000/0/2 hid#vid_16c0&pid_0478 (Teensy 4.0) Bootloader
    23:50:42.906 (loader): secure mode can not be locked: this is Standard Teensy
    23:50:42.916 (loader): encryption is possible on this Teensy, but not yet configured
    23:50:42.936 (loader): but without secure mode locked, encryption will NOT be secure!
    23:50:42.945 (loader): Device came online, code_size = 2031616
    23:50:42.954 (loader): Board is: Teensy 4.0 (IMXRT1062), version 1.08
    23:50:42.992 (loader): File "C:\Users\15712\AppData\Local\Temp\arduino_build_2 61084\audio-guestbook.ino.hex", 142336 bytes
    23:50:42.997 (loader): File "audio-guestbook.ino.hex". 142336 bytes, 7% used
    23:50:43.047 (loader): set background IMG_ONLINE
    23:50:43.062 (loader): HID/win32: HidD_GetPreparsedData ok, device still online :-)
    23:50:43.062 (ports 2): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    23:50:43.063 (ports 2): nothing new, skipping HID & Ports enum
    23:50:43.130 (ports 2): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    23:50:43.131 (ports 2): nothing new, skipping HID & Ports enum

  5. #430
    I unplugged the USB cable from the laptop to the Audio board and connected up a portable power supply to the board and it appears that the Blink Fast is still in there. Am I supposed to suck Blink Fast out of there before trying to get the guestbook into it. Not familiar with the CNTRL-ALT-DEL process for the Teensy. Midnight here in my time zone with big day at work tomorrow. However, I will watch for Gandalf the White to come over the hill.

  6. #431
    Senior Member h4yn0nnym0u5e's Avatar
    Join Date
    Apr 2021
    Location
    Cambridgeshire, UK
    Posts
    895

    Pre-built binaries of a new commit

    Not sure about Gandalf the White - how about Gandalf the Grubby?

    I've been thinking about this for a while, and decided now is probably a good moment to try it out. The attached .ZIP file has builds for both Teensy 4.0 and Teensy 4.1 as .HEX files. You should be able to drag the correct one directly onto the Teensy Loader, check the filename is showing in the status bar, and press the Teensy's Program button to upload it. After the usual USB detach / attach bingles, and the loader progress bar, the MTP disk should appear, as should a COM port.

    Also in the .ZIP file is a known working greeting.wav, and a configuration file gbkcfg.txt. Drop both of these into the root of your SD card - they are not required for initial testing, but are potentially quite helpful at the next steps. You will probably need to edit the gbkcfg.txt depending on your pin assignments and polarities, and the volume levels you get from your hardware. Most volume levels run from 0.0 to 1.0, micgain is in dB (decibels), and can go up to 62. You can also change the volume name; Bad Things will probably happen if you use weird characters here, there is virtually no validation!

    The build looks for SD cards on both the built-in and audio adaptor slots. There's something odd going on with the SD card in my audio adaptor, but it's getting late here in the UK and I don't have time to investigate.

    AudioGuestbookHex.zip
    Source code is at https://github.com/h4yn0nnym0u5e/aud...feature/doc-01

    The builds are with 256-sample audio buffers, and a CPU clock of 150MHz.

  7. #432
    Junior Member
    Join Date
    May 2023
    Posts
    2
    First of all, thank you guys for your awesome work. I love it.
    With my latest update (2months ago) I had big issues, that only 2-5 essages were saved but the rest was with no data. (You could see that there were messages but with 0 bytes, so they were empty, does anybody know, where this problem could come from?)

    I now installed the latest code and tried to upload it but got an error.
    Could anybody help me, what is wrong? Thanks a lot.
    Arduino: 1.8.19 (Mac OS X), TD: 1.57, Board: "Teensy 4.1, Serial + MTP Disk (Experimental), 600 MHz, Faster, US English"

    sketch_may30a:63: error: 'AudioPlaySdWavX' does not name a type
    AudioPlaySdWavX playGreeting; // Play 44.1kHz 16-bit PCM greeting WAV file
    ^
    sketch_may30a:64: error: 'AudioPlaySdWavX' does not name a type
    AudioPlaySdWavX playMessage; // Play 44.1kHz 16-bit PCM message WAV file
    ^
    sketch_may30a:69: error: 'playGreeting' was not declared in this scope
    AudioConnection patchCord2(playGreeting, 0, mixer, 1); // greeting file playback mixer
    ^
    sketch_may30a:70: error: 'playMessage' was not declared in this scope
    AudioConnection patchCord3(playMessage, 0, mixer, 2); // message file playback mixer
    ^
    sketch_may30a: In function 'void loop()':
    sketch_may30a:331: error: 'playGreeting' was not declared in this scope
    playGreeting.play("greeting.wav");
    ^
    sketch_may30a: In function 'void playAllRecordings()':
    sketch_may30a:523: error: 'playMessage' was not declared in this scope
    playMessage.play(entry.name());
    ^
    sketch_may30a:529: error: 'playMessage' was not declared in this scope
    while (!playMessage.isStopped()) { // this works for playWav
    ^
    sketch_may30a: In function 'void playLastRecording()':
    sketch_may30a:560: error: 'playMessage' was not declared in this scope
    playMessage.play(filename);
    ^

    'AudioPlaySdWavX' does not name a type

  8. #433
    Thanks to Gandalf the Grubby. I have stepped away for a couple of days. But, unlike Gandalf, I am back at sundown on the 3rd day and ready to work through the night using the *.hex and tweaked *.ino from 2 days ago. My phone has a contact open when the handset is lifted and a contact closure when it is put back on the receiver. To us electrical guys that is a 0 and a 1 which one would think would be a fall and a rise. However, from what I read in the 400+ messages above and in the software, a contact closure is a fall (connection to gnd) and a contact open is a rise (signal higher than ground). I have a SPDT set of 3 wires so I will rewire it if needed to match the hex code if I can get it to work.

    Many thanks for the structure corrections and fully vetted code. Wedding countdown is now 12 days. Fingers crossed.

  9. #434
    Following up on #433 above. *.wav file was copied to SD Card along with gbkcfg.txt and SD card put back into the Audio. Opened Loader and did File/Open *.hex file and browsed to the 4.0 Hex and plugged USB in to Audio Shield. Got my BlinkFast from 2 days ago when powered up and waited 5 seconds and hit the button. Below is the verbose information log from the loader log. It appears to have loaded and configured. I will test the phone again in a few minutes.

    20:34:10.609 (loader): Teensy Loader 1.56, begin program
    20:34:10.993 (loader): Listening for remote control on port 3149
    20:34:10.993 (loader): initialized, showing main window
    20:34:11.038 (loader): HID/win32: vid:0000 pid:0000 ver:0000
    20:34:11.083 (loader): HID/win32: vid:413C pid:B06E ver:0101 usb:0/140000/0/4/5
    20:34:11.085 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    20:34:11.086 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    20:34:11.087 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    20:34:11.088 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    20:34:11.089 (loader): HID/win32: vid:045E pid:0000 ver:0000
    20:34:11.090 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    20:34:11.090 (loader): HID/win32: vid:045E pid:0000 ver:0000
    20:34:11.090 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    20:34:11.090 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    20:34:11.090 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    20:34:11.090 (loader): HID/win32: vid:04F3 pid:2667 ver:5714
    20:34:11.096 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    20:34:11.133 (loader): HID/win32: vid:413C pid:B06F ver:0101 usb:0/140000/0/4/3/5
    20:34:11.133 (loader): HID/win32: vid:04F3 pid:2667 ver:5714
    20:34:11.133 (loader): HID/win32: vid:04F3 pid:2667 ver:5714
    20:34:11.135 (loader): HID/win32: vid:04F3 pid:2667 ver:5714
    20:34:11.135 (loader): HID/win32: vid:04F3 pid:30B6 ver:0001
    20:34:11.136 (loader): HID/win32: vid:04F3 pid:30B6 ver:0001
    20:34:11.136 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    20:34:11.136 (loader): HID/win32: vid:0000 pid:0000 ver:0000
    20:34:18.003 (loader): Open File event
    20:34:36.264 (loader): File "C:\Users\15712\Documents\Arduino\Audio-Guestbooks\audio-guestbook-T40.ino.hex", 192512 bytes
    20:34:36.268 (loader): File "audio-guestbook-T40.ino.hex". 192512 bytes
    20:34:44.517 (loader): secure mode can not be locked: this is Standard Teensy
    20:34:44.517 (loader): encryption is possible on this Teensy, but not yet configured
    20:34:44.517 (loader): but without secure mode locked, encryption will NOT be secure!
    20:34:44.517 (loader): Device came online, code_size = 2031616
    20:34:44.517 (loader): Board is: Teensy 4.0 (IMXRT1062), version 1.08
    20:34:44.564 (loader): File "C:\Users\15712\Documents\Arduino\Audio-Guestbooks\audio-guestbook-T40.ino.hex", 192512 bytes
    20:34:44.564 (loader): File "audio-guestbook-T40.ino.hex". 192512 bytes, 9% used
    20:34:44.618 (loader): set background IMG_ONLINE
    20:34:44.770 (loader): HID/win32: HidD_GetPreparsedData ok, device still online :-)
    20:35:03.411 (loader): Verbose Info event

  10. #435
    Teensy SD Card is showing in explorer. Click image for larger version. 

Name:	Mike_WV_ImagePost_435.png 
Views:	25 
Size:	20.6 KB 
ID:	32025. Blink fast is no longer flashing on Teensy. I get one flash 6 seconds after connecting USB cable from power pack or laptop. Lift handset. Nothing. Replace handset. Nothing. Connected earphones. Thinking phone speaker might be bad. Nothing with handset switch down. Nothing with handset switch up. Will now backtrack to see what I missed.

  11. #436
    Serial Monitor of COM5 shows the below message when connecting to the phone.

    After 21.36.33.596 I lifted the handset. Nothing. Put the handset back. Nothing. At 21.37,30 pushed and held in momentary play message button and got the Playing. However, there were no files so it went back to ready. Hit momentary pushbutton again and got 65535.wav to come up??? and Playing . Released pushbutton and back to Ready.
    Will backtrack and check my connections with a meter.


    21:36:33.596 -> Mode switched to: Initialising
    21:36:33.596 -> Serial set up correctly
    21:36:33.596 -> Audio block set to 128 samples
    21:36:33.596 -> No SD card in built-in slot
    21:36:33.596 -> SD card correctly initialized: pin 10
    21:36:33.596 ->
    21:36:33.596 -> &&&&& Dump MTPStorage Loop Data &&&&&
    21:36:33.596 -> Callback Data: 0 0x0 0
    21:36:33.596 -> 1 0xdb01 1
    21:36:33.596 -> 2 0x0 0
    21:36:33.596 -> 3 0x0 0
    21:36:33.596 -> 4 0x0 0
    21:36:33.596 -> File Systems:
    21:36:33.596 -> 0 0x20009dfc 1
    21:37:30.095 -> 65535.wav
    21:37:30.095 -> Mode switched to: Playing
    21:37:30.095 -> Mode switched to: Ready
    21:37:49.928 -> 65535.wav
    21:37:49.928 -> Mode switched to: Playing
    21:37:49.928 -> Mode switched to: Ready
    21:37:50.210 -> Button (pin 1) Release

  12. #437
    Tried loading the *40.hex file directly again. Here is the Verbose Loader.

    22:04:14.103 (loader): Teensy Loader 1.56, begin program
    22:04:14.458 (loader): Listening for remote control on port 3149
    22:04:14.458 (loader): initialized, showing main window
    22:04:14.500 (loader): HID/win32: vid:0000 pid:0000 ver:0000
    22:04:14.538 (loader): HID/win32: vid:413C pid:B06E ver:0101 usb:0/140000/0/4/5
    22:04:14.540 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    22:04:14.540 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    22:04:14.540 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    22:04:14.540 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    22:04:14.540 (loader): HID/win32: vid:045E pid:0000 ver:0000
    22:04:14.540 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    22:04:14.540 (loader): HID/win32: vid:045E pid:0000 ver:0000
    22:04:14.540 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    22:04:14.540 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    22:04:14.540 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    22:04:14.555 (loader): HID/win32: vid:04F3 pid:2667 ver:5714
    22:04:14.555 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    22:04:14.591 (loader): HID/win32: vid:413C pid:B06F ver:0101 usb:0/140000/0/4/3/5
    22:04:14.591 (loader): HID/win32: vid:04F3 pid:2667 ver:5714
    22:04:14.591 (loader): HID/win32: vid:04F3 pid:2667 ver:5714
    22:04:14.591 (loader): HID/win32: vid:04F3 pid:2667 ver:5714
    22:04:14.591 (loader): HID/win32: vid:04F3 pid:30B6 ver:0001
    22:04:14.591 (loader): HID/win32: vid:04F3 pid:30B6 ver:0001
    22:04:14.591 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
    22:04:14.591 (loader): HID/win32: vid:0000 pid:0000 ver:0000
    22:04:17.829 (loader): Open File event
    22:04:26.719 (loader): File "C:\Users\15712\Documents\Arduino\Audio-Guestbooks\audio-guestbook-T40.ino.hex", 192512 bytes
    22:04:26.719 (loader): File "audio-guestbook-T40.ino.hex". 192512 bytes
    22:04:34.446 (loader): Verbose Info event
    22:04:46.390 (loader): secure mode can not be locked: this is Standard Teensy
    22:04:46.390 (loader): encryption is possible on this Teensy, but not yet configured
    22:04:46.399 (loader): but without secure mode locked, encryption will NOT be secure!
    22:04:46.399 (loader): Device came online, code_size = 2031616
    22:04:46.406 (loader): Board is: Teensy 4.0 (IMXRT1062), version 1.08
    22:04:46.444 (loader): File "C:\Users\15712\Documents\Arduino\Audio-Guestbooks\audio-guestbook-T40.ino.hex", 192512 bytes
    22:04:46.450 (loader): File "audio-guestbook-T40.ino.hex". 192512 bytes, 9% used
    22:04:46.490 (loader): set background IMG_ONLINE
    22:04:46.646 (loader): HID/win32: HidD_GetPreparsedData ok, device still online :-)

    Light next to USB connection on Teensy is now on constantly (red). Oops. Accidentally hit Reboot in loader. Not sure where I am now.

    Need to take a break. Will meter my pins and hook switch and momentary pushbutton again and let you know where it stands.

  13. #438
    Checked my connections again. Pin 0 is confirmed as normally open contact to hook and Pin 1 is confirmed as normally open contact to momentary playback pushbutton. Modified your/our gbkcfg.txt on my SD Card Root Drive Line 1 from hookpin 2 to hookpin 1 and put SD Card back into the Audio Shield. Pushed audio-guestbook-t40.ino.hex back into Teensy. Below is the Serial Monitor of what happened next.

    Serial Monitor says that it went into "Prompting" at 23.28.22.612 but I heard nothing on the phone earpiece.

    I tried again with my earbuds and still got nothing but did get the "Starting Recording" message so I babbled into the phones 1960s speaker.

    Tried recording again and babbled some more and hung up Went to "Ready" at 23.29.38.703 and Enabled MTP storage device checks.

    So I decided to hit the momentary Play button and it switched to "Playing" mode and appears to have locked up.

    Getting somewhere. I will check the SD Card and see if any of my babbling is there. Concerned about speaker and microphone now that switches appear to work. If backwards for now.

    When it wen
    23:27:35.854 -> No SD card in built-in slot
    23:27:35.854 -> SD card correctly initialized: pin 10
    23:27:35.854 ->
    23:27:35.854 -> Settings:
    23:27:35.854 -> Volume name ''My Audio Guestbook''
    23:27:35.854 -> hookpin 0, idle level 1
    23:27:35.854 -> playpin 1, idle level 1
    23:27:35.854 -> micgain 38
    23:27:35.854 -> speakervol 0.51
    23:27:35.854 -> beepvol 0.11
    23:27:35.854 -> greetingvol 0.51
    23:27:35.854 -> playvol 0.90
    23:27:35.854 ->
    23:27:35.854 -> &&&&& Dump MTPStorage Loop Data &&&&&
    23:27:35.854 -> Callback Data: 0 0x0 0
    23:27:35.854 -> 1 0xdbe9 1
    23:27:35.854 -> 2 0x0 0
    23:27:35.854 -> 3 0x0 0
    23:27:35.854 -> 4 0x0 0
    23:27:35.854 -> File Systems:
    23:27:35.854 -> 0 0x2000a1fc 1
    23:28:22.612 -> Handset lifted
    23:28:22.612 -> Mode switched to: Prompting
    23:28:23.320 -> Button (pin 0) Release
    23:28:23.604 -> Mode switched to: Ready
    23:28:40.121 -> Handset lifted
    23:28:40.121 -> Mode switched to: Prompting
    23:28:44.750 -> Starting Recording
    23:28:46.011 -> Disabled MTP storage device checks
    23:28:46.011 -> Opened file !
    23:28:46.011 -> Recording to 00003.wav
    23:28:46.011 -> Mode switched to: Recording
    23:29:00.737 -> Stopping Recording
    23:29:00.784 -> header written
    23:29:00.784 -> Subchunk2: 1299414
    23:29:00.784 -> Closed file
    23:29:00.784 -> Mode switched to: Ready
    23:29:00.784 -> Enabled MTP storage device checks
    23:29:22.233 -> Handset lifted
    23:29:22.233 -> Mode switched to: Prompting
    23:29:26.856 -> Starting Recording
    23:29:28.086 -> Disabled MTP storage device checks
    23:29:28.086 -> Opened file !
    23:29:28.086 -> Recording to 00004.wav
    23:29:28.086 -> Mode switched to: Recording
    23:29:38.656 -> Stopping Recording
    23:29:38.703 -> header written
    23:29:38.703 -> Subchunk2: 929750
    23:29:38.703 -> Closed file
    23:29:38.703 -> Mode switched to: Ready
    23:29:38.703 -> Enabled MTP storage device checks
    23:29:48.576 -> 00004.wav
    23:29:48.576 -> Mode switched to: Playing

  14. #439
    Checked my connections again. Pin 0 is confirmed as normally open contact to hook and Pin 1 is confirmed as normally open contact to momentary playback pushbutton. Modified your/our gbkcfg.txt on my SD Card Root Drive Line 1 from hookpin 2 to hookpin 1 and put SD Card back into the Audio Shield. Pushed audio-guestbook-t40.ino.hex back into Teensy. Below is the Serial Monitor of what happened next.

    Serial Monitor says that it went into "Prompting" at 23.28.22.612 but I heard nothing on the phone earpiece.

    I tried again with my earbuds and still got nothing but did get the "Starting Recording" message so I babbled into the phones 1960s speaker.

    Tried recording again and babbled some more and hung up Went to "Ready" at 23.29.38.703 and Enabled MTP storage device checks.

    So I decided to hit the momentary Play button and it switched to "Playing" mode and appears to have locked up.

    Getting somewhere. I will check the SD Card and see if any of my babbling is there. Concerned about speaker and microphone now that switches appear to work. If backwards for now.

    When it wen
    23:27:35.854 -> No SD card in built-in slot
    23:27:35.854 -> SD card correctly initialized: pin 10
    23:27:35.854 ->
    23:27:35.854 -> Settings:
    23:27:35.854 -> Volume name ''My Audio Guestbook''
    23:27:35.854 -> hookpin 0, idle level 1
    23:27:35.854 -> playpin 1, idle level 1
    23:27:35.854 -> micgain 38
    23:27:35.854 -> speakervol 0.51
    23:27:35.854 -> beepvol 0.11
    23:27:35.854 -> greetingvol 0.51
    23:27:35.854 -> playvol 0.90
    23:27:35.854 ->
    23:27:35.854 -> &&&&& Dump MTPStorage Loop Data &&&&&
    23:27:35.854 -> Callback Data: 0 0x0 0
    23:27:35.854 -> 1 0xdbe9 1
    23:27:35.854 -> 2 0x0 0
    23:27:35.854 -> 3 0x0 0
    23:27:35.854 -> 4 0x0 0
    23:27:35.854 -> File Systems:
    23:27:35.854 -> 0 0x2000a1fc 1
    23:28:22.612 -> Handset lifted
    23:28:22.612 -> Mode switched to: Prompting
    23:28:23.320 -> Button (pin 0) Release
    23:28:23.604 -> Mode switched to: Ready
    23:28:40.121 -> Handset lifted
    23:28:40.121 -> Mode switched to: Prompting
    23:28:44.750 -> Starting Recording
    23:28:46.011 -> Disabled MTP storage device checks
    23:28:46.011 -> Opened file !
    23:28:46.011 -> Recording to 00003.wav
    23:28:46.011 -> Mode switched to: Recording
    23:29:00.737 -> Stopping Recording
    23:29:00.784 -> header written
    23:29:00.784 -> Subchunk2: 1299414
    23:29:00.784 -> Closed file
    23:29:00.784 -> Mode switched to: Ready
    23:29:00.784 -> Enabled MTP storage device checks
    23:29:22.233 -> Handset lifted
    23:29:22.233 -> Mode switched to: Prompting
    23:29:26.856 -> Starting Recording
    23:29:28.086 -> Disabled MTP storage device checks
    23:29:28.086 -> Opened file !
    23:29:28.086 -> Recording to 00004.wav
    23:29:28.086 -> Mode switched to: Recording
    23:29:38.656 -> Stopping Recording
    23:29:38.703 -> header written
    23:29:38.703 -> Subchunk2: 929750
    23:29:38.703 -> Closed file
    23:29:38.703 -> Mode switched to: Ready
    23:29:38.703 -> Enabled MTP storage device checks
    23:29:48.576 -> 00004.wav
    23:29:48.576 -> Mode switched to: Playing

  15. #440
    Correction to post #439 above. "Modified your/our gbkcfg.txt on my SD Card Root Drive Line 1 from hookpin 2 to hookpin 0 ".

  16. #441
    Trying to edit code for risingEdge and fallingEdge and running into problems that appear to take me backwards. Will rewire my hook switch that opens on lift to close on lift to match "normal" in code and new gbkcfg.txt file tomorrow. Need to find my soldering iron. I still think the first line of the gbkcfg.txt should be Pin 0. Still no sound from either phone earpiece or my earbuds and mic not working. But code is compiling well. At least that is something. Goodnight from the American Colonies.

  17. #442
    Senior Member h4yn0nnym0u5e's Avatar
    Join Date
    Apr 2021
    Location
    Cambridgeshire, UK
    Posts
    895
    Only you know which pins you used for the hook switch and play button! The numbering on the Teensy is logical rather than physical, so you need to check against the reference card or https://www.pjrc.com/store/teensy40.html#pins. But post #439 suggests you have them correct in gbkcfg.txt.

    A normally-open switch will appear as 1, and go to 0 when closed, when its pin is configured INPUT_PULLUP. There ought to be no need to get your soldering iron out, just change hookidle and playidle settings.

    With a Teensy 4.0 using the SD card on the audio adaptor, the LED will glow during SD card accesses. The blink you see at 6s after boot is the config file read, and it should glow during recording and playback too.

    There’s a “ready” beep after boot, so if you don’t hear that there’s a hardware problem….

    Ah rats, I see what I’ve done! Wait one…

  18. #443
    Senior Member h4yn0nnym0u5e's Avatar
    Join Date
    Apr 2021
    Location
    Cambridgeshire, UK
    Posts
    895
    OK, so Gandalf the Blithering Idiot messed up.

    Here's a new set of hex files, or get the latest commit from https://github.com/h4yn0nnym0u5e/aud...feature/doc-01
    AudioGuestbookHexV2.zip

    Full disclosure ... I've modified my audio adaptor to use the alternate IC address, and left that line in the code: sgtl5000_1.setAddress(HIGH);. This basically causes all the audio stuff to fail, but not so it crashes or anything... The new gbkcfg.txt has a line in for setting it at run-time, along with one that lets you set the maximum recording length, which was previously hard-coded to two minutes.

    Future readers: DO NOT USE THE CODE FROM POST #431 ABOVE!

  19. #444
    Excellent. I see now what you did there with the gbkcfg.txt file on the SD Chip. I finally got some sound and it played the "Greatings Earthlings" *.wav file and I got to record myself. Attached shows the files side by side.

    MWG_WV_Guestbook_Trail_Image_444.pdf

    I have some constant clicking going on but it is not too bad. I may reduce the speaker volume to see what I get.

    Thanks loads for the *.hex file. For some reason my Serial Monitoring does not let me watch what is going on. The ports are not shown any more. It may be a USB Cable/Connector issue.

    Regardless, I have a working phone thanks to a fellow Blithering Idiot.

  20. #445
    Senior Member h4yn0nnym0u5e's Avatar
    Join Date
    Apr 2021
    Location
    Cambridgeshire, UK
    Posts
    895
    Great news, hope the wedding goes well!

    Yes, the constant clicking seems to be a "feature" of the Teensy 4.0 / audio adaptor conbination - see my post #311 and on for the discussion of what I think is going on. Using a Teensy 4.1 and its built-in SD card slot seems to work for many, I wouldn't recommend trying to modify your audio adaptor this close to the wedding...

  21. #446
    The clicking appears to be there all the time in the earpiece whenever it is lifted. Before the message, during the message, the beep and during recording. However, one does not hear the clicking when the message is being played during playback.

    Concerning issue: It all worked fine 23 hours ago and when I went to show my wife this evening it did not record my message. All I got was significant static. Serial Monitoring showed everything was going as planned but no recording. Reloaded everyything and it worked but a lot of static on the playback. Reduced the mic gain again and it seems to be working fine again.

    Disconnected the USB cable from the Teensy and will wait 24 hours to see if it loses its way again. Should I power this thing for a few hours every day? I will check in another 23 hours to see if it is still there.

  22. #447
    Senior Member h4yn0nnym0u5e's Avatar
    Join Date
    Apr 2021
    Location
    Cambridgeshire, UK
    Posts
    895
    Well that's a bonus, if the clicking isn't on the recordings (which are, after all, the important thing). But it doesn't ring any bells to me as to possible causes. Have you checked that the files are OK if you remove the SD card and put it into your PC? Or at least used MTP to copy them over to the PC.

    I've not encountered any particular stability problems - once it's working it seems to go for days. I guess if the gbkcfg.txt doesn't load properly on a reboot and the default levels are wrong, then you'd be likely to experience issues. I'd be inclined to leave it plugged in 24/7 and give it the occasional test, probably more often than every 24 hours.

    If you post a file* with the "static" we might be able to track down the cause, or at least eliminate some candidates. The trouble with these written messages is they can't convey what the sound is actually like!

    * you'll have to put the WAV file(s) in a ZIP file, because the forum doesn't allow WAV as an attachment type.

  23. #448
    OK. Following up on 446 and 446 and the "Concerning Issue" . After leaving the Teensy 4.0 unpowered since yesterday I connected it up to the laptop and got the Serial Monitor messages below and recorded four (4) messages. I was able to play 3 of them as only the most recent message would play when indexing the momentary button. It appears that my "Concerning Issue" is unfounded or the Teensy healed itself from the embarrassing demonstration to my wife from last night. That is usually the case. Right?

    I think the quality is acceptable. Will see if the wife and groom and bride agree. Fingers crossed.

    Again, below is the Serial Monitor working exactly as it should. I will see if I can post a *.zip file. The icon above only allows .png/.gif/jpeg. I will paly around with #449 and see if I can figure out how to send/post a *.zip

    21:08:08.554 -> Mode switched to: Initialising
    21:08:08.554 -> Serial set up correctly
    21:08:08.554 -> Audio block set to 128 samples
    21:08:08.554 -> No SD card in built-in slot
    21:08:08.554 -> SD card correctly initialized: pin 10
    21:08:08.554 ->
    21:08:08.554 -> &&&&& Dump MTPStorage Loop Data &&&&&
    21:08:08.554 -> Callback Data: 0 0x0 0
    21:08:08.554 -> 1 0xdba9 1
    21:08:08.554 -> 2 0x0 0
    21:08:08.554 -> 3 0x0 0
    21:08:08.554 -> 4 0x0 0
    21:08:08.554 -> File Systems:
    21:08:08.554 -> 0 0x20009dfc 1
    21:08:31.096 -> Handset lifted
    21:08:31.096 -> Mode switched to: Prompting
    21:08:36.939 -> Starting Recording
    21:08:38.159 -> Disabled MTP storage device checks
    21:08:38.159 -> Opened file !
    21:08:38.159 -> Recording to 00001.wav
    21:08:38.159 -> Mode switched to: Recording
    21:08:52.314 -> Stopping Recording
    21:08:52.349 -> header written
    21:08:52.349 -> Subchunk2: 1246166
    21:08:52.349 -> Closed file
    21:08:52.349 -> Mode switched to: Ready
    21:08:52.349 -> Enabled MTP storage device checks
    21:09:11.618 -> Handset lifted
    21:09:11.618 -> Mode switched to: Prompting
    21:09:17.446 -> Starting Recording
    21:09:18.697 -> Disabled MTP storage device checks
    21:09:18.697 -> Opened file !
    21:09:18.697 -> Recording to 00002.wav
    21:09:18.697 -> Mode switched to: Recording
    21:09:39.269 -> Stopping Recording
    21:09:39.269 -> header written
    21:09:39.269 -> Subchunk2: 1811926
    21:09:39.269 -> Closed file
    21:09:39.269 -> Mode switched to: Ready
    21:09:39.269 -> Enabled MTP storage device checks
    21:09:46.845 -> 00002.wav
    21:09:46.845 -> Mode switched to: Playing
    21:10:07.375 -> Mode switched to: Ready
    21:10:12.763 -> 00002.wav
    21:10:12.763 -> Mode switched to: Playing
    21:10:33.307 -> Mode switched to: Ready
    21:10:42.835 -> Handset lifted
    21:10:42.835 -> Mode switched to: Prompting
    21:10:48.665 -> Starting Recording
    21:10:49.931 -> Disabled MTP storage device checks
    21:10:49.931 -> Opened file !
    21:10:49.931 -> Recording to 00003.wav
    21:10:49.931 -> Mode switched to: Recording
    21:11:08.534 -> Stopping Recording
    21:11:08.534 -> header written
    21:11:08.534 -> Subchunk2: 1640150
    21:11:08.534 -> Closed file
    21:11:08.534 -> Mode switched to: Ready
    21:11:08.534 -> Enabled MTP storage device checks
    21:11:14.189 -> 00003.wav
    21:11:14.189 -> Mode switched to: Playing
    21:11:32.749 -> Mode switched to: Ready
    21:11:37.611 -> Handset lifted
    21:11:37.611 -> Mode switched to: Prompting
    21:11:43.436 -> Starting Recording
    21:11:44.699 -> Disabled MTP storage device checks
    21:11:44.699 -> Opened file !
    21:11:44.699 -> Recording to 00004.wav
    21:11:44.699 -> Mode switched to: Recording
    21:12:14.413 -> Stopping Recording
    21:12:14.460 -> header written
    21:12:14.460 -> Subchunk2: 2620630
    21:12:14.460 -> Closed file
    21:12:14.460 -> Mode switched to: Ready
    21:12:14.460 -> Enabled MTP storage device checks

  24. #449
    Junior Member
    Join Date
    Sep 2023
    Posts
    1
    Hi guys, im in a bit off a struggle with the project. The code seems to be correct, I followed al the steps and I dont get any errors. The Teensy 4.0 is solderd to the Teensy Audio-board and I know my hook switch is working (switches from 1 to ,xxx when pressed).

    When I run the Serial Monitor with the Teensy connected I get the following message:

    Serial set up correctly
    Audio block set to 256 samples
    Mode switched to: Initialising
    SD card correctly initialized
    Add **SDClass** file system
    Added SD card via MTP
    Mode switched to: Ready
    &&&&& Dump MTPStorage Loop Data &&&&&
    Callback Data: 0 0x0 0
    1 0xd3f9 1
    2 0x0 0
    3 0x0 0
    4 0x0 0
    File Systems:
    0 0x200031f8 1
    Then nothing happens. It just keeps showing that information. Any troubleshooting tips?

  25. #450
    Junior Member
    Join Date
    Sep 2023
    Posts
    1
    Hello everyone,
    followed this thread but find no answer to my problem of my second audio guestbook:
    my .wav-files just recording nearly the half the recordings.

    Hardware is the same like audio guestbook no.1:
    Teensy Audio Shield
    Teensy 4.1
    electret microphone
    SD Card SanDisk

    all the same versions.
    Changing the new Teensy 4.1 with the old one solved the problem, so the code of the new Teensy 4.1 should be the problem right?
    I am stuck at the moment because I don't know which settings i should change in the code.

    Do you have any idea? Thanks a lot in advance!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •