Thanks so much for the prompt reply! I have used your Pololu Serial Transmitter and my whole setup works! Thanks! I have begun trying to program something similar to your program, and I am having difficulties trying to write the data onto the COM ports. Here's the code:
public partial class Form1 : Form
static SerialPort _serialPort3;
int channelNumber, target, realTarget, offset, count;
int serialBytes = int;
private void Form1_Load(object sender, EventArgs e)
private void textBox1_TextChanged(object sender, EventArgs e)
string a = textBox1.Text; // channel number in string
private void textBox2_TextChanged(object sender, EventArgs e)
string b = textBox2.Text; // target number in string
realTarget = Convert.ToInt32(b);
target = (realTarget*4);
private void button1_Click(object sender, EventArgs e)
serialBytes = 0x84;
serialBytes = channelNumber; // First data byte holds channel number.
serialBytes = target & 0x7F; // Second byte holds the lower 7 bits of target.
serialBytes = (target >> 7) & 0x7F; // Third data byte holds the bits 7-13 of target.
_serialPort3 = new SerialPort("COM3");
_serialPort3.Write(serialBytes, offset, count);
Basically, Once you enter the Target (in integer) in textBox2 and the channel in textBox1, it will save it to the array. But now, I am not sure about the datatype of the array.I read the serial servo commands section of the PDF guide and it say's Target and Channel are both integers....
Could you advise me on how I would be able to continue from here? I am a newbie to C# and programming in general.
Thanks so much!