Skip to content

LKneringer/Alturos.PanTilt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alturos.PanTilt

Alturos.PanTilt

This project delivers an interface for general pan tilt communication. Additionally we deliver an implementation for Eneo VPT-601 unit. We have three different communication providers udp/tcp/serial available.

The library supports the following primary features

  • Move to absolute position
  • Move with relative speed
  • Position feedback
  • Get limits

And some Eneo special features

  • Set limits
  • Get temperature
  • Set relay

nuget

The package is available on nuget

PM> install-package Alturos.PanTilt

Network communication to RS-422/RS-485

Do you want to talk about the network with your pan tilt unit you can use a serial device server.

Manufacturer Product Communications
iccdesigns.com ETH-1000 RS-485
moxa.com NPort 5130 RS-422/RS-485
atop.com.tw SE5001 RS-422/RS-485
aten.com SN3101 RS-422/RS-485

Examples

Move to position pan 50° and tilt 0° with udp communication

var ipAddress = IPAddress.Parse("192.168.1.10");
using (ICommunication communication = new UdpNetworkCommunication(ipAddress, 4003, 4003))
using (IPanTiltControl control = new EneoPanTiltControl(communication))
{
	control.PanAbsolute(50);
	control.TiltAbsolute(0);
}

Move to position pan 50° and tilt 0° with tcp communication

var ipAddress = IPAddress.Parse("192.168.1.10");
using (ICommunication communication = new TcpNetworkCommunication(new IPEndPoint(ipAddress, 4003)))
using (IPanTiltControl control = new EneoPanTiltControl(communication))
{
	control.PanAbsolute(50);
	control.TiltAbsolute(0);
}

Move to position pan 50° and tilt 0° with serial communication

var serialPort = "COM1";
using (ICommunication communication = new SerialPortCommunication(serialPort))
using (IPanTiltControl control = new EneoPanTiltControl(communication))
{
	control.PanAbsolute(80);
	control.TiltAbsolute(0);
}

Activate pt head position feedback

var serialPort = "COM1";
using (ICommunication communication = new SerialPortCommunication(serialPort))
using (IPanTiltControl control = new EneoPanTiltControl(communication))
{
	control.Start();
	Thread.Sleep(200); //delay for response, only need if you stop very fast
	var currentPosition = control.GetPosition();
	//example: {0,02/0,98}
	control.Stop();
}

About

C# Pan Tilt unit control (Eneo VPT-601)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 98.4%
  • PowerShell 1.6%