Hi:
From the PC, I can be controlled by software with Visual C # 2013 open and close the DVD tray. Your code is this.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Runtime.InteropServices; // No olvidar.
namespace Lector_IDE
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
[DllImport("winmm.dll")]
public static extern Int32 mciSendString(string lpstrCommand,
StringBuilder lpstrReturnString, int uReturnLength, IntPtr hwndCallback);
//Why did i put this here?
StringBuilder rt = new StringBuilder(127);
private void button_Abrir_Click(object sender, EventArgs e)
{
mciSendString("set CDAudio door open", rt, 127, IntPtr.Zero);
label1.Text = "Abierto";
}
private void button_Cerrar_Click(object sender, EventArgs e)
{
mciSendString("set CDAudio door closed", rt, 127, IntPtr.Zero);
label1.Text = "Cerrado";
}
}
}
My idea is to control the reader is only SATA IDE Arduino or technology. If anyone has experience in this field, any information is welcome to start.
I want to do what this video down or something similar.
Greeting.