use stm32g0 for example

This commit is contained in:
pikastech 2021-11-21 16:32:30 +08:00
parent c862aff46e
commit af59eae06d
15 changed files with 31 additions and 31 deletions

View File

@ -1,8 +1,8 @@
import PikaStdLib
import STM32
import STM32G0
time = STM32.Time()
adc1 = STM32.ADC()
time = STM32G0.Time()
adc1 = STM32G0.ADC()
adc1.init()
adc1.setPin('PA1')

View File

@ -1,5 +1,5 @@
pikascript-core==v0.8.3
PikaStdLib==v1.0.1
PikaStdDevice==v1.3.0
STM32==v1.0.2
STM32G0==v1.0.2
PikaPiZero==v1.0.1

View File

@ -1,7 +1,7 @@
pikascript-core==v1.2.4
PikaStdLib==v1.2.2
PikaStdDevice==v1.4.2
STM32==v2.0.1
STM32G0==v2.0.1
PikaPiZero==v1.0.5
STM32G030Booter==1.2.2
Arm2D==v0.2.0

View File

@ -1,9 +1,9 @@
import PikaStdLib
import STM32
import STM32G0
mem = PikaStdLib.MemChecker()
io1 = STM32.GPIO()
time = STM32.Time()
io1 = STM32G0.GPIO()
time = STM32G0.Time()
io1.init()
io1.setPin('PA8')

View File

@ -1,5 +1,5 @@
pikascript-core==v0.8.3
PikaStdLib==v1.0.1
PikaStdDevice==v1.3.0
STM32==v1.0.2
STM32G0==v1.0.2
PikaPiZero==v1.0.1

View File

@ -1,8 +1,8 @@
import PikaStdLib
import STM32
import STM32G0
time = STM32.Time()
pwm = STM32.PWM()
time = STM32G0.Time()
pwm = STM32G0.PWM()
pwm.setPin('PA8')
pwm.setFrequency(2000)
pwm.setDuty(0.5)

View File

@ -1,5 +1,5 @@
pikascript-core==v0.8.3
PikaStdLib==v1.0.1
PikaStdDevice==v1.3.0
STM32==v1.0.2
STM32G0==v1.0.2
PikaPiZero==v1.0.1

View File

@ -1,12 +1,12 @@
import STM32
import STM32G0
import PikaPiZero
import PikaStdLib
time = STM32.Time()
adc = STM32.ADC()
pin = STM32.GPIO()
pwm = STM32.PWM()
uart = STM32.UART()
time = STM32G0.Time()
adc = STM32G0.ADC()
pin = STM32G0.GPIO()
pwm = STM32G0.PWM()
uart = STM32G0.UART()
rgb = PikaPiZero.RGB()
mem = PikaStdLib.MemChecker()

View File

@ -1,5 +1,5 @@
pikascript-core==v0.8.3
PikaStdLib==v1.0.1
PikaStdDevice==v1.3.0
STM32==v1.0.2
STM32G0==v1.0.2
PikaPiZero==v1.0.1

View File

@ -1,8 +1,8 @@
from PikaObj import *
import PikaStdLib
import PikaPiZero
import STM32
pin = STM32.GPIO()
import STM32G0
pin = STM32G0.GPIO()
pin.init()
pin.setPin('PA0')
pin.setMode('in')
@ -17,7 +17,7 @@ pin.enable()
pin.setPin('PB6')
pin.enable()
remove('pin')
ll = STM32.lowLevel()
ll = STM32G0.lowLevel()
oled = PikaPiZero.OLED()
oled.init()
snake = PikaPiZero.Point()

View File

@ -1,6 +1,6 @@
pikascript-core==latest
PikaStdLib==v1.1.0
PikaStdDevice==latest
STM32==latest
STM32G0==latest
PikaPiZero==latest
STM32G030Booter==latest

View File

@ -1,7 +1,7 @@
import PikaStdLib
import STM32
import STM32G0
time = STM32.Time()
time = STM32G0.Time()
while True:
time.sleep_ms(500)

View File

@ -1,5 +1,5 @@
pikascript-core==v0.8.3
PikaStdLib==v1.0.1
PikaStdDevice==v1.3.0
STM32==v1.0.2
STM32G0==v1.0.2
PikaPiZero==v1.0.1

View File

@ -1,8 +1,8 @@
import PikaStdLib
import STM32
import STM32G0
time = STM32.Time()
uart = STM32.UART()
time = STM32G0.Time()
uart = STM32G0.UART()
uart.init()
uart.setId(1)
uart.setBaudRate(115200)

View File

@ -1,5 +1,5 @@
pikascript-core==v0.8.3
PikaStdLib==v1.0.1
PikaStdDevice==v1.3.0
STM32==v1.0.2
STM32G0==v1.0.2
PikaPiZero==v1.0.1