Loading...
  Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Re: arduino + visual basic 2008 on: March 29, 2012, 04:03:43 am
ok, i already figure something. at our arduino board have TX abd RX 'pin' right ??

1) i try to modified my coding and do xbee-xbee connection wirelessly (success).
2) i try to do vb-xbee by wired (success). the TX and RX light is blinking to when i click button on vb.

but, when i do vb-xbee(1st)-xbee(2nd) wirelessly..
1) the 1st xbee did not transmit any data to 2nd xbee
2) only RX light at 1st xbee is blinking.

what can i do to make it communicate wirelessly ?? can somebody help me?? please =___=".. i appreciate it.
2  Using Arduino / Project Guidance / Re: arduino + visual basic 2008 on: March 28, 2012, 05:07:01 am
thanx for helping SirNickity, i'll fix it.. smiley-grin
3  Using Arduino / Project Guidance / Re: arduino + visual basic 2008 on: March 27, 2012, 07:17:09 pm

It looks to me like you have not configured your XBees correctly. You haven't even mentioned what kind they are, or how (or even if) you have configured them.

i did configure it like you told before in another forum(topic)..and it's work when i insert the coding like below.. only when i add some coding to make it works with vb, it didnt blink at all. here is the code without inserting vb..

transmitting part
Code:
void setup ()
{
  Serial.begin (9600);
  }

void loop ()
{
  Serial.print ('H');
  delay (2000);
  Serial.print ('L');
  delay (2000);
}

receiver part is same like previous..i did not change anything..
4  Using Arduino / Project Guidance / arduino + visual basic 2008 on: March 27, 2012, 06:44:34 am
hi, i need somebody to help me solve this easy programming.. i tried running simple programming, blinking 3 LEDs at different pin at arduino and control it using VB 2008 and it is works. however, when i tried to do same command bt only blink 1 LED at receiver (pin 13), by using 2 arduinos+xbees as tx and rx, it didnt blink at all.

for transmitting part
Code:
int SerialData = 0;

void setup ()
{
  Serial.begin (9600);
  }

void loop ()
{
  SerialData = Serial.read ();
 
  switch (SerialData)
  {
    case 10:
    Serial.print ('H');
    break;
   
    case 20:
    Serial.print ('L');
    break;
  }
}

for receiving part
Code:
const int ledPin = 13;
int incomingByte;

void setup ()
{
  Serial.begin (9600);
  pinMode (ledPin, OUTPUT);
}

void loop ()
{
  if (Serial.available () > 0)
  {
    incomingByte = Serial.read ();
    if (incomingByte == 'H')
    {
    digitalWrite (ledPin, HIGH);
    }
    if (incomingByte == 'L')
    {
    digitalWrite (ledPin,LOW);
    }
  }
}

visual basic code
Code:
Imports System.IO.Ports.SerialPort

Public Class Form1

    Private Sub form1_formClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        If serialport1.IsOpen Then
            SerialPort1.Write(ChrW(100))
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim ports As String() = GetPortNames()
        Dim Port As String

        CbbComport.Items.Clear()

        If ports.Length > 0 Then

            For ii As Integer = 0 To (ports.Length - 1)
                If CInt(ports(ii).Substring(3)) < 10 Then
                    ports(ii) = "COM" & ports(ii).Substring(3)
                End If
            Next

            Array.Sort(ports)

            For ii As Integer = 0 To (ports.Length - 1)
                ports(ii) = "COM" & ports(ii).Substring(3).Trim
            Next

        End If

        For Each Port In ports
            CbbComport.Items.Add(Port)
        Next Port

        BtnConnect.Enabled = False
        BtnDisconnect.Enabled = False

    End Sub

    Private Sub BtnConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnConnect.Click

        Try

            BtnConnect.Enabled = False
            BtnDisconnect.Enabled = True
            CbbComport.Enabled = False

            SerialPort1.PortName = CbbComport.Text
            SerialPort1.BaudRate = 9600
            SerialPort1.Open()

            Timer1.Enabled = True

        Catch ex As Exception

            BtnConnect.Enabled = True
            BtnDisconnect.Enabled = False
            CbbComport.Enabled = True

        End Try

    End Sub

    Private Sub BtnOn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnOn.Click
        If SerialPort1.IsOpen Then
            SerialPort1.Write(ChrW(10))
        End If
    End Sub

    Private Sub BtnOff_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnOff.Click
        If SerialPort1.IsOpen Then
            SerialPort1.Write(ChrW(20))
        End If
    End Sub

    Private Sub CbbComport_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CbbComport.SelectedIndexChanged
        BtnConnect.Enabled = True
        BtnDisconnect.Enabled = False
    End Sub
End Class

i need to know why is my LED at reciver part didnt blik at all..please help me.. thanx
is it i have to change my serial.print () to digital.read () at transmitter part??
5  Using Arduino / Interfacing w/ Software on the Computer / Re: Interfacing Arduino with PC (2-way communication) on: March 12, 2012, 08:50:15 am
thanx again.. my friend ask, can we use x-ctu version 5.2.7.5 for 64bits window 7??
6  Using Arduino / Interfacing w/ Software on the Computer / Re: Interfacing Arduino with PC (2-way communication) on: March 10, 2012, 11:19:52 am
did u mean like this module ?? i do have XBee 1mW Wire Antenna - Series 1 attach to the Arduino-XBee Shield .. is it ok ?? i think i do have that jumper on the xbee shield also... smiley-grin

Quote
There are jumpers on that shield that can be moved ....

7  Using Arduino / Interfacing w/ Software on the Computer / Re: Interfacing Arduino with PC (2-way communication) on: March 10, 2012, 06:04:11 am
ooo..thanx for helping...

i'm using Arduino-XBee Shield (without module)
8  Using Arduino / Interfacing w/ Software on the Computer / Re: Interfacing Arduino with PC (2-way communication) on: March 09, 2012, 06:38:32 pm
thanx PaulS  smiley ,

errr.. i just put wrong device ...
XBee 1mW Wire Antenna - Series 1 not series 2.. sorry for mistake...

so..in your opinion, can i use the tutorial i mention before ?? or do u have any suggestion  smiley-confuse  please help..  smiley-cry thank you..
9  Using Arduino / Interfacing w/ Software on the Computer / Re: Interfacing Arduino with PC (2-way communication) on: March 09, 2012, 03:36:20 am
hello.

i just want some advice/help  smiley

my project is about sending data from pc-xbee(Tx)-xbee(Rx)-fan. in simple words, i just want to switch on/off the fan.. however, i find it very hard to start but i think http://tutorial.cytron.com.my/2011/08/13/project-14-wireless-temperature-logging/ was a very good tutorial for my project right ??

i have ..

2 Arduino Duemilanove(Compatible)-Main Board
2 Arduino-XBee Shield (without module)
2 XBee 1mW Wire Antenna - Series 2

can i use this tutorial http://antipastohw.blogspot.com/2009/01/xbee-shield-to-xbee-shield.html to make my xbee communicate to each other first?? if not, can someone help to link other tutorial (similar to my project)?? please teach me... thanx~
Pages: [1]