A Basic Interpreter written from scratch for the ESP8266

Moderator: Mmiscool

User avatar
By aphawk
#54849 I want to draw 3 vertical sliders, side by side, separated by a small space.
How I can specify the right positioning, or better, the space between then ?

My test code follows, but the sliders are far one to other.

Code: Select allcls
let pi1 = 2
let pi2 = 5
let pi3 = 4
let x = 0
let y = 0
let z = 0

slider x, 0, 1023
cssid htmlid(),"transform: rotate(270deg);margin: 75px;"
slider y, 0, 1023
cssid htmlid(),"transform: rotate(270deg);margin: 75px;"
slider z, 0, 1023
cssid htmlid(),"transform: rotate(270deg);margin: 75px;"
button "End",[pend]
timer 500, [set.pwm]
wait

[set.pwm]
a = 1023 - x
b = 1023 - y
c = 1023 - z
io(pwo,pi1,a)
io(pwo,pi2,b)
io(pwo,pi3,c)
wait

[pend]
timer 0
end



Thanks !
User avatar
By aphawk
#54904 Well, I see that I must learn CSS and HTML ......

This code makes what I need :

Code: Select allslider x, 0, 1023
cssid htmlid(),"transform: rotate(270deg);position: fixed;top: 105px;left: 0px;"
slider y, 0, 1023
cssid htmlid(),"transform: rotate(270deg);position: fixed;top: 105px;left: 33px;"
slider z, 0, 1023
cssid htmlid(),"transform: rotate(270deg);position: fixed;top: 105px;left: 65px;"