Commit fc048c6dc0b5039d79228ff3ba4d509b771b5c78

Authored by jnduwamu
1 parent 19ae2416

Restructuration du git

Showing 101 changed files with 1 additions and 1054 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 101 files are displayed.

Rpi_to_xml.py deleted
... ... @@ -1,16 +0,0 @@
1   -#!usr/bin/env python
2   -
3   -import serial
4   -from lxml import etree
5   -
6   -xml = etree.parse('111-1.xml')
7   -
8   -ser = serial.Serial("/dev/ttyACM0", 9600, timeout=1)
9   -value = ser.readline()
10   -
11   -for parametre in xml.getchildren():
12   - if 'name' in parametre.attrib and parametre.attrib['name'] == 'data':
13   - parametre.text = value
14   -with open('111-1.xml', 'w') as myFile:
15   - myFile.write(etree.tounicode(xml))
16   -myFile.close()
17 0 \ No newline at end of file
accesBase.php deleted
... ... @@ -1,117 +0,0 @@
1   -<?php
2   - function connexion()
3   - {
4   - $machine='houplin.studserv.deule.net' ;
5   - $user='grouille' ;
6   - $pwd='postgres' ;
7   - $db='projetCapteurs' ;
8   - $link = pg_connect("host=$machine user=$user password=$pwd dbname=$db") or die('Erreur de Connection !<br />'.pg_last_error()) ;
9   - return $link ;
10   - }
11   -
12   - function deconnexion($db)
13   - {
14   - pg_close($db);
15   - }
16   -
17   - function verifPwd($id, $pwd)
18   - {
19   - $db = connexion();
20   - $query = "SELECT pwd FROM membres WHERE identifiant = '$id'";
21   - $result = pg_query($db, $query) or die("La requête a echoué : ".pg_last_error());
22   - $pass = pg_fetch_assoc($result);
23   - deconnexion($db);
24   - return(password_verify($pwd, $pass['pwd']));
25   - }
26   -
27   - function notAMember($id)
28   - {
29   - $db = connexion();
30   - $query = "SELECT * FROM membres WHERE identifiant = '$id'";
31   - $result = pg_query($db, $query) or die("La requête a echoué : ".pg_last_error());
32   - if (pg_affected_rows($result)!=0){
33   - return False;
34   - }
35   - else{
36   - return True;
37   - }
38   - }
39   -
40   - function countMember()
41   - {
42   - $db = connexion();
43   - $query = "SELECT * FROM membres";
44   - $result = pg_query($db, $query) or die("La requête a echoué : ".pg_last_error());
45   - return pg_affected_rows($result);
46   - }
47   -
48   - function inscription($id, $pwd, $nom, $prenom)
49   - {
50   - $db = connexion();
51   - $num = countMember() +1;
52   - $pwd_hache = password_hash($pwd, PASSWORD_DEFAULT);
53   - $query = "INSERT INTO membres VALUES('$num', '$nom', '$prenom', '$pwd_hache', '$id')";
54   - $result = pg_query($db, $query) or die("La requête a echoué : ".pg_last_error());
55   - if (pg_affected_rows($result)!=0){
56   - return True;
57   - }
58   - else{
59   - return False;
60   - }
61   - }
62   -
63   - function getMembreByIdPwd($id, $pwd)
64   - {
65   - $db = connexion();
66   - $query = "SELECT nom, prenom, pwd FROM membres WHERE identifiant = '$id'";
67   - $result = pg_query($db, $query) or die("La requête a echoué : ".pg_last_error());
68   - $tab = pg_fetch_assoc($result);
69   - if(password_verify($pwd, $tab['pwd']))
70   - return $tab;
71   - }
72   -
73   - function getSensors()
74   - {
75   - $db = connexion();
76   - $query = "SELECT * FROM capteurs";
77   - $result = pg_query($db, $query) or die("La requête a echoué : ".pg_last_error());
78   - $tab = pg_fetch_all($result);
79   - return $tab;
80   - }
81   -
82   - function upload($index,$maxsize=FALSE,$extensions=FALSE)
83   - {
84   - //Test1: fichier correctement uploadé
85   - if (!isset($_FILES[$index]) OR $_FILES[$index]['error'] > 0) return FALSE;
86   - //Test2: taille limite
87   - if ($maxsize !== FALSE AND $_FILES[$index]['size'] > $maxsize) return FALSE;
88   - //Test3: extension
89   - $ext = substr(strrchr($_FILES[$index]['name'],'.'),1);
90   - if ($extensions !== FALSE AND !in_array($ext,$extensions)) return FALSE;
91   - $name = 'binaire';
92   - $extension_upload = strtolower( substr( strrchr($_FILES['fichier']['name'], '.') ,1) );
93   - $fichier = "upload/{$name}.{$extension_upload}";
94   - //$fichier = basename($_FILES[$index]['name']);
95   - return move_uploaded_file($_FILES['fichier']['tmp_name'],$fichier);
96   - }
97   -
98   - function get_num()
99   - {
100   - $db = connexion();
101   - $query = "SELECT num FROM verif";
102   - $result = pg_query($db, $query) or die("La requête a echoué : ".pg_last_error());
103   - $tab = pg_fetch_assoc($result);
104   - return $tab['num'];
105   - }
106   -
107   - function inc_num()
108   - {
109   - $db = connexion();
110   - $query = "SELECT num FROM verif";
111   - $result = pg_query($db, $query) or die("La requête a echoué : ".pg_last_error());
112   - $tab = pg_fetch_assoc($result);
113   - $var = $tab['num'];
114   - $query = "UPDATE verif SET num='$var'+1";
115   - $result = pg_query($db, $query) or die("La requête a echoué : ".pg_last_error());
116   - }
117   -?>
118 0 \ No newline at end of file
arduinoToRpi.c deleted
... ... @@ -1,48 +0,0 @@
1   -#include <avr/io.h> // for the input/output register
2   -#include <avr/interrupt.h>
3   -#include <util/delay.h>
4   -#include <unistd.h>
5   -#include <string.h>
6   -#include <stdlib.h>
7   -#include <stdio.h>
8   -
9   -#define PRESCALER 1024
10   -#define TIME_SLOT 20
11   -#define NB_TICK 113
12   -#define BAUDRATE 103
13   -
14   -void send_serial(unsigned char c)
15   -{
16   - loop_until_bit_is_set(UCSR0A, UDRE0);
17   - UDR0 = c;
18   -}
19   -
20   -void init_serial(void)
21   -{
22   - /* ACHTUNG : we suppose UBRR value < 0xff */
23   - /* Not true in all case */
24   - uint8_t baudrate = BAUDRATE;
25   - /* Set baud rate */
26   - UBRR0H = 0;
27   - UBRR0L = baudrate;
28   -
29   - /* Enable transmitter *///task_led_red();
30   - //task_send_serial('A');
31   - UCSR0B = (1<<TXEN0);
32   -
33   - /* Set frame format */
34   - UCSR0C = 0x06;
35   -
36   -}
37   -
38   -
39   -int main(void)
40   -{
41   - init_serial();
42   - while(1)
43   - {
44   - send_serial('A');
45   - _delay_ms(3000);
46   - }
47   - return 0;
48   -}
binaire.c deleted
... ... @@ -1,36 +0,0 @@
1   -#include <stdio.h>
2   -#include <stdlib.h>
3   -#include <wiringPi.h>
4   -#include <string.h>
5   -
6   -void add_caract(char word[], char caract)
7   -{
8   - char str[2];
9   - str[0] = caract;
10   - str[1] = '\0';
11   - strcat(word, str);
12   -}
13   -
14   -int main()
15   -{
16   - FILE* fp = fopen("stock.txt", "r");
17   - char set[2];
18   - fscanf(fp, "%s", set);
19   - int pin = (int)atoi(set);
20   - if(pin==4) return 0;
21   - if(wiringPiSetup()==-1)
22   - {
23   - return 0;
24   - }
25   - pinMode(pin,OUTPUT);
26   - int i=0;
27   - while(i<10)
28   - {
29   - digitalWrite(pin,1);//la valeur est définie à HIGH (3.3v)
30   - delay(500); //on attend 500ms
31   - digitalWrite(pin,0);//la valeur est définie à LOW (0V)
32   - delay(500);
33   - i++;
34   - }
35   - return 0;
36   -}
blink.c deleted
... ... @@ -1,91 +0,0 @@
1   -#include <stdio.h>
2   -#include <wiringPi.h>
3   -#include <stdlib.h>
4   -#include <string.h>
5   -#include <stdbool.h>
6   -
7   -void add_caract(char word[], char caract)
8   -{
9   - char str[2];
10   - str[0] = caract;
11   - str[1] = '\0';
12   - strcat(word, str);
13   -}
14   -
15   -void read_xml(FILE* fp, char sensor[])
16   -{
17   - char c;
18   - int cpt=0;
19   - while(1)
20   - {
21   - c = fgetc(fp);
22   - if(c=='>') cpt++;
23   - if(cpt==2) break;
24   - }
25   - while(1)
26   - {
27   - c = fgetc(fp);
28   - if(c=='<') break;
29   - add_caract(sensor, c);
30   - }
31   -}
32   -
33   -bool verif()
34   -{
35   - FILE* fpv = fopen("verif.txt", "r");
36   - FILE* fpd = fopen("demande.txt", "r");
37   -
38   - if(fpv==NULL || fpd==NULL) return false;
39   -
40   - char v[2];
41   - char d[2];
42   -
43   - fgets(v, 3, fpv);
44   - fgets(d, 3, fpd);
45   -
46   - //char cv = fgetc(fpv);
47   - //char cd = fgetc(fpd);
48   -
49   - fclose(fpv);
50   - fclose(fpd);
51   - FILE* fp = fopen("verif.txt", "w+");
52   -
53   - //add_caract(v, cv);
54   - //add_caract(d, cd);
55   -
56   - int verif = atoi(v);
57   - int demande = atoi(d);
58   -
59   - if(verif!=demande)
60   - fputs(d, fp);
61   - else
62   - fputs(v, fp);
63   -
64   - return(verif!=demande);
65   -}
66   -
67   -int pin_num()
68   -{
69   - FILE* fp = fopen("sensor.xml", "r");
70   - if(fp==NULL) return EXIT_FAILURE;
71   -
72   - char sensor[15] = "";
73   - char nb[2]="";
74   - read_xml(fp, sensor);
75   -
76   - // Vérification présence du capteur/pin sur la RPi
77   -
78   - add_caract(nb, sensor[strlen(sensor)-1]);
79   - if(verif())
80   - return atoi(nb);
81   - else
82   - return 4;
83   -}
84   -
85   -int main(void)
86   -{
87   - int pin=pin_num();
88   - FILE* fp = fopen("stock.txt", "w+");
89   - fprintf(fp, "%d", pin);
90   - return 0;
91   -}
capteurs.php deleted
... ... @@ -1,48 +0,0 @@
1   -<?php
2   -$sensors = getSensors();
3   -?>
4   -
5   -<div class="row">
6   - <div class="col-6 col-md-6 offset-md-3 offset-3">
7   - <br/>
8   - <h1 style="margin-bottom:50px; margin-top:50px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fa fa-bars"></i> Choix du capteur</h1>
9   - <form action="envoiFichiers.php" method="post" enctype="multipart/form-data">
10   - <table class="table table-striped table-bordered">
11   - <tbody>
12   - <tr>
13   - <td>Sélection</td>
14   - <td>Nom</td>
15   - <td>Raspberry</td>
16   - <td>Type</td>
17   - </tr>
18   -
19   - <?php
20   - foreach($sensors as $sensor){
21   - ?>
22   - <tr>
23   - <td><div class="form-check"><input class="form-check-input position-static" type="radio" name="sensor" id="sensor1" value="<?php echo $sensor['raspberry'];?>" aria-label="..."></div>
24   - <td><?php echo $sensor['nom'];?></td>
25   - <td><?php echo $sensor['raspberry'];?></td>
26   - <td><?php echo $sensor['type'];?></td>
27   - </tr>
28   - <?php
29   - }
30   - ?>
31   -
32   - </tbody>
33   - </table>
34   -
35   - <h1 style="margin-bottom:50px; margin-top:50px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fa fa-file-upload"></i> Uploader un fichier</h1>
36   - <div class="panel panel-default">
37   -
38   - <div class="form-group">
39   - <label for="exampleFormControlFile1">Charger un fichier</label>
40   - <input type="file" name="fichier" class="form-control-file" id="fichier">
41   - <input type="hidden" name="MAX_FILE_SIZE" value="1048576" />
42   - </div>
43   -
44   - </div>
45   - <input type="submit" class="btn btn-dark btn-lg btn-block"style="margin-top:50px;" value="Envoyer"/>
46   - </form>
47   - </div>
48   -</div>
49 0 \ No newline at end of file
Tuno_to_rpi.c renamed to codes/Tuno_to_rpi.c
demande.txt deleted
No preview for this file type
envoiFichiers.php deleted
... ... @@ -1,77 +0,0 @@
1   -<?php
2   -session_start();
3   -?>
4   -<!DOCTYPE html>
5   -
6   -<html>
7   - <head>
8   - <?php include("head.php"); ?>
9   - </head>
10   -
11   - <!-- Contenu du site -->
12   - <body>
13   - <?php
14   - include("header.php");
15   - $upload1 = upload('fichier',FALSE, array('c', 'txt') );
16   - ?>
17   - <div class="row">
18   - <div class="col-4 col-md-4 offset-md-4 offset-4">
19   - <br/>
20   - <h1 style="margin-bottom:50px; margin-top:50px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fa fa-cloud"></i> Envoi du fichier en ligne</h1>
21   - <?php if($upload1){
22   - inc_num();
23   - ?>
24   - <div class="alert alert-success" role="alert">
25   - Upload du fichier réussi !
26   - </div>
27   - <?php
28   - }
29   - else {?>
30   - <div class="alert alert-danger" role="alert">
31   - Erreur lors du transfert du fichier !
32   - </div><?php
33   - }
34   - ?>
35   - <h1 style="margin-bottom:50px; margin-top:50px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fa fa-info-circle"></i> Informations complémentaires</h1>
36   - <table class="table table-striped table-bordered">
37   - <tbody>
38   - <tr>
39   - <td>Nom du fichier</td>
40   - <td><?php echo $_FILES['fichier']['name'];?></td>
41   - </tr>
42   - <tr>
43   - <td>Type</td>
44   - <td><?php echo $_FILES['fichier']['type'];?></td>
45   - </tr>
46   - <tr>
47   - <td>Localisation</td>
48   - <td><?php echo $_FILES['fichier']['tmp_name'];?></td>
49   - </tr>
50   - <tr>
51   - <td>Erreur</td>
52   - <td><?php echo $_FILES['fichier']['error'];?></td>
53   - </tr>
54   - <tr>
55   - <td>Taille</td>
56   - <td><?php echo $_FILES['fichier']['size'];?></td>
57   -
58   - </tr>
59   - </tbody>
60   - </table>
61   -
62   - </div>
63   - </div>
64   - </body>
65   -</html>
66   -
67   -<?php
68   -if ( isset($_POST['sensor']) ) {
69   - $xml = "<?xml version='1.0' encoding='ISO-8859-1'?>\r\n"
70   - . '<sensor>' . htmlspecialchars($_POST['sensor']) . '</sensor>' ;
71   - file_put_contents('upload/sensor.xml', $xml) ;
72   -}
73   -if ( isset($_POST['sensor']) ) {
74   - $txt = get_num();
75   - file_put_contents('upload/demande.txt', $txt);
76   -}
77   -?>
78 0 \ No newline at end of file
fichiersRPI/script.sh deleted
... ... @@ -1,8 +0,0 @@
1   -#!/bin/sh
2   -sudo su
3   -./load.sh
4   -while true
5   -do
6   - sleep 5
7   - python3 Rpi_to_server.py
8   -done
formInscription.php deleted
... ... @@ -1,40 +0,0 @@
1   -<div class="row">
2   - <div class="col-4 col-md-4 offset-md-4 offset-4">
3   - <br/>
4   - <h1 style="margin-bottom:50px; margin-top:50px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fa fa-user-circle"></i> Inscription</h1>
5   - <form action="inscription.php" method="post">
6   - <table class="table table-striped table-bordered">
7   - <tbody>
8   - <tr>
9   - <td>Nom : </td>
10   - <td><input type="text" name="nom" placeholder="Entrez votre nom" required="true" /></td>
11   - </tr>
12   -
13   - <tr>
14   - <td>Prénom : </td>
15   - <td><input type="text" name="prenom" placeholder="Entrez votre prénom" required="true" /></td>
16   - </tr>
17   -
18   - <tr>
19   - <td>Identifiant: </td>
20   - <td><input type="text" name="id" placeholder="Entrez votre identifiant" maxlength="30" required="true" /></td>
21   - </tr>
22   -
23   - <tr>
24   - <td>Mot de passe :</td>
25   - <td><input type="password" name="pass1" placeholder="Entrez votre mot de passe" required="true" /></td>
26   - </tr>
27   - <tr>
28   - <td>Confirmer mot de passe :</td>
29   - <td><input type="password" name="pass2" placeholder="Entrez votre mot de passe" required="true" /></td>
30   - </tr>
31   -
32   - <tr>
33   - <td></td>
34   - <td><input type="submit" class="btn btn-dark" value="S'inscrire"/></td>
35   - </tr>
36   - </tbody>
37   - </table>
38   - </form>
39   - </div>
40   -</div>
41 0 \ No newline at end of file
header.php deleted
... ... @@ -1,26 +0,0 @@
1   -<!-- header -->
2   -<header class="container-fluid header">
3   - <div class="container">
4   - <a href ="accueil.php" class="logo"><i class="fa fa-home"></i> Gestion des noeuds</a>
5   - <div class="menu">
6   - <?php
7   - if(isset($_SESSION['Login'], $_SESSION['Password']))
8   - {
9   - require("accesBase.php") ;
10   - $membre = getMembreByIdPwd($_SESSION['Login'], $_SESSION['Password']);
11   - ?>
12   - <a href="settings.php"><i class="fa fa-cog"></i> <?php echo $membre['prenom']; echo ' '; echo $membre['nom'];?></a>
13   - <a href="deconnecter.php"><i class="fa fa-power-off"></i> Deconnexion</a>
14   - <?php
15   - }
16   - else
17   - {
18   - ?>
19   - <a href="inscrire.php"><i class="fa fa-user-circle"></i> Inscription</a>
20   - <?php
21   - }
22   - ?>
23   - </div>
24   - </div>
25   -</header>
26   -<!-- end header -->
27 0 \ No newline at end of file
load.sh deleted
... ... @@ -1,14 +0,0 @@
1   -#!/bin/sh
2   -
3   -wget -N -P ./ http://houplin.studserv.deule.net/~grouille/PROJET/upload/binaire.c
4   -wget -N -P ./ http://houplin.studserv.deule.net/~grouille/PROJET/upload/sensor.xml
5   -wget -N -P ./ http://houplin.studserv.deule.net/~grouille/PROJET/upload/demande.txt
6   -
7   -gcc -o program program.c -lwiringPi
8   -./program
9   -
10   -cp binaire.c Build/main.c
11   -cd Build
12   -make clean
13   -make upload
14   -#avrdude -p atmega328p -C ~/avrdude_gpio.conf -c pi_3 -v -U flash:w:build-uno/Build.hex
minicom.c deleted
... ... @@ -1,49 +0,0 @@
1   -#include <stdio.h>
2   -#include <termios.h>
3   -#include <sys/fcntl.h>
4   -
5   -void main(void)
6   -{
7   - int fd;
8   - char c;
9   - struct termios termios_p;
10   -
11   - /* Ouverture de la liaison serie */
12   - if ( (fd=open("/dev/ttyACM0",O_RDWR)) == -1 ) {
13   - perror("open");
14   - exit(-1);
15   - }
16   -
17   - /* Lecture des parametres courants */
18   - tcgetattr(fd,&termios_p);
19   - /* On ignore les BREAK et les caracteres avec erreurs de parite */
20   - termios_p.c_iflag = IGNBRK | IGNPAR;
21   - /* Pas de mode de sortie particulier */
22   - termios_p.c_oflag = 0;
23   - /* Liaison a 9600 bps avec 7 bits de donnees et une parite paire */
24   - termios_p.c_cflag = B9600 | CS7 | PARENB;
25   - /* Mode non-canonique avec echo */
26   - termios_p.c_lflag = ECHO;
27   - /* Caracteres immediatement disponibles */
28   - termios_p.c_cc[VMIN] = 1;
29   - termios_p.c_cc[VTIME] = 0;
30   - /* Sauvegarde des nouveaux parametres */
31   - tcsetattr(fd,TCSANOW,&termios_p);
32   -
33   - /* Affichage sur le terminal */
34   - write(fd,"Tapez Ctrl-C pour quitter\n",26);
35   -
36   - /* Boucle de lecture */
37   - while ( 1 ) {
38   - read(fd,&c,1);
39   - if ( c == 0x03 ) /* Ctrl-C */
40   - break;
41   - printf("%03u %02x %c\n",c&0xff,c&0xff,c);
42   - }
43   -
44   - /* Fermeture */
45   - close(fd);
46   -
47   - /* Bye... */
48   - exit(0);
49   -}
50 0 \ No newline at end of file
EXEC/Build/Makefile renamed to raspberry/Build/Makefile
EXEC/Build/main.c renamed to raspberry/Build/main.c
EXEC/Rpi_to_server.py renamed to raspberry/Rpi_to_server.py
EXEC/binaire.c renamed to raspberry/binaire.c
EXEC/load.sh renamed to raspberry/load.sh
EXEC/script.sh renamed to raspberry/script.sh
rpiToArduino.py deleted
... ... @@ -1,6 +0,0 @@
1   -#!/usr/bin/env python
2   -
3   -import serial
4   -ser = serial.Serial('/dev/ttyACM0', 9600, timeout=1)
5   -while 1:
6   - print(ser.readline())
script.sh deleted
... ... @@ -1,8 +0,0 @@
1   -#!/bin/sh
2   -while true
3   -do
4   - ./load.sh
5   - sleep 15
6   -done
7   -
8   -
site_projet/.project renamed to site/.project
site_projet/.settings/.jsdtscope renamed to site/.settings/.jsdtscope
site_projet/.settings/org.eclipse.wst.jsdt.ui.superType.container renamed to site/.settings/org.eclipse.wst.jsdt.ui.superType.container
site_projet/.settings/org.eclipse.wst.jsdt.ui.superType.name renamed to site/.settings/org.eclipse.wst.jsdt.ui.superType.name
site_projet/.ssh/config renamed to site/.ssh/config
site_projet/.ssh/rpi_ssh_key renamed to site/.ssh/rpi_ssh_key
site_projet/.ssh/rpi_ssh_key.pub renamed to site/.ssh/rpi_ssh_key.pub
site_projet/accesBase.php renamed to site/accesBase.php
site_projet/accueil.php renamed to site/accueil.php
site_projet/add.php renamed to site/add.php
site_projet/addSensor.php renamed to site/addSensor.php
site_projet/ajoutCapteur.php renamed to site/ajoutCapteur.php
site_projet/capteurs.php renamed to site/capteurs.php
connecter.php renamed to site/connecter.php
site_projet/css/bootstrap-grid.css renamed to site/css/bootstrap-grid.css
site_projet/css/bootstrap-grid.css.map renamed to site/css/bootstrap-grid.css.map
site_projet/css/bootstrap-grid.min.css renamed to site/css/bootstrap-grid.min.css
site_projet/css/bootstrap-grid.min.css.map renamed to site/css/bootstrap-grid.min.css.map
site_projet/css/bootstrap-reboot.css renamed to site/css/bootstrap-reboot.css
site_projet/css/bootstrap-reboot.css.map renamed to site/css/bootstrap-reboot.css.map
site_projet/css/bootstrap-reboot.min.css renamed to site/css/bootstrap-reboot.min.css
site_projet/css/bootstrap-reboot.min.css.map renamed to site/css/bootstrap-reboot.min.css.map
site_projet/css/bootstrap.css renamed to site/css/bootstrap.css
site_projet/css/bootstrap.css.map renamed to site/css/bootstrap.css.map
site_projet/css/bootstrap.min.css renamed to site/css/bootstrap.min.css
site_projet/css/bootstrap.min.css.map renamed to site/css/bootstrap.min.css.map
site_projet/css/style.css renamed to site/css/style.css
site_projet/data.php renamed to site/data.php
deconnecter.php renamed to site/deconnecter.php
site_projet/envoiFichiers.php renamed to site/envoiFichiers.php
fichiersRPI/Build/Makefile renamed to site/fichiersRPI/Build/Makefile
fichiersRPI/Build/main.c renamed to site/fichiersRPI/Build/main.c
fichiersRPI/Rpi_to_server.py renamed to site/fichiersRPI/Rpi_to_server.py
site_projet/fichiersRPI/fichiersRPI.zip renamed to site/fichiersRPI/fichiersRPI.zip
No preview for this file type
fichiersRPI/load.sh renamed to site/fichiersRPI/load.sh
site_projet/fichiersRPI/script.sh renamed to site/fichiersRPI/script.sh
site_projet/fichiersRPI/toto.sh renamed to site/fichiersRPI/toto.sh
formConnexion.php renamed to site/formConnexion.php
site_projet/formInscription.php renamed to site/formInscription.php
head.php renamed to site/head.php
site_projet/header.php renamed to site/header.php
site_projet/hist.php renamed to site/hist.php
site_projet/history.php renamed to site/history.php
site_projet/img/font.png renamed to site/img/font.png

