NXShield  v1.07
NXShield Library Reference by OpenElectrons.com
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
SHDefines.h File Reference

Go to the source code of this file.

Macros

#define SCL_BAS1   21
 
#define SDA_BAS1   20
 
#define SCL_BAS2   19
 
#define SDA_BAS2   A13
 
#define SCL_BBS1   17
 
#define SDA_BBS1   A14
 
#define SCL_BBS2   18
 
#define SDA_BBS2   A15
 
#define BTN_LEFT   16
 
#define BTN_GO   15
 
#define BTN_RIGHT   14
 
#define LED_RED   16
 
#define LED_GREEN   15
 
#define LED_BLUE   14
 

Enumerations

enum  SH_BankPort { SH_BAS1 = 0x01, SH_BAS2 = 0x02, SH_BBS1 = 0x03, SH_BBS2 = 0x04 }
 
enum  SH_Protocols { SH_HardwareI2C = 0, SH_SoftwareI2C }
 Protocols supported by NXShield. More...
 

Detailed Description

SHDefines.h defines global definitions and constants used by NXShield library.

Enumeration Type Documentation

for the sensor bank ports

Enumerator
SH_BAS1 

Bank A Sensor Port 1

SH_BAS2 

Bank A Sensor Port 2

SH_BBS1 

Bank B Sensor Port 1

SH_BBS2 

Bank B Sensor Port 2

Protocols supported by NXShield.

Protocol enums - to initialize your NXShield with appropriate protocol.

Enumerator
SH_HardwareI2C 

It's best to use hardware i2c as it is faster, (but it does not work with Ultrasonic Sensor).

SH_SoftwareI2C 

Software I2C is slower, and designed to work with Ultrasonic sensor.