Show Posts
Pages: [1] 2 3
1  Using Arduino / Networking, Protocols, and Devices / Cellular Shield SM5100B and Arduino UNO on: July 13, 2011, 08:38:58 am
I have a SM5100B cell shield and an antenna.  I am using the SIM card from my AT&T phone.  I am following the tutorial on http://tronixstuff.wordpress.com/2011/01/19/tutorial-arduino-and-gsm-cellular-part-one/
In both my serial monitor and the terminal download, when my shield prints the +Sind numbers, it skips number 11(registered to network).  Why is it doing that? How can i fix it?

Prints:

Starting SM5100B Communication...
    
+SIND: 1

+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1,"ME",1

+SIND: 3

+SIND: 4

+SIND: 8
2  Using Arduino / Sensors / Re: Adding an Adxl to my board on: July 13, 2011, 07:40:53 am
Quote
Vin is supposed to be connected to the positive lead on a battery or an ac adapter (wall wart), thus the 'in'. It's not supposed to supply power to your accelerometer. Please post your project pic.

I am new to arduino and electronics, so i am learning as i go.  I will change the power to 3.3V.  I don't have a camera to post pictures.
3  Using Arduino / Sensors / Re: Adding an Adxl to my board on: July 12, 2011, 01:21:45 pm
I am not using the 3.3V, i am using Vin.  I simply want a sensor to alert me if there is any movement.  if there is, just light a LED. 
4  Using Arduino / Sensors / Re: Adding an Adxl to my board on: July 12, 2011, 09:47:01 am
Thanks Mark, I wasn't sure if i should post all my code.  I have the adxl powered and working correctly.  
Here is the full adxl code, and it is giving me the proper readings.  

Code:
const int xpin = A4;                 
const int ypin = A3;                 
const int zpin = A2;                 
int ledPin = 13;
float alarmValue; 
int xforward = 6;
int xbackward = 7;
int ledState = LOW;
int xbase = 467;
int ybase = 490;
int zbase = 540;
int diff = 30;

int xx;
int yy;
int zz;

void setup()
{
 
  Serial.begin(9600);
  Serial.println("Ready");
   alarmValue = 25;
}

void loop()
{
 
 
  Serial.print(analogRead(xpin));
    Serial.print("x \t");
  yy = analogRead(ypin);
  Serial.print(analogRead(ypin));
    Serial.print("y \t");
  Serial.print(analogRead(zpin));
  zz = analogRead(zpin);
  Serial.println("z");
    delay(1000);
      if ((abs(yy-ybase) >= diff) && (abs(zz-zbase)>= diff))
 {
  digitalWrite(xbackward, HIGH);
  Serial.print("high= ybase \t");
  Serial.print(yy-ybase);
     Serial.print("cc \t");
   digitalWrite (ledPin, HIGH);
 }
 else
 {
   digitalWrite(xbackward, LOW);
  Serial.print("low \t"); 
  digitalWrite (ledPin, LOW);
 };
}
5  Using Arduino / Sensors / Re: Adding an Adxl to my board on: July 12, 2011, 09:06:03 am
My accelerometer has been in a breadboard.  The power is in the Vin pin, and the gnd is in the digital side.  Is that OK? I have my x,y,and z in analog pins now.  However, now my x axis is showing a reading of 0, regardless.  I have two codes- one just for the readouts, and the other with an alarm. I was trying to get the plain code to work, so i could adapt it for my project, but it wasn't working. My alarm code, however, I have gotten to start working properly, so i will just use that for the time being.
The alarm code takes the difference (movement) of the adxls axis, and then prints low (normal) or high (moving), and lights the LED when it is on high. 

Continuing the matter, i have a sensor system hooked up and running.  What it does is if the two sensor values are above the alarmValue, it lights the LED.  I am trying to add the adxl, so that when the two sensor values are above the alarmValue, and the adxl is on HIGH, the LED will light up.  I'm not sure how to add the LED system in, because it is not based on an alarmValue. 

Two sensor code
Code:
if (corda > alarmValue  && toad > alarmValue)
  {
    digitalWrite (ledPin, HIGH); // turn the LED on
  }

  else
  {
    digitalWrite (ledPin, LOW);
  }