63.2 KB

site_projet/index.html renamed to site/index.html
index.php renamed to site/index.php
inscription.php renamed to site/inscription.php
inscrire.php renamed to site/inscrire.php
site_projet/js/bootstrap.bundle.js renamed to site/js/bootstrap.bundle.js
site_projet/js/bootstrap.bundle.js.map renamed to site/js/bootstrap.bundle.js.map
site_projet/js/bootstrap.bundle.min.js renamed to site/js/bootstrap.bundle.min.js
site_projet/js/bootstrap.bundle.min.js.map renamed to site/js/bootstrap.bundle.min.js.map
site_projet/js/bootstrap.js renamed to site/js/bootstrap.js
site_projet/js/bootstrap.js.map renamed to site/js/bootstrap.js.map
site_projet/js/bootstrap.min.js renamed to site/js/bootstrap.min.js
site_projet/js/bootstrap.min.js.map renamed to site/js/bootstrap.min.js.map
site_projet/js/dropzone.js renamed to site/js/dropzone.js
site_projet/logo.php renamed to site/logo.php
site_projet/recherche.php renamed to site/recherche.php
site_projet/requests.php renamed to site/requests.php
accueil.php renamed to site/send.php
... ... @@ -22,4 +22,4 @@ session_start();
22 22 }
23 23 ?>
24 24 </body>
25   -</html>
26 25 \ No newline at end of file
  26 +</html>
