Examples of Serial


Examples of it.baeyens.arduino.arduino.Serial

  myConnectToSerialPort.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_ADD)); // IMG_OBJS_INFO_TSK));

  myDisconnectSerialPort = new Action() {
      @Override
      public void run() {
    Serial newSerial = GetSelectedSerial();
    if (newSerial != null) {
        SerialListener theListener = mySerialConnections.get(newSerial);
        mySerialConnections.remove(newSerial);
        newSerial.removeListener(theListener);
        newSerial.dispose();
        theListener.dispose();
        SerialPortsUpdated();
    }
      }
  };
View Full Code Here

Examples of it.baeyens.arduino.arduino.Serial

    /**
     * methoid to make sure the visualisation is correct
     */
    void SerialPortsUpdated() {
  myDisconnectSerialPort.setEnabled(mySerialConnections.size() != 0);
  Serial CurSelection = GetSelectedSerial();
  mySerialPorts.setInput(mySerialConnections);
  if (mySerialConnections.size() == 0) {
      mySendButton.setEnabled(false);
      myresetButton.setEnabled(false);
  } else {

      if (mySerialPorts.getSelection().isEmpty()) // nothing is selected
      {
    if (CurSelection == null) // nothing was selected
    {
        CurSelection = (Serial) mySerialConnections.keySet().toArray()[0];
    }
    mySerialPorts.getCombo().setText(CurSelection.toString());
    ComboSerialChanged();
      }
  }
    }
View Full Code Here

Examples of it.baeyens.arduino.arduino.Serial

     *            the bautrate to connect to the com port
     */
    public void connectSerial(String ComPort, int BaudRate) {
  if (mySerialConnections.size() < myMaxSerialPorts) {
      int colorindex = mySerialConnections.size();
      Serial newSerial = new Serial(ComPort, BaudRate);
      if (newSerial.IsConnected()) {
    newSerial.registerService();
    SerialListener theListener = new SerialListener(this, colorindex);
    newSerial.addListener(theListener);
    theListener.event(System.getProperty("line.separator") + "Connected to " + ComPort + " at " + BaudRate
      + System.getProperty("line.separator"));
    mySerialConnections.put(newSerial, theListener);
    return;
      }
View Full Code Here

Examples of it.baeyens.arduino.arduino.Serial

     * PauzePort is called when the monitor needs to disconnect from a port for a short while. For instance when a upload is started to a com port the
     * serial monitor will get a pauzeport for this com port. When the upload is done ResumePort will be called
     */
    @Override
    public boolean PauzePort(String PortName) {
  Serial TheSerial = GetSerial(PortName);
  if (TheSerial != null) {
      TheSerial.disconnect();
      return true;
  }
  return false;
    }
View Full Code Here

Examples of it.baeyens.arduino.arduino.Serial

    /**
     * see PauzePort
     */
    @Override
    public void ResumePort(String PortName) {
  Serial TheSerial = GetSerial(PortName);
  if (TheSerial != null) {
      TheSerial.connect();
  }
    }
View Full Code Here

Examples of processing.serial.Serial

   * but other firmwares may override it)
   */
  public Arduino(PApplet parent, String iname, int irate) {
    this.parent = parent;
    this.serialProxy = new SerialProxy();
    this.serial = new Serial(serialProxy, iname, irate);

    try {
      Thread.sleep(3000);
    } catch (InterruptedException e) {}
   
View Full Code Here

Examples of processing.serial.Serial

    // I know that the first port in the serial list on my mac
    // is always my  FTDI adaptor, so I open Serial.list()[0].
    // On Windows machines, this generally opens COM1.
    // Open whatever port is the one you're using.
    String portName = Serial.list()[3];
    myPort = new Serial(this, portName, 9600);
  }
View Full Code Here

Examples of processing.serial.Serial

  private ArrayList<SerializationSerialReader> readers = new ArrayList<SerializationSerialReader>();
  private Serial serial;
 
  public SerializationSerialConnection(PApplet applet, String port, int speed) {
    serial = new Serial(applet, port, speed);
    setDaemon(true);
    start();
  }
View Full Code Here

Examples of processing.serial.Serial

  public void startSerial(String portName) {
    if (port != null) {
      port.clear();
      port.stop();
    }
    port = new Serial(this, portName, 57600);   
  }
View Full Code Here

Examples of processing.serial.Serial

   * but other firmwares may override it)
   */
  public Arduino(PApplet parent, String iname, int irate) {
    this.parent = parent;
    this.serialProxy = new SerialProxy();
    this.serial = new Serial(serialProxy, iname, irate);

    try {
      Thread.sleep(3000);
    } catch (InterruptedException e) {}
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.