commit 206c5f1ae05c8ae6324010fe1ecce08c5333c538 Author: Emilie Date: Fri Nov 14 13:03:43 2025 +0100 Version 1 diff --git a/ADXL345.pdf b/ADXL345.pdf new file mode 100644 index 0000000..37e66c2 Binary files /dev/null and b/ADXL345.pdf differ diff --git a/ADXL345_SPI_v2.pdf b/ADXL345_SPI_v2.pdf new file mode 100644 index 0000000..b77c214 Binary files /dev/null and b/ADXL345_SPI_v2.pdf differ diff --git a/Cahier_Des_Charges.pdf b/Cahier_Des_Charges.pdf new file mode 100644 index 0000000..a1ad0b0 Binary files /dev/null and b/Cahier_Des_Charges.pdf differ diff --git a/DossierTechVoilier2_0.pdf b/DossierTechVoilier2_0.pdf new file mode 100644 index 0000000..579021b Binary files /dev/null and b/DossierTechVoilier2_0.pdf differ diff --git a/GitLocalToGithub.txt b/GitLocalToGithub.txt new file mode 100644 index 0000000..f7080e8 --- /dev/null +++ b/GitLocalToGithub.txt @@ -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 : , 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 \ No newline at end of file diff --git a/LCD.pdf b/LCD.pdf new file mode 100644 index 0000000..ae17fe0 Binary files /dev/null and b/LCD.pdf differ diff --git a/RW1063.pdf b/RW1063.pdf new file mode 100644 index 0000000..8b5b371 Binary files /dev/null and b/RW1063.pdf differ diff --git a/TD_Periph_2022.pdf b/TD_Periph_2022.pdf new file mode 100644 index 0000000..f599756 Binary files /dev/null and b/TD_Periph_2022.pdf differ diff --git a/fonction-acquerir-les-codeurs.pdf b/fonction-acquerir-les-codeurs.pdf new file mode 100644 index 0000000..4de2276 Binary files /dev/null and b/fonction-acquerir-les-codeurs.pdf differ diff --git a/iem.txt b/iem.txt new file mode 100644 index 0000000..228538e --- /dev/null +++ b/iem.txt @@ -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);} diff --git a/user name Emilie.txt b/user name Emilie.txt new file mode 100644 index 0000000..64857a6 --- /dev/null +++ b/user name Emilie.txt @@ -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 d’un 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