Commit e23c0937 by Hideaki Tai

fix for new hardware (pull-up registor added)

parent 1d8355dd
......@@ -26,7 +26,7 @@ void setup()
// ----- Emergency Switch -----
pinMode(PIN_EMERGENCY, INPUT_PULLUP);
pinMode(PIN_EMERGENCY, INPUT);
// ----- check I2C -----
Wire.begin();
......@@ -55,20 +55,19 @@ void setup()
Serial.println("set speed profile");
whill.speed(SPEEDMODE::RS232C, 60, 90, 160, 60, 50, 80, 60, 60, 160); // max
delay(500);
delay(1000);
Serial.println("check speed profile");
whill.streaming(true, WHILL_INFO_INTERVAL_MS, DATASET::SPEED_PROFILE); // valid in next streaming phase
waitReply(WhillOmni::LR::L, WHILL_INFO_INTERVAL_MS + 500);
waitReply(WhillOmni::LR::R);
waitReply(WHILL_INFO_INTERVAL_MS + 1000);
Serial.println("change streaming to sensor info");
whill.streaming(true, WHILL_INFO_INTERVAL_MS, DATASET::SENSOR_INFO);
delay(500);
delay(1000);
attachInterrupt(digitalPinToInterrupt(PIN_EMERGENCY), disableMotor, FALLING);
attachInterrupt(digitalPinToInterrupt(PIN_EMERGENCY), disableMotor, RISING);
Serial.println("start program");
fps.start();
......
  • Markdown is supported
    0% or
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or sign in to comment