defragster
Senior Member+
@nathanSuperStar- I connected a Teensy Touch pin that uses Teensy's [LC, 3.2, 3.6] single wire touchRead() as a button. I just started using that because it works well and easier than making a real button to push. I saw you had a SensorToButton.h class - Being a 'c' guy too lazy to make my own class layout - I rewrote that to accommodate the capacitive nature and use of that touchRead() function and it works to encapsulate what I was having to do manually in the earlier test code - it does work with that library wasPressed and wasReleased so I left them and it works in the song_with_MOD sketch.
Can you tell me if I should leave it pointing you with MIT license as it stands? :: View attachment TouchButton_src.zip
I just looked at IDE's verbose - there are many screens of ' warning: narrowing conversion':
Can you tell me if I should leave it pointing you with MIT license as it stands? :: View attachment TouchButton_src.zip
I just looked at IDE's verbose - there are many screens of ' warning: narrowing conversion':
// …
"T:\\arduino_1.8.6_TYC\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -Os --specs=nano.specs -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=143 -DARDUINO=10806 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\TEMP\\arduino_build_489881/pch" "-IT:\\arduino_1.8.6_TYC\\hardware\\teensy\\avr\\cores\\teensy3" "-It:\\tcode\\libraries\\TouchButton\\src" "-It:\\tcode\\libraries\\MusicWithoutDelay\\src" "T:\\TEMP\\arduino_build_489881\\sketch\\TchSong_with_MOD.ino.cpp" -o "T:\\TEMP\\arduino_build_489881\\sketch\\TchSong_with_MOD.ino.cpp.o"
In file included from t:\tcode\libraries\MusicWithoutDelay\src/synth.h:13:0,
from t:\tcode\libraries\MusicWithoutDelay\src/MusicWithoutDelay.h:32,
from T:\tCode\TouchRead\TchSong_with_MOD\TchSong_with_MOD.ino:29:
t:\tcode\libraries\MusicWithoutDelay\src/tables.h:289:1: warning: narrowing conversion of '-3' from 'int' to 'char' inside { } [-Wnarrowing]
};
^
t:\tcode\libraries\MusicWithoutDelay\src/tables.h:289:1: warning: narrowing conversion of '-6' from 'int' to 'char' inside { } [-Wnarrowing]
t:\tcode\libraries\MusicWithoutDelay\src/tables.h:289:1: warning: narrowing conversion of '-9' from 'int' to 'char' inside { } [-Wnarrowing]
//...