loading
Picture of Wireless Lego Race Car
LegoRaceCar101.JPG
LegoRaceCar106.JPG
LegoRaceCar100.JPG
LegoRaceCar501.JPG
Lego Bricks are great to use as a sketch tool. I can build a mock up, then tear it down. I can create different designs, if it didn't worked I can tear them down and rebuild another model without wasting anything. Or I would build two models at the same time and compare them side by side, and see which one will work better.

This instructable shows you how I used Lego Bricks and components to design Lego Race Car.

My Lego Race Car using different wheels sizes for the front and rear. My Lego Race Car did not have front wing flap, similar to some  Formula 1 race cars in 1960s. 

This Lego Race Car did not used all Lego's parts. I built this one the same way I built my R/C Lego Car. A small servo was used as the turning mechanism. And I used motor and gearbox with axle that I took out from small R/C car.

When I first started building this car. I thought of using XBee module to wirelessly receive commands from PC or Laptop. (See test video in Step 13). After I finished the car I thought of using RN-XV WiFly module to receive commands from my iPod touch.

The reason to use iPod Touch (4G) as a remote control device instead of using the laptop or PC to control the car. Since the iPod Touch (or iPhone) is so small that I can hold in my hand(s), I could move around to follow the car instead of sitting at the same place with a laptop sit on my lap.

Here is how I created this Wireless Lego Race Car.

 


 
Remove these adsRemove these ads by Signing Up

Step 1: Parts and Tools

Picture of Parts and Tools
steering004.JPG
servo029.JPG
DSC03099.JPG
RNXVbasic.jpg

Following is the list of Lego Technic parts that I used for building this R/C Lego Race Car.

If you want to do this project you could use the differenct color for the car. 

Note: The number in the bracket is the Lego's Design ID.

