Show Posts
Pages: 1 [2] 3 4 ... 12
16  Using Arduino / Microcontrollers / Problem uploading code with Olimex isp 500 on: August 19, 2012, 05:14:25 pm
I have been trying to upload code to the arduino with the Olimex programmer but every time I get the error: "did not find any USB device "usb"". It let me upload the bootloader correctly with the same setup, I only have this problem when uploading code.

in programmers.txt I added:
olimexisp.name=AVR ISP 500 Olimex
olimexisp.communication=serial
olimexisp.protocol=stk500v2

and in preferences.txt I changed:
upload.using = bootloader
to
upload.using = olimexisp
17  Using Arduino / General Electronics / Re: Help with 2/2R DAC Quick!!! on: August 13, 2012, 04:15:43 pm
Ok thank you for the quick responses it seems I have a malfunctioning resistor in the circuit.
18  Using Arduino / General Electronics / Re: Help with 2/2R DAC Quick!!! on: August 13, 2012, 04:09:48 pm
It shouldnt be a wiring problem I have followed numerous schematics from the web. And I am using 1k and 2k ohm resistors. Is the output from the dac non linear? Just a guess
19  Using Arduino / General Electronics / Help with 2/2R DAC Quick!!! on: August 13, 2012, 04:03:10 pm
I have just soldered together a 6 bit R/2R digital to analog converter. The problem Im having is that the voltages i get are like so..... .07-.22-.36-.51-1.8-1.94 and so forth. My question is why is there a bit voltage jump from .51volts to 1.8 volts. any help is appreciated!
20  Using Arduino / General Electronics / Re: SMD sma antenna trace on: March 11, 2012, 05:16:07 pm
Okay thank you for the advice, ill look into that.
21  Using Arduino / General Electronics / Re: SMD sma antenna trace on: March 11, 2012, 04:37:39 pm
@ Mike
What kind of equipment would I need? is there a wesite that you know of that could give me some guidance in this matter?
22  Using Arduino / General Electronics / SMD sma antenna trace on: March 11, 2012, 12:52:36 pm
I am trying to run an antenna copper trace from an sm5100b cellular module to an sma conector off my board. I did that here:


And it didnt work, I've heard you need some components on the trace. Does anyone know how to do this?
23  Using Arduino / Programming Questions / Re: two if available statements in one loop on: January 27, 2012, 10:20:15 pm
anyone else have any ideas???
24  Using Arduino / Programming Questions / Re: two if available statements in one loop on: January 27, 2012, 09:18:09 pm
So I tried putting the if(gps.available()) outside of the if(cell.available()) but now when I send a text to the cell module I dont get any responce. So here it receives the gps coords first then does the cell if statement but there is still no response.

Code:
#include <TinyGPS.h>
#include <NewSoftSerial.h>
#include <string.h>   
byte button, ctrlz = 26;
char inchar;
TinyGPS gps;
NewSoftSerial GPS(14, 15);
NewSoftSerial cell(2,3);
float flat, flon;
float latitude, longitude;



void getgps(TinyGPS &gps);
void setup()
{
  Serial.begin(9600);
  cell.begin(9600);
  GPS.begin(4800);
  delay(30000);
  cell.println("AT+CMGF=1");
  delay(200);
  cell.println("AT+CNMI=3,3,0,0");
  delay(200);
  Serial.println("ready");
  pinMode(13, OUTPUT);
  digitalWrite(13, HIGH);
}


void loop() {
  if(GPS.available()){
    byte c = GPS.read();
    if(gps.encode(c)){
      float latitude, longitude;
      gps.f_get_position(&latitude, &longitude);
    }
  }

  if(cell.available() >0)
  {
    inchar=cell.read();
    Serial.print(inchar);
    if (inchar=='C'){
      delay(10);
      inchar=cell.read();
      if (inchar=='o'){
        delay(10);
        inchar=cell.read();
        if (inchar=='o'){
          delay(10);
          inchar=cell.read();
          if (inchar=='d'){
            delay(10);
            inchar=cell.read();
            if (inchar=='s'){
              delay(10);
              Serial.println("recieved");
              cell.println("AT+CMGF=1");
              cell.print("AT+CMGS=");             
              cell.print(34,BYTE);               
              cell.print("214934****");           
              cell.println(34,BYTE);
              delay(500);   
              cell.print(latitude, 4);
              cell.print(", ");
              cell.print(longitude, 5);
              cell.println(26,BYTE); 
              delay(500);
            }
          }
        }
      }
    }
  }
}







