#define GAMMA_CORRECTION { \ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, \ 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, \ 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, \ 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, \ 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 16, 16, 17, 17, \ 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 25, 25, 26, \ 26, 27, 28, 28, 29, 30, 30, 31, 32, 33, 33, 34, 35, 36, 36, 37, \ 38, 39, 40, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 51, \ 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, \ 70, 71, 73, 74, 75, 76, 78, 79, 80, 82, 83, 84, 86, 87, 88, 90, \ 91, 93, 94, 96, 97, 99,100,102,103,105,106,108,110,111,113,115, \ 116,118,120,121,123,125,127,128,130,132,134,136,138,139,141,143, \ 145,147,149,151,153,155,157,159,161,163,165,168,170,172,174,176, \ 178,181,183,185,187,190,192,194,197,199,201,204,206,209,211,214, \ 216,219,221,224,226,229,232,234,237,240,242,245,248,250,253,255} // COMMON SETTINGS // ---------------------------------------------------------------------------------------------- // These settings are used in both SW UART, HW UART and SPI mode // ---------------------------------------------------------------------------------------------- #define BUFSIZE 128 // Size of the read buffer for incoming data #define VERBOSE_MODE true // If set to 'true' enables debug output #define BLE_READPACKET_TIMEOUT 10 // Timeout in ms waiting to read a response // SOFTWARE UART SETTINGS // ---------------------------------------------------------------------------------------------- // The following macros declare the pins that will be used for 'SW' serial. // You should use this option if you are connecting the UART Friend to an UNO // ---------------------------------------------------------------------------------------------- #define BLUEFRUIT_SWUART_RXD_PIN 9 // Required for software serial! #define BLUEFRUIT_SWUART_TXD_PIN 10 // Required for software serial! #define BLUEFRUIT_UART_CTS_PIN 11 // Required for software serial! #define BLUEFRUIT_UART_RTS_PIN -1 // Optional, set to -1 if unused // HARDWARE UART SETTINGS // ---------------------------------------------------------------------------------------------- // The following macros declare the HW serial port you are using. Uncomment // this line if you are connecting the BLE to Leonardo/Micro or Flora // ---------------------------------------------------------------------------------------------- #ifdef Serial1 // this makes it not complain on compilation if there's no Serial1 #define BLUEFRUIT_HWSERIAL_NAME Serial1 #endif // SHARED UART SETTINGS // ---------------------------------------------------------------------------------------------- // The following sets the optional Mode pin, its recommended but not required // ---------------------------------------------------------------------------------------------- #define BLUEFRUIT_UART_MODE_PIN 12 // Set to -1 if unused // SHARED SPI SETTINGS // ---------------------------------------------------------------------------------------------- // The following macros declare the pins to use for HW and SW SPI communication. // SCK, MISO and MOSI should be connected to the HW SPI pins on the Uno when // using HW SPI. This should be used with nRF51822 based Bluefruit LE modules // that use SPI (Bluefruit LE SPI Friend). // ---------------------------------------------------------------------------------------------- #define BLUEFRUIT_SPI_CS 8 #define BLUEFRUIT_SPI_IRQ 7 #define BLUEFRUIT_SPI_RST 4 // Optional but recommended, set to -1 if unused // SOFTWARE SPI SETTINGS // ---------------------------------------------------------------------------------------------- // The following macros declare the pins to use for SW SPI communication. // This should be used with nRF51822 based Bluefruit LE modules that use SPI // (Bluefruit LE SPI Friend). // ---------------------------------------------------------------------------------------------- #define BLUEFRUIT_SPI_SCK 13 #define BLUEFRUIT_SPI_MISO 12 #define BLUEFRUIT_SPI_MOSI 11