Driving a zigzag path (Lego Dance)

From wikiluntti
Revision as of 21:01, 13 January 2022 by Mol (talk | contribs) (→‎Introduction)

Introduction

The plan and planned route

Use gyroscope to drive a zigzag path

Theory

The code

Use loop and the properties of exponentation:

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (-1)^1 = -1}

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (-1)^2 = (-1)(-1) = 1}

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (-1)^4 = (-1)(-1)(-1) = -1}

Exercises