Back to project page android-udoo-rover.
The source code is released under:
Copyright (c) 2014, Emanuele Palazzetti and contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the followin...
If you think the Android project android-udoo-rover listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package me.palazzetti.adkrover.arduino; //from w w w .j av a2s. com import me.palazzetti.adktoolkit.AdkManager; public class Arduino { /** * Create a serial command with format DIRECTION-SPEED (D-SSS) * @param command used in Arduino * @param speed with range 0-400 * @return a valid Arduino command */ public static String commandBuilder(int command, int speed) { return String.valueOf(command) + "-" + String.valueOf(speed); } /** * Sends a command to Arduino board * @param adkManager used to send serial command * @param serialCommand valid Arduino command */ public static void executeCommand(AdkManager adkManager, String serialCommand) { adkManager.writeSerial(serialCommand); } }