|
|
Fun Projects for your LEGO® MINDSTORMS® NXT! |
Program DownloadsThere are two kinds of program download links you will find on this site. If the program download looks like the following: Youtube Html5 Video Player Codepen ((new)) [TESTED]This is where the combination of the and platforms like CodePen comes into play. CodePen allows for the rapid prototyping and sharing of web concepts, and it's the perfect sandbox for creating your own custom, HTML5-powered YouTube player. In this article, we'll explore what you can create, how to build it, and why you might want to go beyond the default YouTube controls. : This is the official and most reliable way to embed YouTube videos with programmatic control. You can see a live example in this Auto Play YouTube Video CodePen . youtube html5 video player codepen .video-container:hover .player-controls opacity: 1; This is where the combination of the and .time-display font-size: 12px; iOS and Android browsers frequently block video autoplay and programmatically triggered volume levels. Videos must typically be muted to autoplay. : This is the official and most reliable playPauseBtn.addEventListener('click', () => if (video.paused) video.play(); playPauseBtn.textContent = 'Pause'; else video.pause(); playPauseBtn.textContent = 'Play'; , a developer wanted full control over video playback—without YouTube’s branding, but with similar functionality. So they opened CodePen and built a custom HTML5 video player from scratch. Required SoftwareThe downloadable programs for the projects (.rbt files) are written using the NXT-G programming system, which requires the LEGO MINDSTORMS NXT software to be installed in order to view them, edit them, or download them to the NXT brick. The program files cannot be used with RoboLab or any of the other NXT programming systems, not can they be viewed in standard text/graphics programs such as Microsoft Word or Adobe Reader.
If you have the LEGO MINDSTORMS NXT software installed, then a program file (.rbt) will automatically load into the NXT-G programming system when you open the file.
Errors Trying to Load or Compile a Downloaded ProgramAll of the program (.rbt) files on nxtprograms.com should load, compile and upload to your NXT through the standard NXT software without any additional software, if you have a suitable version of the NXT software installed, as explained in the Required Software section above. If you are getting "Error 5002" or "The program is broken. It may be missing required files", you are most likely trying to load an NXT 2.0 program into the NXT 1.X or other older version of the software. If you have the correct NXT software installed but you still get an error trying to load or compile a downloaded program such as "Invalid program file", or "Internal Compiler Error", it is possible that the file was not downloaded completely by your browser or was corrupted. The .rbt files are large and may fail to download completely in some cases. If this happens, try downloading the program again. Saving Changes to a ProgramIf you open a program file directly from the web site without saving it to your computer first, and you want to make changes and save them, you will need to save the file to a different location using the File -> Save As menu command. If you want to save the program to the default location for NXT program files, this location will be something like the following:
NXT 2.0 vs. NXT 1.X and Retail vs. Education Versions of the NXT SoftwareThe retail versions of the NXT kits (The original 8527 and the NXT 2.0 8547) come with the NXT software CD. If you lost your CD, you can contact LEGO Technical Support to get a replacement. The NXT 2.0 software can read and use all programs written for NXT 1.X, so if you have the NXT 2.0, you will also be able to load the programs from the NXT 1.X projects and possibly adapt them a similar robot of your own design. The NXT 1.X software cannot in general use programs written for NXT 2.0. You will usually be able to load them and examine them, but some blocks may not display properly. Some very simple NXT 2.0 programs can be downloaded to a 1.X NXT, but in general you will not be able to use them. The NXT software for the Education version of the NXT (9797) is sold separately here at LEGO Education and contains different help material and building instructions from the retail version of the software, although either version of the software can be used to write programs for either NXT kit.  For the NXT 2.0 projects on this site, the LEGO Education NXT-G 2.1 software is required to use any programs that use the color sensor or the Pack-and-Go (.rbtx) format, otherwise the LEGO Education NXT-G 2.0 software will work with most 2.0 programs. |
|
Copyright
©
2007-2011 by Dave Parker. All rights reserved. |