![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
NHK2017 octopus robot
Dependencies: 2017NHKpin_config mbed FEP ikarashiMDC PID jy901 omni HMC6352 omni_wheel
Fork of KANI2017v2 by
Diff: bot/tentacle_unit/tentacle_unit.cpp
- Revision:
- 26:7258d5ad0bff
- Parent:
- 23:37bb9afe9fdc
diff -r d199d621ecca -r 7258d5ad0bff bot/tentacle_unit/tentacle_unit.cpp --- a/bot/tentacle_unit/tentacle_unit.cpp Sat Sep 30 17:59:10 2017 +0900 +++ b/bot/tentacle_unit/tentacle_unit.cpp Wed Oct 25 03:25:06 2017 +0900 @@ -2,10 +2,11 @@ Tentacle::Tentacle(DigitalOut* RS485Controller, Serial* RS485) : tentacleMotor({ - {RS485Controller, 1, 0, SM, RS485}, + {RS485Controller, 1, 3, SM, RS485}, {RS485Controller, 1, 1, SM, RS485}, }), - right(Sensor3pin3a, Sensor3pin3b), left(Sensor4pin2a, Sensor4pin2b) + right(PWM3, PWM6),left(PWM8,PWM10), + debugSerial(USBTX, USBRX, 115200) { tentacleMotor[0].braking = true; tentacleMotor[1].braking = true; @@ -30,3 +31,8 @@ tentacleMotor[0].setSpeed(0); tentacleMotor[1].setSpeed(0); } + +void Tentacle::debugPrint() +{ + debugSerial.printf("right:%d left:%d\r\n",right.getPosition(),left.getPosition()); +}