// Use this project to run precompiled AnnexBasic binary:
// Press "F1", choose "Load HEX File and Start Simulation..."
// Select a precompiled AnnexBasic binary.
// copy this script in the editor page, save and run it
pin.mode 2, output
pin.mode 15, output
pin(2) = 0 : pin(15) = 1
pos = 100: dir = 5
PWM.SETUP 22, 1, pos, 50, 12
tft.init 0
gui.init 20, black
txt = GUI.Textline(10,50,190,50, "Position:", 3)
gui.autorefresh 50
maxscroll.setup 4, 21
maxscroll.print "Annex & WOKWI"
for z = 1 to 1000
pin(2) = 1 - pin(2)
pin(15) = 1 - pin(15)
pause 200
PWM.OUT 1, pos
pos = pos + dir
if (pos < 100) or (pos > 500) then dir = -dir
gui.settext txt,"Position " + str$(pos)
MAXSCROLL.SCROLL 5
next z
esp:0
esp:1
esp:2
esp:3
esp:4
esp:5
esp:6
esp:7
esp:8
esp:9
esp:10
esp:11
esp:12
esp:13
esp:14
esp:15
esp:16
esp:17
esp:18
esp:19
esp:20
esp:21
esp:26
esp:33
esp:34
esp:35
esp:36
esp:37
esp:38
esp:39
esp:40
esp:41
esp:42
esp:45
esp:46
esp:3V3
esp:5V
esp:GND.1
esp:TX
esp:RX
esp:RST
esp:GND.2
lcd1:VCC
lcd1:GND
lcd1:CS
lcd1:RST
lcd1:D/C
lcd1:MOSI
lcd1:SCK
lcd1:LED
lcd1:MISO
sd1:CD
sd1:DO
sd1:GND
sd1:SCK
sd1:VCC
sd1:DI
sd1:CS
led1:A
led1:C
led2:A
led2:C
servo1:GND
servo1:V+
servo1:PWM
r1:1
r1:2
r2:1
r2:2
matrix1:V+
matrix1:GND
matrix1:DIN
matrix1:CS
matrix1:CLK
matrix1:V+.2
matrix1:GND.2
matrix1:DOUT
matrix1:CS.2
matrix1:CLK.2