Adafruit NeoTrellis M4 Library
Public Member Functions | List of all members
Adafruit_NeoTrellisM4 Class Reference

NeoTrellis M4 helper library that handles DMA NeoPixel, Keypad scanning, and some basic MIDI messages. More...

#include <Adafruit_NeoTrellisM4.h>

Inheritance diagram for Adafruit_NeoTrellisM4:

Public Member Functions

void begin (void)
 Initialize the NeoTrellis, start the keypad scanner and turn all neopixels off. x.
 
void tick (void)
 Check the keypads to determine whather they were just pressed/released. x.
 
void autoUpdateNeoPixels (boolean flag)
 Whether we should automatically update the neopixels whenever we set/fill the colors. Auto-update is easier to use, but is slower. More...
 
void setPixelColor (uint32_t pixel, uint32_t color)
 Set one neopixel with a 24-bit color (RGB in 888 format) More...
 
void fill (uint32_t color)
 Fill the neopixels with a 24-bit color (RGB in 888 format) More...
 
uint8_t num_keys (void)
 Getter for how many keys are available on this NeoTrellis. More...
 
void enableUSBMIDI (boolean f)
 Whether to send MIDI messages over the USB port. More...
 
void enableUARTMIDI (boolean f)
 Whether to send MIDI messages over the UART port. More...
 
void setUARTMIDIchannel (uint8_t c)
 Configure the MIDI channel to use when using UART. More...
 
void setUSBMIDIchannel (uint8_t c)
 Configure the MIDI channel to use when using USB. More...
 
void noteOn (byte pitch, byte velocity)
 Send MIDI note on. More...
 
void noteOff (byte pitch, byte velocity)
 Send MIDI note off. More...
 
void pitchBend (int value)
 Send pitch bend MIDI message. More...
 
void controlChange (byte control, byte value)
 Send control change MIDI message. More...
 
void sendMIDI (void)
 Flush any pending MIDI messages for sending.
 
void programChange (byte channel, byte program)
 Send program change MIDI message. More...
 

Detailed Description

NeoTrellis M4 helper library that handles DMA NeoPixel, Keypad scanning, and some basic MIDI messages.

Member Function Documentation

◆ autoUpdateNeoPixels()

void Adafruit_NeoTrellisM4::autoUpdateNeoPixels ( boolean  flag)

Whether we should automatically update the neopixels whenever we set/fill the colors. Auto-update is easier to use, but is slower.

Parameters
flagtrue if we should auto update (show()) x

◆ setPixelColor()

void Adafruit_NeoTrellisM4::setPixelColor ( uint32_t  pixel,
uint32_t  color 
)

Set one neopixel with a 24-bit color (RGB in 888 format)

Parameters
pixelThe pixel index from 0 (top left) to 31 (bottom right)
colorThe RGB888 color x

◆ fill()

void Adafruit_NeoTrellisM4::fill ( uint32_t  color)

Fill the neopixels with a 24-bit color (RGB in 888 format)

Parameters
colorThe RGB888 color x

◆ num_keys()

uint8_t Adafruit_NeoTrellisM4::num_keys ( void  )
inline

Getter for how many keys are available on this NeoTrellis.

Returns
number of keys

◆ enableUSBMIDI()

void Adafruit_NeoTrellisM4::enableUSBMIDI ( boolean  flag)

Whether to send MIDI messages over the USB port.

Parameters
flagtrue for enable, false to disable x

◆ enableUARTMIDI()

void Adafruit_NeoTrellisM4::enableUARTMIDI ( boolean  flag)

Whether to send MIDI messages over the UART port.

Parameters
flagtrue for enable, false to disable x

◆ setUARTMIDIchannel()

void Adafruit_NeoTrellisM4::setUARTMIDIchannel ( uint8_t  c)

Configure the MIDI channel to use when using UART.

Parameters
cChannel number, from 0-15 x

◆ setUSBMIDIchannel()

void Adafruit_NeoTrellisM4::setUSBMIDIchannel ( uint8_t  c)

Configure the MIDI channel to use when using USB.

Parameters
cChannel number, from 0-15 x

◆ noteOn()

void Adafruit_NeoTrellisM4::noteOn ( byte  pitch,
byte  velocity 
)

Send MIDI note on.

Parameters
pitch7-bit note pitch value
velocity7-bit note velocity

◆ noteOff()

void Adafruit_NeoTrellisM4::noteOff ( byte  pitch,
byte  velocity 
)

Send MIDI note off.

Parameters
pitch7-bit note pitch value
velocity7-bit note velocity

◆ pitchBend()

void Adafruit_NeoTrellisM4::pitchBend ( int  value)

Send pitch bend MIDI message.

Parameters
value14-bit pitchbend value, from -8191 to 8192

◆ controlChange()

void Adafruit_NeoTrellisM4::controlChange ( byte  control,
byte  value 
)

Send control change MIDI message.

Parameters
control7-bit control name
value7-bit control value

◆ programChange()

void Adafruit_NeoTrellisM4::programChange ( byte  channel,
byte  program 
)

Send program change MIDI message.

Parameters
channelRanges from 0-15
program7-bit program value

The documentation for this class was generated from the following files: