In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: Danny, You'll need to adjust the next level up at the same time you are adjusting the previous level down. Try this: [code] FOR brightness = 0 to 254 level1 = brightness DELAY_MS 20 NEXT FOR brightness = 255 to 0 STEP -1 level1 = brightness IF brightness < 20 level2 = 20 - brightness ENDIF DELAY_MS 20 NEXT FOR brightness = 21 to 254 level2 = brightness DELAY_MS 20 NEXT [/code] Bean ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=338503#m338516 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)