pxt-calliope/docs/reference/pins.md
Peli de Halleux 81b8b1b69c updated docs
2016-05-05 11:16:14 -07:00

17 lines
455 B
Markdown

# Pins
Control currents in Pins for analog/digital signals, servos, i2c, ...
```cards
pins.digitalReadPin(DigitalPin.P0);
pins.digitalWritePin(DigitalPin.P0, 0);
pins.analogReadPin(AnalogPin.P0);
pins.analogWritePin(AnalogPin.P0, 1023);
pins.analogSetPeriod(AnalogPin.P0, 20000);
pins.servoWritePin(AnalogPin.P0, 180);
pins.servoSetPulse(AnalogPin.P0, 1500);
pins.map(0, 0, 1023, 0, 4);
pins.analogPitch(0, 0);
pins.analogSetPitchPin(AnalogPin.P0);
```