Robotický simulátor PRIA IDE: Rozdiel medzi revíziami
Zo stránky SensorWiki
Bez shrnutí editace |
Bez shrnutí editace |
||
Riadok 6: | Riadok 6: | ||
</tabs> | </tabs> | ||
--> | --> | ||
[[Súbor:priaIDE05.png]] | |||
Verzia z 09:50, 27. november 2022
[[Súbor:priaIDE05.png]]
import math
hedgehog.commands(
hedgehog.move_motor_cmd(0, 1000),
hedgehog.move_motor_cmd(1, 1000),
)
sleep(1)
hedgehog.commands(
hedgehog.brake_cmd(0),
hedgehog.brake_cmd(1),
)
hedgehog.commands(
hedgehog.move_motor_cmd(0, 1000),
hedgehog.move_motor_cmd(1, -1000),
)
sleep(1)
hedgehog.commands(
hedgehog.brake_cmd(0),
hedgehog.brake_cmd(1),
)
print(''.join([str(x) for x in ['SEN: ', round(hedgehog.get_analog(4)), ' / ', round(hedgehog.get_analog(5)), ' / ', round(hedgehog.get_analog(6))]]))