 }
 
 void busy_delay(uint32_t ms) {
-	lamp_fade_ms += ms;
 	ms += millis();
-	if (lamp_fade_ms > LAMP_FADE_MS) {
-		lamp_fade_ms = 0;
+	do {
+		test_power();
+	} while (millis() < ms);
+}
+
+void lamp_fade() {
+	if ((millis() - lamp_fade_ms) > LAMP_FADE_MS) {
+		lamp_fade_ms = millis();
 		if (++lamp_fade_index >= sizeof(LAMP_FADE_PWM))
 			lamp_fade_index = 0;
 		set_lamp(LAMP_FADE_PWM[lamp_fade_index]);
 	}
-	do {
-		test_power();
-	} while (millis() < ms);
 }
 
 /* sets the motors positions to match "current_position" global

	}

	write_current_position_to_eeprom();
	set_lamp(255);
	// go_home();
	delay(1000);
	while(!(PINB & BUTTON_MASK));
}

};

const draw_image_t draws[] = {
	{MUSEUM_LOGO_1_DRAW, 0, 0, 1.1},
	{MUSEUM_LOGO_2_DRAW, 440, 0, 1.1},
	{MUSEUM_LOGO_3_DRAW, 220, 330, 1.1},
	{ANDROID_1_DRAW, 0, 0, 1.1},
	{EAGLE_1_DRAW, 0, 0, 1.1},
	{BUTTERFLY_1_DRAW, 0, 0, 1.1},
	{FLOWER_1_DRAW, 0, 0, 1.2},
	{APPLE_1_DRAW, 0, 0, 1.1},
	{BALL_1_DRAW, 0, 0, 1},
	{BICYCLE_1_DRAW, 0, 0, 1},
	{BRAIN_1_DRAW, 0, 0, 1.1},
	{CHESS_1_DRAW, 0, 0, 1.1},
	// {HAND_1_DRAW, 0, 0, 1.1},
	{MENORAH_1_DRAW, 0, 0, 1.1},
	{PATTERN_1_DRAW, 0, 0, 1.2},
	{PRESENT_1_DRAW, 0, 0, 0.9},
	{RECYCLE_1_DRAW, 0, 0, 1.1},
	{TEXT_1_DRAW, 0, 0, 1.1},
	{TRISKELITON_1_DRAW, 0, 0, 1.1},
	{YIN_YANG_1_DRAW, 0, 0, 1.1},
};

int16_t current_position_x = 0;
