playfultechnology / audio-guestbook

The "audio guestbook" is a converted telephone handset that guests can use to leave recorded messages at weddings and parties
GNU General Public License v3.0
140 stars 88 forks source link

Arduino IDE 2.0 Configurations #60

Open smaybs opened 1 year ago

smaybs commented 1 year ago

Just getting familiar with the Arduino 2.0 release. It no longer uses the platform and boards text files and, as such, not clear how to incorporate the recommended configuration adds referenced in the documentation for the audio-guestbook.

nrich50 commented 1 year ago

i am using arduio ide 1.8.19 and have no issue getting the boards to work im only having the issue of no sound or mic input

smaybs commented 1 year ago

As for the speaker and mic working ... I assume they were functioning pieces to begin with (could be tested) ... you might re-check your leads to make sure they are secure and to the correct wires (I've found that not every manufacturer follows a proper wire color use ... for example I've seen red wires get connected to green, etc.)

RavioliStorm commented 1 year ago

@smaybs Have you been able to figure this one out? I'm having a similar issue (noob here)

smaybs commented 1 year ago

Ravioli ... I'm still working my way through things. You might want to consider using the legacy version as the instructions all support it. I am interested in comparing the two to learn.

Jipsey-A commented 1 year ago

@smaybs did using the legacy version of Arduino work for you?

rickstaa commented 1 year ago

Configuring Arduino IDE 2.0 for Teensyduino Boards on Windows 11

For future reference, here are the steps to configure the Arduino IDE 2.0 on a Windows 11 system for use with Teensyduino boards:

Step 1: Download and Install Arduino IDE 2.0

If you haven't already, download and install the Arduino IDE 2.0.

Step 2: Add Teensyduino Board Manager URL

To enable Teensyduino board support within the Arduino IDE 2.0, follow these instructions:

Step 3: Install Teensyduino

In the Arduino IDE, go to the "Tools" menu, select "Board," and then "Boards Manager." Search for "Teensy" and install Teensyduino to add support for Teensy boards in the IDE.

Step 4: Install MTP_Teensy Library

For certain functions, you may need to install the MTP_Teensy library. Here's how to do it:

Step 5: Set USB Type

Configure the USB type for your Teensy board within the Arduino IDE. Select "Tools," then "USB Type," and choose "Serial + MTP Disk (Experimental)".

Step 6: Locate boards.local.txt and platform.txt Files

To find these configuration files, follow the instructions in this answer from the Arduino team. Typically, these files are located in a directory similar to C:\Users\<USER>\AppData\Local\Arduino15\packages\teensy\hardware\avr\, but the exact path may vary based on your setup.

Step 7: Modify boards.local.txt and platform.txt Files

Refer to README.md#installation-method for instructions on adding or modifying the boards.local.txt and platform.txt files. These changes are typically related to the build.flags.audio setting.

+build.flags.audio=-DAUDIO_BLOCK_SAMPLES=128

-recipe.cpp.o.pattern="{compiler.path}{build.toolchain}{build.command.g++}" -c {build.flags.optimize} {build.flags.common} {build.flags.dep} {build.flags.cpp} {build.flags.cpu} {build.flags.defs} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DF_CPU={build.fcpu} -D{build.usbtype} -DLAYOUT_{build.keylayout} "-I{build.path}/pch" {includes} "{source_file}" -o "{object_file}"
+recipe.cpp.o.pattern="{compiler.path}{build.toolchain}{build.command.g++}" -c {build.flags.audio} {build.flags.optimize} {build.flags.common} {build.flags.dep} {build.flags.cpp} {build.flags.cpu} {build.flags.defs} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DF_CPU={build.fcpu} -D{build.usbtype} -DLAYOUT_{build.keylayout} "-I{build.path}/pch" {includes} "{source_file}" -o "{object_file}"

-recipe.c.o.pattern="{compiler.path}{build.toolchain}{build.command.gcc}" -c {build.flags.optimize} {build.flags.common} {build.flags.dep} {build.flags.c} {build.flags.cpu} {build.flags.defs} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DF_CPU={build.fcpu} -D{build.usbtype} -DLAYOUT_{build.keylayout} {includes} "{source_file}" -o "{object_file}"
+recipe.c.o.pattern="{compiler.path}{build.toolchain}{build.command.gcc}" -c {build.flags.audio} {build.flags.optimize} {build.flags.common} {build.flags.dep} {build.flags.c} {build.flags.cpu} {build.flags.defs} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DF_CPU={build.fcpu} -D{build.usbtype} -DLAYOUT_{build.keylayout} {includes} "{source_file}" -o "{object_file}"

-recipe.S.o.pattern="{compiler.path}{build.toolchain}{build.command.gcc}" -c {build.flags.optimize} {build.flags.common} {build.flags.dep} {build.flags.S} {build.flags.cpu} {build.flags.defs} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DF_CPU={build.fcpu} -D{build.usbtype} -DLAYOUT_{build.keylayout} {includes} "{source_file}" -o "{object_file}"
+recipe.S.o.pattern="{compiler.path}{build.toolchain}{build.command.gcc}" -c {build.flags.audio} {build.flags.optimize} {build.flags.common} {build.flags.dep} {build.flags.S} {build.flags.cpu} {build.flags.defs} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DF_CPU={build.fcpu} -D{build.usbtype} -DLAYOUT_{build.keylayout} {includes} "{source_file}" -o "{object_file}"

[!IMPORTANT]\ Upon restart, a known bug in Arduino IDE 2.0 may prevent it from recognizing changes in the boards.txt and boards.local.txt files. If you encounter this issue, delete the C:\Users\<user name>\AppData\Roaming\arduino-ide\ folder for the "Audio Tweaks" to appear correctly.