Skip to content
Extraits de code Groupes Projets
Valider 04b0e735 rédigé par Diego de Fauconval's avatar Diego de Fauconval
Parcourir les fichiers

few changes

parent 0eadf1dd
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
WiringPi/
MyInclude/
*.out
*.o
\ No newline at end of file
*.o
......@@ -14,6 +14,6 @@ compile_switch :
compile_motor :
gcc -o motor motor.c -lwiringPi
.PHONY : clean
clean :
rm *.o
\ No newline at end of file
......@@ -19,6 +19,11 @@ const int SS_BAR_2 = 3; //from RASPI to FPGA -> enable encoder
int main(int argc, char const *argv[])
{
if (wiringPiSetup() == -1) {
printf("WiringPiSetup failed\n");
exit(EXIT_FAILURE);
}
pinMode(ENC_PIN_1A, INPUT);
pinMode(ENC_PIN_1B, INPUT);
pinMode(ENC_PIN_2A, INPUT);
......
......@@ -13,7 +13,8 @@ int wheelSpeed = 600;
int main(int argc, char const *argv[])
{
if (wiringPiSetup() == -1) {
exit(1);
printf("WiringPiSetup failed\n");
exit(EXIT_FAILURE);
}
pinMode(PWM_PIN_RIGHT, PWM_OUTPUT);
pinMode(PWM_PIN_LEFT, PWM_OUTPUT);
......
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <conio.h>
#include <wiringPi.h>
......@@ -9,8 +10,10 @@ const int PIN_SWITCH_LEFT = 29;
int main(int argc, char const *argv[])
{
if (wiringPiSetup() == -1) exit(1);
if (wiringPiSetup() == -1) {
printf("WiringPiSetup failed\n");
exit(EXIT_FAILURE);
}
pinMode(PIN_SWITCH_RIGHT, INPUT);
pinMode(PIN_SWITCH_LEFT, INPUT);
......@@ -23,6 +26,8 @@ int main(int argc, char const *argv[])
printf("Vous avez poussé sur le uswitch gauche\n");
delay(300);
}
if ()
}
return 0;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter