Esy15 1
Esy15 1
Esy15 1
#include <reg51.h>
void rotateClockwise();
void rotateCounterClockwise();
void main() {
while (1) {
unsigned int i, j;
void rotateClockwise() {
P1 = 0x09; // 1001
delay(DELAY_TIME);
P1 = 0x0C; // 1100
delay(DELAY_TIME);
P1 = 0x06; // 0110
delay(DELAY_TIME);
P1 = 0x03; // 0011
delay(DELAY_TIME);
void rotateCounterClockwise() {
P1 = 0x03; // 0011
delay(DELAY_TIME);
P1 = 0x06; // 0110
delay(DELAY_TIME);
P1 = 0x0C; // 1100
delay(DELAY_TIME);
P1 = 0x09; // 1001
delay(DELAY_TIME);