`print "Graphic Clock" `

print

graphics 500 500

gcls

gosub [drawhour]

gosub [drawminute]

end

[drawhour]

mytime = time("hour")

x = mytime * 15

x = x / 57.29577951

xx = sin(x)

xx = xx * 200

xx = 250 + xx

yy = cos(x)

yy = yy * 200

yy = 250 - yy

line 250 250 xx yy

return

[drawminute]

mytime = time("min")

x = mytime * 6

x = x / 57.29577951

xx = sin(x)

xx = xx * 200

xx = 250 + xx

yy = cos(x)

yy = yy * 200

yy = 250 - yy

line 250 250 xx yy 12

return

**Moderator:** Mmiscool

that's some fancy math.

runs on an esp -01 module

dwight

Do you mid if I post this demo on the esp8266 basic web site?

`onload [drawClock]`

wprint "<meta http-equiv='refresh' content='5;URL=/input?'>"

print "Graphic Clock"

print

graphics 500 500

[drawClock]

gcls

gosub [drawhour]

gosub [drawminute]

wait

[drawhour]

mytime = time("hour")

x = mytime * 15

x = x / 57.29577951

xx = sin(x)

xx = xx * 200

xx = 250 + xx

yy = cos(x)

yy = yy * 200

yy = 250 - yy

line 250 250 xx yy

return

[drawminute]

mytime = time("min")

x = mytime * 6

x = x / 57.29577951

xx = sin(x)

xx = xx * 200

xx = 250 + xx

yy = cos(x)

yy = yy * 200

yy = 250 - yy

line 250 250 xx yy 12

return

http://esp8266basic.com

A BASIC interpreter for your ESP

Working now on Autodrop3d. A 3d printer with automatic part ejection system. https://autodrop3d.com

Mmiscool wrote:Modified your demo so it will update the clock face every 5 seconds.

Do you mid if I post this demo on the esp8266 basic web site?Code: Select all`onload [drawClock]`

wprint "<meta http-equiv='refresh' content='5;URL=/input?'>"

print "Graphic Clock"

graphics 500 500

[drawClock]

gcls

gosub [drawhour]

gosub [drawminute]

wait

[drawhour]

mytime = time("hour")

x = mytime * 15

x = x / 57.29577951

xx = sin(x)

xx = xx * 200

xx = 250 + xx

yy = cos(x)

yy = yy * 200

yy = 250 - yy

line 250 250 xx yy

return

[drawminute]

mytime = time("min")

x = mytime * 6

x = x / 57.29577951

xx = sin(x)

xx = xx * 200

xx = 250 + xx

yy = cos(x)

yy = yy * 200

yy = 250 - yy

line 250 250 xx yy 12

return

Thats what I had planned to do with it but I ran out of time last night.

Of course you can use it.