Show Posts
Pages: 1 ... 8 9 [10] 11 12 ... 43
136  Using Arduino / Project Guidance / Re: Controlling phone with arduino on: April 27, 2014, 12:55:46 pm
In that case you are probably looking at Bluetooth and then a phone will always have to be in range. Or wi-fi?
137  Using Arduino / Project Guidance / Re: Controlling phone with arduino on: April 27, 2014, 12:41:40 pm
Why not use a GSM shield to send you a text?
138  Using Arduino / Networking, Protocols, and Devices / Re: Wifi Shield - EiFi [Urgent] on: April 27, 2014, 05:06:51 am
Try this:

Code:
#include <SoftwareSerial.h>

#define rxPin 2
#define txPin 3

SoftwareSerial mySerial(rxPin, txPin);

void setup()
{
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  mySerial.begin(9600);                             // setting baud to 9600
  Serial.begin(9600);
}

void loop()
{

  mySerial.write("AT\r\n");

  char rcv;
  while (mySerial.available()==0) // Sit in a loop awaiting some input
  {
  }

  if(mySerial.available()) // Which it will be
  {
    rcv = mySerial.read();
    Serial.print(rcv);
  }

  delay(1000);
}


It's just a modification of your code, not the way I would do it. It will only print out the first character of any response. You might also wish to consider printing out the ASCII value of what is received just in case it's a control character.
139  Using Arduino / Networking, Protocols, and Devices / Re: Wifi Shield - EiFi [Urgent] on: April 26, 2014, 03:41:17 pm
Which Arduino are you using?
140  Using Arduino / Programming Questions / Re: No GPS signal via SoftwareSerial on Mega... but works on Uno. on: April 26, 2014, 01:22:16 pm
I don't know of this might be the cause of your problems, but from the page on SoftwareSerial:

Quote
Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).
141  Using Arduino / Programming Questions / Re: Print Fails on: April 25, 2014, 04:04:08 pm
If you want more help then provide more code. All of it for instance.
142  Using Arduino / Programming Questions / Re: FESTO pneumatic programming on: April 25, 2014, 03:29:53 pm
Would you care to provide us with a link to said item?
143  Using Arduino / Networking, Protocols, and Devices / Re: gps track on: April 25, 2014, 03:18:36 pm
I buy bandwidth at so much a month. I'm not going to waste nearly 2 megabytes downloading your photo.

And I asked for links to the hardware, not a photo. If you can't provide links then I can't help you.
144  Using Arduino / Networking, Protocols, and Devices / Re: gps track on: April 25, 2014, 02:53:55 pm
Links to the hardware you are using?
145  Using Arduino / Project Guidance / Re: Smallest arduino possible - Tilt sensor on: April 25, 2014, 09:48:07 am
For this scenario there aren't too many options, but I'm just trying to think of the most vulnerable parts. A traditional aerial could also be broken off, rendering the system useless. I've not had a play with the newer 'flat' aerials yet so that may be one avenue to explore.

Is there a reason you aren't going for a straight forward bike alarm?
146  Using Arduino / Networking, Protocols, and Devices / Re: Wifi Shield - EiFi [Urgent] on: April 25, 2014, 08:14:26 am
Typically, ΓΏ (char 255) means nothing to read.

You might want to think about how your sketch is arranged. Send command to device, declare variable, see if anything on serial (the response might not have arrived yet?), print out contents of variable regardless? Wait, and then repeat, and repeat...
147  Using Arduino / Project Guidance / Re: Smallest arduino possible - Tilt sensor on: April 25, 2014, 05:01:41 am
Assuming you want to continue down the GSM modem route, where would the aerial go? Even on modern bikes there's a lot of metal around there to block the signal.
148  Products / Arduino GSM Shield / Re: AS I SHARE CHAR WITH STRING TYPE on: April 25, 2014, 02:22:49 am
Post the code you have developed so far and details of your hardware. And turn your caps lock off.
149  Using Arduino / Project Guidance / Re: Smallest arduino possible - Tilt sensor on: April 24, 2014, 10:07:47 am
Realistically your are governed by the size of two components - the battery and the gsm modem. Simplest way is Uno, GSM Shield, tilt switch (I'm assuming a mercury type tilt switch in the absence of information) and battery.

150  Using Arduino / Microcontrollers / Re: GSM & Microcontroller on: April 24, 2014, 08:16:54 am
I was thinking more along the lines of:

Code:
// Include the GSM library
const byte MSWITCH = 2;
#include <GSM.h>

// initialize the library instance
GSM gsmAccess;
GSM_SMS sms;

void setup()
{
   pinMode(MSWITCH, INPUT_PULLUP); // Default will be high, will drag down to low when switch closed
}



void loop()
{
  if (digitalRead(MSWITCH)==LOW)
  {
    if(gsmAccess.begin()==GSM_READY)
       Serial.println("Not connected");
    delay(1000);
    sms.beginSMS("07565684371");
    sms.print("win");
    sms.endSMS();
    while (1);
  }
}

I've just moved your code around and not tested it but basically you use setup() to set the system up, then just loop() until someone picks up the box. I presume it won't actually be tethered to a computer with a USB cable so you don't need the Serial.print in there. If you do intend doing any Serial.prints for debugging then you need Serial.begin in setup.

And I don't think that you can use pin 2 as it is used by the shield (as is 3), so go with pin 4 upwards.
Pages: 1 ... 8 9 [10] 11 12 ... 43