VAR RPM,STEPS
DISPLAY_INIT(SPI,ST7796,480,320,00,1,3,2) // Initialize display with SPI interface and ST7796 driver (480x320 resolution)
PAUSE 100 // Wait 100 ms for the display to stabilize
DISPLAY_CLEAR(0x0) // Clear the display with color 0x0
WHILE (1)
RPM=STEPS*60/500
DISPLAY_TEXT(10,180,"RPM: ",RPM.0," ",Font_11x18,3,0xFFFF)
PWM1 CH1 STEPS,50,0
PAUSE 10
WEND
