Showing posts with label output ports. Show all posts
Showing posts with label output ports. Show all posts

Monday, January 19, 2009

A step in the Right Direction....

So I'm back and working on the Java environment. I have been able to get the firmware to download to the RCX unit once again. I ended up googling "leJOS 3 serial port", which ended up leading me to a page that gave me information that the error I was getting was related to bad code in the 3 release. I followed the directions/suggestions that was suggested for getting the firmware to download. The summary of the fix was to copy files for the COM port from version 2 and replace the version 3 files. So right now I am sitting with an RCX brick that is ready to receive the Compiled Java code, which I would love to get to download. But I have received a large error message about not being able to find certain file(s), so hopefully I will be able to find a solution pretty quickly on the leJOS forum.

(I once again edited out the user name to protect the identity of the computer.)

On another note: To account for the time of when Uni was closed on Friday...what did I do you ask. Well honestly I didn't do anything but I made up for it on Saturday by working 3 hours on my paper. The good news is that it is pretty close to done, of course if I get the Java up and running I will have some revisions to make.

Time worked Since Last Post: 4 hours 15 minutes
Overall: 37 hours 40 minutes

Thursday, January 15, 2009

Still Trouble Shooting....

To continue on from where I was yesterday....With the lovely error of not being able to find the classes....This is where I started today....I have since tried multiple things to try and solve that error, which it seems that I may have. I know receive an error of not finding the Tower. Specifically: "error while downloading: Tower error: write failure". But let us back track and see what I did to get here.

  • Multiple deleting of files and recopying: I have deleted the folder that I had put the leGOS files into. Copied over straight the newer 3 version with no version 2 files in the folder. Still getting the error. Deleted files again copied over version 2 files and then copied over only one file from version 3, in hopes that that would take care of both the former problem (that was corrected with version 3) and the new one. And then reverted back to only having version 3 files in the folder.
  • Our friend Google, linked me out to a forum, where someone mentioned that to fix their problem they had to change the RCXTTY =USB variable to all lower case. So I tried that with my RCXTTY=COM variable...after making it lower case and putting a 1 directly behind it (and a couple of good old reboots), I got a new error....
"error while downloading: Tower error: bad ir link"....Have yet to google this one or try changing out the battery but from what I have read the IR tower is only suppose to be turned on when transmitting data or when the green light is on. So I have not yet pursued that route.

Time for today: 2 hours
Overall: 31 hours 25 minutes

Tuesday, January 6, 2009

Day 2...More Reading and the beginning of Building :-D

Today was spend doing quite a bit of reading from Baum's book. He does a really good job introducing the RIS.
I will be doing a quick overview of what I learned today from my reading, then I will be showing the beginning of building one of the Robot models in the Knudsen book.



For the RCX (the brain):

  • The programming code is not compiled into an assembly code like you might think. It actually compiled into byte codes that are read by the firmware in the RCX brick. Which makes the RCX able to maintain a safe and reliable environment.
  • The program it can hold 10 tasks, which are a list of instructions for the Robot.
  • Subroutines are a way to call code within a task that you do not want to write directly into a task or that you might want to call over again.
  • The variables that are used in the Lego code, are global and can be used in any task. But the value that it will hold will be the last one that was assigned it.
  • There are three output ports with three modes: on, off, floating. The floating mode means that no energy is going to the motor but that it is allowed to spin freely.
  • Sensors come in two different types with the basic model of the kit: touch and light.
  • The touch sensor has a button that gets pushed in by something and then sends a signal.
  • The light sensor uses a phototransistor in order to sense light. It also can sense colors by this sensor. The light sensors are know to be picky and can cause the need to readjust code in order for it to work properly.
  • The RCX keeps track of time from the moment that it is turned on.
  • The datalog that it can keep can be loaded onto a computer in order to be able to see it.
  • It will automatically shut itself down after a certain amount of time, even if it is running a program.
Now for some pictures of the beginning of the Robot.....
I am following a design in the Knudsen book. I have found the pictures to be helpful in constructing a good base. Although because they are black and white and on regular paper, some of the details can be hard to figure out at first, making you back track with the snapping together of pieces.




Hours Worked: 2.5

Blogger Templates by OurBlogTemplates.com 2007