Jump to content

ogemperle

Members
  • Gesamte Inhalte

    1
  • Benutzer seit

  • Letzter Besuch

Alle erstellten Inhalte von ogemperle

  1. Ich versuche zwei Industrial Quad Relays zum gruppieren, aber da ich Anfänger bin, habe ich den Weg nicht gefunden. Ich habe so gemacht. <html> <head> <meta charset="UTF-8"> <title>Control</title> </head> <body> <form id="form1" name="form1" method="post" action="index.php"> <table border="1" cellpadding="1" cellspacing="4"> <tr> <td>Light 1</td> <td><input name="klickl1" type="submit" value="On" /></td> <td><input name="klickr1" type="submit" value="Off" /></td> </tr> <tr> <td>Light 2</td> <td><input name="klickl2" type="submit" value="On" /></td> <td><input name="klickr2" type="submit" value="Off" /></td> </tr> <tr> <td>Light 3</td> <td><input name="klickl3" type="submit" value="On" /></td> <td><input name="klickr3" type="submit" value="Off" /></td> </tr> </table> </form> <?php require_once('Tinkerforge/IPConnection.php'); require_once('Tinkerforge/BrickletIndustrialQuadRelay.php'); use Tinkerforge\IPConnection; use Tinkerforge\BrickletIndustrialQuadRelay; $host = '192.168.1.3'; $port = 4223; $uid = 'abc'; $COMMAND = 0; if ($_POST['klickl1']) { $COMMAND = 5; } // Pin 0 and 2 high if ($_POST['klickr1']) { $COMMAND = 9; } // Pin 0 and 3 high if ($_POST['klickl2']) { $COMMAND = 6; } // Pin 1 and 2 high if ($_POST['klickr2']) { $COMMAND = 10; } // Pin 1 and 3 high if ($_POST['klickl3']) { $COMMAND = 20; } // Pin 1 and 2 high if ($_POST['klickr3']) { $COMMAND = 24; } // Pin 1 and 3 high $ipcon = new IPConnection(); // Create IP connection $iqr = new BrickletIndustrialQuadRelay($uid, $ipcon); // Create device object $ipcon->connect($host, $port); // Connect to brickd // Don't use device before ipcon is connected $iqr->setGroup( "['a','b','n','n']" ); $grp->setMonoflop($COMMAND, 15, 175); $ipcon->disconnect(); ?> </body> </html> Aber es funktioniert nicht. Wie muss man die Gruppe richtig einstellen? Danke. Gruss Oscar
×
×
  • Neu erstellen...