Hey guys ...
I'm trying to control arduino robot using Rf modules.I'm using very cheap fs1000a RF module.
I connected transmitter to Arduino ... and i connected Receiver to Computer using TTL to USB converter (PL2303)
and i create C# app As Receiving Interface.
So im trying to send data from arduino to computer.I have no idea ,How to do that.
i create a simple app to Know that Am i getting any kind of signal trough the serial port.
it's working ...im getting some numbers.
I will add Code below ..
The Arduino Code
void setup()
{
pinMode(3,OUTPUT);
}
void loop()
{
digitalWrite(3,HIGH);
delay(50);
digitalWrite(3,LOW);
delay(50);
}
The C# Code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
namespace V_Wire
{
public partial class Form1 : Form
{
SerialPort Rxprt;
Byte inputbyte;
int msg = 0;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Rxprt = new SerialPort("COM27", 2000);
}
private void button1_Click(object sender, EventArgs e)
{
try
{
Rxprt.Open();
}
catch
{
MessageBox.Show("Connection Stablishing Faild", "Status");
}
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
if (Rxprt.IsOpen == true)
{
msg = Rxprt.ReadByte();
textBox1.Text = msg.ToString();
}
}
}
}
So does any one have any idea to send data using this method.
Any help Plz