// 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:18
esp:19
esp:GND.1
esp:3V3.1
esp:3V3.2
esp:GND.2
esp:RST
esp:GND.3
esp:GND.4
esp:5V.1
esp:5V.2
esp:GND.5
esp:GND.6
esp:GND.7
esp:GND.8
esp:GND.9
esp:RX
esp:TX
esp:GND.10
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