25  Using Arduino / Programming Questions / Re: two if available statements in one loop on: January 27, 2012, 08:34:53 pm
I can receive bytes from the cell fine. The problem Im having is when it comes to reading the gps from inside the cells if statement. I tested it with the Serial monitor and confirmed that when if(gps.available()) is inside the if(cell.available()) it is always false meaning its not getting anything in from the gps serial port. However when I put the gps if statement on the outside and the cell if statement inside it does the opposite. I get gps readings but nothing for the cell.
26  Using Arduino / Programming Questions / two if available statements in one loop on: January 27, 2012, 08:13:17 pm
I want to send a cellular module a text message and it respond with its coordinates. I need to receive coordinates from a gps over a serial line using if(gps.available()) and also wait for a response from my cellular module on a separate serial port using if(cell.available() . In my code if I wait for a text to be received using if(cell.available()>0) then when its received the if(gps.available()) thats inside of the cell if statement wont work, it just skips right over the gps code. this is kinda hard to explain so ill post the code and just tell me if you guys can spot a problem.

Code:
#include <TinyGPS.h>
#include <NewSoftSerial.h>
#include <string.h>   
byte button, ctrlz = 26;
char inchar;
TinyGPS gps;
NewSoftSerial GPS(14, 15);
NewSoftSerial cell(2,3);
float flat, flon;
float latitude, longitude;



void getgps(TinyGPS &gps);
void setup()
{
  Serial.begin(9600);
  cell.begin(9600);
  GPS.begin(4800);
  delay(30000);
  cell.println("AT+CMGF=1");
  delay(200);
  cell.println("AT+CNMI=3,3,0,0");
  delay(200);
  Serial.println("ready");
  pinMode(13, OUTPUT);
  digitalWrite(13, HIGH);
}


void loop() {
  if(cell.available() >0)
  {
    inchar=cell.read();
    Serial.print(inchar);
    if (inchar=='C'){
      delay(10);
      inchar=cell.read();
      if (inchar=='o'){
        delay(10);
        inchar=cell.read();
        if (inchar=='o'){
          delay(10);
          inchar=cell.read();
          if (inchar=='d'){
            delay(10);
            inchar=cell.read();
            if (inchar=='s'){
              delay(10);
                Serial.println("recieved");

              if(GPS.available()){
                byte c = GPS.read();
                if(gps.encode(c)){
                  float latitude, longitude;
                  gps.f_get_position(&latitude, &longitude);
                  Serial.println("good");
                  Serial.println("sending");
                  cell.println("AT+CMGF=1");
                  cell.print("AT+CMGS=");             
                  cell.print(34,BYTE);               
                  cell.print("214934****");           
                  cell.println(34,BYTE);
                  delay(500);   
                  cell.print(latitude, 4);
                  cell.print(", ");
                  cell.print(longitude, 5);
                  cell.println(26,BYTE); 
                  delay(500);
                }
              }
            }
          }
        }
      }
    }
  }
}
27  Using Arduino / Programming Questions / Re: Writing to SD card on: January 01, 2012, 11:47:48 pm
Are you saying I need to make a two element array for 0xF4 and 0x2E? and if I did that how would I send them at the same time?
28  Using Arduino / Programming Questions / Re: Writing to SD card on: January 01, 2012, 11:33:58 pm
Okay I commented out the read statement and im logging random numbers. It seems to work fine when doing this, so it must be something with the sensor? Any ideas?
29  Using Arduino / Programming Questions / Re: Writing to SD card on: January 01, 2012, 11:28:46 pm
yes there is an led on pin 7 and it does stop flashing. Ill give that a try.
30  Using Arduino / Programming Questions / Re: Writing to SD card on: January 01, 2012, 10:36:16 pm
Hahaha no, its a 11.1v 1200mAh Li-Po. My two adustable regulators are set to 3.3v and 5v. The Li-Po is fully charged I just took it off the charger.
Pages: 1 [2] 3 4 ... 12