Operácie

Robotický simulátor PRIA IDE: Rozdiel medzi revíziami

Z SensorWiki

(Vytvorená stránka „ <tabs> <tab name="Simulator 1"><source lang="python" style="background: LightYellow;"> import math hedgehog.commands( hedgehog.move_motor_cmd(0, 1000), hedgehog.mo…“)
 
Riadok 1: Riadok 1:
 +
<!--
  
 
<tabs>
 
<tabs>
<tab name="Simulator 1"><source lang="python" style="background: LightYellow;">
+
<tab name=""><source lang="">
 +
</source></tab>
 +
</tabs>
 +
-->
 +
 
 +
 
 +
<tabs>
 +
<tab name="Simulator 1"><source lang="">
 +
[[Súbor:priaIDE05.png]]
 +
</source></tab>
 +
<tab name="Python"><source lang="python" style="background: LightYellow;">
 +
 
 
import math
 
import math
  

Verzia zo dňa a času 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))]]))