예제 #1
0
        public SoftwareChannelPwm(IOperatingSystemService operatingSystemService, IGpioPort gpioPort, int pin)
        {
            this.gpioPort = gpioPort;
            this.pin      = pin;

            ChangeFrequency(1000.0f);

            loopThread = operatingSystemService.CreateLoopThread <object>(Loop);
        }
예제 #2
0
        public static Pi2GoLiteRobot BuildPi2GoLite(IOperatingSystemService operatingSystemService, IGpioPort gpioPort)
        {
            return(new Pi2GoLiteRobot()
            {
                GpioPort = gpioPort,

                MotorLeft = new Motor(7, 8)
                {
                    GpioPort = gpioPort
                },
                MotorRight = new Motor(10, 9)
                {
                    GpioPort = gpioPort
                },

                LedFront = new Led(22)
                {
                    GpioPort = gpioPort
                },
                LedRear = new Led(23)
                {
                    GpioPort = gpioPort
                },

                IrLeft = new InfraredSensor(4)
                {
                    GpioPort = gpioPort
                },
                IrRight = new InfraredSensor(17)
                {
                    GpioPort = gpioPort
                },
                IrLeftLine = new InfraredSensor(18)
                {
                    GpioPort = gpioPort
                },
                IrRightLine = new InfraredSensor(27)
                {
                    GpioPort = gpioPort
                },

                Sonar = new Sonar(14)
                {
                    GpioPort = gpioPort
                },

                Switch = new Switch(11)
                {
                    GpioPort = gpioPort
                },

                ServoPan = new Servo(25)
                {
                    GpioPort = gpioPort
                },
                ServoTilt = new Servo(24)
                {
                    GpioPort = gpioPort
                },

                //VideoStreaming = null
            });
        }
예제 #3
0
 public SoftwarePwm(IOperatingSystemService operatingSystemService, IGpioPort gpioPort)
 {
     this.gpioPort = gpioPort;
     this.operatingSystemService = operatingSystemService;
 }
예제 #4
0
 public GpioHelper(IGpioPort gpioPort)
 {
     this.gpioPort = gpioPort;
 }