public void Start() { JcRobotNetworking jcnet = new JcRobotNetworking(JcRobotNetworking.ConnectionType.Robot, OnMessageReceive); jcnet.Connect(1296); Watchdog(); }
public void Start() { jcnet = new JcRobotNetworking(JcRobotNetworking.ConnectionType.Robot, OnCommandRecieve); jcnet.Connect(1296); Process.Start("gpio", "-g mode 18 pwm"); Process.Start("gpio", "-g mode 17 output"); Process.Start("gpio", "pwm-ms"); Process.Start("gpio", "pwmc 192"); Process.Start("gpio", "pwmr 2000"); }
public void Instantiate() { _port = new SerialPort(_portname, 115200, Parity.None, 8, StopBits.One); _port.Open(); _jcn = new JcRobotNetworking(JcRobotNetworking.ConnectionType.Robot, Update); _percents = new float[_numMotors]; for (int i = 0; i < _percents.Length; i++) { _percents[i] = .5f; } SetPositions(_percents, _time); }
public JohnnyController() { _time = 50; _timeOverlap = 5; _speed = .1f; _running = true; _controllerGain = _speed / (1000 / _time); _jcn = new JcRobotNetworking(JcRobotNetworking.ConnectionType.Controller); _percents = new float[_numMotors]; _controlState = ControlState.Bottom; Console.WriteLine("Choose a gampad:"); Joystick.PrintJoysticks(); _joystickName = Console.ReadLine(); _joystickName = "/dev/input/" + _joystickName; }
public void Start() { js = new LogitechController("/dev/input/js0"); jcnet = new JcRobotNetworking(JcRobotNetworking.ConnectionType.Controller); }