Threads and classes?
Posted on 2006-05-17
OK, I picked up a mindstorm set just to play around with and not too long after I found out that I can get rid of their WYSIWIG programming interface and program it in lejos which is java based language and I really bit the bug..... I've played with some basic stuff which was simple and now I kind of got in in over my head but it's so much fun I don't want to put it away.
So the real question is how do I deal with classes and threads? I want to setup a main control class which has sets up the environment and then interacts with two or more separate classes. Each class would run in it's own thread and would deal with either an input devidce (sensor type for most part) or output (mostly motor, but also maybe a light). I tried looking for simple examples of what the structure/layout should be and I could not find anything. So.... any pointers, preferably skeleton examples that anyone can point me to??
Oh yeah, last time I played with java was just about when I took a college course 6 years ago.... and threads weren't really covered :(