AT&T IoT hackster.io contest entry: Carpal2

Dependencies:   FXOS8700CQ Pubnub_mbed2_sync WNCInterface mbed-rtos mbed

Committer:
cswiger
Date:
Sat Dec 24 17:31:00 2016 +0000
Revision:
2:fe8e935b9342
Parent:
0:d2425a595807
added Ignition awareness so Carpal2 will resume working after car has been turned off and back on.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cswiger 0:d2425a595807 1 /* ===================================================================
cswiger 0:d2425a595807 2 Copyright © 2016, AVNET Inc.
cswiger 0:d2425a595807 3
cswiger 0:d2425a595807 4 Licensed under the Apache License, Version 2.0 (the "License");
cswiger 0:d2425a595807 5 you may not use this file except in compliance with the License.
cswiger 0:d2425a595807 6 You may obtain a copy of the License at
cswiger 0:d2425a595807 7
cswiger 0:d2425a595807 8 http://www.apache.org/licenses/LICENSE-2.0
cswiger 0:d2425a595807 9
cswiger 0:d2425a595807 10 Unless required by applicable law or agreed to in writing,
cswiger 0:d2425a595807 11 software distributed under the License is distributed on an
cswiger 0:d2425a595807 12 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
cswiger 0:d2425a595807 13 either express or implied. See the License for the specific
cswiger 0:d2425a595807 14 language governing permissions and limitations under the License.
cswiger 0:d2425a595807 15
cswiger 0:d2425a595807 16 ======================================================================== */
cswiger 0:d2425a595807 17
cswiger 0:d2425a595807 18 #ifndef Hardware_H_
cswiger 0:d2425a595807 19 #define Hardware_H_
cswiger 0:d2425a595807 20 #include "MODSERIAL.h"
cswiger 0:d2425a595807 21
cswiger 0:d2425a595807 22 extern I2C i2c; //SDA, SCL -- define the I2C pins being used
cswiger 0:d2425a595807 23 extern MODSERIAL pc; //UART to USB host
cswiger 0:d2425a595807 24 extern MODSERIAL mdm; //UART to WNC modem
cswiger 0:d2425a595807 25 //extern SerialBuffered mdm; //UART to WNC modem
cswiger 0:d2425a595807 26
cswiger 0:d2425a595807 27 //Un-comment the definition below if you want to use the USB rx for another purpose.
cswiger 0:d2425a595807 28 //otherwise the USB rx will be used to receive virtual sensor data from Avnet's
cswiger 0:d2425a595807 29 //"Sensor Simulator Dashboard" utility
cswiger 0:d2425a595807 30 #define USE_VIRTUAL_SENSORS
cswiger 0:d2425a595807 31
cswiger 0:d2425a595807 32 // comment out the following line if color is not supported on the terminal
cswiger 0:d2425a595807 33 #define USE_COLOR
cswiger 0:d2425a595807 34 #ifdef USE_COLOR
cswiger 0:d2425a595807 35 #define BLK "\033[30m"
cswiger 0:d2425a595807 36 #define RED "\033[31m"
cswiger 0:d2425a595807 37 #define GRN "\033[32m"
cswiger 0:d2425a595807 38 #define YEL "\033[33m"
cswiger 0:d2425a595807 39 #define BLU "\033[34m"
cswiger 0:d2425a595807 40 #define MAG "\033[35m"
cswiger 0:d2425a595807 41 #define CYN "\033[36m"
cswiger 0:d2425a595807 42 #define WHT "\033[37m"
cswiger 0:d2425a595807 43 #define DEF "\033[39m"
cswiger 0:d2425a595807 44 #else
cswiger 0:d2425a595807 45 #define BLK
cswiger 0:d2425a595807 46 #define RED
cswiger 0:d2425a595807 47 #define GRN
cswiger 0:d2425a595807 48 #define YEL
cswiger 0:d2425a595807 49 #define BLU
cswiger 0:d2425a595807 50 #define MAG
cswiger 0:d2425a595807 51 #define CYN
cswiger 0:d2425a595807 52 #define WHT
cswiger 0:d2425a595807 53 #define DEF
cswiger 0:d2425a595807 54 #endif
cswiger 0:d2425a595807 55
cswiger 0:d2425a595807 56 #ifdef _ULINK_PRINT
cswiger 0:d2425a595807 57 #include "itm_output.h"
cswiger 0:d2425a595807 58 #else
cswiger 0:d2425a595807 59 #define PRINTF pc.printf
cswiger 0:d2425a595807 60 #define PUTS pc.puts
cswiger 0:d2425a595807 61 #endif
cswiger 0:d2425a595807 62
cswiger 0:d2425a595807 63
cswiger 0:d2425a595807 64 #endif