blynk & neopixelring & w7500

Fork of WIZwiki-7500_Blynk by IOP

Committer:
vshymanskyy
Date:
Sat May 07 08:02:50 2016 +0000
Revision:
0:58b20b438383
Child:
3:31e4b850b126
First commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vshymanskyy 0:58b20b438383 1 /**
vshymanskyy 0:58b20b438383 2 * @file BlynkDetectDevice.h
vshymanskyy 0:58b20b438383 3 * @author Volodymyr Shymanskyy
vshymanskyy 0:58b20b438383 4 * @license This project is released under the MIT License (MIT)
vshymanskyy 0:58b20b438383 5 * @copyright Copyright (c) 2016 Volodymyr Shymanskyy
vshymanskyy 0:58b20b438383 6 * @date May 2016
vshymanskyy 0:58b20b438383 7 * @brief
vshymanskyy 0:58b20b438383 8 *
vshymanskyy 0:58b20b438383 9 */
vshymanskyy 0:58b20b438383 10
vshymanskyy 0:58b20b438383 11 #ifndef BlynkDetectDevice_h
vshymanskyy 0:58b20b438383 12 #define BlynkDetectDevice_h
vshymanskyy 0:58b20b438383 13
vshymanskyy 0:58b20b438383 14 #ifndef BLYNK_INFO_CPU
vshymanskyy 0:58b20b438383 15
vshymanskyy 0:58b20b438383 16 /******************************************
vshymanskyy 0:58b20b438383 17 * ATmega
vshymanskyy 0:58b20b438383 18 */
vshymanskyy 0:58b20b438383 19
vshymanskyy 0:58b20b438383 20 #if defined(__AVR_ATmega168__)
vshymanskyy 0:58b20b438383 21 #define BLYNK_INFO_CPU "ATmega168"
vshymanskyy 0:58b20b438383 22 #elif defined(__AVR_ATmega328P__)
vshymanskyy 0:58b20b438383 23 #define BLYNK_INFO_CPU "ATmega328P"
vshymanskyy 0:58b20b438383 24 #elif defined(__AVR_ATmega1280__)
vshymanskyy 0:58b20b438383 25 #define BLYNK_INFO_CPU "ATmega1280"
vshymanskyy 0:58b20b438383 26 #elif defined(__AVR_ATmega1284__)
vshymanskyy 0:58b20b438383 27 #define BLYNK_INFO_CPU "ATmega1284"
vshymanskyy 0:58b20b438383 28 #elif defined(__AVR_ATmega2560__)
vshymanskyy 0:58b20b438383 29 #define BLYNK_INFO_CPU "ATmega2560"
vshymanskyy 0:58b20b438383 30 #elif defined(__AVR_ATmega32U4__)
vshymanskyy 0:58b20b438383 31 #define BLYNK_INFO_CPU "ATmega32U4"
vshymanskyy 0:58b20b438383 32 #elif defined(__SAM3X8E__)
vshymanskyy 0:58b20b438383 33 #define BLYNK_INFO_CPU "AT91SAM3X8E"
vshymanskyy 0:58b20b438383 34
vshymanskyy 0:58b20b438383 35 /******************************************
vshymanskyy 0:58b20b438383 36 * ATtiny
vshymanskyy 0:58b20b438383 37 */
vshymanskyy 0:58b20b438383 38
vshymanskyy 0:58b20b438383 39 #elif defined(__AVR_ATtiny25__)
vshymanskyy 0:58b20b438383 40 #define BLYNK_INFO_CPU "ATtiny25"
vshymanskyy 0:58b20b438383 41 #elif defined(__AVR_ATtiny45__)
vshymanskyy 0:58b20b438383 42 #define BLYNK_INFO_CPU "ATtiny45"
vshymanskyy 0:58b20b438383 43 #elif defined(__AVR_ATtiny85__)
vshymanskyy 0:58b20b438383 44 #define BLYNK_INFO_CPU "ATtiny85"
vshymanskyy 0:58b20b438383 45 #elif defined(__AVR_ATtiny24__)
vshymanskyy 0:58b20b438383 46 #define BLYNK_INFO_CPU "ATtiny24"
vshymanskyy 0:58b20b438383 47 #elif defined(__AVR_ATtiny44__)
vshymanskyy 0:58b20b438383 48 #define BLYNK_INFO_CPU "ATtiny44"
vshymanskyy 0:58b20b438383 49 #elif defined(__AVR_ATtiny84__)
vshymanskyy 0:58b20b438383 50 #define BLYNK_INFO_CPU "ATtiny84"
vshymanskyy 0:58b20b438383 51 #elif defined(__AVR_ATtiny2313__)
vshymanskyy 0:58b20b438383 52 #define BLYNK_INFO_CPU "ATtiny2313"
vshymanskyy 0:58b20b438383 53 #elif defined(__AVR_ATtiny4313__)
vshymanskyy 0:58b20b438383 54 #define BLYNK_INFO_CPU "ATtiny4313"
vshymanskyy 0:58b20b438383 55 #endif
vshymanskyy 0:58b20b438383 56 #endif
vshymanskyy 0:58b20b438383 57
vshymanskyy 0:58b20b438383 58 #ifndef BLYNK_INFO_DEVICE
vshymanskyy 0:58b20b438383 59
vshymanskyy 0:58b20b438383 60 #if defined(ENERGIA)
vshymanskyy 0:58b20b438383 61 #define BLYNK_INFO_DEVICE "Energia"
vshymanskyy 0:58b20b438383 62
vshymanskyy 0:58b20b438383 63 #if defined(__MSP430F5529__)
vshymanskyy 0:58b20b438383 64 #define BLYNK_INFO_CPU "MSP430F5529"
vshymanskyy 0:58b20b438383 65 #define BLYNK_NO_FLOAT
vshymanskyy 0:58b20b438383 66 #endif
vshymanskyy 0:58b20b438383 67
vshymanskyy 0:58b20b438383 68 #elif defined(LINUX)
vshymanskyy 0:58b20b438383 69
vshymanskyy 0:58b20b438383 70 #define BLYNK_INFO_DEVICE "Linux"
vshymanskyy 0:58b20b438383 71
vshymanskyy 0:58b20b438383 72 #elif defined(SPARK) || defined(PARTICLE)
vshymanskyy 0:58b20b438383 73
vshymanskyy 0:58b20b438383 74 #if PLATFORM_ID==0
vshymanskyy 0:58b20b438383 75 #define BLYNK_INFO_DEVICE "Particle Core"
vshymanskyy 0:58b20b438383 76 #elif PLATFORM_ID==6
vshymanskyy 0:58b20b438383 77 #define BLYNK_INFO_DEVICE "Particle Photon"
vshymanskyy 0:58b20b438383 78 #elif PLATFORM_ID==8
vshymanskyy 0:58b20b438383 79 #define BLYNK_INFO_DEVICE "Particle P1"
vshymanskyy 0:58b20b438383 80 #elif PLATFORM_ID==9
vshymanskyy 0:58b20b438383 81 #define BLYNK_INFO_DEVICE "Particle Ethernet"
vshymanskyy 0:58b20b438383 82 #elif PLATFORM_ID==10
vshymanskyy 0:58b20b438383 83 #define BLYNK_INFO_DEVICE "Particle Electron"
vshymanskyy 0:58b20b438383 84 #elif PLATFORM_ID==82
vshymanskyy 0:58b20b438383 85 #define BLYNK_INFO_DEVICE "Digistump Oak"
vshymanskyy 0:58b20b438383 86 #elif PLATFORM_ID==88
vshymanskyy 0:58b20b438383 87 #define BLYNK_INFO_DEVICE "RedBear Duo"
vshymanskyy 0:58b20b438383 88 #elif PLATFORM_ID==103
vshymanskyy 0:58b20b438383 89 #define BLYNK_INFO_DEVICE "Bluz"
vshymanskyy 0:58b20b438383 90 #else
vshymanskyy 0:58b20b438383 91 #warning "Cannot detect board type"
vshymanskyy 0:58b20b438383 92 #define BLYNK_INFO_DEVICE "Particle"
vshymanskyy 0:58b20b438383 93 #endif
vshymanskyy 0:58b20b438383 94
vshymanskyy 0:58b20b438383 95 #elif defined(MBED_LIBRARY_VERSION)
vshymanskyy 0:58b20b438383 96
vshymanskyy 0:58b20b438383 97 #define BLYNK_INFO_DEVICE "MBED"
vshymanskyy 0:58b20b438383 98
vshymanskyy 0:58b20b438383 99 #elif defined(ARDUINO) && defined(MPIDE)
vshymanskyy 0:58b20b438383 100 #define BLYNK_NO_YIELD
vshymanskyy 0:58b20b438383 101
vshymanskyy 0:58b20b438383 102 #if defined(_BOARD_UNO_)
vshymanskyy 0:58b20b438383 103 #define BLYNK_INFO_DEVICE "chipKIT Uno32"
vshymanskyy 0:58b20b438383 104 #else
vshymanskyy 0:58b20b438383 105 #define BLYNK_INFO_DEVICE "chipKIT"
vshymanskyy 0:58b20b438383 106 #endif
vshymanskyy 0:58b20b438383 107
vshymanskyy 0:58b20b438383 108 #elif defined(ARDUINO)
vshymanskyy 0:58b20b438383 109
vshymanskyy 0:58b20b438383 110 /* Arduino AVR */
vshymanskyy 0:58b20b438383 111 #if defined(ARDUINO_AVR_NANO)
vshymanskyy 0:58b20b438383 112 #define BLYNK_INFO_DEVICE "Arduino Nano"
vshymanskyy 0:58b20b438383 113 #elif defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_DUEMILANOVE)
vshymanskyy 0:58b20b438383 114 #define BLYNK_INFO_DEVICE "Arduino Uno"
vshymanskyy 0:58b20b438383 115 #elif defined(ARDUINO_AVR_YUN)
vshymanskyy 0:58b20b438383 116 #define BLYNK_INFO_DEVICE "Arduino Yun"
vshymanskyy 0:58b20b438383 117 #elif defined(ARDUINO_AVR_MINI)
vshymanskyy 0:58b20b438383 118 #define BLYNK_INFO_DEVICE "Arduino Mini"
vshymanskyy 0:58b20b438383 119 #elif defined(ARDUINO_AVR_ETHERNET)
vshymanskyy 0:58b20b438383 120 #define BLYNK_INFO_DEVICE "Arduino Ethernet"
vshymanskyy 0:58b20b438383 121 #elif defined(ARDUINO_AVR_FIO)
vshymanskyy 0:58b20b438383 122 #define BLYNK_INFO_DEVICE "Arduino Fio"
vshymanskyy 0:58b20b438383 123 #elif defined(ARDUINO_AVR_BT)
vshymanskyy 0:58b20b438383 124 #define BLYNK_INFO_DEVICE "Arduino BT"
vshymanskyy 0:58b20b438383 125 #elif defined(ARDUINO_AVR_PRO)
vshymanskyy 0:58b20b438383 126 #define BLYNK_INFO_DEVICE "Arduino Pro"
vshymanskyy 0:58b20b438383 127 #elif defined(ARDUINO_AVR_NG)
vshymanskyy 0:58b20b438383 128 #define BLYNK_INFO_DEVICE "Arduino NG"
vshymanskyy 0:58b20b438383 129 #elif defined(ARDUINO_AVR_GEMMA)
vshymanskyy 0:58b20b438383 130 #define BLYNK_INFO_DEVICE "Arduino Gemma"
vshymanskyy 0:58b20b438383 131 #elif defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560)
vshymanskyy 0:58b20b438383 132 #define BLYNK_INFO_DEVICE "Arduino Mega"
vshymanskyy 0:58b20b438383 133 #elif defined(ARDUINO_AVR_ADK)
vshymanskyy 0:58b20b438383 134 #define BLYNK_INFO_DEVICE "Arduino Mega ADK"
vshymanskyy 0:58b20b438383 135 #elif defined(ARDUINO_AVR_LEONARDO)
vshymanskyy 0:58b20b438383 136 #define BLYNK_INFO_DEVICE "Arduino Leonardo"
vshymanskyy 0:58b20b438383 137 #elif defined(ARDUINO_AVR_MICRO)
vshymanskyy 0:58b20b438383 138 #define BLYNK_INFO_DEVICE "Arduino Micro"
vshymanskyy 0:58b20b438383 139 #elif defined(ARDUINO_AVR_ESPLORA)
vshymanskyy 0:58b20b438383 140 #define BLYNK_INFO_DEVICE "Arduino Esplora"
vshymanskyy 0:58b20b438383 141 #elif defined(ARDUINO_AVR_LILYPAD)
vshymanskyy 0:58b20b438383 142 #define BLYNK_INFO_DEVICE "Lilypad"
vshymanskyy 0:58b20b438383 143 #elif defined(ARDUINO_AVR_LILYPAD_USB)
vshymanskyy 0:58b20b438383 144 #define BLYNK_INFO_DEVICE "Lilypad USB"
vshymanskyy 0:58b20b438383 145 #elif defined(ARDUINO_AVR_ROBOT_MOTOR)
vshymanskyy 0:58b20b438383 146 #define BLYNK_INFO_DEVICE "Robot Motor"
vshymanskyy 0:58b20b438383 147 #elif defined(ARDUINO_AVR_ROBOT_CONTROL)
vshymanskyy 0:58b20b438383 148 #define BLYNK_INFO_DEVICE "Robot Control"
vshymanskyy 0:58b20b438383 149
vshymanskyy 0:58b20b438383 150 /* Arduino SAM/SAMD */
vshymanskyy 0:58b20b438383 151 #elif defined(ARDUINO_SAM_DUE)
vshymanskyy 0:58b20b438383 152 #define BLYNK_INFO_DEVICE "Arduino Due"
vshymanskyy 0:58b20b438383 153 #elif defined(ARDUINO_SAMD_ZERO)
vshymanskyy 0:58b20b438383 154 #define BLYNK_INFO_DEVICE "Arduino Zero"
vshymanskyy 0:58b20b438383 155 #elif defined(ARDUINO_SAMD_MKR1000)
vshymanskyy 0:58b20b438383 156 #define BLYNK_INFO_DEVICE "Arduino MKR1000"
vshymanskyy 0:58b20b438383 157
vshymanskyy 0:58b20b438383 158 /* Intel */
vshymanskyy 0:58b20b438383 159 #elif defined(ARDUINO_GALILEO)
vshymanskyy 0:58b20b438383 160 #define BLYNK_INFO_DEVICE "Galileo"
vshymanskyy 0:58b20b438383 161 #elif defined(ARDUINO_GALILEOGEN2)
vshymanskyy 0:58b20b438383 162 #define BLYNK_INFO_DEVICE "Galileo Gen2"
vshymanskyy 0:58b20b438383 163 #elif defined(ARDUINO_EDISON)
vshymanskyy 0:58b20b438383 164 #define BLYNK_INFO_DEVICE "Edison"
vshymanskyy 0:58b20b438383 165 #elif defined(ARDUINO_ARCH_ARC32) // TODO
vshymanskyy 0:58b20b438383 166 #define BLYNK_INFO_DEVICE "Arduino 101"
vshymanskyy 0:58b20b438383 167
vshymanskyy 0:58b20b438383 168 /* Konekt */
vshymanskyy 0:58b20b438383 169 #elif defined(ARDUINO_DASH)
vshymanskyy 0:58b20b438383 170 #define BLYNK_INFO_DEVICE "Dash"
vshymanskyy 0:58b20b438383 171 #elif defined(ARDUINO_DASHPRO)
vshymanskyy 0:58b20b438383 172 #define BLYNK_INFO_DEVICE "Dash Pro"
vshymanskyy 0:58b20b438383 173
vshymanskyy 0:58b20b438383 174 /* Red Bear Lab */
vshymanskyy 0:58b20b438383 175 #elif defined(ARDUINO_RedBear_Duo)
vshymanskyy 0:58b20b438383 176 #define BLYNK_INFO_DEVICE "RedBear Duo"
vshymanskyy 0:58b20b438383 177 #elif defined(ARDUINO_BLEND)
vshymanskyy 0:58b20b438383 178 #define BLYNK_INFO_DEVICE "Blend"
vshymanskyy 0:58b20b438383 179 #elif defined(ARDUINO_BLEND_MICRO_8MHZ) || defined(ARDUINO_BLEND_MICRO_16MHZ)
vshymanskyy 0:58b20b438383 180 #define BLYNK_INFO_DEVICE "Blend Micro"
vshymanskyy 0:58b20b438383 181 #elif defined(ARDUINO_RBL_nRF51822)
vshymanskyy 0:58b20b438383 182 #define BLYNK_INFO_DEVICE "BLE Nano"
vshymanskyy 0:58b20b438383 183
vshymanskyy 0:58b20b438383 184 /* ESP8266 */
vshymanskyy 0:58b20b438383 185 #elif defined(ARDUINO_ESP8266_ESP01)
vshymanskyy 0:58b20b438383 186 #define BLYNK_INFO_DEVICE "ESP8266"
vshymanskyy 0:58b20b438383 187 #elif defined(ARDUINO_ESP8266_ESP12)
vshymanskyy 0:58b20b438383 188 #define BLYNK_INFO_DEVICE "ESP-12"
vshymanskyy 0:58b20b438383 189 #elif defined(ARDUINO_ESP8266_NODEMCU)
vshymanskyy 0:58b20b438383 190 #define BLYNK_INFO_DEVICE "NodeMCU"
vshymanskyy 0:58b20b438383 191 #elif defined(ARDUINO_ESP8266_THING)
vshymanskyy 0:58b20b438383 192 #define BLYNK_INFO_DEVICE "Esp Thing"
vshymanskyy 0:58b20b438383 193 #elif defined(ARDUINO_ESP8266_THING_DEV)
vshymanskyy 0:58b20b438383 194 #define BLYNK_INFO_DEVICE "Esp Thing Dev"
vshymanskyy 0:58b20b438383 195
vshymanskyy 0:58b20b438383 196 /* Digistump */
vshymanskyy 0:58b20b438383 197 #elif defined(ARDUINO_ESP8266_OAK)
vshymanskyy 0:58b20b438383 198 #define BLYNK_INFO_DEVICE "Oak"
vshymanskyy 0:58b20b438383 199 #elif defined(ARDUINO_AVR_DIGISPARK)
vshymanskyy 0:58b20b438383 200 #define BLYNK_INFO_DEVICE "Digispark"
vshymanskyy 0:58b20b438383 201 #elif defined(ARDUINO_AVR_DIGISPARKPRO)
vshymanskyy 0:58b20b438383 202 #define BLYNK_INFO_DEVICE "Digispark Pro"
vshymanskyy 0:58b20b438383 203
vshymanskyy 0:58b20b438383 204 /* Microduino */
vshymanskyy 0:58b20b438383 205 #elif defined(ARDUINO_AVR_USB)
vshymanskyy 0:58b20b438383 206 #define BLYNK_INFO_DEVICE "CoreUSB"
vshymanskyy 0:58b20b438383 207 #elif defined(ARDUINO_AVR_PLUS)
vshymanskyy 0:58b20b438383 208 #define BLYNK_INFO_DEVICE "Core+"
vshymanskyy 0:58b20b438383 209 #elif defined(ARDUINO_AVR_RF)
vshymanskyy 0:58b20b438383 210 #define BLYNK_INFO_DEVICE "CoreRF"
vshymanskyy 0:58b20b438383 211
vshymanskyy 0:58b20b438383 212 /* Wildfire */
vshymanskyy 0:58b20b438383 213 #elif defined(ARDUINO_WILDFIRE_V2)
vshymanskyy 0:58b20b438383 214 #define BLYNK_INFO_DEVICE "Wildfire V2"
vshymanskyy 0:58b20b438383 215 #elif defined(ARDUINO_WILDFIRE_V3)
vshymanskyy 0:58b20b438383 216 #define BLYNK_INFO_DEVICE "Wildfire V3"
vshymanskyy 0:58b20b438383 217 #elif defined(ARDUINO_WILDFIRE_V4)
vshymanskyy 0:58b20b438383 218 #define BLYNK_INFO_DEVICE "Wildfire V4"
vshymanskyy 0:58b20b438383 219
vshymanskyy 0:58b20b438383 220 /* Simblee */
vshymanskyy 0:58b20b438383 221 #elif defined(__Simblee__) // TODO: ARDUINO_SIMBLEE bug?
vshymanskyy 0:58b20b438383 222 #define BLYNK_INFO_DEVICE "Simblee"
vshymanskyy 0:58b20b438383 223
vshymanskyy 0:58b20b438383 224 #else
vshymanskyy 0:58b20b438383 225 #warning "Cannot detect board type"
vshymanskyy 0:58b20b438383 226 #define BLYNK_INFO_DEVICE "Arduino"
vshymanskyy 0:58b20b438383 227 #endif
vshymanskyy 0:58b20b438383 228
vshymanskyy 0:58b20b438383 229 #endif
vshymanskyy 0:58b20b438383 230 #endif
vshymanskyy 0:58b20b438383 231
vshymanskyy 0:58b20b438383 232 #endif