Commit a4e386fbf5e8a61da9a6abbd3d92d5923a4b3ed4

Authored by root
1 parent 1c753661

Ajout graphe V1

Ansible/MainTask.retry 0 → 100644
@@ -0,0 +1 @@ @@ -0,0 +1 @@
  1 +172.26.145.111
Ansible/inventaire.ini
1 [Arduino_init] 1 [Arduino_init]
2 -172.26.145.112 capteur=1 2 +172.26.145.111 capteur=1
3 172.26.145.113 capteur=2 3 172.26.145.113 capteur=2
4 4
5 [Arduino] 5 [Arduino]
6 -172.26.145.112 capteur=1  
7 \ No newline at end of file 6 \ No newline at end of file
  7 +172.26.145.111 capteur=1
Ansible/roles/arduino/tasks/main.yml
1 --- 1 ---
2 - name: "envoyer du fichier binaire.c" 2 - name: "envoyer du fichier binaire.c"
3 get_url: 3 get_url:
4 - url: http://projet-p10.plil.fr/upload/binaire.c 4 + url: http://projet-p10.plil.fr/IMA3_P10/site/upload/binaire.c
5 dest: /home/pi/capteur{{capteur}}/binaire.c 5 dest: /home/pi/capteur{{capteur}}/binaire.c
6 mode: '0644' 6 mode: '0644'
7 7
Ansible/roles/arduino_Setup/tasks/main.yml
1 --- 1 ---
2 - name: "First Install" 2 - name: "First Install"
3 include: Install.yml 3 include: Install.yml
4 - when: capteur==1 4 + when: setup == 1
5 5
6 - name: "Creation des dossiers pour le capteur" 6 - name: "Creation des dossiers pour le capteur"
7 file: 7 file:
site/graphe.php 0 → 100644
@@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
  1 +<?php // content="text/plain; charset=utf-8"
  2 +require_once ('jpgraph/jpgraph.php');
  3 +require_once ('jpgraph/jpgraph_line.php');
  4 +
  5 +$datay1 = array(20,15,23,15);
  6 +$datay2 = array(12,9,42,8);
  7 +$datay3 = array(5,17,32,24);
  8 +
  9 +// Setup the graph
  10 +$graph = new Graph(300,250);
  11 +$graph->SetScale("textlin");
  12 +
  13 +$theme_class=new UniversalTheme;
  14 +
  15 +$graph->SetTheme($theme_class);
  16 +$graph->img->SetAntiAliasing(false);
  17 +$graph->title->Set('Filled Y-grid');
  18 +$graph->SetBox(false);
  19 +
  20 +$graph->SetMargin(40,20,36,63);
  21 +
  22 +$graph->img->SetAntiAliasing();
  23 +
  24 +$graph->yaxis->HideZeroLabel();
  25 +$graph->yaxis->HideLine(false);
  26 +$graph->yaxis->HideTicks(false,false);
  27 +
  28 +$graph->xgrid->Show();
  29 +$graph->xgrid->SetLineStyle("solid");
  30 +$graph->xaxis->SetTickLabels(array('A','B','C','D'));
  31 +$graph->xgrid->SetColor('#E3E3E3');
  32 +
  33 +// Create the first line
  34 +$p1 = new LinePlot($datay1);
  35 +$graph->Add($p1);
  36 +$p1->SetColor("#6495ED");
  37 +$p1->SetLegend('Line 1');
  38 +
  39 +// Create the second line
  40 +$p2 = new LinePlot($datay2);
  41 +$graph->Add($p2);
  42 +$p2->SetColor("#B22222");
  43 +$p2->SetLegend('Line 2');
  44 +
  45 +// Create the third line
  46 +$p3 = new LinePlot($datay3);
  47 +$graph->Add($p3);
  48 +$p3->SetColor("#FF1493");
  49 +$p3->SetLegend('Line 3');
  50 +
  51 +$graph->legend->SetFrameWeight(1);
  52 +
  53 +// Output line
  54 +$graph->Stroke();
  55 +
  56 +?>
  57 +
  58 +