New Teensy 3.1 Projects To Share

Status
Not open for further replies.

craiglindley

Well-known member
Hello,

Like many of the people who read this blog I am totally impressed with the Teensy 3.1 micro controller and with Paul's commitment to the community of people who put his controllers and his other products to work.

I have completed two projects based on the Teensy 3.1 and want to share them here in the hopes that someone will find them useful.

The first project which I call the Light Appliance uses a Teensy 3.1 and the PixelMatrix driver to control a 32x32 RGB LED matrix. The Light Appliance can display animated GIFs, runs many fun and colorful graphics functions, displays time, date and temperature and can even play some classic computer games all controlled by an IR remote control. Information about the Light Appliance is available at http://www.craigandheather.net/celelightappliance.html.

The second project which I call MIDI Buddy, uses a Teensy 3.1 to control the SAM-2195 single chip MIDI synthesizer. The MIDI Buddy has a MIDI input for connection of a MIDI controller, can play standard MIDI files from its SD memory card, can record and playback MIDI riffs from the SD card, can run code to programmatically generate data for the synthesizer and is an excellent platform for experimenting with all things MIDI. Information about MIDI Buddy is available at http://www.craigandheather.net/celemidibuddy.html.

Both of these project will be published in Nuts and Volts magazine in the near future.

If you do something cool with either of these project please post it on this site for everyone to read.

Cheers,

Craig Lindley
 
Hello Craig,


Thank you for your excellent Midi Buddy project! All parts are connected, but I have errors on building process :

HTML:
/tmp/build7632845037380780056.tmp/Utils.cpp: In function 'JS_DIRECTION _readJoystick(int, int)':
/tmp/build7632845037380780056.tmp/Utils.cpp:168:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void waitForTicCount(int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:56:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (targetTicCount < ticCount) {
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleTimeDivision(int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:67:57: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Time Division (PPQN): %d\n", _ppqn);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:72:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "ticTime in microseconds: %d\n", ticTimeInMicroseconds);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleNoteOff(uint32_t, int, int, int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:78:112: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Note Off at: %d for Channel: %d, Note: %d, Velocity: %d\n", tics, channel, note, velocity);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleNoteOn(uint32_t, int, int, int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:86:111: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Note On at: %d for Channel: %d, Note: %d, Velocity: %d\n", tics, channel, note, velocity);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleNoteAfterTouch(uint32_t, int, int, int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:94:114: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Note After Touch at: %d for Channel: %d, Note: %d, Value: %d\n", tics, channel, note, value);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleController(uint32_t, int, int, int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:100:120: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Controller at: %d for Channel: %d, Controller: %d, Value: %d\n", tics, channel, controller, value);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleProgramChange(uint32_t, int, int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:108:100: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Program Change at: %d for Channel: %d, Program: %d\n", tics, channel, program);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleChannelAfterTouch(uint32_t, int, int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:116:101: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Channel After Touch at: %d for Channel: %d, Value: %d\n", tics, channel, value);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handlePitchBend(uint32_t, int, int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:121:92: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Pitch Bend at: %d for Channel: %d, Value: %d\n", tics, channel, value);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleSequenceNumber(uint32_t, int, int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:128:100: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Sequence at: %d - NumberMSB: %d, NumberLSB: %d\n", tics, numberMSB, numberLSB);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleTextEvent(uint32_t, char*)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:133:60: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Text Eventat: %d: - %s\n", tics, text);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleCopyrightNotice(uint32_t, char*)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:138:67: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Copyright Notice at: %d: - %s\n", tics, text);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleSequenceTrackName(uint32_t, char*)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:143:70: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Sequence Track Name at: %d: - %s\n", tics, text);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleInstrumentName(uint32_t, char*)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:148:66: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Instrument Name at: %d: - %s\n", tics, text);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleLyric(uint32_t, char*)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:153:56: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Lyric at: %d: - %s\n", tics, text);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleMarker(uint32_t, char*)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:158:57: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Marker at: %d: - %s\n", tics, text);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleCuePoint(uint32_t, char*)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:163:60: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Cue Point at: %d: - %s\n", tics, text);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleMidiChannelPrefix(uint32_t, int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:168:73: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Midi Channel Prefix at: %d: - %d\n", tics, channel);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleSetTempo(uint32_t, int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:173:91: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Set Tempo (micro seconds / quarter note) at: %d - %d\n", tics, tempo);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:179:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "ticTime in microseconds: %d\n", ticTimeInMicroseconds);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleSMPTEOffset(uint32_t, int, int, int, int, int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:185:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
tics, hours, mins, secs, frames, subFrames);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleTimeSignature(uint32_t, int, int, int, int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:191:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
tics, numerator, denominator, metro, _32nds);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleKeySignature(uint32_t, int, int)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:196:85: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Key Signature at: %d - Key: %d, Scale: %d\n", tics, key, scale);
^
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp: In function 'void handleSequencerSpecificMetaEvent(uint32_t, char*)':
/tmp/build7632845037380780056.tmp/MIDIPlayer.cpp:201:83: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
logger(LOG_INFO, "Sequencer Specific Meta Event at: %d - Data: \n", tics, data);
^
/tmp/build7632845037380780056.tmp/UISMFunctions.cpp:28:28: fatal error: AUISMFunctions.h: No such file or directory
#include "AUISMFunctions.h"
^
compilation terminated.

I'm quite new on teensy but already uploaded a blink test.

Linux Mint 17
Arduino 1.6.5
Teensyduino 1.24

Any idea welcome,
Jeff
 
Hi Jeff,

You are certainly getting a lot of warnings but only one error I see. I think the file included in UISMFunctions.cpp should be UISMFunctions.h not AUISMFunctions.h. I don't know where the A in the file name came from but I see it in my source as well. Edit this and let me know what happens. You can also email me directly at calhjh@gmail.com instead of using this public forum to resolve this issue.

Hope you have fun with Midi Buddy
 
Status
Not open for further replies.
Back
Top