Class DSLKt

  • All Implemented Interfaces:

    
    public final class DSLKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static Unit set(PwmOutputDevice $self, Boolean sensorValue) Adds DSL-like capabilities to diozero
      final static Unit set(PwmOutputDevice $self, Float sensorValue)
      final static Unit set(DigitalOutputDevice $self, Boolean input)
      final static Unit set(ServoDevice $self, Float input) Sets the value for the servo (-1 to 1).
      final static Unit set(ServoDevice $self, Integer input)
      final static Unit set(LcdInterface<?> $self, Integer row, String text) Uses array notion to set text on a rowExample: lcd[2] = "Hello, World"
      final static Unit setAngle(ServoDevice $self, Integer input)
      final static Unit at(ServoDevice $self, Float angle) Sets the angle for the servo.
      final static Unit at(ServoDevice $self, Integer angle)
      final static Unit at(MotorInterface $self, Float speed) Run a motor at this relative speed (-1 to 1).
      final static Unit position(LcdInterface<?> $self, Pair<Integer, Integer> location) Use a Pair to express row, columnExample: lcd position Pair(1,1)TODO not happy about this one
      final static Unit plusAssign(LcdInterface<?> $self, String text) Add text at current location
      final static Unit plusAssign(LcdInterface<?> $self, Character char) Add char at current location
      final static Unit plusAssign(LcdInterface<?> $self, Integer special) Add a special code at current location
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • set

         final static Unit set(PwmOutputDevice $self, Boolean sensorValue)

        Adds DSL-like capabilities to diozero

      • set

         final static Unit set(PwmOutputDevice $self, Float sensorValue)
      • set

         final static Unit set(DigitalOutputDevice $self, Boolean input)
      • set

         final static Unit set(ServoDevice $self, Float input)

        Sets the value for the servo (-1 to 1).

      • set

         final static Unit set(LcdInterface<?> $self, Integer row, String text)

        Uses array notion to set text on a row

        Example: lcd[2] = "Hello, World"

      • at

         final static Unit at(ServoDevice $self, Float angle)

        Sets the angle for the servo. Note that this must be in the range the servo supports.

      • at

         final static Unit at(MotorInterface $self, Float speed)

        Run a motor at this relative speed (-1 to 1).

      • position

         final static Unit position(LcdInterface<?> $self, Pair<Integer, Integer> location)

        Use a Pair to express row, column

        Example: lcd position Pair(1,1)

        TODO not happy about this one

      • plusAssign

         final static Unit plusAssign(LcdInterface<?> $self, String text)

        Add text at current location

      • plusAssign

         final static Unit plusAssign(LcdInterface<?> $self, Integer special)

        Add a special code at current location