> gpio.mode(3, gpio.OUTPUT)
> gpio.write(3, gpio.LOW)
> print (gpio.read(3))
0
>
> pwm.setup(6, 500, 512)
> pwm.setup(7, 500, 512)
> pwm.setup(8, 500, 512)
> pwm.start(6)
> pwm.start(7)
> pwm.start(8)
> function cled(r,g,b)
>> pwm.setduty(6,g)
>> pwm.setduty(7,b)
>> pwm.setduty(8,r)
>> end
> cled(512,0,0)
> cled(0,512,0)
> cled(0,0,512)
>
> print (adc.read(0))
3
> prnit (adc.read(0))
0
> prnit (adc.read(0))
25
>
IO index | ESP8266 pin | IO index | ESP8266 pin |
---|---|---|---|
0 [*] | GPIO16 | 8 | GPIO15 |
1 | GPIO5 | 9 | GPIO3 |
2 | GPIO4 | 10 | GPIO1 |
3 | GPIO0 | 11 | GPIO9 |
4 | GPIO2 | 12 | GPIO10 |
5 | GPIO14 | ||
6 | GPIO12 | ||
7 | GPIO13 |
沒有留言:
張貼留言