First commit
This commit is contained in:
BIN
IUT/Saé/PHASE5_P5/PHASE5_P5pdsprj.pdsprj
Normal file
BIN
IUT/Saé/PHASE5_P5/PHASE5_P5pdsprj.pdsprj
Normal file
Binary file not shown.
56
IUT/Saé/PHASE5_P5/PHASE5_P5pdsprj.pdsprj.MSI.noamh.workspace
Normal file
56
IUT/Saé/PHASE5_P5/PHASE5_P5pdsprj.pdsprj.MSI.noamh.workspace
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||
<WORKSPACE>
|
||||
<FRAME activewindow="0">
|
||||
<PLACEMENT>2c0000000000000001000000ffffffffffffffffffffffffffffffffb00000000c000000d0060000fc030000</PLACEMENT>
|
||||
<WINDOW type="default" module="ISIS">
|
||||
<editor metric="0" gridmajor="2540000" mode="00000000" zoom="0" scale="119" flipped="0" gridminor="254000" gridmode="32" snapidx="2" snap="254000" xcursor="0" orgmode="0" snaprange="127000">
|
||||
<world y1="-8890000" x1="-12700000" y2="8890000" x2="12700000"/>
|
||||
<centre x="0" y="0"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</WINDOW>
|
||||
</FRAME>
|
||||
<MODULE name="ARES">
|
||||
<editor metric="0" gridmajor="0" mode="00000000" zoom="10" scale="10" flipped="0" gridminor="0" gridmode="32" snapidx="3" snap="0" xcursor="0" orgmode="0" snaprange="0">
|
||||
<world y1="-12700000" x1="-15240000" y2="12700000" x2="15240000"/>
|
||||
<centre x="0" y="0"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</MODULE>
|
||||
<MODULE name="ISIS">
|
||||
<editor metric="0" gridmajor="2540000" mode="00000000" zoom="0" scale="119" flipped="0" gridminor="254000" gridmode="32" snapidx="2" snap="254000" xcursor="0" orgmode="0" snaprange="127000">
|
||||
<world y1="-8890000" x1="-12700000" y2="8890000" x2="12700000"/>
|
||||
<centre x="0" y="0"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</MODULE>
|
||||
<MODULE name="VSMDEBUG">
|
||||
<PWI>
|
||||
<POPUP w="800" x="999" flags="00000002" y="165" h="200" pid="0" iid="-1">
|
||||
<PROPERTIES>
|
||||
<ITEM name="Message Column Width">663</ITEM>
|
||||
<ITEM name="ShowGrid">No</ITEM>
|
||||
<ITEM name="Source Column Width">100</ITEM>
|
||||
<ITEM name="Version">100</ITEM>
|
||||
</PROPERTIES>
|
||||
</POPUP>
|
||||
<POPUP w="350" x="1019" flags="00000032" y="185" h="200" pid="1" iid="-1">
|
||||
<PROPERTIES>
|
||||
<ITEM name="Address Column Width">83</ITEM>
|
||||
<ITEM name="AutoResize">No</ITEM>
|
||||
<ITEM name="Gridlines">Yes</ITEM>
|
||||
<ITEM name="Name Column Width">83</ITEM>
|
||||
<ITEM name="ShowAddresses">Yes</ITEM>
|
||||
<ITEM name="ShowPreviousValues">No</ITEM>
|
||||
<ITEM name="ShowTypes">No</ITEM>
|
||||
<ITEM name="ShowWatchPoint">Yes</ITEM>
|
||||
<ITEM name="TriggerMode">0</ITEM>
|
||||
<ITEM name="Value Column Width">83</ITEM>
|
||||
<ITEM name="Version">100</ITEM>
|
||||
<ITEM name="Watch Expression Column Width">83</ITEM>
|
||||
<ITEM name="nItems">0</ITEM>
|
||||
</PROPERTIES>
|
||||
</POPUP>
|
||||
</PWI>
|
||||
</MODULE>
|
||||
</WORKSPACE>
|
||||
Binary file not shown.
BIN
IUT/Saé/Phase 2/Carte Alim.pdsprj
Normal file
BIN
IUT/Saé/Phase 2/Carte Alim.pdsprj
Normal file
Binary file not shown.
30
IUT/Saé/Phase 2/Carte Alim.pdsprj.MSI.noamh.workspace
Normal file
30
IUT/Saé/Phase 2/Carte Alim.pdsprj.MSI.noamh.workspace
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||
<WORKSPACE>
|
||||
<FRAME activewindow="0">
|
||||
<PLACEMENT>2c0000000200000003000000ffffffffffffffffffffffffffffffffb00000000c000000d0060000fc030000</PLACEMENT>
|
||||
<WINDOW type="default" module="ISIS">
|
||||
<editor metric="0" gridmajor="2540000" mode="00000000" zoom="0" scale="125" flipped="0" gridminor="254000" gridmode="32" snapidx="2" snap="254000" xcursor="0" orgmode="0" snaprange="127000">
|
||||
<world y1="-8890000" x1="-12700000" y2="8890000" x2="12700000"/>
|
||||
<centre x="0" y="0"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</WINDOW>
|
||||
</FRAME>
|
||||
<MODULE name="ARES">
|
||||
<editor metric="0" gridmajor="0" mode="00000000" zoom="10" scale="10" flipped="0" gridminor="0" gridmode="32" snapidx="3" snap="0" xcursor="0" orgmode="0" snaprange="0">
|
||||
<world y1="-12700000" x1="-15240000" y2="12700000" x2="15240000"/>
|
||||
<centre x="0" y="0"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</MODULE>
|
||||
<MODULE name="ISIS">
|
||||
<editor metric="0" gridmajor="2540000" mode="00000000" zoom="0" scale="125" flipped="0" gridminor="254000" gridmode="32" snapidx="2" snap="254000" xcursor="0" orgmode="0" snaprange="127000">
|
||||
<world y1="-8890000" x1="-12700000" y2="8890000" x2="12700000"/>
|
||||
<centre x="0" y="0"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</MODULE>
|
||||
<MODULE name="VSMDEBUG">
|
||||
<PWI/>
|
||||
</MODULE>
|
||||
</WORKSPACE>
|
||||
BIN
IUT/Saé/Phase 2/SAÉ_1_Phase_02_2023_2024.pdf
Normal file
BIN
IUT/Saé/Phase 2/SAÉ_1_Phase_02_2023_2024.pdf
Normal file
Binary file not shown.
BIN
IUT/Saé/Phase 2/Sans titre.png
Normal file
BIN
IUT/Saé/Phase 2/Sans titre.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
BIN
IUT/Saé/Phase6/Driver_2Moteur.pdsprj
Normal file
BIN
IUT/Saé/Phase6/Driver_2Moteur.pdsprj
Normal file
Binary file not shown.
59
IUT/Saé/Phase6/Driver_2Moteur.pdsprj.MSI.noamh.workspace
Normal file
59
IUT/Saé/Phase6/Driver_2Moteur.pdsprj.MSI.noamh.workspace
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||
<WORKSPACE>
|
||||
<FRAME activewindow="1">
|
||||
<PLACEMENT>2c0000000200000003000000ffffffffffffffffffffffffffffffffb00000000c000000d0060000fc030000</PLACEMENT>
|
||||
<WINDOW type="default" module="ISIS">
|
||||
<editor metric="0" gridmajor="2540000" mode="00000000" zoom="0" scale="125" flipped="0" gridminor="254000" gridmode="32" snapidx="2" snap="254000" xcursor="0" orgmode="0" snaprange="127000">
|
||||
<world y1="-8890000" x1="-12700000" y2="8890000" x2="12700000"/>
|
||||
<centre x="0" y="0"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</WINDOW>
|
||||
<WINDOW type="default" module="ARES">
|
||||
<editor metric="1" gridmajor="1000000" mode="00000000" zoom="-1" scale="312" flipped="0" gridminor="200000" gridmode="32" snapidx="0" snap="10000" xcursor="0" orgmode="0" snaprange="40705">
|
||||
<world y1="-12700000" x1="-15240000" y2="12700000" x2="15240000"/>
|
||||
<centre x="3300000" y="-2375000"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</WINDOW>
|
||||
</FRAME>
|
||||
<MODULE name="ARES">
|
||||
<editor metric="1" gridmajor="1000000" mode="00000000" zoom="-1" scale="312" flipped="0" gridminor="200000" gridmode="32" snapidx="0" snap="10000" xcursor="0" orgmode="0" snaprange="40705">
|
||||
<world y1="-12700000" x1="-15240000" y2="12700000" x2="15240000"/>
|
||||
<centre x="3300000" y="-2375000"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</MODULE>
|
||||
<MODULE name="ISIS">
|
||||
<editor metric="0" gridmajor="2540000" mode="00000000" zoom="0" scale="125" flipped="0" gridminor="254000" gridmode="32" snapidx="2" snap="254000" xcursor="0" orgmode="0" snaprange="127000">
|
||||
<world y1="-8890000" x1="-12700000" y2="8890000" x2="12700000"/>
|
||||
<centre x="0" y="0"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</MODULE>
|
||||
<MODULE name="VSMDEBUG">
|
||||
<PWI>
|
||||
<POPUP w="800" x="38" flags="00000002" y="129" h="200" pid="0" iid="-1">
|
||||
<PROPERTIES>
|
||||
<ITEM name="Message Column Width">663</ITEM>
|
||||
<ITEM name="ShowGrid">No</ITEM>
|
||||
<ITEM name="Source Column Width">100</ITEM>
|
||||
<ITEM name="Version">100</ITEM>
|
||||
</PROPERTIES>
|
||||
</POPUP>
|
||||
<POPUP w="350" x="58" flags="00000032" y="149" h="200" pid="1" iid="-1">
|
||||
<PROPERTIES>
|
||||
<ITEM name="AutoResize">No</ITEM>
|
||||
<ITEM name="Gridlines">Yes</ITEM>
|
||||
<ITEM name="ShowAddresses">Yes</ITEM>
|
||||
<ITEM name="ShowPreviousValues">No</ITEM>
|
||||
<ITEM name="ShowTypes">No</ITEM>
|
||||
<ITEM name="ShowWatchPoint">Yes</ITEM>
|
||||
<ITEM name="TriggerMode">0</ITEM>
|
||||
<ITEM name="Version">100</ITEM>
|
||||
<ITEM name="nItems">0</ITEM>
|
||||
</PROPERTIES>
|
||||
</POPUP>
|
||||
</PWI>
|
||||
</MODULE>
|
||||
</WORKSPACE>
|
||||
BIN
IUT/Saé/Phase6/Driver_2Moteur2.pdsprj
Normal file
BIN
IUT/Saé/Phase6/Driver_2Moteur2.pdsprj
Normal file
Binary file not shown.
37
IUT/Saé/Phase6/Driver_2Moteur2.pdsprj.MSI.noamh.workspace
Normal file
37
IUT/Saé/Phase6/Driver_2Moteur2.pdsprj.MSI.noamh.workspace
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||
<WORKSPACE>
|
||||
<FRAME activewindow="0">
|
||||
<PLACEMENT>2c00000002000000030000000083ffff0083ffffffffffffffffffffb00000000c000000d0060000fc030000</PLACEMENT>
|
||||
<WINDOW type="default" module="ISIS">
|
||||
<editor metric="0" gridmajor="2540000" mode="00000000" zoom="-1" scale="125" flipped="0" gridminor="254000" gridmode="32" snapidx="2" snap="254000" xcursor="0" orgmode="0" snaprange="127000">
|
||||
<world y1="-8890000" x1="-12700000" y2="8890000" x2="12700000"/>
|
||||
<centre x="0" y="0"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</WINDOW>
|
||||
<WINDOW type="default" module="ARES">
|
||||
<editor metric="1" gridmajor="1000000" mode="00000000" zoom="-1" scale="312" flipped="0" gridminor="200000" gridmode="32" snapidx="0" snap="10000" xcursor="0" orgmode="0" snaprange="40705">
|
||||
<world y1="-12700000" x1="-15240000" y2="12700000" x2="15240000"/>
|
||||
<centre x="3300000" y="-2375000"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</WINDOW>
|
||||
</FRAME>
|
||||
<MODULE name="ARES">
|
||||
<editor metric="1" gridmajor="1000000" mode="00000000" zoom="-1" scale="312" flipped="0" gridminor="200000" gridmode="32" snapidx="0" snap="10000" xcursor="0" orgmode="0" snaprange="40705">
|
||||
<world y1="-12700000" x1="-15240000" y2="12700000" x2="15240000"/>
|
||||
<centre x="3300000" y="-2375000"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</MODULE>
|
||||
<MODULE name="ISIS">
|
||||
<editor metric="0" gridmajor="2540000" mode="00000000" zoom="-1" scale="125" flipped="0" gridminor="254000" gridmode="32" snapidx="2" snap="254000" xcursor="0" orgmode="0" snaprange="127000">
|
||||
<world y1="-8890000" x1="-12700000" y2="8890000" x2="12700000"/>
|
||||
<centre x="0" y="0"/>
|
||||
<origin x="0" y="0"/>
|
||||
</editor>
|
||||
</MODULE>
|
||||
<MODULE name="VSMDEBUG">
|
||||
<PWI/>
|
||||
</MODULE>
|
||||
</WORKSPACE>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
IUT/Saé/Phase6/Project Backups/Driver_2Moteur [Autosaved].pdsprj
Normal file
BIN
IUT/Saé/Phase6/Project Backups/Driver_2Moteur [Autosaved].pdsprj
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
IUT/Saé/Phase6/typon.pdf
Normal file
BIN
IUT/Saé/Phase6/typon.pdf
Normal file
Binary file not shown.
1
IUT/Saé/Phases_Latex
Submodule
1
IUT/Saé/Phases_Latex
Submodule
Submodule IUT/Saé/Phases_Latex added at 8b35dd86bd
BIN
IUT/Saé/Robot.f3d
Normal file
BIN
IUT/Saé/Robot.f3d
Normal file
Binary file not shown.
BIN
IUT/Saé/SAÉ_1_Phase_02_2023_2024.pdf
Normal file
BIN
IUT/Saé/SAÉ_1_Phase_02_2023_2024.pdf
Normal file
Binary file not shown.
BIN
IUT/Saé/SAÉ_1_Phase_03.pdf
Normal file
BIN
IUT/Saé/SAÉ_1_Phase_03.pdf
Normal file
Binary file not shown.
BIN
IUT/Saé/SAÉ_1_Phase_04.pdf
Normal file
BIN
IUT/Saé/SAÉ_1_Phase_04.pdf
Normal file
Binary file not shown.
BIN
IUT/Saé/SAÉ_1_Phase_05.pdf
Normal file
BIN
IUT/Saé/SAÉ_1_Phase_05.pdf
Normal file
Binary file not shown.
BIN
IUT/Saé/SAÉ_1_Phase_06.pdf
Normal file
BIN
IUT/Saé/SAÉ_1_Phase_06.pdf
Normal file
Binary file not shown.
BIN
IUT/Saé/SAÉ_1_Phase_07_2023-2024.pdf
Normal file
BIN
IUT/Saé/SAÉ_1_Phase_07_2023-2024.pdf
Normal file
Binary file not shown.
BIN
IUT/Saé/SAÉ_2_Phase_08_2023.pdf
Normal file
BIN
IUT/Saé/SAÉ_2_Phase_08_2023.pdf
Normal file
Binary file not shown.
BIN
IUT/Saé/SAÉ_2_Phase_09_2023.pdf
Normal file
BIN
IUT/Saé/SAÉ_2_Phase_09_2023.pdf
Normal file
Binary file not shown.
BIN
IUT/Saé/SAÉ_2_Phase_10_2023.pdf
Normal file
BIN
IUT/Saé/SAÉ_2_Phase_10_2023.pdf
Normal file
Binary file not shown.
BIN
IUT/Saé/SAÉ_2_Phase_11_2023.pdf
Normal file
BIN
IUT/Saé/SAÉ_2_Phase_11_2023.pdf
Normal file
Binary file not shown.
BIN
IUT/Saé/SAé_1_Phase_01.pdf
Normal file
BIN
IUT/Saé/SAé_1_Phase_01.pdf
Normal file
Binary file not shown.
BIN
IUT/Saé/Saé 1er Semestre.docx
Normal file
BIN
IUT/Saé/Saé 1er Semestre.docx
Normal file
Binary file not shown.
28
IUT/Saé/robot arduino/.vscode/tasks.json
vendored
Normal file
28
IUT/Saé/robot arduino/.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"tasks": [
|
||||
{
|
||||
"type": "cppbuild",
|
||||
"label": "C/C++: gcc.exe build active file",
|
||||
"command": "C:\\msys64\\ucrt64\\bin\\gcc.exe",
|
||||
"args": [
|
||||
"-fdiagnostics-color=always",
|
||||
"-g",
|
||||
"${file}",
|
||||
"-o",
|
||||
"${fileDirname}\\${fileBasenameNoExtension}.exe"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${fileDirname}"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"detail": "Task generated by Debugger."
|
||||
}
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
||||
12
IUT/Saé/robot arduino/capteur/capteur.ino/capteur.ino.ino
Normal file
12
IUT/Saé/robot arduino/capteur/capteur.ino/capteur.ino.ino
Normal file
@@ -0,0 +1,12 @@
|
||||
#define trigger_pin 9
|
||||
#define echo_pin 8
|
||||
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
|
||||
}
|
||||
131
IUT/Saé/robot arduino/ino/main/main.ino
Normal file
131
IUT/Saé/robot arduino/ino/main/main.ino
Normal file
@@ -0,0 +1,131 @@
|
||||
// ; Pins capteurs de couleur
|
||||
#define DROITE A0
|
||||
#define GAUCHE A1
|
||||
|
||||
|
||||
|
||||
|
||||
// Pins carte de commande (moteur n°1)
|
||||
#define PWM_GAUCHE 5
|
||||
#define SENS_GAUCHE 4
|
||||
// (moteur n°2)
|
||||
#define PWM_DROIT 6
|
||||
#define SENS_DROIT 7
|
||||
|
||||
#define SIZE 60
|
||||
|
||||
unsigned int droite;
|
||||
unsigned int gauche;
|
||||
unsigned int cpt;
|
||||
|
||||
unsigned int queue_droite[SIZE];
|
||||
unsigned int queue_gauche[SIZE];
|
||||
|
||||
unsigned int c= 0;
|
||||
|
||||
void setup() {
|
||||
|
||||
|
||||
cpt = 0;
|
||||
|
||||
|
||||
// Capteur
|
||||
pinMode(GAUCHE, INPUT);
|
||||
pinMode(DROITE, INPUT);
|
||||
|
||||
|
||||
// Carte Commande
|
||||
pinMode(PWM_GAUCHE, OUTPUT);
|
||||
pinMode(SENS_GAUCHE, OUTPUT);
|
||||
pinMode(PWM_DROIT, OUTPUT);
|
||||
pinMode(SENS_DROIT, OUTPUT);
|
||||
|
||||
|
||||
// Affichage série
|
||||
Serial.begin(115200);
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
c++;
|
||||
// Lecture capteur de couleur
|
||||
gauche = analogRead(GAUCHE);
|
||||
droite = analogRead(DROITE);
|
||||
|
||||
/* Zone noires, avancer
|
||||
* Le robot est sur la ligne
|
||||
*/
|
||||
if(gauche > 700 && droite > 700)
|
||||
{
|
||||
vitesseGauche(180);
|
||||
vitesseDroit(180);
|
||||
}
|
||||
|
||||
|
||||
/* Capteur gauche --> blanc : tourner à droite
|
||||
* Le robot est à gauche de la ligne
|
||||
*/
|
||||
if(gauche < 200 && droite > 700)
|
||||
{
|
||||
vitesseGauche(150*0.9);
|
||||
vitesseDroit(-70);
|
||||
}
|
||||
|
||||
|
||||
/* Capteur droit --> blanc : tourner à gauche
|
||||
* Le robot est à droite de la ligne
|
||||
*/
|
||||
if(gauche > 700 && droite < 200)
|
||||
{
|
||||
vitesseGauche(-70);
|
||||
vitesseDroit(150);
|
||||
}
|
||||
|
||||
|
||||
/* Bleu : demi tour et arret=*/
|
||||
if(gauche > 380 && gauche < 570 && droite > 380 && droite < 570)
|
||||
{
|
||||
if (cpt == 0) {
|
||||
demiTour();
|
||||
cpt = 1;
|
||||
} else if (cpt == 1) {
|
||||
vitesseDroit(0);
|
||||
vitesseGauche(0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Controle du sens et de la vitesse du moteur Gauche
|
||||
void vitesseGauche(int vitesse) {
|
||||
if (vitesse >= 0) {
|
||||
digitalWrite(SENS_GAUCHE, HIGH);
|
||||
analogWrite(PWM_GAUCHE, vitesse);
|
||||
} else {
|
||||
digitalWrite(SENS_GAUCHE, LOW);
|
||||
analogWrite(PWM_GAUCHE, -vitesse);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Controle du sens et de la vitesse du moteur Droit
|
||||
void vitesseDroit(int vitesse) {
|
||||
if (vitesse >= 0) {
|
||||
digitalWrite(SENS_DROIT, HIGH);
|
||||
analogWrite(PWM_DROIT, vitesse);
|
||||
} else {
|
||||
digitalWrite(SENS_DROIT, LOW);
|
||||
analogWrite(PWM_DROIT, -vitesse);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void demiTour() {
|
||||
while(gauche < 700) {
|
||||
gauche = analogRead(GAUCHE);
|
||||
vitesseDroit(180);
|
||||
vitesseGauche(-180);
|
||||
}
|
||||
}
|
||||
|
||||
19
IUT/Saé/robot arduino/main.c
Normal file
19
IUT/Saé/robot arduino/main.c
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "stdio.h"
|
||||
#include "main.h"
|
||||
|
||||
|
||||
unsigned int queue_droite[SIZE];
|
||||
unsigned int queue_gauche[SIZE];
|
||||
|
||||
int main() {
|
||||
|
||||
|
||||
for (unsigned int i = 0; i<60; i++) {
|
||||
push(i, queue_droite);
|
||||
printf("%d, %d\n", queue_droite[0], queue_droite[29]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
12
IUT/Saé/robot arduino/main.h
Normal file
12
IUT/Saé/robot arduino/main.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#define SIZE 30
|
||||
|
||||
void push(int value, unsigned int *queue) {
|
||||
|
||||
// décaler les valeurs vers la droite
|
||||
for(int i = SIZE - 1; i > 0; i--) {
|
||||
queue[i] = queue[i - 1];
|
||||
}
|
||||
|
||||
// mettre la nouvelle valeur au début
|
||||
queue[0] = value;
|
||||
}
|
||||
1
IUT/Saé/sae
Submodule
1
IUT/Saé/sae
Submodule
Submodule IUT/Saé/sae added at fd41b5e196
Reference in New Issue
Block a user