How i tried to modify it...
Code:
//    if ((ybase-ypin) >= 100) //makes the high, low signals
  if ((abs(yy-ybase) >= diff) && (abs(zz-zbase)>= diff))
 {
  digitalWrite(xbackward, HIGH);
  Serial.print("high= ybase \t");
  Serial.print(yy-ybase);
  //Serial.print(  analogRead(ybase)-ypin);
   Serial.print("cc \t");
  //Serial.print(abs(zbase-zpin));
 }
 else
 {
   digitalWrite(xbackward, LOW);
  Serial.print("low \t"); 
 };
 
if (corda > alarmValue  && toad > alarmValue && (xbackward, HIGH)) 
  {
    digitalWrite (ledPin, HIGH); // turn the LED on
  }

  else
  {
    digitalWrite (ledPin, LOW);
6  Using Arduino / Sensors / Adding an Adxl to my board on: July 11, 2011, 12:16:10 pm
I have a couple of 'things' hooked up to a number of pins on my arduino uno. I have hooked up my adxl 335 accelerometer to the analog pins on the arduino before, and it worked. I was wondering if there was a different place to hook up my adxl connetions without using the pins i originally had  to use.  i have been trying different connections, but haven't hit the right combo yet. 

Pins in use on arduino:
3.3V
5V
GND, both of them
A0
A1

My original adxl connections are
Arduino- adxl
A0-self-test
A1-z axis
A2-y axis
A3-x axis
A4-ground
A5-vcc
7  Using Arduino / Sensors / Re: Basic Touch Sensor / Switch program on: July 08, 2011, 09:55:58 am
LadyAda has great step by step tutorials
8  Using Arduino / Sensors / Re: Thermistor2 - Strange result? on: July 08, 2011, 09:54:11 am
I was working with a 10K thermistor and 8.2K resistor.  I connected the thermistor to 5v, the resistor to ground, and both of them to the analog 0 pin.  Hope this helps!
Code:
#define analogPin 0
#define beta 3000 // from your thermistors datasheet
#define resistance 8.2
int ledPin = 13; // LED is connected to digital pin 13
int sensorPin = 0; // light sensor is connected to analog pin 0
int sensorValue; // variable to store the value coming from the sensor
float alarmValue;  // a variable to know when to light LED - alarm value

void setup()
{
Serial.begin(9600);
Serial.println("Ready");
pinMode(ledPin, OUTPUT); // sets the ledPin to be an output
  Serial.begin(9600); //initialize the serial port
  digitalWrite(ledPin, LOW); // turn the LED off
  alarmValue = 25; // initialize alarm value in Celsius
}

void loop()
{
long a = analogRead(analogPin);
float temp = beta / (log(((1025.0 * resistance / a) - 8.2) / 8.2) + (beta / 298.0)) - 273.0;
Serial.println(temp);
sensorValue = analogRead(sensorPin); // read the value from the sensor
  Serial.println(sensorValue);
delay(500); 
// now print out the temperature
 float temperatureC = (sensorValue-.5)/10;
                                               
 Serial.print(temperatureC); Serial.println(" degress C");
 
 // now convert to Fahrenheight
 float temperatureF = (temperatureC * 9 / 5) + 32;
 Serial.print(temperatureF); Serial.println(" degress F");
 
  if (temperatureF > alarmValue) { // if the temp > alarm temp value,
            digitalWrite(ledPin, HIGH); // turn the LED on
  }
  else { // otherwise,
            digitalWrite(ledPin, LOW); // turn the LED off
  }
 
 delay(500);                                     //waiting a second


delay(1000);
}
9  Using Arduino / Networking, Protocols, and Devices / Re: GPS receiver module on: July 05, 2011, 02:02:19 pm
My unit was defective.  I now have a working unit hooked up, but my code is not uploading. 
Code:
#include <string.h>
 #include <ctype.h>

 int ledPin = 13;                  // LED test pin
 int rxPin = 0;                    // RX PIN
 int txPin = 1;                    // TX TX
 int byteGPS=-1;
 char linea[300] = "";
 char comandoGPR[7] = "$GPRMC";
 int cont=0;
 int bien=0;
 int conta=0;
 int indices[13];

 void setup() {
   pinMode(ledPin, OUTPUT);       // Initialize LED pin
   pinMode(rxPin, INPUT);
   pinMode(txPin, OUTPUT);
   Serial.begin(4800);
   for (int i=0;i<300;i++){       // Initialize a buffer for received data
     linea[i]=' ';
   }   
 }

 void loop() {
   digitalWrite(ledPin, HIGH);
   byteGPS=Serial.read();         // Read a byte of the serial port
   if (byteGPS == -1) {           // See if the port is empty yet
     delay(100);
   } else {
     linea[conta]=byteGPS;        // If there is serial port data, it is put in the buffer
     conta++;                     
     Serial.print(byteGPS, BYTE);
     if (byteGPS==13){            // If the received byte is = to 13, end of transmission
       digitalWrite(ledPin, LOW);
       cont=0;
       bien=0;
       for (int i=1;i<7;i++){     // Verifies if the received command starts with $GPR
         if (linea[i]==comandoGPR[i-1]){
           bien++;
         }
       }
       if(bien==6){               // If yes, continue and process the data
         for (int i=0;i<300;i++){
           if (linea[i]==','){    // check for the position of the  "," separator
             indices[cont]=i;
             cont++;
           }
           if (linea[i]=='*'){    // ... and the "*"
             indices[12]=i;
             cont++;
           }
         }
         Serial.println("");      // ... and write to the serial port
         Serial.println("");
         Serial.println("---------------");
         for (int i=0;i<12;i++){
           switch(i){
             case 0 :Serial.print("Time in UTC (HhMmSs): ");break;
             case 1 :Serial.print("Status (A=OK,V=KO): ");break;
             case 2 :Serial.print("Latitude: ");break;
             case 3 :Serial.print("Direction (N/S): ");break;
             case 4 :Serial.print("Longitude: ");break;
             case 5 :Serial.print("Direction (E/W): ");break;
             case 6 :Serial.print("Velocity in knots: ");break;
             case 7 :Serial.print("Heading in degrees: ");break;
             case 8 :Serial.print("Date UTC (DdMmAa): ");break;
             case 9 :Serial.print("Magnetic degrees: ");break;
             case 10 :Serial.print("(E/W): ");break;
             case 11 :Serial.print("Mode: ");break;
             case 12 :Serial.print("Checksum: ");break;
           }
           for (int j=indices[i];j<(indices[i+1]-1);j++){
             Serial.print(linea[j+1]);
           }
           Serial.println("");
         }
         Serial.println("---------------");
       }
       conta=0;                    // Reset the buffer
       for (int i=0;i<300;i++){    // 
         linea[i]=' ';             
       }                 
     }
   }
 }

10  Using Arduino / Sensors / Re: FlexiForce Pressure Sensor on: June 27, 2011, 02:42:55 pm
What is the code you are using?
11  Using Arduino / Installation & Troubleshooting / terminals on the arduino on: June 27, 2011, 12:59:02 pm
I'm totally new to arduino.  I want to hook an alarm into my uno board.  The alarm has a negative and positive wire.  Where are the negative and positive terminals on the uno board?
12  Using Arduino / Sensors / Re: Temp Sensor does not get reasonable result on: June 23, 2011, 08:37:05 am
You might also consider using a resistor
13  Using Arduino / Project Guidance / Re: GPS Module on: June 22, 2011, 01:08:53 pm
Thanks for your help! smiley
14  Using Arduino / Project Guidance / Re: GPS Module on: June 22, 2011, 12:36:58 pm
I just bought it from Robotshop.  Is there any way i can make sure it's broken, so that i could exchange it or something?
15  Using Arduino / Project Guidance / Re: GPS Module on: June 22, 2011, 12:11:45 pm
I don't have a multi-meter, but will consider getting one, though I can't today.  I'm pretty sure that the 5V works because i have different components hooked up, and the worked just fine. 
Pages: [1] 2 3