MPU9150 Accelerometer, Gyro, Temperature, Compass icon MPU9150 Accelerometer, Gyro, Temperature, Compass — MPU9150 ARC control reads compass, gyro, accelerometer and temperature via I2C, initializes and sets EZ-Script variables on demand. Try it →

ARC Pro

Upgrade to ARC Pro

ARC Pro is your passport to a world of endless possibilities in robot programming, waiting for you to explore.

Author Avatar
PRO
Belgium
Thingiverse
#2  

ah thanks david.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#3  

Or in blocky, use the LOOP command titled LOOP FOREVER

User-inserted image

It generates this code...

User-inserted image

Author Avatar
PRO
Belgium
Thingiverse
#4  

dj

is that only in the begin ? loop forever or is there at the end also a command.

#5  

The above code loops forever... If you want to stop the script use the command below or to just exit the loop but stay in the script you can use a different "Goto/Label" command to put you outside the loop...

 Halt() #stops a script

$x=0
:top
# do something
if($x=1)
goto(exit) #exit the loop only
endif

goto(top)

:exit
Print("finished")
Author Avatar
PRO
Belgium
Thingiverse
#6  

thanks averyone.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#7  

This demonstrates both ways to exit the loop or script in blockly.

Use Blockly to learn how to program

User-inserted image