Recent Changes - Search:

edit SideBar

LEDCubeAndDatagloveSetup

Back to mbed

Overview

The application is comprised of three main parts, the LED cube, the Dataglove, and a computer to bridge the connection. The LED cube is made up of Neopixel RGB LED strips, which cover three sides of a foam board cube with 10 by 10 arrays. This is power by an external power supply, and driven by an mbed FRDM-K64F. Also attached to the mbed is a CC3000 wifi module, which will be used to communicate with the Dataglove. The dataglove is the Virtual Realities DG5 Glove 3.0 with Wifi.

Setting up the LED Cube, mbed, and CC3000

The interface to the LED comprises of three parts, power, ground, and a single data pin. The ground should be shared between the mbed and the external power source. The power should be connected to a 4.5V power source (the reason for this is the logic on the mbed is not high enough trigger the data line at 5V). The data pin should be connected to the TODO: ADD PIN FOR MBED HERE pin on the K64F mbed.

The interface to the CC3000 is a bit more complex, but it should follow the pin assignments as follows

Pin Mapping for the CC3000 with mbed

    Pin name    SPI name	    Other name	Pin on KL25Z	Pin on K64F
    Vcc (Vin)	  - 	            P5V_USB	J9 10	                J3 10

    GND	          - 	            GND	        J2 14         	J2 14

    INT         SPI1_PCS0          PTD4	        J1 06	                J6 04

    EN          I2C0_SDA           PTC9	        J1 16	                J1 09

    CS	          SPI0_PCS0          PTD0	        J2 06         	J2 06

    MOSI      SPI0_MOSI          PTD2	        J2 08	                J2 08

    MISO      SPI0_MISO          PTD3	        J2 10         	J2 10

    SCK        SPI0_SCK           PTD1	        J2 12	                J2 12

The mbed should then be connected to a computer to download the computer. In order to download a .bin file from a mac, the following apple script can be used, simple drag the file to it when the mbed is connected:

 on run {input, parameters}
  do shell script "mount -u -w -o sync /Volumes/MBED" with administrator privileges
  set mbedFile to (input as text)	
  do shell script "cp " & quoted form of POSIX path of mbedFile & " /Volumes/MBED"
 end run

Setting up the DataGlove: Virtual Realities DG5 Glove 3.0

The DataGlove does come with some setup software that can run in Windows only. Currently, the dataglove is setup to connect to a router with the following information:

 SSID: CubeNet
 Password: modelbased

The computer, and CC3000 should also be connected to this network. Using Airbears will not work.

In order to configure the glove, you must be running windows, and connect the glove over USB. The software to help you do this is found here, if the link is not active, contact Virtual Realities. Navigate to the Software folder and run the setup from windows. You should be able to find and configure the glove over the USB. Do NOT update the firmware, this will brick the glove and you will not be able to use it.

The computer bridge

A computer is used to bridge the connection between the glove and the mbed. They should all be connected to the same network as mentioned before. The following program should be downloaded and built on a mac (linux would probably work too), from here. This program simply receives data packets from dataglove, down-samples it a bit (I think it will send 5 packets a second), then forwards it to the mbed. Unzip then navigate to the folder in terminal, and run make clean all to make sure the binary is up to date. To run the application, type in ./Client from here.

If this is ran on a new network, a static IP should be assigned for the mbed and the Dataglove (we did this using the MAC address on the router configuration). Under the MacClient folder, open main.cpp. Search for 192, and there will be two lines of code with the static IP Address. The first IP is the Data Glove, and the second is the mbed. Configure this to be the correct given by the router, or configure the router to give these IPs. They are currently:

 DataGlove: 192.168.1.160, Port: 2000
 mbed: 192.168.1.161, Port: 2000

Also on this file, there is a line that down samples the amount of packets, in our case we only send 1 in ever 10 packets (so it runs at 5Hz instead of 50Hz):

 //Down Sample the packets to only send 1 in every 10 received from the glove.
 if(receiveCount > 9)

Running the Application

Plug everything in, including the dataglove (the battery does not last long), and reset the mbed. The Dataglove can be a bit finicky, press the button a few times until the led lights up bright and stays that way. Once both of these are connected, run the computer bridge with ./Client and it should connect. It will display messages when it connects to the Glove, then the mbed. The application should now be running, triggered by the packets being sent from the dataglove.

To see how to create a model, see: Setting up a CG model for mbed

For Offline Libraray help, see: Offline mbed Library Setup

Edit - History - Print - Recent Changes - Search
Page last modified on May 15, 2015, at 03:02 PM