Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Hi,

Zustand: mehrere gruppierte Bricklets an einem Master.

   

$uid_iqr1 = 'abc';

$uid_iqr2 = 'xyz';

...

$iqr1 = new BrickletIndustrialQuadRelay($uid_iqr1, $ipcon);

$iqr2 = new BrickletIndustrialQuadRelay($uid_iqr2, $ipcon);

...

 

Ist es nun egal ob ich

$iqr1->setValue($value);

oder

$iqr2->setValue($value);

verwende??

Danke

Geschrieben

Wenn du bei Bricklet A zuvor setGroup aufgerufen hast, dann kannst du mit A.setValue auch die verbundenen (gruppierten) Bricklets mit setzen.

 

Der Aufruf von setValue für ein anderes Bricklet aus der Gruppe wird aber nicht die den Status Gruppe ändern, sondern nur für das Bricklet.Möchtest du das es auch den Status der Gruppe ändern kann, so musst du für dieses Bricklet ebenfalls setGroup aufrufen.

 

Wir werden unsere Doku dahingehend mal verbessern

 

Grüße

  • 9 months later...
Geschrieben

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.