ansibleSensor.php
393 Bytes
$arduino_simple = "[Arduino_init]\r\n";
$arduino_spi = "[Arduino_spi_init]\r\n";
$nucleo = "[Nucleo_init]\r\n";
if($_POST['version'] == 0)
{
$ini = $arduino_simple;
}
elseif($_POST['version'] == 1)
{
$ini = $arduino_spi;
}
elseif($_POST['version'] == 2)
{
$ini = $nucleo
}
$ini = $ini.$_POST['raspberry']." capteur=".$_POST['numero']."\n";
file_put_contents('upload/inventaire.ini', $ini);