本文整理汇总了Java中edu.wpi.first.wpilibj.DigitalModule.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java DigitalModule.getInstance方法的具体用法?Java DigitalModule.getInstance怎么用?Java DigitalModule.getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.wpi.first.wpilibj.DigitalModule
的用法示例。
在下文中一共展示了DigitalModule.getInstance方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import edu.wpi.first.wpilibj.DigitalModule; //导入方法依赖的package包/类
public void init(Environment environment) {
accel = new ADXL345_I2C(RobotMap.ACCELEROMETER_PORT, ADXL345_I2C.DataFormat_Range.k4G);
i2c = new I2C(DigitalModule.getInstance(1), DEVICE_ADDRESS);
i2c.setCompatabilityMode(true);
timer = new Timer();
timer.start();
}
示例2: setupCompass
import edu.wpi.first.wpilibj.DigitalModule; //导入方法依赖的package包/类
public void setupCompass() {
if(clear){
clear = false;
cwrite = new I2C(DigitalModule.getInstance(1), 0x3C);
cread = new I2C(DigitalModule.getInstance(1), 0x3D);
cwrite.write(0, 88);
cwrite.write(1, 64);
cwrite.write(2, 0);
}
clear = true;
}
示例3: setupGyro
import edu.wpi.first.wpilibj.DigitalModule; //导入方法依赖的package包/类
public void setupGyro() {
if(clear){
clear = false;
gwrite = new I2C(DigitalModule.getInstance(1), 0xD1);
gread = new I2C(DigitalModule.getInstance(1), 0xD0);
gwrite.write(21, Wiring.SAMPLE_RATE);
gwrite.write(22, 0x1A);
}
clear = true;
}
示例4: setupAccel
import edu.wpi.first.wpilibj.DigitalModule; //导入方法依赖的package包/类
public void setupAccel() {
if(clear){
clear = false;
awrite = new I2C(DigitalModule.getInstance(1), 0xA6);
aread = new I2C(DigitalModule.getInstance(1), 0xA7);
awrite.write(44, 0x0A);
awrite.write(45, 0x08);
awrite.write(49, 0x08);
}
clear = true;
}
示例5: Bling
import edu.wpi.first.wpilibj.DigitalModule; //导入方法依赖的package包/类
public Bling() {
//DigitalModule::GetI2C(UINT32,address);
DigitalModule digiMod = DigitalModule.getInstance(1);
chat = digiMod.getI2C(8);
chat.setCompatabilityMode(true);
}
示例6: InsightLT
import edu.wpi.first.wpilibj.DigitalModule; //导入方法依赖的package包/类
public InsightLT(int option)
{
module = DigitalModule.getInstance(1);
setupHelper();
config(option);
}
示例7: MessageHandler
import edu.wpi.first.wpilibj.DigitalModule; //导入方法依赖的package包/类
public MessageHandler() {
//Get ourselves an i2c instance to send out some data.
i2c = new I2C(DigitalModule.getInstance(1), 0x52 << 1);
}