diff --git a/project/motor.c b/project/motor.c index 9f35bab..f5c05f8 100755 --- a/project/motor.c +++ b/project/motor.c @@ -17,6 +17,9 @@ void writeFile(char *filename, char *buffer, size_t count) { int fd = open(filename, O_WRONLY); + if(fd == -1) { + perror("Fehler bei open "); + } write(fd, buffer, count); close(fd); } @@ -93,7 +96,7 @@ int main() registerOutput(PIN_MOTOR1_REVERSE); registerOutput(PIN_MOTOR2_FORWARD); registerOutput(PIN_MOTOR2_REVERSE); - + forward(2); return 0; }