by KRA5H
Download
22 Steps
Share
The Trakr is a remote controlled robot equipped with a microphone and color
video camera, speaker, a near infrared LED for night vision, an SD memory card
slot for recording audio/video and 8MB of on board memory for storing
downloadable and user designed programs. The remote control unit has control
levers to drive the robot, a speaker and color video display so you can hear the
audio picked up by the microphone and display the video transmitted by the
camera, and several function buttons that can be used to control additional
program functions of user designed programs. In this article we will demonstrate
how to hack the Trakr. We will show you how to download and install the C
language compiler for the Trakr. Next well explain how to compile a simple
program and install it on the Trakr and then run this simple program. Finally, we
will demonstrate how to open up the Trakr, attach jumper pins to the GPIO
connections on the mainboard of the Trakr and compile a simple program to flash
an LED connected to the GPIO pins. You will be able to confidently call yourself
an elite Trakr Hacker.
You'll need to download and install the C language compiler so that you can
write programs for the Trakr and compile your software into machine language
that the Trakr can understand. The C Language compiler is included in a fairly
complete software development kit (SDK) that the folks at Wild Planet call the
"Primer." So, download the Primer and save it on your computer where it'll be
easy to find by clicking the following link:
http://www.spygear.net/help/files/TRAKR_APP_PRIMER_V1.2.zip
the "app.c" file (the text file containing the source code) into a TRAKR program.
The compiler only looks for the "app.c" file in the current folder so always name
your source code app.c. Save your programs in separate folders with names
which make sense. This helps to keep all the various "app.c" files organized. As
shown in the screen shot, you'll want to run "make clean" in the
C:\Trakr\Internals folder. It reports all the files it is removing before returning the
prompt to you. Then type "make" at the command prompt and the compiler will
use the "makefile" to assemble all the parts of your program (which may include
many libraries, images and files specified by your code) into a .bin file to write to
the TRAKR hardware.
At the "C:\Trakr\Internals>" prompt type:
make clean
make
Your newly compiled program or app for the Trakr is called "Test.bin" and the
file will need to be copied to the Trakr. Make sure the Trakr is switched off and
connect it to your computer using the yellow USB cable that came with the Trakr.
Copy Test.bin to the APPS folder inside the Trakr folder. Disconnect the Trakr
from your computer and switch the Trakr on. Switch the Trakr remote on, click
the home button, and select Test from the menu. It's just a little app that tests all
the various functions that your Trakr can do such as motor tests, screen functions
and so on.
I'm going to show both, but you can do just the GPIO if you want.
I ordered part # PRT-10112 ($0.95) from Sparkfun http://www.sparkfun.com for
the JTAG header. It's 10 pins; we only need 7, so we can just snip off the extras.
For the GPIO, I ordered part # PRT-00116 ($1.50). It is a 40-pin header. Since we
only need 9 pins, that one part is enough for 4 Trakrs!
the speaker off of the left front leaving the pins sticking up from the board. It was
easy to reattach the connectors to the naked pins once I got the connector
separated. I just used a hot glue gun to reattach it to the mainboard.
A quick note. Gelfling6 commented on this instructable and pointed out the
following:
"The connectors for the speaker, and the push button, are not critical, since both
are non-polar. The MIC connector, however, IS! Make sure you put the socket
back exactly the same direction, or you could (a) fry the MIC element, and (b,
Obviously) the MIC will not pick up anything!"
If you accidently remove the whole connector, try to reconnect it back in its
original orientation on the circuit board.
The Trakr Hakr community are interested in improving their Instructables. If you
notice an error or something they've forgotten, let them know in the comments
section.
You can see how it was soldered in the upper left portion of the picture. When
you run the trakrmotorcontrol app and no button is pressed, nothing illuminates.
When button A is pressed, the green LED lights up; when button B is pressed, the
red LED lights up.
C Language code:
////////////////////////////////////////////
//LED flash program for Spy Video TRAKR
//Program scans to see if button A was
//pressed on TRAKR remote and sets GPC0 high
//and GPC1 low to send current through LED
//in forward bias direction (switched on).
//
//If button B is pressed, it sets GPC0 low
//and GPC1 high to send current through
//LED in reverse direction (switched off).
///////////////////////////////////////////
#include "svt.h"
#include "JAPI.h"
#define GPC0 (1<<0)
#define GPC1 (1<<1)
#define GPC2 (1<<2)
#define GPC3 (1<<3)
#define GPC4 (1<<4)
#define GPC5 (1<<5)
#define GPC6 (1<<6)
#define GPC7 (1<<7)
int keyState;
void Start()
{
JAPI_SetIoOutputMode(GPC0+GPC1);//Set output mode for pins GPC0 and
GPC1
}
bool Run()
{
keyState=GetRemoteKeys(); //TRAKR remote control key pressed
//assign to keystate
if (keyState > 0)
}
return true;
}
void End()
{
//Program end - switch off both pins
JAPI_SetIoLow(GPC0+GPC1);
}
Make file:
# Makefile for TRAKR Toy
# Trakr Project
TRACKR_PATH = C:/Trackr
PROGRAM_NAME = trakrmotorcontrol
PRETTY_NAME = trakrmotorcontrol
OUTPUT_PATH = ./Intermediate
OUTPUT_NAME = $(OUTPUT_PATH)/$(PROGRAM_NAME).elf
INTERNALS_PATH = ../Internals
SOURCES = app.c
S_OBJECTS = $(OUTPUT_PATH)/app.o
OBJECTS = $(S_OBJECTS) $(INTERNALS_PATH)/trakr.a
SHELL = sh
CC = arm-elf-gcc
AS = arm-elf-as
BIN = arm-elf-ld
LD = arm-elf-ld
TOPMEMORY=0xFFE7C000
CFLAGS = -O0 -I../Internals/Include -I../Internals -Wall -gstabs+
TARGET_FLAG = -mcpu=arm926ejs -mapcs-32 -mlittle-endian
-specs=specs.semi
LDFLAGS = -T ../Internals/WJ_APP_8M.ld -Wl,--defsym -Wl,__stack_base=$
(TOPMEMORY) -Wl,-Map -Wl,$(basename $@).map -nostartfiles -static
all: prebuild $(OUTPUT_NAME) postbuild
$(OUTPUT_NAME): $(OBJECTS)
@echo "Linking... "
@echo "Creating file $@..."
@$(CC) -u _start -o $@ $(INTERNALS_PATH)/trakr_start.a $(OBJECTS) $
(TARGET_FLAG) $(LDFLAGS)
$(OUTPUT_PATH)/app.o:app.c Makefile
@echo "Compiling $<"
@$(CC) -c -o "$@" "$<" $(TARGET_FLAG) $(CFLAGS)
.PHONY: clean prebuild postbuild
clean:
$(RM) -f $(PROGRAM_NAME).bin
$(RM) -f "$(PRETTY_NAME).bin"
$(RM) -f $(OUTPUT_PATH)/app.o
$(RM) -f $(OUTPUT_NAME)
$(RM) -f $(MKDEPFILE)
postbuild:
arm-elf-objcopy -O binary $(OUTPUT_NAME) "$(PRETTY_NAME).bin"
@if [ -d "E:/" ] ; then \
cp "$(PRETTY_NAME).bin" e:/APPS/ ; \
fi
prebuild:
# End of Makefile
When you compile the above code with the above make file, this will create a
Trakr App file called "trakrmotorcontrol.bin" and the file will need to be copied
to the Trakr. Make sure the Trakr is switched off and connect it to your computer
using the yellow USB cable that came with the Trakr. Copy trakrmotorcontrol.bin
to the APPS folder inside the Trakr folder. Disconnect the Trakr from your
computer and switch the Trakr on. Switch the Trakr remote on, click the home
button, and select trakrmotorcontrol from the menu.
You can use the trakrmotorcontrol app to control many different types of
electrical devices...motors, lights, relays, etc.
Hi. I need someone who can help me with software / hardware for capturing movement
on a mini camera. Will pay top dollar with help.
Flag
Flag
http://www.ti.com/tool/msp-exp430g2#buy
The cost is $4.30 USD.
Flag
Could you load it into your arduino's program memory and run it? No.
If you want to connect the Trakr's GPC0 and GPC1 pins to your arduino and
program it to do something when your arduino detects GPC0 and GPC1 are set
to high or low depending on which buttons are pressed on the Trakr remote,
then very probably yes.