Show Posts
Pages: 1 ... 21 22 [23] 24 25 ... 84
331  Using Arduino / Sensors / Re: New library for TCS230 RGB Color Sensor on: December 12, 2013, 03:46:26 pm
You can connect the sensor to any pin as long as you tell the library which one is which when you create the object - please read the documentation PDF that comes with the library.

The one exception is the frequency reading pin. From the header file:

Quote
  This library has a dependency on the FreqCount library for frequency counting. FreqCount library is available at  http://www.pjrc.com/teensy/td_libs_FreqCount.html
   
  ** IMPORTANT NOTE**
  FreqCount imposes a limitation that the frequency can only be counted on specific pins and limits the use of other pins as   follows:
  Board       Input Pin Pins Unusable with analogWrite()
  ----------- --------- -------------------------------- 
  Arduino Uno      5      3, 9, 10, 11
  Arduino 2009    5      3, 9, 10, 11
  Arduino Mega    47    9, 10, 44, 45, 46
  Sanguino            1      12, 13, 14, 15
332  Using Arduino / Audio / Re: MIDI library conflict? on: December 12, 2013, 03:24:18 pm
Stop using the serial port for prints if your using it for midi. You just cannot do that. If one library (midi) is using a resource it is unavailable to the other code.
333  Using Arduino / Audio / Re: MIDI library conflict? on: December 12, 2013, 03:43:38 am
Quote
Just cast the data[0] parameter to midi::MidiType.

The cast should be to kMIDIType. It is actually not part of the class definition if you look in the header file, but an external enumerated type.
334  Using Arduino / Audio / Re: MIDI library conflict? on: December 11, 2013, 08:14:04 pm
Just cast the data[0] parameter to midi::MidiType.
335  Using Arduino / Audio / Re: MIDI library conflict? on: December 11, 2013, 01:36:10 pm
Close. I am not sure that the get type is what you want but try it.
336  Using Arduino / Audio / Re: MIDI library conflict? on: December 11, 2013, 05:56:14 am
Take all references to serial out of the MIDIfile example sketch that you are using. This was covered in my longer post before.

The MIDIfile library DOES NOT use serial, only the example sketch and it is just an example. You should be handling the callback differently in your code. Again as per my long post above.
337  Using Arduino / Audio / Re: MIDI library conflict? on: December 10, 2013, 03:56:23 am
In the MIDI library header file there is this
Code:
#define USE_SERIAL_PORT         Serial      // Change the number (to Serial1 for example) if you want
                                            // to use a different serial port for MIDI I/O.

which means that you can change the serial port used to something else if you want to.

The MIDI library has a generic function to send messages
Code:
void send(kMIDIType type, byte param1, byte param2, byte channel);

which you can invoke in the MIDIfile callback function, which receives as its parameter a pointer to this structure (defined in the MIDIfile header file)
Code:
typedef struct
{
uint8_t track; // the track this was on
uint8_t channel; // the midi channel
uint8_t size; // the number of data bytes
uint8_t data[4]; // the data. Only 'size' bytes are valid
} midi_event;

- The track you can ignore, as it is the track in the SMF being processed.
- The channel should be mapped to the channel in the send() function above. Need to take care that whether the channel is zero or one based in MIDI. MIDIfile is zero based.
- The rest of the data[] are KMIType, param1 and param2.

If you look at MIDI  header file KMIType is
Code:
enum kMIDIType {
NoteOff               = 0x80, ///< Note Off
NoteOn                = 0x90, ///< Note On
AfterTouchPoly        = 0xA0, ///< Polyphonic AfterTouch
ControlChange         = 0xB0, ///< Control Change / Channel Mode
ProgramChange         = 0xC0, ///< Program Change
AfterTouchChannel     = 0xD0, ///< Channel (monophonic) AfterTouch
PitchBend             = 0xE0, ///< Pitch Bend
SystemExclusive       = 0xF0, ///< System Exclusive
TimeCodeQuarterFrame  = 0xF1, ///< System Common - MIDI Time Code Quarter Frame
SongPosition          = 0xF2, ///< System Common - Song Position Pointer
SongSelect            = 0xF3, ///< System Common - Song Select
TuneRequest           = 0xF6, ///< System Common - Tune Request
Clock                 = 0xF8, ///< System Real Time - Timing Clock
Start                 = 0xFA, ///< System Real Time - Start
Continue              = 0xFB, ///< System Real Time - Continue
Stop                  = 0xFC, ///< System Real Time - Stop
ActiveSensing         = 0xFE, ///< System Real Time - Active Sensing
SystemReset           = 0xFF, ///< System Real Time - System Reset
InvalidType           = 0x00    ///< For notifying errors
};

which are basically the MIDI codes for those functions. These should correspond to the first byte in data[].
338  Using Arduino / Audio / Re: MIDI library conflict? on: December 09, 2013, 08:20:52 pm
If the MIDI library uses the serial port, then you cannot have the MIDIFile library opening up the same serial port. I am not sure what the effect would be, but it is likely that the last 'open' is the one that works and the other is lost.

What you should probably be doing is calling the generic MIDI 'send a message' library call using the parameters from the MIDIFile callback rather than calling the serial routines (ie, all your MIDI messages are sent through the MIDI library).
339  Community / Website and Forum / Re: Signature changes will not stick on: December 09, 2013, 06:28:25 am
@AWOL I still struggle to understand when 'they' will know it is right and how we will find out so that we can just make our changes once. No response from the webmaster, btw.

I don't think anyone disagrees with the need for it if it stops the spammers, just the lack of comms is a bit frustrating.

Out of interest, my new signature is less than 140 chars, the old one is not!
340  Using Arduino / Audio / Re: LDR with logic pro 9 (midi trigger) on: December 07, 2013, 07:23:36 pm
What is your circuit and what is your code?
341  Using Arduino / LEDs and Multiplexing / Re: 8x8 dot matrix with MAX7219 on: December 05, 2013, 02:52:16 pm
As I said in my previous post, look at Parola if you want to have message on the display. If you just want to treat the 8x8 displays as individual smaller display (independent), then the transformation functions in my MD_MAX72xx library (link below in the repository). Read the documentation for the library.

You will not find examples to do exactly what you want because it is pretty unusual!
342  Using Arduino / LEDs and Multiplexing / Re: 8x8 dot matrix with MAX7219 on: December 05, 2013, 01:56:49 am
Look at Parola (http://parola.codeplex.com) and on this thread http://forum.arduino.cc/index.php?topic=171056.0

I would say this will do close to what you want and more.
343  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: December 03, 2013, 10:31:22 pm
Great work Pedro.

Now we have Mama Parola and Baby Parola. Who will do a Papa Parola? I am expecting window size :-)

344  Community / Website and Forum / Re: Signature changes will not stick on: December 03, 2013, 03:12:05 am
So are you saying that these experiments are changing my signature back? If they are, how do I get around them?
345  Community / Website and Forum / Signature changes will not stick on: December 02, 2013, 06:59:47 pm
I have been trying to change my signature for a few days, but it keeps flipping back to the old one.

I can edit the signature successfully (to include codeplex.com sites) but after a while, overnight usually, it just goes back to the old signature (code.google.com).

Anyone else seen this problem and/or have a fix for this? It is damned annoying.
Pages: 1 ... 21 22 [23] 24 25 ... 84