Arduino101Servo 伺服
The Arduino 101 Servo extension lets users remotely control servos connected toan Arduino 101.
More Links<ul><li>Download a sample project for the Arduino 101 Servo.</li></ul>
Properties
BluetoothDevice
– The BluetoothLE component with a connection to the Arduino 101.
Methods
IsSupported
– Tests whether the Bluetooth low energy device is broadcasting support for the service. If true, calls to TurnOn and TurnOff should work correctly. Otherwise an error will be reported through the Screen’s ErrorOccurred event.
Parameters:
* <code>position</code> (<a href="http://appinventor.mit.edu/explore/ai2/support/blocks/math.html#number">_number_</a>) —
The new position of the servo in degrees. Valid values are 0-180.
SetPositionMicros
– Set the time per revolution in microseconds of a continuous rotation servo. For a standard servo, 1000 is fully counterclockwise and 2000 is fully clockwise.
Parameters:
* <code>position</code> (<a href="http://appinventor.mit.edu/explore/ai2/support/blocks/math.html#number">_number_</a>) —
The new rotational speed for a continuous rotational servo.
Events
PositionWritten
– ThePositionWritten
event is run after a successful write to the servo’s position. The meaning of theposition
parameter depends on whether position update was triggered by aSetPosition
call or aSetPositionMicros
call.
Parameters:
* <code>position</code> (<a href="http://appinventor.mit.edu/explore/ai2/support/blocks/math.html#number">_number_</a>) —
The new position of the servo. If the call was positional, this will be in degrees. If the call was rotational, it will be in microseconds.