- #ROBOTC PROGRAMMING EXAMPLES HOW TO#
- #ROBOTC PROGRAMMING EXAMPLES UPDATE#
- #ROBOTC PROGRAMMING EXAMPLES DRIVER#
Start the program on the NXT brick (Make sure your batteries are charged!).When you’re done, press F5 (Compile and Download Program).The large RCX tyres are 84 mm in diameter. The default is 42 mm for standard NXT 2.0 tyres. Use your_wheel_diameter to let your code account for the robot’s wheel diameter.Plug your sensor cable into this port, or replace S2 by S1, S3 or S4. tSensors Gyro = S2 specifies which sensor port you connect your gyro sensor to.If you use the HiTechnic, Mindsensors or Microinifnity sensor, simply comment out the one from Dexter Industries and uncomment your sensor. Presently, this example is configured to work with the dIMU sensor from Dexter Industries. You use one of the first four lines to tell the program which gyro sensor you have.Now consider the following code fragment that you see in your example program:.If you see (among other errors): **Severe*:Couldn’t open ‘#include’ file ‘segway-driver-lv.h, then the files in the zipped archive were not successfully unzipped to a single folder.
#ROBOTC PROGRAMMING EXAMPLES DRIVER#
#ROBOTC PROGRAMMING EXAMPLES UPDATE#
If you are a new RobotC user, make sure you update the NXT firmware with RobotC.RobotC for Mindstorms, version 3.54 or higher (successfully tested with 3.54.).Mindsensors AbsoluteIMU-ACG (Sensor firmware 1.051.I am not affiliated with any of these vendors. When buying one of these, choose one that’s also suited for your other projects. All sensors work equally well for this balancing application. Requires one of the following Gyroscopic Sensors.Requires one NXT set (any version will work).LEGO MINDSTORMS NXT Anyway Robot (follow the instructions, then return here).
I’ve added comments to the programs that can replace this tutorial. Otherwise, proceed to programming the Segway with RobotC. If you are not comfortable with RobotC or if you’re not sure what you’re doing, consider programming your Segway using the original LEGO NXT-G Software. I recommend that you start here and modify your Segway only once you finish this tutorial - when you have a working Anyway Segway.
Although you can use any type of LEGO NXT Segway with this code, I am assuming you will use the ‘Anyway’ platform.
#ROBOTC PROGRAMMING EXAMPLES HOW TO#
This tutorial will show you how to use and modify RobotC program code to create a working LEGO NXT Segway that you can customize as you like.