Show Posts
Pages: [1] 2 3
1  Community / Website and Forum / forum is slow? on: January 26, 2011, 07:39:49 am
i just wanted to confirm is it my connection or is the new forum really slowing things a little bit.


thank you guys, anyways u do a wonderful job
2  Forum 2005-2010 (read only) / Interfacing / Re: how to use Cellular Shield with SM5100B on: December 31, 2010, 08:29:16 am
please pals one urgent request, is this module alone is enough ( anything else to be bought along with it? ) and can it be interfaced to arduino uno!

please reply guys.


thanks
3  Forum 2005-2010 (read only) / Interfacing / Re: Control arduino via the web on: January 13, 2011, 09:53:25 am
download this tutorial it has verything right from installing to programming of php
http://btjunkie.org/torrent/Lynda-com-PHP-With-MySQL-Essential-Training-DVD/435856189f982f6d1320494b2ffdcf70e3ff2c76150f
4  Forum 2005-2010 (read only) / Interfacing / Re: php arduino please help on: January 13, 2011, 09:51:16 am
k i found one thing for sure php serial class is NOT BI DIRECTIONAL for windows............................ ( for until now atleast)

you can send data to arduino with EASE

but the reverse is not possible ( again until now)
5  Forum 2005-2010 (read only) / Interfacing / Re: php arduino please help on: January 07, 2011, 09:30:07 am
k, i understood one thing ... from your reply

my idea was to implement a rfid +arduino + webpage ( using php ) to implement a targeted advertisement....

but now i am clear that web page need not necessarily be written in php but i could use flash which which too could be interfaced with arduino easily... thank you

going with flash for website design...
6  Forum 2005-2010 (read only) / Interfacing / Re: php arduino please help on: January 07, 2011, 06:22:22 am
thank you ! but i am collecting this information for my final year project so that i could go ahead and purchase stuff only after confirming that those works...

anyway  thank you..
7  Forum 2005-2010 (read only) / Interfacing / Re: php arduino please help on: January 06, 2011, 12:00:32 pm
thanks a lot for the reply i understood the example.php and php_serialclass.php from your explanation but one thing still is not clear...

let me put it this way to communicate with arduino using the serial class need i have to buy a rs232 converter to connect arduino to rs232 serial port in my computer or is the usb interface enough...


one more too
 i found this link in google code where a guy has written code for read function in php serial class does this work?

the link is : http://code.google.com/p/php-serial/issues/detail?id=1#c0

thank you
8  Forum 2005-2010 (read only) / Interfacing / Re: php arduino please help on: January 06, 2011, 11:14:06 am
http://www.phpclasses.org/package/3679-PHP-Communicate-with-a-serial-port.html

a little info i downloaded the above two files ( prev post ) from here..

please help guys
9  Forum 2005-2010 (read only) / Interfacing / php arduino please help on: January 06, 2011, 10:34:42 am
i may sound a little dumb but please answer ...

1. I learnt about php serial and found that it could be used to communicate with arduino via serial port but i can't seem to figure out whether it is rs232 or usb port ... (please clarify )

2. i downloaded these  two php files from phpserial class website

php_serial.class.php and example.php

my question is are they standalone like just modifying example.php with the function we would need it to perform would allow communication to arduino?  

please reply..

10  Forum 2005-2010 (read only) / Interfacing / Re: vb arduino please help on: January 13, 2011, 09:34:40 am
k i never thought that. will change that now
11  Forum 2005-2010 (read only) / Interfacing / Re: vb arduino please help on: January 13, 2011, 07:05:41 am
I am documenting all the stages of my project in http://www.frankey.webs.com . thank you all . please continue to guide me. thanks all.
12  Forum 2005-2010 (read only) / Interfacing / Re: vb arduino please help on: January 13, 2011, 06:26:34 am
i used visual studio 2010 ( it had vb6) i think that you too are takling about the same .... but don't know for sure
13  Forum 2005-2010 (read only) / Interfacing / Re: vb arduino please help on: January 11, 2011, 12:39:05 pm
thanks a lot for all your help i finally got eberything lined up and working
 i understood that serial.read returns bytes not integer and that to compare strings we need strcmp()
thanks

