Input
Events and data from sensors
Accelerometer
input.onGesture(Gesture.Shake, () => {
})
input.setAccelerometerRange(AcceleratorRange.OneG)
input.acceleration(Dimension.X)
input.rotation(Rotation.Pitch)
Light sensor
input.onLightConditionChanged(LightCondition.Dark, () => {
})
input.lightLevel()
input.ambientColor()
circuit-playground
Buttons
input.buttonA.isPressed()
input.buttonA.wasPressed()
input.onSwitchMoved(SwitchDirection.Left, () => {
})
input.buttonA.onEvent(ButtonEvent.Click, () => {
})
Microphone
input.onLoudSound(() => {})
input.soundLevel()
Thermometer
input.onTemperatureConditionChanged(TemperatureCondition.Hot, 15, TemperatureUnit.Celsius, () => {
})
input.temperature(TemperatureUnit.Celsius)