Show Posts
Pages: 1 ... 10 11 [12] 13
166  Using Arduino / Programming Questions / Re: Read a freqency from an analog pin on: November 14, 2012, 10:28:37 pm
Quote
I don't need the full code. I want only a line , wich read frequency...
Please help. 

Try this
http://interface.khm.de/index.php/lab/experiments/frequency-measurement-library/
http://www.arduinoos.com/wordpress/?p=1022 smiley-cool
167  Using Arduino / Programming Questions / Re: Wifi-Shield connection.. on: November 14, 2012, 10:22:06 pm
Quote
Hi all,

I am new to wifi-shield and Ardui-uno and I need step by step configurations in order to be able to connect to Arduino through wifi-sheild and be able to turn on-off a LED.

I appreciate your help,...thanks in advance,
Pay

Is this http://arduino.cc/en/Guide/ArduinoWiFiShield for you looking
168  Using Arduino / Programming Questions / Re: Arduino + TTL Camera +SD on: November 14, 2012, 10:08:45 pm
It's my pleasure smiley-cool

Enjoy "Art of Logic"
169  Using Arduino / Programming Questions / Re: Learning web programming on: November 14, 2012, 10:04:42 pm
Are you ready to enter in the world of Web base control devices smiley-cool

https://github.com/ovidiucp/TinyWebServer
https://www.teleduino.org/
http://starter-kit.nettigo.eu/2011/
170  Using Arduino / Programming Questions / Re: Communication problem with GSM/GPRS-shield on: November 14, 2012, 08:36:36 am
Code:
#include <GSM_GPS_Shield.h>

int switch_gsm;
int switch_gps;
int i;
int led_mode = 0;

GSM gsm(7,9600);                                                                // (power_pin, baudrate)
GPS gps(7,9600);                                                                // (power_pin, baudrate)

void setup()
{
  Serial.begin(9600);
 
  pinMode(54, INPUT);                                                           // GSM-Button
  pinMode(55, INPUT);                                                           // GPS-Button
  pinMode(9, OUTPUT);                                                           // LED-GPS

  digitalWrite(54, HIGH);
  digitalWrite(55, HIGH);
}

void loop()
{
  gps.getGPS();
 
  Serial.println(gps.coordinates);
 
  for(i = 0; i < 80; i++)                                                       // check GPS-Coordinates
  {
    if(gps.gps_data[i] == 'N')
    {
      led_mode = 1;
    }
  }
 
  if(led_mode == 1)
  {
    delay(300);
    digitalWrite(9, HIGH);
    delay(500);
    digitalWrite(9, LOW);
  }
  else
  {
    delay(20);
    digitalWrite(9, HIGH);
    delay(20);
    digitalWrite(9, LOW);
    delay(20);
    digitalWrite(9, HIGH);
    delay(20);
    digitalWrite(9, LOW);
  }

  switch_gsm = digitalRead(54);                                                 // Read status of the switch_gsm
  switch_gps = digitalRead(55);                                                 // Read status of the switch_gps

  if(switch_gsm == 0)                 
  {
    gsm.initializeGSM("1210");                                          // Enter your SIM-Pin if it's required
    delay(200);
    gsm.makeCall("07535267131");                             // Enter the Destination-Phone-Number
  }
  else               
  {
    gsm.initializeGSM("1210");                                          // Enter your SIM-Pin if it's required
    delay(200);
    gsm.sendSMS("07535267131","Hello");              // Enter the Destination-Phone-Number
  }
}

Use this code because i find some mistake in your code and please verify you pin connections according tohttp://www.antrax.de/downloads/arduino-gsm-gprs-gps-shield-mega2560-rework_en.pdf
171  Using Arduino / Programming Questions / Re: little question, big problem on: November 14, 2012, 08:12:59 am
Quote
Ok, it was only a question at the momment..... , but i will try
Thaks again for all your help. It has been very important for me now that i am begining with this.


It's my pleasure. Enjoy "Art of Logic" smiley-cool
172  Using Arduino / General Electronics / Re: Depaneling pcbs -- what tool(s) do you use? on: November 14, 2012, 07:47:36 am
Quote
Anyone getting their pcbs made up with panels and then cutting them apart? If so, what methods and tools do you use?

I design and implement PCB lot of time. To depanel it mostly i do this by blade Or by Drill as a cutter
173  Using Arduino / Programming Questions / Re: code for 2560 R3 and secuduino canshield on: November 14, 2012, 07:37:28 am
Reply #5
Quote
From http://secuduino.blogspot.com.au/ they e-mailed it to me after I ordered the can-shield from them.

You can see what I mean here by down CAN is in bold. it didn't seem right to me...
Reply #5  In Picture it is clear you didnot pass any value in CAN.begin() why? you need to pass value.
Code:
//Let's open the bus. Remember the input parameter:
  //  1: 1Mbps
  // 500: 500Kbps  <--- Most frecuently used
  // 250: 250Kbp
  // 125: 125Kbps
  CAN.begin(1);

Quote
So I gave this a crack, but didn't make any difference, would someone be able to have a look at this and give me some points? thanks..
Reply #10

what do you mean by that line in your code int CAN: if you want to declare any variable please choose another name

Quote
Even the examples give errors that CAN wasnt declared in the scope.

which example you execute show it's snapshot

and finally what i want to say, "check your IDE by executing blink example if IDE is ok where you put CAN library post it's path"
174  Using Arduino / Programming Questions / Re: All pins unused pins HIGH? on: November 14, 2012, 06:45:26 am
IF you post your code this ways no one is going to read it boy. smiley-wink
175  Using Arduino / Programming Questions / Re: Arduino + TTL Camera +SD on: November 14, 2012, 06:42:25 am
Quote
Cybernetician
thx for your advice and i'll try it
the reason why i have the different delay time because I try to figure out the reason of this problem
I try to change the baudrate, the delay time in different part!

Most probably your Problem: "int a" smiley-cool
 
Solution:change the definition of starting address variable "a" from int to long int.

cheers
176  Using Arduino / Programming Questions / Re: Arduino + TTL Camera +SD on: November 14, 2012, 01:19:39 am
One very important point left by viewing your picture "to avoid problem with 640X480", change the definition of starting address variable "a" from int to long int.


cheers
177  Using Arduino / Programming Questions / Re: Arduino + TTL Camera +SD on: November 14, 2012, 12:08:58 am
Code:
byte incomingbyte;
NewSoftSerial mySerial(4,5);                     //Configure pin 4 and 5 as soft serial port
int a=0x0000,j=0,k=0,count=0;                    //Read Starting address       
uint8_t MH,ML;
boolean EndFlag=0;
                               
void SendResetCmd();
void SendTakePhotoCmd();
void SendReadDataCmd();
void StopTakePhotoCmd();

void setup()
{
  Serial.begin(19200);
  mySerial.begin(38400);
}

void loop()
{
     SendResetCmd();
     delay(4000);                               //After reset, wait 2-3 second to send take picture command
     
      SendTakePhotoCmd();

     while(mySerial.available()>0)
      {
        incomingbyte=mySerial.read();

      }   
      byte a[32];
     
      while(!EndFlag)
      { 
         j=0;
         k=0;
         count=0;
         SendReadDataCmd();

         delay(25);
          while(mySerial.available()>0)
          {
               incomingbyte=mySerial.read();
               k++;
               if((k>5)&&(j<32)&&(!EndFlag))
               {
               a[j]=incomingbyte;
               if((a[j-1]==0xFF)&&(a[j]==0xD9))      //Check if the picture is over
               EndFlag=1;                           
               j++;
       count++;
               }
          }
         
          for(j=0;j<count;j++)
          {   if(a[j]<0x10)
              Serial.print("0");
              Serial.print(a[j],HEX);
              Serial.print(" ");
          }                                       //Send jpeg picture over the serial port
          Serial.println();
      }     
     while(1);
}

//Send Reset command
void SendResetCmd()
{
      mySerial.print(0x56, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x26, BYTE);
      mySerial.print(0x00, BYTE);
}

//Send take picture command
void SendTakePhotoCmd()
{
      mySerial.print(0x56, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x36, BYTE);
      mySerial.print(0x01, BYTE);
      mySerial.print(0x00, BYTE); 
}

//Read data
void SendReadDataCmd()
{
      MH=a/0x100;
      ML=a%0x100;
      mySerial.print(0x56, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x32, BYTE);
      mySerial.print(0x0c, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x0a, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(MH, BYTE);
      mySerial.print(ML, BYTE);   
      mySerial.print(0x00, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x20, BYTE);
      mySerial.print(0x00, BYTE); 
      mySerial.print(0x0a, BYTE);
      a+=0x20;                            //address increases 32£¬set according to buffer size
}

void StopTakePhotoCmd()
{
      mySerial.print(0x56, BYTE);
      mySerial.print(0x00, BYTE);
      mySerial.print(0x36, BYTE);
      mySerial.print(0x01, BYTE);
      mySerial.print(0x03, BYTE);       
}

In your code and in this there is difference in delays value why? And Follow the rule "Divide and conquer" smiley-cool
First step get picture and show the value of "a[j]" on serial port. Copy those value and save them manually on file.

If file output not broken Include Sd Card library and use it at proper place

else Use this library http://www.sparkfun.com/datasheets/Sensors/Imaging/JPEG%20Camera%20Libraries.zip   smiley-wink .
178  Using Arduino / Programming Questions / Re: little question, big problem on: November 13, 2012, 11:01:08 pm
Quote
Only one question please:
- Is possible use pwm in 6 outputs at the same time ?.
I have thought that correct way would be going pin by pin increasing step by step util it goes to the maximum(255) and the same for decreasing until zero. But i can't use pw1 at pin 3 and pwm2 at pin5, and pwm3 at pin, .....  because the code is read up to down and if it is inside a loop never will go to the next, isn't it?

May be "Yes" in arduino
by using interrupts
because i use something like that long ago in "PIC Controller" programming not in arduino platform. And Accuracy of result also decreases by adding more tasks.

by using Real time operating System
Again i use rtos in "PIC Controller" to do multiple tasks simultaneously.

I prefer Second option.
179  Using Arduino / Storage / Re: ExtendedDatabaseLibrary in conjunction with the standard Arduino SD library on: November 13, 2012, 10:42:24 pm
thnx
i find a function which works like "fseek"
"seekSet()"
180  Using Arduino / Storage / Re: ExtendedDatabaseLibrary in conjunction with the standard Arduino SD library on: November 13, 2012, 10:16:45 pm
Quote
why not open a file for append and write to it?

With fseek() you can reposition the filepointer if you want to read back from the file

will you show me any example related to fseek()
because i did not find it in SD library Arduino 1.0

thankyou for your reply
Pages: 1 ... 10 11 [12] 13