Results 1 to 2 of 2

Thread: TINI Board

  1. #1
    ApheoXAIO is offline Member
    Join Date
    Jul 2010
    Posts
    2
    Rep Power
    0

    Question TINI Board

    Hello Everyone
    I am a uni student doing a project with a team and we are controlling a robotic arm using a "TINI Board" which is a 10 year old peice of gadgetry which hosts a web server, and using java applets, one can control the outputs (in this case LEDS) using java.
    I am an absolute novice with java and thought i might pick some of your brains.
    Basically, i need the following code to excecute the following, it turns on a yellow LED, which i am taking the output to control a relay and do various things...

    manip.add(LEDManip.Y1);
    lcdmanip.clear();
    lcdmanip.out.println("Current Move:");
    lcdmanip.out.print("Elbow Down");
    lcdmanip.out.flush();
    pause(5000);

    In the following code
    -------------------------------------------------------------------------------

    import com.dalsemi.system.*;
    import java.net.*;
    import java.io.*;
    import com.taylec.tini.*;
    import com.taylec.tini.io.*;
    import java.lang.*;
    import java.util.*;
    import com.dalsemi.system.TINIOS;
    import java.util.Enumeration;

    public class elbowdown
    {
    /**
    * Pause
    */
    private static final void pause(int delay_)
    {
    try
    {
    Thread.sleep(delay_);
    }
    catch (InterruptedException e_)
    {
    }
    }

    public static void testLED(Interrupt interrupt_)
    {
    try
    {
    LEDManip manip = new LEDManip();
    LCDManipFormat lcdmanip = new LCDManipFormat();

    //setup local variable to use for state manipulation of LEDs
    int cur_state = 0;

    //turn off the LEDs
    manip.clear();

    manip.add(LEDManip.Y1);
    lcdmanip.clear();
    lcdmanip.out.println("Current Move:");
    lcdmanip.out.print("Elbow Down");
    lcdmanip.out.flush();
    pause(5000);



    manip.subtract(LEDManip.Outer);
    while(true)
    { manip.subtract(LEDManip.Inner);
    if (interrupt_.getNumEvents()>0)
    {
    return;
    }
    }
    }
    catch (IllegalAddressException err_)
    {
    System.out.println(err_.toString());
    }
    }


    public static void main(String args[])
    {
    Interrupt interrupt = new Interrupt();

    System.out.println("Starting Motion");
    testLED(interrupt);
    System.out.println("Ending Motion");
    System.exit(0);

    }
    }
    ----------------------------------------------------------------------------------
    When i run that code, the program continues to run and stuffs up the next one from running, so i need it to exit without having to use the interupt (a button on the TINI board)
    I thought it would be logical and just have the import part, then the function definition, then the LED control part, then the function stops, however when trying to remove bits, i keep getting errors.

    Probably super simple, but i dont need to learn Java for my subject, just get this working...
    Any help is appreciated

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,317
    Rep Power
    25

    Default

    i keep getting errors
    Please copy and paste the full text of the errror messages here.

    dont need to learn Java for my subject, just get this working
    Can you hire a programmer to help you?

Similar Threads

  1. how can I draw a board in 2d array?
    By java_fun2007 in forum New To Java
    Replies: 8
    Last Post: 12-28-2011, 05:58 PM
  2. How to do a score board?
    By vlan in forum Java Applets
    Replies: 11
    Last Post: 06-03-2010, 10:10 AM
  3. game board design
    By tomitu in forum New To Java
    Replies: 12
    Last Post: 02-27-2010, 05:31 PM
  4. how to create board in java...
    By zenith in forum New To Java
    Replies: 5
    Last Post: 01-20-2010, 04:42 AM
  5. Programming a Board Game
    By makanti in forum New To Java
    Replies: 7
    Last Post: 03-10-2009, 02:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •