Android Open Source - smartcar Client Output






From Project

Back to project page smartcar.

License

The source code is released under:

GNU General Public License

If you think the Android project smartcar listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/**
 * Opens a socket to the desired ip and port and sends the inputted string through it.
 * @author Team Pegasus (dimi)//ww  w .  j a  v  a2s . c o m
 */
import java.io.PrintWriter;
import java.net.Socket;


public class ClientOutput {
  Socket socket;
  PrintWriter out;
  public ClientOutput(){
    try { //192.168.1.100
      socket = new Socket("127.0.0.1", 8787);
      out = new PrintWriter(socket.getOutputStream(), true);
    } catch (Exception ex) {

    }
  }
  
  public void send2pi (String GUIinput){
    out.println(GUIinput);
  }
  
  public void send2pi (int[] GUIinput){
    out.println(GUIinput);
  }
  
  public void close(){
    out.close();
  }
}




Java Source Code List

.ClientOutput.java
.DrawingCanvas.java
.JoystickGUI.java
.JoystickMain.java
piSockets.SerialOutput.java
piSockets.SocketReceive.java
piSockets.SocketsMain.java
se.chalmers.balmung.smartcar.JoystickView.java
se.chalmers.balmung.smartcar.MainActivity.java
se.chalmers.balmung.smartcar.SettingsActivity.java