3 no. - Technic Plate 2x8 (#3738)
1 no. - Technic Plate 2x6 (#32001)
2 no. - Technic Plate 2x4 (#3709b)

2 no. - Plate 1x8 (#3460)
5 no. - Plate 1x6 (#3666)
3 no. - Plate 1x4 (#3710)
1 no. - Plate 1x3 (#3623)
2 no. - Plate 1x2 (#3023)
4 no. - Plate 1x1 Transparent (#30008)

4 no. - Technic Brick Angular 1x1 (#4070)
1 no. - Technic Brick 1x2 with 2 Holes (#32000)
4 no. - Technic Brick 1x2 (#3700)

9 no. - Technic Brick 1x4(#3701) , 4 Red, 3 Grey, and 2 Black
3 no. - Technic Brick 1x6 (#3894)
4 no. - Technic Brick 1x8 (#3702)
4 no. - Technic Brick 1x12 (#3895)
2 no. - Technic Brick 1x16 (#3703)

2 no. - Slanted Brick1x6  (#2744)

6 no.   - Connector Peg (#3673)
10 no. - Connector Peg With Friction (#2780)
8 no.   - Connector Peg with Cross Axle (#6562)
4 no.   -  Connector Peg with Knob (#4274) 2 Grey, and 2 Blue
6 no.   - 3M Connector Peg (#32556)
4 no.   - Bush for Cross Axle (#6590)

1 no. - 2M Cross Axle with Groove (#32062)
3 no. - Cross Axle 6M  (#3706)

Steering Kit

Steering Gear Holder(#2790)
Steering Rack (#2791)
Steering Rack Top (#2792)
Steering Rack Bracket  8 pin Plate T37 (#4262)
Steering Arm Drop Link (#4261)
8 Tooth Gear (#3647)

2 nos. - Cross Axle 3 with Knob (#6587)
1 no. - 1/2 Bush (#32123)
1 no. - 1x4 Flat Tile (#2431, not shown in the picture)

Wheels and Rims
Front
2 no. - Tire size 30.4 x 14 VR (#6578)
2 no. - Wheel size 30.4 x 14 VR (#2994)

Rear
2 no. - Tire size 43.2 x 22 ZR (#44309)
2 no. - Reinforced Rim with no pin holes 30.4mm D x 20 mm (#56145)

Rear Wing Flap
1 no. - Panel Fairing #5 (#32527)
1 no. - Panel Fairing #6 (#32528)
2 no. - Lift arm 3 x 5 L-Shape with Quarter Ellipse Thin (#32250)
1 no. - Lift arm 3x3 (#32249)
2 no. - Lift arm 2x4 L shape (#32140)

Servo
9g Micro Servo (T Pro SG90)
This servo is controlling the front wheels turn.

Motor
I got the motor with the worm gear and enclosure from an old 1:18 Scale R/C car.
This motor is driving the car forward and backward.

Others
Arduino or Arduino compatible (I used DIY Arduino in this project.)
L293D (or SN754410) motors driver IC
RN-XV WiFly module
Xbee breakout board (For RN_XV WiFly module (I used XB-Buddy Basic Kit, Jameco's Part no. 2163680)
PCB (approximately 2"x3")
Hook up Wire

Tools
Super Glue
X-ACTO Knife
Sand paper
Files
Hand Drill & bits

Step 2: Forward/Backward Motor


The reason I showed the Forward/Backward Motor early on in this step because it was the hardest and crucial step.
If I could not find the suitable motor and could not modified the motor enclosure to fit with the Lego modular system, this project would be a failure.

I wish I had a 3D Printer! So I could design and print my own motor enclosure to fit the Lego modular system.  And I do not have to use or savaging motor enclosure and modify it to fit the Lego modular system just like I did in this project or previous project (R/C Lego Car)

The motor is for driving the car forward and backward. I got the motor with the gears from the rear motor of an old 1:18 Scale R/C car I bought from Amazon.com. 

This Lego Race Car used motor that I savaged from cheap R/C car that was a one time sale on Amazon.com.
And I used the similar micro servo that I used in my first R/C Lego Car for turning the car left or right.

When I took the motor and the gears box out of the R/C car. The gears were exposed, and faced downward to the floor. I saw that this would be the problem if I used it this way. So I decided to cut out the part that cover the gears from the bottom of the R/C car chassis that I took the motor from.

Three Lego Technic Brick 1x4 (#3701), grey color had been used with the motor unit. And two had been modified to fit with the motor enclosure. 

Step 3: Arduino + Motor Control PCB, and RN-XV WiFly Module

Picture of Arduino + Motor Control PCB, and RN-XV WiFly Module
LegoRaceCar303.JPG
LegoRaceCar311.JPG
LegoRaceCar314.JPG
Arduino and Motor Control PCB

This step show how I built a DIY Arduino Compatible with L293D, Motor Driver IC (I used SN754401) on one single PCB.

For the Arduino and Motor Control I used the same layout and same micro-controller for Arduino and motor control IC (either L293D or SN754410). 
I will not go into detail of how I built my Arduino Compatible PCB, instead I would recommended you to go to my instructables, Lego R/C Car, Step 8: Arduino, Motor and XBee PCB, for the details.
Or see these projects for details of how I built Arduino,

Palm Arduino Kit,
Palm Arduino II, with the motor driver PCB in Step 5.


Not XBee this time!

Instead of using two XBee modules to transmit and receive data. I am using one RN-XV WiFly module (See Step 11, for brief Intro.) to receive commands from iPod Touch (or iPhone) via Internet.

The great thing about switching from XBee to RN-XV module is that I can just dropped in the WiFly RN-XV module into the XBee socket on the same breakout board. RN-XV module have same pins configuration. Voilà, I have the control.

One thing that I altered was the TX and RX pins that communicate between Arduino and RN-XV module. This time I used pin 2 and 3 on Arduino as the TX/RX with the use of SoftwareSerial library (instead of using pin 0 and 1) to talk to RN-XV WiFly module via Dout and Din pins.

Test the circuit on the non solder breadboard to make sure that everything work before put it on the prototype PCB.

Step 4: Motor Installation and Car Frame Build


Lego Parts used in this step:

1 no. - Modified Brick 1x4 (#3701) for motor
2 no. - Technic Brick 1x16 (#3703)
2 no. - Technic Brick 1x6 (#3894)

2 no.   - 3M Connector Peg (#32556)
4 no.   - Connector Peg (#3673) 2 grey, 2 black
2 no.   -  Connector Peg with Knob (#4274) 2 Blue

Following are the photos show how to assemble parts:

Photo 1. Parts used in this step, 2 no. - Technic Brick 1x16 (#3703). Two modified 1x4 Tecnic Brick(#3701) for motor support. 2 no. Technic Brick 1x6 (#3894)

Photo 2. Insert two 3M Connector Pegs (#32556) into a modified 1x4 Brick (#3701).

Photo 3. Insert the left motor axle into the middle hole of the assembled parts (modified 1x4 brick and pegs.)

Photo 4. Insert a connector peg (#4274) to 1x6 brick (#3703). Insert two connector pegs (#3673) to second of the 1x6 brick (#3703)

Photo 5. Insert connector peg (#3673) to the first 1x6 brick as shown.

Photo 6. Connect 1x16 brick(#) to the peg on 1x6 brick as shown.

Photo 7. Insert connector peg (#3673) to 1x6 brick as shown.

Photo 8. Connect 1x16 brick (#3703) to the connector peg as shown.

Photo 9. Insert the motor axle to the second hole of the assembled parts as shown.

Photo 10. Insert the other motor axle to the second assembled part as shown.

Photo 11. Top view of the assembled motor and the car frame.

Photo 12. Bottom view of the assembled motor and the car frame.

Step 5: Car Frame Build (Cont.)


Lego Parts used in this step:

2 no. - Technic Plate 2x4 (#3709b)
3 no. - Technic Plate 2x8 (#3738)

2 no. - Technic Brick 1x12 (#3895)

2 no.   - Connector Peg with Cross Axle (#6562)
4 no.   - 3M Connector Peg (#32556)
4 no. - Connector Peg With Friction (#2780)

2 no. - Tire size 43.2 x 22 ZR with rims

Following are the photos show how to assemble parts:

Photo 1. Prepare two Technic Plate 2x4 (#3709b) and two nos. connector peg with cross axle(#6562)

Photo 2. Inserts Plate 2x4 (#3709b) to both side of the frame as shown. And inserts Connector Peg with Cross Axles (#6562) to axle on both sides.

Photo 3. Prepare two nos. of 1x12 Technic Brick (#3895) and four nos. of 3M Connector Peg (#32556).

Photo 4. Insert four 3M connector pegs into 1x12 brick as shown.

Photo 5. Insert both assembled parts to the frame as shown.

Photo 6. Prepare three 2x8 Technic Plate (#3738).

Photo 7. Turn the car frame upside down. Then snap three 2x8 plates on the frame as shown.

Photo 8. Prepare rear tires and rims (43.2x22ZR).

Photo 9. install the rear wheels to the axles.

Photo 10. Prepare two technic Brick 1x8 (#3702) and four no. of connector peg with friction (#2780).

Photo 11. Insert two connector pegs with friction (#2780) to each 1x8 brick s shown.

Photo 12. This is how the assembly look like.

Step 6: Steering and Front Wheels


Refer to R/C Lego Car Step 3: Steering System and R/C Lego Car Step 4: Servo for steering system and how to modified servo as used in this project.

Lego Parts used in this step:

Steering Gear Holder(#2790)
Steering Rack (#2791)
Steering Rack Top (#2792)
Steering Rack Bracket  8 pin Plate (#4262)
Steering Arm Drop Link (#4261)
8 Tooth Gear (#3647)

1 no. - Axle 3 with Stud (#6587)
1 no. - 1/2 Bush (#32123)

2 no. - Technic Brick 1x4(#3701)
2 no. - Slanted Brick1x6  (#2744)

2 no. - Tire size 30.4 x 14 VR with rims

1 no. - 1x4 Flat Tile (#2431)
2 no. - Plate 1x2 (#3023)
2 no. - Plate 1x4 (#3710)
1 no. - Plate 2x6 (#32001)

Following are the photos show how to assemble parts:

Photo 1. Prepare Front steering system assembled and front wheels. Steering Rack Bracket  8 pin Plate (#4262). And 1x4 Flat Tile (#2431).

Photo 2. Install 1x4 Flat Tile (#2431) as shown.

Photo 3. Turn the assembled steering system upside down. And install both slant bricks (#2744 ) as shown.

Photo 4. Turn the car frame upside down and install it as shown.

Photo 5. Install the steering bracket plate (#4262) to the steering assembly as shown. And prepare 2x6 plate (#) and modified 2x2 plate for servo support with the servo installed.

Photo 6. While the car assembled still upside down, install the 2x6 plate (#32001) as shown.

Photo 7. Turn the car assembled car up, then install the servo to the position as shown.

Photo 8. Set (rotate) the steering system to the forward position, and snap the servo horn to the servo.

Photo 9. The servo and the steering system at the finished position.

Photo 10. Prepare 2 no. Technic Brick 1x4 (#3701) and 2 no. 1x4 Plate (#2431).

Photo 11. Set 1x4 brick on top of 1x4 plate  as shown.

Photo 12. Install the assembled 1x4 brick and 1x4 plate next to the servo as shown.

Photo 13. Install the second assembled 1x4 brick and 1x4 plate next to the servo as shown.

Step 7: Battery Compartment


Lego Parts used in this step:

4 no. - Technic Brick 1x2 (#3700)
1 no. - Technic Brick 1x2 with 2 Holes (#32000)
2 no. - Technic Brick 1x4(#3701)
1 no. - Technic Brick 1x6 (#3894)
2 no. - Technic Brick 1x8 (#3702)
2 no. - Technic Brick 1x12 (#3895)

2 no. - Technic Brick Angular 1x1 (#4070)

1 no. - Plate 1x3 (#3623)
1 no. - Plate 1x4 (#3710)
4 no. - Plate 1x6 (#3666)
2 no. - Plate 1x8 (#3460)

4 no. - Connector Peg With Friction (#2780)
2 no.   -  Connector Peg with Knob (#4274)

4 no. - Plate 1x1 Transparent (#30008)

Following are the photos show how to assemble parts:

Photo 1. Prepare two nos. of 1x8 Technic Brick(#3702).

Photo 2. Insert 1x8 bricks(#3702) to existing pegs as shown on both side of the car frame.
And prepare 2 nos. of Connector Peg with Knob (#4274), 2 nos. of 1x4 Technic Brick(#3701)m, and 4 nos. of Connector with frictions(#2780).

Photo 3. Insert connector with knob(#) to 1x4 brick as shown.

Photo 4. Insert four connector peg with friction to 1x4 brick as shown.

Photo 5. Insert the previously assembled parts to the car frame on both side as shown.

Photo 6. Prepare 1x12 Technic Bricks(#3895) and 1 no. - 1x3 Plate(#3623)

Photo 7. Install 1x3 plate(#3623) as shown.

Photo 8. Install both 1x12 Brick(#3895) on both side of the car frame as shown. Then prepare four nos. of 1x6 plate(#3666) and 2 no. - Technic Brick Angular 1x1 (#4070).

Photo 9. Install two nos. of 1x6 plate next to 1x12 Brick previously installed.

Photo 10. Install Technic Brick Angular 1x1 (#4070) as shown.

Photo 11. Install the others two 1x12 Brick, and angular brick to the other side of car frame. And prepare 4 no. - Transparent Plate 1x1 (#30008).

Photo 12. Stack up two transparent plate  (#30008)  on top of each other to make two of them. Then place them on the car frame as shown.

Photo 13. Prepare 4 nos. of 1x2 Technic Brick (#3700) and place them as shown.

Photo 14. Prepare 1 no. - 1x8 Plate(#3460) and place it as shown.

Photo 15. Prepare 1 no. - Technic Brick 1x6 (#3894) and place it as shown.

Photo 16. Prepare Arduino and motor PCB and 1 no. - Plate 1x4 (#3710).
Place the PCB on the car frame, then place the 1x4 plate as shown.

Photo 17.  Prepare 1x2 Brick(#32000) in the position as shown.

Photo 18. Prepare 1x8 Plate (#3460) and place it as shown.
Note: This 1x8 plate and 1x2 brick from last photo are used to hold the PCB in place without using any fastener to hold the PCB in place.

Photo 19 and 20. Show the void area underneath the PCB where the battery resided.

Photo 21. Shows the completed assembly of car body. with the XBee module installed. I used XBee module with Breakout board to test the Arduino and motor PCB before move further to RN-XV module on this car. By using the same sketch and Processing GUI that I already have from R/C Lego Car project.

Next step, I am going to show how to assemble the rear wing flap.

Step 8: Rear Wing Flap


Lego Parts for Rear Wing Flap:

1 no. - Panel Fairing #5 (#32527)
1 no. - Panel Fairing #6 (#32528)
2 no. - Lift arm 3 x 5 L-Shape with Quarter Ellipse Thin (#32250)
1 no. - Lift arm 3x3 (#32249)
2 no. - Lift arm 2x4 L shape (#32140)

2 no. - Technic Brick 1x4, Black (#3701)
3 no. - Cross Axle 6M  (#3706)
2 no. - Connector Peg with Cross Axle (#6562)
4 no. - Connector Peg (#3673)
1 no. - 2M Cross Axle with Groove (#32062)
4 no. - Bush for Cross Axle (#6590)

1 no. - Technic Brick Angular 1x1 (#4070)
1 no. - Plate 1x6 (#3666)
2 nos. - Plate 1x2 (#3023)


Following are the photos show how to assemble parts:

Photo 1. All the necessary parts for the rear wing flap.

Photo 2. Insert Bush for Cross Axle (#6590) into 6M Cross Axle(#3706) as shown.

Photo 3. Insert both Liftarm 3 x 5 L-Shape with Quarter Ellipse Thin (#32250) into Cross Axles as shown.

Photo 4. Insert both Liftarm 2x4 L shape (#32140) to Cross Axle as shown on both side.

Photo 5. Insert Lift arm 3x3 (#32249) into Cross Axle on both side as shown.

Photo 6.  Prepare 2M Cross Axle with Groove (#32062) and insert into the position as shown.

Photo 7. Insert the third Cross Axle 6M  (#3706) through here.

Photo 8. Prepare Panel Fairing #5 (#32527), Panel Fairing #6 (#32528), 2 no. of Connector Peg with Cross Axle (#6562), and 2 no. of Connector Peg (#3673).

Photo 9. Insert Connector Peg (#3673) into hole of Panel Fairing #5 (#32527) and Panel Fairing #6 (#32528) as shown.

Photo 10. Insert Connector Peg with Cross Axle (#6562) into openning of  Panel Fairing #5 (#32527), Panel Fairing #6 (#32528) respectively as shown.

Photo 11. Install assembled Panel Fairing #6 here.

Photo 12. Install assembled Panel Fairing #5 here.

Photo 13. Prepare 2 nos. - Connector Peg (#3673) and 2 nos. - 1x4 Technic Brick(#3701).

Photo 14.Insert Connector Peg (#3673) into 1x4 Technic Brick(#3701) as shown.

Photo 15. Install the 1x4 Brick and connector on both side.

Photo 16. Prepare 2 nos. - Bush for Cross Axle (#6590) and install them as shown.

Photo 17. The completed rear wing flap.

Photo 18. To install rear wing flap onto the car we needed 1 no. 1x6 Plate(#3666), 2 nos. -Technic Brick Angular 1x1 (#4070), and 2 nos. - 1x2 Plate(#3023).

Photo 19. Turn the car upside down, and install 1x6 Plate (#3666) as shown.

Photo 20. Turn the car back to normal upright, and install Angular 1x1 (#4070) Bricks as shown.

Photo 21. Install 1x2 Plates as shown.

Photo 22. And That's it! Done! This photo shows the RN-XV module installed.



Step 9: Use Palm Arduino V3 and DIY Motor Driver PCB

This Step is showing an alternative to use Palm Arduino V3, style 4 instead of DIY Arduino board. 

Lego Parts used in this Step:

4 nos. 1x1 Technic Brick (#6541) or 1x1 Angular Brick (#4070)

Installation of Palm Arduino and In situ Lego case are shown in description text box in Photos below.

Step 10: User Interface Design

Picture of User Interface Design
Design02.jpg
LegoRaceCar500.JPG
One challenge I had to do was to create the the PHP script and to design a web page GUI to fit the iPod Touch screen. Since I already had the Processing GUI (designed for R/C Lego Car and  R/C Car with XBee Module projects), I could used it as the template. And I could used the same Arduino Sketch because WiFly RN-XV module uses Serial Communication just like XBee does, so I could used  the same Arduino sketch as in the previous Lego R/C Car.

In reality, Formula 1 Race Car only have constrain amount of the dashboard. All  the dashboard UI are shrink down to fit on the steering wheel, for example, McLaren Mercedes, Ferrari, and BMW teams, etc.

Since my intention of using iPod Touch as a controller that user will hold it in their hand(s). So, I designed my Web GUI to use that similar concept, the dashboard that would fit it iPod (or iPhone) display screen.

Following photos show the final design that I use as a controller GUI.


Step 11: RN-XV Module Configuration

RN-XV Module
  • is a Certified WIFI solution
  • is based upon Roving Networks's robust RN-171 Wi-Fi module
  • the module is pre-loaded with Roving firmware to simplify integration and minimize development time of your application
  • the hardware only requires four connections (PWR, TX, RX and GND) to create a wireless data connection
  • incorporates 802.11 b/g radio, 32 bit processor, TCP/IP stack, real-time clock, crypto accelerator, power management unit and analog sensor interface
  • support ad-hoc mode so you can have them connect and talk among themselves
  • use 3.3V power consumption 
  • if your project is set up for XBee and you want to move it to a standard WiFi network, you can drop this in the same socket without any other new hardware

A link to RN-XV (pdf) datasheet, and a link to RN-XV (pdf) user manual


Setting up RN-XV Module

From ClubJameco document http://www.jameco.com/Jameco/Products/ProdDS/2163680KitInstructions.pdf

For Windows (XP) User:

You can download instruction from ClubJameco's XB-Buddy Basic Kit Instructions on how to use RN-XV module with XB-Buddy Basic Kit or follow the instruction below.

Installing FTDI Driver - Virtual Comm. Port

To use USB to Serial Converter i.e FTDI Cable, XB-Buddy, Adafruit's FTDI Friend, Sparkfun's as the Serial Communication between computer  and micro controller we need to install a driver (Virtual Comm Port).
Note: I used XB-Buddy Basic Kit and FTDI cable in this presentation.

To configure RN-XV WiFi module we are going to use the different commands set than the AT commands. (see image 4 and 5)

First, Install the RN-XV WiFi module on XB-Buddy. Plug the RN-XV WiFi module (not included in the kit.) on XB-Buddy Basic Kit.

Connect XB-Buddy Basic Kit to FTDI cable. Insert USB end from FTDI cable to USB port on the PC or laptop.

Click Start button on the Windows desktop

Click All Programs tab to bring up the menu list

Click Accessories->Communication->HyperTerminal

HyperTerminal display dialogue box asking whether you want to make HyperTerminal to be default telnet program? It's up to you to choose the Yes or No button.

The HyperTerminal New Connection window opens with another dialogue box asking for name and icon of the new connection.

Type TestXBuddy in the Text box. Choose an icon for your new connection or click OK button to use default icon and start HyperT erminal.

The Connect To dialogue appears, select XB-Buddy COM port name, mine is COM4.

The next dialogue, COM4 Properties appears. Set the Bits per second to 9600, Data bit to 8, Parity to None, Stop bits to 1, and
Flow control to None. And click OK button.

There is one more step to do before we can start using Hyperterminal to configure XBee module.
Click at Disconnect/Hang up icon on the menu bar.

Select File->Properties from the main menu bar.

The TestXBuddy Properties dialogue appears. Click at Setting tab, and click at ASCII Setup... button.
Checks Send line ends with line feeds.

Do not check Echo typed characters locally, as we did in Step 12. If we leave this step checked, we will see double echo of characters we type. Also, do not check Append line feeds to incoming line ends.

In the HyperTerminal windows, click connect button.

Type $$$, then wait for the RN-XV module to respond after a few second.

We will not see the $$$ as we type, but we will see the CMD response instead, because we disabled the characters echo earlier.

Type set wlan ssid and hit Enter key. Wait for the RN_XV to respond with AOK.

Type set wlan phrase and hit Enter key.

Wait for the RN_XV to respond with AOK.

Type save and Enter key

Wait for the RN_XV to respond with Storing in config.

Type reboot and hit Enter key. Wait for the RN_XV to respond with lots of information, i.e IP Address, MAC Address,
andconfirmed that RN-XV is joining your network now. That's it. Your RN_XV WiFly is connected to WiFi network!



For MAC OS User:

To use USB to Serial Converter i.e FTDI Cable, XB-Buddy, Adafruit's FTDI Friend, Sparkfun's as the Serial Communication between computer  and micro controller we need to install a driver (Virtual Comm Port).
Note: I used XB-Buddy Basic Kit in this project.

Installing FTDI Driver - Virtual Comm. Port. (See datails, Step 3 of Processing Controls R/C Car with XBee modules Project.)

Install CoolTerm for MacOS. I found that it is a lot easier to use CoolTerm, terminal program, than Terminal App. that came with MacOS. But if you familiar with the Terminal App. you can use it. For those who wants to use CoolTerm see details in Step 9- Install CoolTern for MacOS. (image 6 - 11)

To configure the RN-XV module with MacOS is not different from doing it in Windows OS. Following are the steps to configure the RN-XV module on MacOS:

Insert xB-Buddy with RN-XV WiFly  module installed, to USB port.
Click at “Options” button on the menu bar.

The available xB-Buddy serial port shows up on the Serial Port: list. If not, just click at “Re-Scan Serial Ports” button.
Then click "OK" button.

Set Baudrate to 9600
Data Bits to        8
Parity to              none
Stop Bits to        1
And select "Terminal" from the list on the left-hand window. And click "OK"

Check at the checkbox in front of "Local Echo". Click “OK” to save the settings, then close the “Options” window.

Click at “Connect” icon.

- Type $$$ (you should now see CMD on you telnet screen)
- Perform the commands:

Following is what it look like in  the Terminal Program,


Step 12: PHP and Apache on Mac OSX

Picture of PHP and Apache on Mac OSX
MacOSphp001.jpg
MacOSphp003.jpg
MacOSphp002.jpg
I am using PHP to create the GUI and send the commands from the personal web site (server) on my Macbook and use my iPod touch to use the GUI file(php/html) to control the Lego Race Car.

First we need to make sure that our PHP on the MacBook is enabled, and we also need to set the Apache Web Sharing to ON

What is PHP?
PHP - common scripting language for applications that run on the web server, that allow you to do a lot of things for example, save data from the web session, send mail, etc.

What is Apache?
Most of the time, you won't be excuting the PHP scripts directly from the command line. Instead, you'll be calling the web server application on your server, most likely a prgram called Apache, and asking for a file (this is accomplished simply by openning a web browser, typing in the address of a cocument on your web server, and press Enter (just like visiting any web site). If the file you ask fo is PHP script the web server application will look for your file and execute it. It'll then send a message back to you with the results.

Install & cofigure Apache, MySQL and PHP on OSX Lion 10.7 & 10.6
Apache
Set Web Sharing to ON
Web sharing allows users of other computers to view webpages on their computer

Your personal website, in the Sites folder in your home folders, is available at
http://192.168.1.xxx/~username/

Your computer's website is available at this address:
http://192.168.1.xxx/

Computers on your local network can access your computer at:
Sams-MacBook-Air.local

Personal web sharing folder is located at
Macintosh HD->Users->~username->Sites->

At the user level in Lion 10.7 you may need to create the presonal web sharing folder first, do this through the
System Preferences > Sharing > Web Sharing
then click "Create Personal Website Folder"
if it is created this will say "Oepn Personal Website Folder"

- Verify that PHP is loaded and ready to go
1. Create phpinfo.php with text editor of your choice
2. Type the content of the file




3. Save file phpinfo.php to Sites folder in your home directory.

Sample PHP scripts
Example 1: hello.php



To use, at command line type hello.php
output:

<html><<head></head><body>
Hello, Instructables!
</body></html>

Open the browser,i.e. Safari, open the file hello.php in the link


Step 13: Conclusion

At time of this post, although the web page application is completed, and working. But yet still have some bug and needed a few tweaks. The full source code will be available as soon as it is stable.

Photos and Videos

Below are some photo of finished Lego Race Car, and video shows the bench test of Lego Race Car with XBee module.




sahirbray7 months ago
What's is the distance it can go with you stationary?
nfrith2 years ago
Very cool. You've improved significantly on the previous design, and the mobile integration is excellent.
sath02 (author)  nfrith2 years ago
Thanks for your kind words.
Looking forward to see the one you are building for your son.
nfrith sath021 year ago

Finally got the 'ible up for mine http://www.instructables.com/id/Lego-Technic-Car-with-Arduino-XBee-Wireless-Contro/, crude but efficient.

I see you've been rather busy :)

xujiaqiang1 year ago
seem that your RN-XV do not run in AP mode, so RN-XV have to join a wifi network, also there must be a web server runing apache and php in the network, all these bring great limitation. Now I have a similar project that RN_XV create a wifi network to which mobile devices can join, they exchange data with tcp protocol, no server needed.
rch52 years ago
very well !
sath02 (author)  rch52 years ago
Thanks!
MarkML2 years ago
Awesome!
sath02 (author)  MarkML2 years ago
Thanks! :)
thebluebulk2 years ago
very kewl! i <3 legos
sath02 (author)  thebluebulk2 years ago
Thanks :)
onrust2 years ago
Nicely done. Not to mention that car is just sexy!
sath02 (author)  onrust2 years ago
Thanks :)
JonnyBGood2 years ago
Cooler than the last one. I like the more aerodynamic look, which reminds me of a formula one car.
sath02 (author)  JonnyBGood2 years ago
Thanks.
You got it, Johnny! Yes, my intention was to make it look like F1 car.
Alright! I still haven't got around to making one yet, but there hasn't been any rc cars I've felt like disassembling either...
J-Five2 years ago
Pure genius!!!
sath02 (author)  J-Five2 years ago
Thanks.
WWC2 years ago
Excelent as usual
sath02 (author)  WWC2 years ago
Thanks.
rubiksqub2 years ago
wow! Great job!
sath02 (author)  rubiksqub2 years ago
Thanks.