| ||||
|
The HeadArduinoTracker or HAT-tracker plugin was originally written by Furax49 and was adapted for FaceTrackNoIR v200 by Wim Vriend. It reads data-frames from the selected COM-port, checks the validity and then relays the data to FaceTrackNoIR.
The HAT-tracker also gives several options to relay commands from FaceTrackNoIR to the serial device, so it can handle "Start", "Stop" and "Center" commands itself.
If you have questions regarding the HAT-tracker plugin, please post them here: [discussion:hat]
// Arduino frame structure
#pragma pack(push,2)
struct TArduinoData
{
quint16 Begin;
// Header trame 0xAAAA;
quint16 Code;
// 0-999 = TRACKING (+frame counter), 1000-1999 = CALIBRATING
(+frame counter)
float Rot[3];
float Trans[3];
quint16 End;
// End trame 0x5555;
} ;
#pragma pack(pop)
A sample Arduino script can be found in the SourceForge Files section.
Please drop me an e-mail, if you want to interface with FaceTrackNoIR and need some help... I would also be interested in any projects using FaceTrackNoIR. Quite a number of "serious" applications can be enhanced with head-tracking!
The current version of the HAT-Tracker is part of the free PluginPack that's available for download from SourceForge. You can find the latest version here:
Serial port: select the COM-port here. In the example, a Bluetooh COM-port was used.
Zero, Center and Reset: send a command to the serial device. You can configure these on the Command tab .
Axis Configuration: per axis (from the HAT-frame) you can select which FaceTrackNoIR axis to assign it to, whether to enable it and if the value should be inverted.
Arduino Commands:
Here you can configure whichs character or string to send to the Arduino, following a command from FaceTrackNoIR.
Generally it may not be necessary to interrupt the serial device at all. In the example, only the "Center" command is handled by the Arduino. When the text-box for "Center" contains one or more characters, FaceTrackNoIR will not perform this command itself (to prevent double-centering).
Serial Parameters:
Here you configure the port-settings for the COM-port.
These are pretty self-explanatory.
Here you can send "custom" commands to the serial device and monitor the automated commands and their return-value(s).