Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jabrena committed Nov 26, 2014
1 parent 615cc42 commit 8809bd5
Show file tree
Hide file tree
Showing 17 changed files with 591 additions and 8 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ Open your web browser Chrome and type:
Connect with your EV3 Brick and Speak with it.
Enjoy!!!

### Examples

Example: A set of Examples evolving the class HelloWorld
Example: A program using LeJOS API
Example: Example running a Web Socket Server

### Living Robots

#### Brick only
Expand Down Expand Up @@ -288,7 +294,9 @@ Examples: https://github.com/jabrena/liverobots

## Chapter 7: Computer vision

### Track Color
### Examples

Example: Track color objects with your Smarphone

## Chapter 8: Internet, web services & web interfaces

Expand Down
1 change: 1 addition & 0 deletions chapter1/ev3/HelloWorld/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/ev3classes.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
19 changes: 19 additions & 0 deletions chapter1/ev3/HelloWorld/.externalToolBuilders/New_Builder.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/HelloWorld&quot; type=&quot;4&quot;/&gt;&#10;&lt;/resources&gt;}"/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 7 [1.7.0_51]"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.launching.remote.InternalAntRunner"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="HelloWorld"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dbuild.compiler=javac1.7"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/HelloWorld/build.xml}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/HelloWorld}"/>
<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
</launchConfiguration>
10 changes: 10 additions & 0 deletions chapter1/ev3/HelloWorld/.project
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>auto,full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/New_Builder.launch</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
Expand Down
6 changes: 3 additions & 3 deletions chapter1/ev3/HelloWorld/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ classes.dir = ${build.dir}
classes.src.zip = ${project.name}-src.zip
classes.jar = ${dist.dir}/${jar.name}

main.class = livingrobots.ev3.ch1.helloWorld.HelloWorld7
main.class = livingrobots.ev3.ch1.helloWorld.HelloWorld9

dist.include =
dist.exclude = ${build.dir}/** bin/** dist/** local.properties build.properties
Expand All @@ -31,6 +31,6 @@ dist.exclude = ${build.dir}/** bin/** dist/** local.properties build.properties
lejos.home = /home/root/lejos
lejos.user.program.dir = /home/lejos/programs
lejos.user.www.dir = /home/lejos/www
#ev3.host = 192.168.0.13
ev3.host = 10.0.1.1
ev3.host = 192.168.0.13
#ev3.host = 10.0.1.1

4 changes: 2 additions & 2 deletions chapter1/ev3/HelloWorld/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<include name="*.jar"/>
</fileset>
</path>

<target name="compile" description="build class files" depends="clean">
<mkdir dir="${build.dir}"/>
<javac srcdir="${source.dir}" destdir="${build.dir}" includeantruntime="false" encoding="UTF-8">
<javac srcdir="${source.dir}" destdir="${build.dir}" includeantruntime="false" encoding="UTF-8" >
<classpath refid="libraries.path"/>
</javac>
<copy todir="${build.dir}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void showMessage(String message){
*/
public static void main(String[] args) {
HelloWorld6 hw = new HelloWorld6();
hw.showMessage("HelloWorld");
hw.showMessage(MESSAGE);
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package livingrobots.ev3.ch1.helloWorld;

import lejos.hardware.Sound;

/**
* HelloWorld is an example designed to understand the environment.
* This class show in console the string: "Hello World"
Expand Down Expand Up @@ -49,9 +51,11 @@ public static void main(String[] args) {
if(args.length > 0) {
hw.showMessage(args[0]);
} else {
hw.showMessage("HelloWorld");
hw.showMessage(MESSAGE);
}

Sound.beep();

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package livingrobots.ev3.ch1.helloWorld;

/**
* HelloWorld is an example designed to understand the environment.
* This class show in console the string: "Hello World"
*
* @author jabrena
*
*/
public class HelloWorld8 implements IHelloWorld{

/**
* Internal variable with the message
*/
private static final String MESSAGE = "Hello World";

/**
* Constructor
*/
public HelloWorld8(){

}

/**
* Internal method designed to show in console a String.
*
*/
public void showMessage(){
System.out.println(MESSAGE);
}

/**
*
* @param message
*/
public void showMessage(String message){
System.out.println(message);
}

/**
* Main method
*
* @param args
*/
public static void main(String[] args) {
HelloWorld8 hw = new HelloWorld8();


if(args.length > 0) {
hw.showMessage(args[0]);
} else {
hw.showMessage(MESSAGE);
}

}

}
Loading

0 comments on commit 8809bd5

Please sign in to comment.