Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
M
Minibot
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Conditions générales et politique de confidentialité
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Diego de Bernard de Fauconval
Minibot
Validations
b721958e
Valider
b721958e
rédigé
2 years ago
par
Diego de Bernard de Fauconval
Parcourir les fichiers
Options
Téléchargements
Plain Diff
Merge branch 'main' of
https://forge.uclouvain.be/ddebernardde/minibot
parents
32a036d1
954bfd05
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
5
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
5 fichiers modifiés
.gitignore
+2
-1
2 ajouts, 1 suppression
.gitignore
Makefile
+1
-1
1 ajout, 1 suppression
Makefile
encoder.c
+23
-8
23 ajouts, 8 suppressions
encoder.c
motor.c
+2
-1
2 ajouts, 1 suppression
motor.c
switch.c
+8
-2
8 ajouts, 2 suppressions
switch.c
avec
36 ajouts
et
13 suppressions
.gitignore
+
2
−
1
Voir le fichier @
b721958e
WiringPi/
MyInclude/
*.out
*.o
\ No newline at end of file
*.o
Ce diff est replié.
Cliquez pour l'agrandir.
Makefile
+
1
−
1
Voir le fichier @
b721958e
...
...
@@ -14,6 +14,6 @@ compile_switch :
compile_motor
:
gcc
-o
motor motor.c
-lwiringPi
.PHONY
clean
:
rm
*
.o
\ No newline at end of file
Ce diff est replié.
Cliquez pour l'agrandir.
encoder.c
+
23
−
8
Voir le fichier @
b721958e
...
...
@@ -3,16 +3,31 @@
#include
<wiringPi.h>
const
int
MOSI_PIN
=
12
;
const
int
MISO_PIN
=
13
;
const
int
MOSI_PIN_FPGA
=
14
;
const
int
MISO_PIN_FPGA
=
16
;
const
int
ENC_PIN_1A
=
38
;
const
int
ENC_PIN_1B
=
36
;
const
int
ENC_PIN_2A
=
35
;
const
int
ENC_PIN_2B
=
34
;
const
int
MOSI_PIN
=
12
;
//from RASPI to FPGA
const
int
MISO_PIN
=
13
;
//from RASPI to FPGA
const
int
MOSI_PIN_FPGA
=
14
;
//from RASPI to FPGA
const
int
MISO_PIN_FPGA
=
16
;
//from RASPI to FPGA
const
int
VDD_PIN_FPGA
=
29
;
//from FPGA to ENCODER -> ouput data from encoder
const
int
ENC_PIN_1A
=
38
;
//from FPGA to ENCODER -> ouput data from encoder
const
int
ENC_PIN_1B
=
36
;
//from FPGA to ENCODER -> ouput data from encoder
const
int
ENC_PIN_2A
=
35
;
//from FPGA to ENCODER -> ouput data from encoder
const
int
ENC_PIN_2B
=
34
;
//from FPGA to ENCODER -> ouput data from encoder
const
int
SCK_PIN
=
14
;
//from RASPI to FPGA -> clock signal
const
int
SCK_PIN_FPGA
=
13
;
//from FPGA to ENCODER -> clock signal
const
int
SS_BAR_1
=
2
;
//from RASPI to FPGA -> enable encoder
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
);
pinMode
(
ENC_PIN_2B
,
INPUT
);
return
0
;
}
\ No newline at end of file
Ce diff est replié.
Cliquez pour l'agrandir.
motor.c
+
2
−
1
Voir le fichier @
b721958e
...
...
@@ -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
);
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
switch.c
+
8
−
2
Voir le fichier @
b721958e
...
...
@@ -9,8 +9,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 +25,10 @@ int main(int argc, char const *argv[])
printf
(
"Vous avez poussé sur le uswitch gauche
\n
"
);
delay
(
300
);
}
if
(
kbhit
())
{
exit
(
EXIT_SUCCESS
);
}
}
return
0
;
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter