Version 1

This commit is contained in:
Emilie 2025-11-14 13:03:43 +01:00
commit 206c5f1ae0
11 changed files with 150 additions and 0 deletions

BIN
ADXL345.pdf Normal file

Binary file not shown.

BIN
ADXL345_SPI_v2.pdf Normal file

Binary file not shown.

BIN
Cahier_Des_Charges.pdf Normal file

Binary file not shown.

BIN
DossierTechVoilier2_0.pdf Normal file

Binary file not shown.

31
GitLocalToGithub.txt Normal file
View file

@ -0,0 +1,31 @@
Auteur : T.Rocacher
***************************
faire un git local
- télécharger le .gitignore sur Moodle à l'intérieur du répertoire. ATTENTION, si vous faites "enregistrer la cible du lien sous", le fichier prend
le nom de gitignore.gitignore. Si tel est le cas, renommer le fichier sous .gitignore
Info : ce fichier contient les extensions de fichiers qui ne seront pas suivis, ainsi que les répertoires non utiles = ce qu'on ne veut pas sauvegarder
il est spécialement écrit pour les projets KEIL
- dans le répertoire que vous voulez gérer sous git : <clic droit>, puis choisir 'gitbash here' // on ouvre git bash et on va chercher le bon répertoire
- dans la console qui s'ouvre : git init
- dans la console : git add --all
Info : cette ligne ajoute tous les fichiers, qui sont prêts à être "commités" (sauf ceux que .gitignore spécifie).
- dans la console : git commit -m "Premier Commit..."
Info : tous les fichiers qui ont été ajoutés précédemment sont "figés" sans ce premier commit.
- créer un repository github. Copier alors le lien qui doit ressembler à https://github.com/.../blabla.git
- dans la console : git remote add origin https://github.com/.../blabla.git
Info : cette ligne associe à origin, l'URL du repository github visé
- dans la console : git push -u origin master
Info : le répertoire est uploadé sur le repository github. Ce qui est poussé, est la branche master, celle sur laquelle on
travaille au départ.
IEM
.gitignore
Service_Cap -> .c .h
Service_Bordage -> .c .h
Drivers -> .c .h
Dev_Girouette

BIN
LCD.pdf Normal file

Binary file not shown.

BIN
RW1063.pdf Normal file

Binary file not shown.

BIN
TD_Periph_2022.pdf Normal file

Binary file not shown.

Binary file not shown.

80
iem.txt Normal file
View file

@ -0,0 +1,80 @@
MyUART.C
void (*rx_callback)(char) = 0;
void MyUART_SetRxCallback(void (*callback)(char)) {
rx_callback = callback;
}
void USART2_IRQHandler(void){
if (USART2->SR & USART_SR_RXNE) {
char c = (char)(USART2->DR & 0xFF);
if (rx_callback) rx_callback(c);
}
}
main.C
volatile char cap = 0;
void ReceptionCap(char c){
cap = c;
}
void AppliquerCommandeCap(void){
int cmd = (int)cap;
if (cmd == 0) {
StopRotation();
} else if (cmd > 0) {
RotDroite(cmd);
} else {
RotGauche(-cmd);
}
}
void main(){
MyUART_Init(USART2);
MyUART_SetRxCallback(ReceptionCap);
Init_GPIO_Sens();
Init_Timer_PWM();
while(1){
AppliquerCommandeCap();
Delay_ms(100); //fct à créer
}
}
#define MOTEUR_GPIO GPIOB ??
#define MOTEUR_PIN_SENS 0 ??
void Init_GPIO_Sens(void) {
MyGPIO_Init(MOTEUR_GPIO, MOTEUR_PIN_SENS, Out_Ppull);
}
#define MOTEUR_TIM TIM2 ??
#define MOTEUR_TIM_CHANNEL 1 ??
void Init_Timer_PWM(void) {
// Exemple fréquence PWM : 20 kHz fclock=72Mhz
// Choix PSC = 36 => 2 MHz timer clock
// ARR = 100 => 20 kHz PWM (2MHz / 100)
//La bonne pin (TIMx CHx) = Alternate Function Push-Pull
avec MyGPIO_Init(GPIOx,x, AltOut_Ppull) et verif RCC->APB2ENR |= RCC_APB2ENR_IOPxEN; actif
MyTimer_Base_Init(MOTEUR_TIM, 100, 36);
MyTimer_PWM(MOTEUR_TIM, MOTEUR_TIM_CHANNEL);
MyTimer_StartPWM(MOTEUR_TIM, MOTEUR_TIM_CHANNEL, 0); // PWM à 0 pour le start
}
void StopRotation(void) {
MyGPIO_Reset(MOTEUR_GPIO, MOTEUR_PIN_SENS); // blc sens MyTimer_StartPWM(MOTEUR_TIM, MOTEUR_TIM_CHANNEL, 0); // PWM=0 STOP
}
void RotDroite(int vitesse) {
MyGPIO_Set(MOTEUR_GPIO, MOTEUR_PIN_SENS); // droite = 1
MyTimer_StartPWM(MOTEUR_TIM, MOTEUR_TIM_CHANNEL, vitesse);}
void RotGauche(int vitesse) {
MyGPIO_Reset(MOTEUR_GPIO, MOTEUR_PIN_SENS); // droite = 1
MyTimer_StartPWM(MOTEUR_TIM, MOTEUR_TIM_CHANNEL, vitesse);}

39
user name Emilie.txt Normal file
View file

@ -0,0 +1,39 @@
user name Emilie
email emilie.montaigu@gmail.com 2E88-136D
sur GitHub emiliemontaigu avec google
winget install --id GitHub.cli
winget install --id Git.Git
git --version
git config --global user.name "Emilie"
git config --global user.email "emilie.montaigu@gmail.com"
gh --version
gh auth login GitHub.com HTTPS
mkdir test_git
cd test_git
git init
echo "Hello Git" > test.txt
git add test.txt ou git add --all
git commit -m "Premier commit"
git log ou git log --oneline --all --graph HISTORIQUE
git show 9a3b5f2 Voir le contenu dun commit
git status Voir létat actuel
echo "Deuxième ligne" >> test.txt
git add test.txt
git commit -m "Ajout d'une deuxième ligne"
git log --oneline
git show 9a3b5f2 Voir une ancienne version sans la modifier
git checkout 9a3b5f2 Revenir temporairement à un commit (mode "visite du passé")
git switch master Revenir au présent
git reset --hard 9a3b5f2 Revenir définitivement à une ancienne version
Créer une branche
git branch nouvelle_fonction
git checkout nouvelle_fonction
ou git switch -c nouvelle_fonction