the code which FINALLY worked is
Code:
Private Sub Form_Load()
MSComm1.CommPort = 3
' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Settings = "9600,N,8,1"
' Tell the control to read entire buffer when Input
' is used.
MSComm1.EOFEnable = True

MSComm1.InputLen = 0
MSComm1.RThreshold = 4  ' IMPORTANT change this to change the number of characters to be received
MSComm1.SThreshold = 3

' Open the port.
MSComm1.PortOpen = True
End Sub

Private Sub MSComm1_OnComm()
Dim inbuffer() As Byte 'Declare an array of bytes
Dim b() As Byte

Dim i As Long
Dim s As String

Select Case Me.MSComm1.CommEvent
Case comEvReceive
ReDim inbuffer(Me.MSComm1.InBufferCount) 'Specify the size of the array. InBuffercount gives the number of characters in the InputBuffer

inbuffer = Me.MSComm1.Input 'Read the InputBuffer


 
For i = 0 To UBound(inbuffer) 'Ubound(inbuffer) gives the upper bound of the array, which is equal to the number of characters in the InputBuffer

Me.txtreceive.Text = Me.txtreceive.Text & Chr$(inbuffer(i)) 'TxtReceive is a text box

Next i

s = StrConv(inbuffer, vbUnicode)
End Select

MsgBox s
Dim string2 As String
string2 = "1234"
If StrComp(s, string2, vbTextCompare) = 0 Then
MsgBox s
MSComm1.Output = "YES"
End
Else
MSComm1.PortOpen = False
End If

End Sub





and in the arduino side
Code:
char inData[20]; // Allocate some space for the string
char inChar; // Where to store the character read
byte index = 0; // Index into array; where to store the character
int ledpin =13;
void establishContact();
void setup()
{
  // start serial port at 9600 bps:
  Serial.begin(9600);
  Serial.flush();
  pinMode(ledpin, OUTPUT);   // digital sensor is on digital pin 2
  establishContact();  // send a byte to establish contact until receiver responds
          
 }


void loop()
{
  // if we get a valid byte, read analog ins:
     while(Serial.available() > 0) // Don't read unless
                                                  // there you know there is data
   {
        //digitalWrite(ledpin,HIGH);
            if(index < 19) // One less than the size of the array
       {
          
             inChar = Serial.read(); // Read a character
           inData[index] = inChar; // Store it
           index++; // Increment where to write next
           inData[index] = '\0'; // Null terminate the string
       }
   }
    if (strcmp(inData,"YES")==0)
     {
        digitalWrite(ledpin,HIGH);
        Serial.print(inData);
     }
        
}

void establishContact()
{
//  while (Serial.available() <= 0)
  //{
    Serial.print("1234");
        // send an initial string
    delay(300);
    
 // }
}


thank you

14  Forum 2005-2010 (read only) / Interfacing / Re: vb arduino please help on: January 11, 2011, 09:33:49 am
okay then started phase 2


i would like to send "y" in vb so that arduino would turn on led

but i dont know how arduino interprets the received "y" from vb

{note: i had confirmed that vb is sending string only using MSComm1.output="y" }

but my arduino is not interpreting it correctly please help

this is the code i used
Code:
int i;
char rec[7];
char str3 = "Y";
void establishContact();
void setup()
{
  // start serial port at 9600 bps:
  Serial.begin(9600);
  Serial.flush();
  pinMode(13, OUTPUT);   // digital sensor is on digital pin 2
  establishContact();  // send a byte to establish contact until receiver responds
          
 }


void loop()
{
  // if we get a valid byte, read analog ins:
   for (i=0;i<Serial.available();i++)
    {
    rec[i]=Serial.read();
     }
  delay(10);
        if (rec==str3)
     {
        Serial.print("firs");
        digitalWrite(13,HIGH);
     }
    
}

void establishContact()
{
  //while (Serial.available() <= 0)
  //{
    Serial.print("SEND");
    //Serial.println(byte(26));
    // send an initial string
    delay(300);
    
  //}
}
15  Forum 2005-2010 (read only) / Interfacing / Re: vb arduino please help on: January 11, 2011, 07:46:34 am
thanks a lot thanks a lot


i figured it out


thanks

it lay in a single line
Code:
MSComm1.RThreshold = 4

changing that to 4 did the trick


mscomm event fires only after 4 characters (SEND)

works great and feels great

thanks
Pages: [1] 2 3