Skip to content

1. environment

Kristian Wahlroos edited this page Dec 29, 2015 · 7 revisions

#RojbOS

Jouko Strömmer has built a Linux distro, which contains all that is needed to start programming with the NXT. (With EV3 brick you don;t need RojbOS but can follow instructions here: Getting started with leJOS EV3)

##Download this

rojbOS (disc) image

###VirtualBox part1 VirtualBox is maybe the easiest and the fastest way to get the enviroment up and working.

  • install VirtualBox from the site, or sudo apt-get install virtualbox (should work for owners of "fuksi"-laptop)
  • unpack the image
  • chage it to a form VirtualBoxin can read: VBoxManage convertfromraw --format VDI [filename].img [filename].vdi
  • add a new computer to VirtualBox using the vdi file created in the previous point
  • you are ready to run RojbOS on a virtual machine

###VirtualBox part2 (no USB-found -issue)

  • add your user to recognize all usb-ports sudo adduser YOURUSERNAME vboxusers and logout
  • open RojbOS from virtual box --> navigate to "Devices" tab and "Insert Guest Additions CD image". Install it.
  • (If you encounter the "VT-X is disabled" you have to turn it on from the BIOS-Settings)
  • close RojbOS
  • install extension pack for VB
  • Open Virtual Box --> Settings --> USB. Enable USB 2.0 -support and add new USB-driver here by clicking the usb with the plus sign. You can add everything just in case.
  • You are now ready to develop your lego robot.

###Windows (not tested)

###Linux

  • insert stick to your machine and check the device name (for example cat /proc/partitions, look at the sizes), for example sdg (not sdg1, which references to the partition) NB: MAKE SURE THE DEVICE NAME IS CORRECT OR YOU MIGHT DESTROY FOR EXAMPLE THE CONTENTS OF YOUR HARD DRIVE
  • if stick is mounted automatically, unmount it (easies way usually in Ubuntu: sudo umount /media/)
  • the next commands presume the device name is "sdg"
  • sudo time dd if=rojbos-img-name.img of=/dev/sdg
  • sudo sync
  • stick should be ready to use

###OSX

  • we have not tried but should go similarly as Linux if you just use device names from OSX

##Booting

  • restart your computer so that the stick is connected
  • the next settings are machine specific, but usually very similar
  • when the machine is firing up, you need to press some button to get to the settings that allow you to start the OS from the stick. Often this is displayed in the boot screen as "quick boot menu" or "boot menu" etc. and the button might be F12 or F9 for example. Press it repeatedly until something happens, then select the stick from the list
  • sometimes you need to change BIOS settings ("Setup"/"BIOS Setup") to be able to start OS from the stick. Usually you get here by pressing F2, DEL or ESC and selecting USB device before hard drive from the "Boot"/"Boot Order"/"Boot Priority" list in launch settings etc.
  • with some machines it matters when the stick is inserted. If no stick is found, try removing it, putting it back and rebooting
  • sometimes it matters in which USB station the stick is inserted into, try changing the station if no stick is found and rebooting

##Usage

  • DO NOT REMOVE THE STICK WHILE USING IT!! You might corrupt any changes you've made
  • be patient. Some sticks are slow and you need to wait
  • if you suspect your changes have corrupted (usually manifests by Eclipse acting up or freezing), you can start the stick in live mode and type "fixpersist" to verify files (ext2)
  • TAKE BACKUPS OR BETTER YET USE VERSION CONTROL, sticks have a tendency of being mistreated or lost

##Duplication

  • in live mode you can clone the stick with the Linux instructions above, just using the original device name (for example /dev/sda) as the if=-parameter (your own files and changes will also be cloned)

Source (in Finnish)

#leJOS

leJOS is a small Java virtual machine, which runs on NXT. You are highly recommended to use leJOS and Java for programming your robot on this course. There are readily installed tools for leJOS on RojbOS, which will save a lot of time setting up your environment.

leJOS API documentation can be found HERE.

Clone this wiki locally