-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPWM.txt
28 lines (23 loc) · 949 Bytes
/
PWM.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
PWM
IchigoJam BASIC 1.1.0~
IchigoJam BASIC RPi
IchigoJam PC not compatible
-----------------------------------------------------------
[Function]
Perform pulse width modulation on the OUT terminal.
[Command format]
PWM <terminal>, <pulse width> [, <pulse period>]
[Example]
PWM 2,10
PWM 2,10,20
PWM 2,4800,-9600 (1.2 beta 13 ~)
[Commentary]
<terminal> corresponds to OUT2 ~ 5 with terminal pins 2 ~ 5. The other side uses GND or OUT1.
<pulse width> sets the time when it becomes HIGH in 0.01 millisecond increments (100 = 1 millisecond).
Values from 100 to 200 are used for servo.
<pulse period> specifies the pulse period in units of 0.01 milliseconds.
The default is 2000, 20 milliseconds.
1.2 beta When it is minus value from 13, <pulse width> and <pulse cycle>
It becomes 480 times faster.
PWM 2,10*480, 20*-480 and PWM 10,20 have the same operation.
IchigoJam BASIC RPi only supports terminals 3 and 4.