... ...
site_projet/test.php renamed to site/test.php
site_projet/upload/binaire.c renamed to site/upload/binaire.c
site_projet/upload/sensor.xml renamed to site/upload/sensor.xml
site_projet/values.php renamed to site/values.php
site_projet/connecter.php deleted
... ... @@ -1,42 +0,0 @@
1   -<?php
2   -session_start();
3   -require("accesBase.php") ;
4   -?>
5   -
6   -<!DOCTYPE html>
7   -
8   -<html>
9   - <head>
10   - <?php include("head.php"); ?>
11   - </head>
12   -
13   - <!-- Contenu du site -->
14   - <body>
15   - <?php include("header.php"); ?>
16   -
17   - <!-- Centre de la page -->
18   - <div class="container-fluid">
19   - <div class="row">
20   -
21   - <!-- Contenu de la page -->
22   - <!-- Connexion -->
23   - <div class="row syst">
24   - <div class="connect">
25   - <?php
26   - if (verifPwd($_POST["id"], $_POST["pwd"])){
27   - $_SESSION['Login'] = $_POST['id'];
28   - $_SESSION['Password'] = $_POST['pwd'];
29   - ?><meta http-equiv="Refresh" content="0;url=accueil.php" /><?php
30   - }
31   - else
32   - echo "---------------------erreur de mdp";?>
33   - </div>
34   - </div>
35   - <!-- fin connexion -->
36   - </div>
37   - <!-- fin contenu de la page -->
38   - </div>
39   - </div>
40   - <!-- fin centre de la page -->
41   - </body>
42   -</html>
site_projet/deconnecter.php deleted
... ... @@ -1,6 +0,0 @@
1   -<?php
2   -session_start();
3   -session_unset();
4   -session_destroy();
5   -?>
6   -<meta http-equiv="Refresh" content="0;url=accueil.php" />
7 0 \ No newline at end of file
site_projet/fichiersRPI/Build/Makefile deleted
... ... @@ -1,42 +0,0 @@
1   -export CC = avr-gcc
2   -
3   -export MCU = atmega328p
4   -export TARGET_ARCH = -mmcu=$(MCU)
5   -
6   -export CFLAGS = -Wall -I. -DF_CPU=16000000 -Os #-g
7   -export LDFLAGS = -g $(TARGET_ARCH) -lm -Wl,--gc-sections # -Os
8   -
9   -
10   -TARGET = blink
11   -CPPFLAGS = -mmcu=$(MCU)
12   -PGMERISP = -c pi_3
13   -ARVDUDECONF= -C ~/avrdude_gpio.conf
14   -export DUDE = avrdude -v -p $(MCU) $(AVRDUDECONF)
15   -
16   -C_SRC = $(wildcard *.c)
17   -OBJS = $(C_SRC:.c=.o)
18   -
19   -
20   -all: $(TARGET).hex
21   -
22   -
23   -clean:
24   - rm -f *.o *.hex *.elf build-uno
25   -
26   -%.o:%.c
27   - $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
28   -
29   -
30   -$(TARGET).elf: $(OBJS)
31   - $(CC) $(LDFLAGS) -o $@ $(OBJS)
32   -
33   -$(TARGET).hex: $(TARGET).elf
34   - avr-objcopy -j .text -j .data -O ihex $(TARGET).elf $(TARGET).hex
35   - avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O ihex $(TARGET).elf eeprom.hex
36   -
37   -upload: $(TARGET).hex
38   - $(DUDE) $(PGMERISP) -U flash:w:$(TARGET).hex
39   -
40   -size: $(TARGET).elf
41   - avr-size --format=avr --mcu=$(MCU) $(TARGET).elf
42   -
site_projet/fichiersRPI/Build/main.c deleted
... ... @@ -1,114 +0,0 @@
1   -#include <avr/io.h> // for the input/output register
2   -#include <avr/interrupt.h>
3   -#include <util/delay.h>
4   -#include <string.h>
5   -#include <stdio.h>
6   -#include <stdlib.h>
7   -#define PRESCALER 1024
8   -#define TIME_SLOT 20
9   -#define BAUDRATE 103
10   -
11   -#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
12   -#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
13   -
14   -char Donnee[24];
15   -float temp;
16   -
17   -void init_serial(void)
18   -{
19   - /* ACHTUNG : we suppose UBRR value < 0xff */
20   - /* Not true in all case */
21   - uint8_t baudrate = BAUDRATE;
22   - /* Set baud rate */
23   - UBRR0H = 0;
24   - UBRR0L = baudrate;
25   - /* Enable transmitter *///task_led_red();
26   - //task_send_serial('A');
27   - UCSR0B = (1<<TXEN0);
28   - /* Set frame format */
29   - UCSR0C = 0x06;
30   -
31   -}
32   -
33   -void send_serial(unsigned char c)
34   -{
35   - loop_until_bit_is_set(UCSR0A, UDRE0);
36   - UDR0 = c;
37   -}
38   -
39   -
40   -void send_msg2(char Donnee[]){
41   -
42   - while (( UCSR0A & (1<<UDRE0)) == 0){};
43   -
44   - for (int i = 0; i < strlen(Donnee); i++){
45   - while (( UCSR0A & (1<<UDRE0)) == 0){};
46   - UDR0 = Donnee[i];
47   - if (i == (strlen(Donnee) - 1)){
48   - send_serial('\n');
49   - send_serial('\r');
50   - }
51   - }
52   -}
53   -
54   -void send_msg(char Donnee[]){
55   - int i=0;
56   - for(i=0; i<strlen(Donnee); i++){
57   - if (i==strlen(Donnee)-1){
58   - send_serial(Donnee[i]);
59   - send_serial('\n');
60   - send_serial('\r');
61   - }
62   - else{
63   - send_serial(Donnee[i]);
64   - }
65   - _delay_ms(100);
66   - }
67   -}
68   -
69   -
70   -// équivalent de analogueRead()
71   -int analogReadNew(uint8_t pin) {
72   - /*
73   - // Définition de la référence de tension
74   - ADMUX |= (1 << REFS0);
75   - // On sélectionne notre pin
76   - ADMUX |= pin & 0x07;
77   -
78   - // On lance la conversion
79   - sbi(ADCSRA, ADSC);
80   -
81   - // Le bit sera désactivé à la fin de la conversion
82   - while(bit_is_set(ADCSRA, ADSC));
83   -
84   - // Lire ADCL en premier est obligatoire, sinon l'ADC se bloque
85   - uint8_t low = ADCL;
86   -
87   - // Récupérer le résultat
88   - return ((ADCH << 8) | low);
89   - */
90   - ADCSRA |= (1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0);
91   - ADMUX |= (1<<REFS0)|(1<<ADLAR);
92   - ADMUX = (ADMUX&0xf0)|pin;
93   - ADCSRA |= (1<<ADEN);
94   -
95   - ADCSRA |= (1<<ADSC);
96   - while(bit_is_set(ADCSRA, ADSC));
97   - return ADCH;
98   -}
99   -
100   -int main()
101   -{
102   - int reading;
103   - init_serial();
104   - while(1){
105   - reading=analogReadNew(0);
106   - temp = reading * 1.9607843;
107   - dtostrf(temp, 4, 1, Donnee);
108   - //send_serial('T');
109   - //send_serial('=');
110   - send_msg2(Donnee);
111   - _delay_ms(2000);
112   - }
113   - return 0;
114   -}
site_projet/fichiersRPI/Rpi_to_server.py deleted
... ... @@ -1,24 +0,0 @@
1   -#!usr/bin/env python
2   -
3   -import serial
4   -import requests
5   -import datetime
6   -
7   -date_comp = datetime.datetime.now()
8   -A = str(date_comp.year)
9   -M = str(date_comp.month)
10   -J = str(date_comp.day)
11   -h = str(date_comp.hour)
12   -m = str(date_comp.minute)
13   -s = str(date_comp.second)
14   -date = A + '-' + M + '-' + J + ' ' + h + ':' + m + ':' + s
15   -
16   -ser = serial.Serial("/dev/ttyACM0", 9600, timeout=1)
17   -value = ser.readline()
18   -while (value in ['\r', '', '\n']):
19   - value = ser.readline()
20   -data = str(float(value[0:4]))
21   -
22   -params = {"ip_address":"172.26.145.111", "numero":"2", "name":"Solaris", "data": data, "date": date}
23   -r = requests.post("http://serveur-etu.polytech-lille.fr/~grouille/PROJET/requests.php", data = params)
24   -print(data)
25 0 \ No newline at end of file
site_projet/fichiersRPI/load.sh deleted
... ... @@ -1,10 +0,0 @@
1   -#!/bin/sh
2   -
3   -wget -N -P ./ http://houplin.studserv.deule.net/~grouille/PROJET/upload/binaire.c
4   -wget -N -P ./ http://houplin.studserv.deule.net/~grouille/PROJET/upload/sensor.xml
5   -
6   -cp binaire.c Build/main.c
7   -cd Build
8   -make clean
9   -make upload
10   -cd ..
site_projet/formConnexion.php deleted
... ... @@ -1,20 +0,0 @@
1   -<div class="row">
2   - <div class="col-4 col-md-4 offset-md-4 offset-4">
3   - <br/>
4   - <h1 style="margin-bottom:50px; margin-top:50px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fa fa-user-shield"></i> Connexion</h1>
5   - <form action="connecter.php" method="post">
6   - <table class="table table-striped table-bordered">
7   - <tbody>
8   - <tr>
9   - <td>Identifiant : </td>
10   - <td><input type="text" name="id" placeholder="Entrez votre identifiant" maxlength="30" required="true" class="case" /></td>
11   - </tr>
12   - <tr><td>Mot de passe :</td>
13   - <td><input type="password" name="pwd" placeholder="Entrez votre mot de passe" required="true" class="case" /></td>
14   - </tr>
15   - <tr><td></td><td><input type="submit" class="btn btn-dark" value="Se connecter"/></td></tr>
16   - </tbody>
17   - </table>
18   - </form>
19   - </div>
20   -</div>
21 0 \ No newline at end of file
site_projet/head.php deleted
... ... @@ -1,14 +0,0 @@
1   -<meta charset="utf-8">
2   -<title>Administration Réseau</title>
3   -
4   -<!-- font -->
5   -<link href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,600" rel="stylesheet">
6   -
7   -<!-- css -->
8   -<link rel="stylesheet" href="css/bootstrap.min.css">
9   -<link rel="stylesheet" href="css/style.css">
10   -<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css">
11   -<script src="js/dropzone.js"></script>
12   -
13   -<!-- js -->
14   -<script type="text/javascript" src="./js/bootstrap.min.js"></script>
15 0 \ No newline at end of file
site_projet/index.php deleted
... ... @@ -1,12 +0,0 @@
1   -<!DOCTYPE html>
2   -
3   -<html>
4   - <head>
5   - <?php include("head.php"); ?>
6   - </head>
7   -
8   - <!-- Contenu du site -->
9   - <body>
10   - <meta http-equiv="Refresh" content="0;url=accueil.php" />
11   - </body>
12   -</html>
13 0 \ No newline at end of file
site_projet/inscription.php deleted
... ... @@ -1,54 +0,0 @@
1   -<?php
2   -session_start();
3   -require("accesBase.php") ;
4   -?>
5   -
6   -<!DOCTYPE html>
7   -
8   -<html>
9   - <head>
10   - <?php include("head.php"); ?>
11   - </head>
12   -
13   - <!-- Contenu du site -->
14   - <body>
15   - <?php include("header.php"); ?>
16   -
17   - <!-- Centre de la page -->
18   - <div class="container-fluid">
19   - <div class="row">
20   -
21   - <!-- Contenu de la page -->
22   - <!-- Connexion -->
23   - <div class="row syst">
24   - <div class="inscritpion">
25   - <?php
26   - if (notAMember($_POST["id"])){
27   - if($_POST["pass1"]==$_POST["pass2"]){
28   - if(inscription($_POST["id"], $_POST["pass1"], $_POST["nom"], $_POST["prenom"]))
29   - {
30   - $_SESSION['Login'] = $_POST['id'];
31   - $_SESSION['Password'] = $_POST['pass1'];
32   - ?><meta http-equiv="Refresh" content="0;url=accueil.php" /><?php
33   - }
34   - else
35   - echo "erreur inscri";
36   -
37   - }
38   - else
39   - echo "erreur pwd";
40   - }
41   - else{
42   - echo "erreur membre";
43   - }
44   - ?>
45   - </div>
46   - </div>
47   - <!-- fin connexion -->
48   - </div>
49   - <!-- fin contenu de la page -->
50   - </div>
51   - </div>
52   - <!-- fin centre de la page -->
53   - </body>
54   -</html>
site_projet/inscrire.php deleted
... ... @@ -1,13 +0,0 @@
1   -<!DOCTYPE html>
2   -
3   -<html>
4   -<head>
5   -<?php include("head.php"); ?>
6   - </head>
7   -
8   - <!-- Contenu du site -->
9   - <body>
10   - <?php include("header.php"); ?>
11   - <?php include("formInscription.php");?>
12   - </body>
13   -</html>
14 0 \ No newline at end of file
site_projet/send.php deleted
... ... @@ -1,25 +0,0 @@
1   -<?php
2   -session_start();
3   -?>
4   -<!DOCTYPE html>
5   -
6   -<html>
7   - <head>
8   - <?php include("head.php"); ?>
9   - </head>
10   -
11   - <!-- Contenu du site -->
12   - <body>
13   - <?php
14   - include("header.php");
15   - if(isset($_SESSION['Login'], $_SESSION['Password']))
16   - {
17   - include("capteurs.php");
18   - }
19   - else
20   - {
21   - include("formConnexion.php");
22   - }
23   - ?>
24   - </body>
25   -</html>
style.css deleted
... ... @@ -1,60 +0,0 @@
1   -@CHARSET "UTF-8";
2   -
3   -body {
4   - padding:0;
5   - font-family: 'Raleway', sans-serif;
6   - margin:0 auto;
7   - width: 100%;
8   - overflow-x: hidden;
9   - background-color:#fafafa;
10   -}
11   -
12   -html {
13   - padding:0;
14   - margin:0;
15   -}
16   -
17   -/* Header */
18   -
19   -.header {
20   - background-color: #0D0D0D;
21   - height:70px;
22   - line-height: 70px;
23   -}
24   -
25   -a, a:hover {
26   - text-decoration: none;
27   -}
28   -
29   -.container-fluid {
30   - padding: 0;
31   -}
32   -
33   -.menu {
34   - float: right;
35   -}
36   -
37   -.menu a {
38   - color:#fff;
39   - margin-right: 20px;
40   -}
41   -
42   -.menu a:hover {
43   - color:#cfcfcf;
44   -}
45   -
46   -.logo {
47   - color: #fff;
48   - /*text-transform: uppercase;*/
49   - letter-spacing: 1px;
50   - float:left;
51   - font-family: 'Raleway', sans-serif;
52   -}
53   -
54   -.logo:hover {
55   - color:#cfcfcf
56   -}
57   -
58   -.inscription {
59   - text-align:center;
60   -}