mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
clear machine.pyi and replace with StdDevice
This commit is contained in:
parent
c3986f5f03
commit
7ea34f917a
@ -784,11 +784,6 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\pikascript\PikaStdTask.pyi</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>machine.pyi</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\pikascript\machine.pyi</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
</Groups>
|
||||
|
@ -999,11 +999,6 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\pikascript\main.py</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>machine.pyi</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\pikascript\machine.pyi</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>PikaStdLib.pyi</FileName>
|
||||
<FileType>5</FileType>
|
||||
|
@ -774,11 +774,6 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\pikascript\main.py</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>machine.pyi</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\pikascript\machine.pyi</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>PikaStdLib.pyi</FileName>
|
||||
<FileType>5</FileType>
|
||||
|
@ -1246,11 +1246,6 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\pikascript\STM32G0.pyi</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>machine.pyi</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\pikascript\machine.pyi</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
@ -1,8 +1,8 @@
|
||||
import PikaStdLib
|
||||
import machine
|
||||
import PikaStdDevice
|
||||
|
||||
time = machine.Time()
|
||||
adc1 = machine.ADC()
|
||||
time = PikaStdDevice.Time()
|
||||
adc1 = PikaStdDevice.ADC()
|
||||
|
||||
adc1.setPin('PA1')
|
||||
adc1.enable()
|
||||
|
@ -1,9 +1,9 @@
|
||||
import PikaStdLib
|
||||
import machine
|
||||
import PikaStdDevice
|
||||
|
||||
mem = PikaStdLib.MemChecker()
|
||||
io1 = machine.GPIO()
|
||||
time = machine.Time()
|
||||
io1 = PikaStdDevice.GPIO()
|
||||
time = PikaStdDevice.Time()
|
||||
|
||||
io1.setPin('PA8')
|
||||
io1.setMode('out')
|
||||
|
@ -1,4 +1,4 @@
|
||||
from machine import GPIO as STD_GPIO
|
||||
from PikaStdDevice import GPIO as STD_GPIO
|
||||
|
||||
print('PikaScript LED KEY')
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
import PikaStdLib
|
||||
|
||||
import machine
|
||||
import PikaStdDevice
|
||||
|
||||
lcd = machine.LCD()
|
||||
lcd = PikaStdDevice.LCD()
|
||||
lcd.init()
|
||||
lcd.clear('white')
|
||||
mem = PikaStdLib.MemChecker()
|
||||
key = machine.KEY()
|
||||
key = PikaStdDevice.KEY()
|
||||
key.init()
|
||||
time = machine.Time()
|
||||
time = PikaStdDevice.Time()
|
||||
h = 10
|
||||
w = 10
|
||||
x = 10
|
||||
|
@ -1,8 +1,8 @@
|
||||
import PikaStdLib
|
||||
import machine
|
||||
import PikaStdDevice
|
||||
|
||||
time = machine.Time()
|
||||
pwm = machine.PWM()
|
||||
time = PikaStdDevice.Time()
|
||||
pwm = PikaStdDevice.PWM()
|
||||
pwm.setPin('PA8')
|
||||
pwm.setFrequency(2000)
|
||||
pwm.setDuty(0.5)
|
||||
|
@ -1,7 +1,7 @@
|
||||
import PikaStdLib
|
||||
import machine
|
||||
import PikaStdDevice
|
||||
|
||||
time = machine.Time()
|
||||
time = PikaStdDevice.Time()
|
||||
|
||||
while True:
|
||||
time.sleep_ms(500)
|
||||
|
@ -1,8 +1,8 @@
|
||||
import PikaStdLib
|
||||
import machine
|
||||
import PikaStdDevice
|
||||
|
||||
time = machine.Time()
|
||||
uart = machine.UART()
|
||||
time = PikaStdDevice.Time()
|
||||
uart = PikaStdDevice.UART()
|
||||
uart.setId(1)
|
||||
uart.setBaudRate(115200)
|
||||
uart.enable()
|
||||
|
Loading…
x
Reference in New Issue
Block a user