Friday, February 12, 2010

Feb.12 Imports and Flip-flops

FBDK imports and more 61499
Importing the FBDK Flasher_test.sys into 4DIAC results in errors when saving. A major problem is the FBDK applications were often implemented in the resources (=sub-device) instead of applications.

Flasher with 1 led= flood light of light sensor in Mindstorms is turn on and cycle for 1 sec.; turn off and cycle for 1 sec.  Two options in 61499 are use E_Cycle with E_Switch and E_RS to toggle the light LMS_LED or
2 E_Delays to set R and S in E_RS to toggle the LMS_LED.

Assignment: Use OUT_BOOL so can see this process.
(-1 error in System Config after creating new system with pre-release)

LeJos
Firmware download

Program to test light values. Buttons: Left=off; Right=on;Enter=display light sensor value; ESCAPE=exit

Thursday, February 11, 2010

Feb. 11 HTL Vienna and Bratislava classes together

Line Follower Day
(link with pictures to be supplied)
1 hour presentations 
  • line follower history, applications, algorithms (1-3 sensors); 
  • intro to LeJos NXT Java  (complete set-up in 1 directory loaded on every computer)
1 1/2 hours work on Robots and programs and first 2 teams tested.
After lunch about half the around 10 group teams started testing.
Time tests started about hour later, so the Bratislava class could catch their train.

At least some of the Bratislava class had experience with LEGO NXT robot building, but no java.
Austrian class had never built any LEGO NXT robots, but knew java. The Austrian class took about 1/2 to 1 hour longer to start testing.


Course was made with electrical tape on a set of square white boards pegged together.


2 light sensor robots had the best times.
Only 1 group used 1 light - only worked in 1 direction
3 light sensor robots zigzaged too much.


Tricks: Slow down when in a curve so don't get too far from the line
Shield line around the sensors.


The line follower robot construction varied alot: Ferrari red model  with big wheels, basic 4 wheels with brick on top, and models with brick up high etc.

Feb.10 Line Follower Steps


 Line Follower: Basic Algorithm
  Black then forward
  White then left or right to find line

Robot:
1. See if / how to go straight
Answers: Is the robot build so it will go straight
2. Alternate left and right - Does go in a straight line?
3. Need to move slightly to get started.
4. Keep light sensor close to floor/line and/or shield to avoid interference from ambivalent light

Program:
5. Calibrate sensor by taking the average of reading on white and black rather than setting to particular value.
6. Program "switch"  or if-then-elseif statements to cover all cases
    # cases = 2^n where n is the number of light sensors
7. Slow down in when line curves so you don't over shoot and lose the line completely.

Following the Line Tests:
Basic
1. Straight
2. Curves 
    (right/left) 
    (gradual/sharp)
Advanced:
3. Break in light
4. Crossing lines
5. Find line in the beginning

With Touch Sensor
Object on the line

Also see more hints in:
Feb. 11 HTL Vienna and Bratislava classes together...

Tuesday, February 9, 2010

*LEGO NXT Software Links

Links for comparing LEGO NXT software. This includes firmware for now.
Mindstorms / Labview
Labview Event Programming
Various C versions

Firmware /OS
nxos  French open source OS for NXT and intro to embedded systems
another nxos or same?    Bare Metal on the NXT
 
eCos open source RT O/S intended for embedded applications.
how to write a driver

http://www.sparkfun.com/datasheets/DevTools/SAM7/at91sam7%20serial%20communications.pdf

http://blog.gmane.org/gmane.os.ecos.devel

*LEGO Blogs, forums and general info


Blogs 
Five minute bot (NXT 2.0=different wheels)

http://thenxtstep.blogspot.com/2009/09/nxt-20-five-minute-bot.html
  with links to a Labview and NXT forums
http://thenxtstep.blogspot.com/ also has links to good constructions
Links 

 Non-Lego HW Options:
Robot using TI Calculators
http://mste.illinois.edu/resources/ti/robot/about/index.html

In Austria
http://forum.lgoe.at/index.php?topic=702.0

*Education / Didatics Links and Notes

Tutorial set-ups:
CMU
Use Video. Example of stepping through Tutorial steps:
Connect / Construct / Contemplate / Continue
Each step ends with a summary review with a couple for understanding questions.
http://www.education.rec.ri.cmu.edu/previews/nxt_products/nxt_video_trainer/partial_product/behaviors/repeatingbehaviors/repeatingbehaviors.html
interative design preview video is especially good 
 
Good explanations 

Good example of explaining names of Lego parts as beams, etc.
Tagbot

Good example of explaining light sensor
http://www.education.rec.ri.cmu.edu/products/robolab_vid_trainer/light1/index.htm#



In Schools / Lego Leagues etc

*LEGO Simulators

Is buying or using a LEGO NXT set required? For schools / universities the kits will be reused, but companies find the idea of buying a toy questionable. So is using a simulator possible or useful for design even when LEGO NXT will be used.

Most articles can only be downloaded with a subscribtion or from a school with one
Realistic simulation of a Lego Mindstorms NXT based robot  IEEE article

older JRE is included which causes problems with 4DIACs use of FBDK.