
Copyright © 2014, Dr Robot Inc. All Rights Reserved.
www.DrRobot.com
V20.12.14
- 23 -
To turn left with full power
myJaguar.DcMotorPwmNonTimeCtrAll(0,0,NOCONTROL,0,0,NOCONTROL);
To turn right with full power
myJaguar.DcMotorPwmNonTimeCtrAll(32767,32767,NOCONTROL,32767,32767,NOCO
NTROL);
For encoder speed/position control of each motor, you could referee “DrRobot
Jaguar4X4 Motor Control Demo” program and you could find the source code in the
installation folder.
To control head lights, using expanded IO port bit7.
Turn off light:
myJaguar.SetCustomDOUT(expandedIO & 0x7f);
Turn on light: myJaguar.SetCustomDOUT(expandedIO | 0x80);
Software watchdog: The system will automatically, stop all the motors if it does not received any data package in
5 seconds.
Laser Scanner
Laser Ranger sensor (4m version, URG-04LX) is connected to Ethernet module–1 port 2 after voltage level
conversion. You could access the sensor data via TCP socket at port 10002 with IP 192.168.0.60.
Default settings for the serial port are: 115200, 8, N, 1, no flow control, TCP, port number 10002
Date and communication protocol could be found in “URG-04LX commspec_eg.pdf”.
GPS
GPS sensor output interface is RS232 serial port, and connected to Ethernet module-2 port 2 after voltage level
conversion. You could access the sensor data via TCP socket at port 10002 with IP 192.168.0.61.
Default settings for the serial port are: 115200, 8, N, 1, no flow control, TCP, port number 10002
NMEA 0183 sentence is described in file “GPS18x_TechnicalSpecifications.pdf”. GPS configuration tool is
SNSRXCFG_200.exe
9 DOF IMU (Gyro/Accelerometer/Compass)
The output interface for this IMU sensor module is serial port. It is connected to Ethernet module-2 port 1. You
could read from this sensor via TCP port 10001 at IP 192.168.0.61. Serial Port Settings: 57600, 8, N, 1, no flow
control, TCP, port number 10001. The sensor output rate is 50Hz (20ms) with output format of ASICII.
It’s easier to read with a terminal program since the sensors’ measurements are reported in ASCII. All
measurements are delimited with “,”characters as well as a carriage return and line feed at the end of the data
frame.
Format:
“$seq,accelX,accleY,accelZ,,gyroX,gyroY,gyroZ,magnetomX, magnetomY, magnetomZ#”
"seq" is data package sequency number, value is in range: 0 ~255.
After “seq”, the data are raw AD value for each sensor.
Sample data string:
“$2,9,1,255,20,40,3,235,4000,20#”
Please note the magnetic sensor will be measured every 220ms, so if the output value is 0, means no new
magnetic sensor data in this data package.
Comentários a estes Manuais