Show Posts
Pages: [1] 2 3 ... 111
1  Using Arduino / Programming Questions / Re: Cannot convert serial input from int to ASCII using atoi function on: August 27, 2014, 10:49:42 am
The code in message #9 prints:
Code:
byteReceived count 4
Received: 1234
To make the ASCII value an int: 1234
val = 1234

All of which is correct and as expected.
What is wrong with "To make the ASCII value an int: 1234"?

Pete
2  Using Arduino / Networking, Protocols, and Devices / Re: Coordinates on: August 26, 2014, 06:15:40 pm
I don't think the GSM shield has GPS in which case you can't find out where it is.

Pete
3  Using Arduino / Networking, Protocols, and Devices / Re: Stuck with RTC on I2C. on: August 25, 2014, 09:26:14 pm
Quote
I have two different types of RTC units.
What kind are they?

Pete
4  Using Arduino / Networking, Protocols, and Devices / Re: low cost frequency generation, DDS vs GPS ~= 20ppm vs 0.01ppb on: August 25, 2014, 07:29:36 pm
It gives a link to the DDS board but not to the "NS-T precision timing mode receiver". What is that?

Pete
5  Using Arduino / Sensors / Re: How to read DS3231 Internal temperature sensor, example code on: August 25, 2014, 12:28:16 pm
No, declare the temp as I showed in the comment. It must be signed. Either "short temp;" or "int16 temp;" will do.

Pete
6  Community / Website and Forum / Re: Forum no longer reloads automatically on: August 25, 2014, 11:19:36 am
I noticed the same thing last night but this morning it is working again.

Pete
7  Using Arduino / Sensors / Re: How to read DS3231 Internal temperature sensor, example code on: August 25, 2014, 11:14:54 am
You aren't doing the conversion properly. The Arduino uses twos complement arithmetic so there's no need to convert. Also, the fraction is part of the twos complement number but you are treating it separately.
I use this code:
Code:
  /*   short temp; */
  temp = Wire.read() << 8;
  temp |= Wire.read();
  return(temp/256.);

Pete
8  Using Arduino / Networking, Protocols, and Devices / Re: DS3234 No Battery Backup on: August 24, 2014, 06:53:33 pm
The datasheet says that the EOSC bit is set to zero on power up so writing zero to the register will have no effect.
Are you sure the battery is the correct voltage (check it on a multimeter) and is it in the right way round?

Pete
9  Using Arduino / Sensors / Re: Trouble with execution of Adafruit Fingerprint Sensor on: August 24, 2014, 06:45:20 pm
The first thing you need to do is read How to post code properly
Then edit your second post (use the Modify button) and put code tags around your code so that it is more readable.

Pete
10  Using Arduino / Sensors / Re: When IRResiver plugged in Arduino goes crazy, but not immediately. on: August 24, 2014, 02:45:07 pm
You are probably running out of ram because you are using the String class. Get rid of it and use C null-terminated strings instead.

Pete
11  Using Arduino / Displays / Re: Cartesian coordinate system TFT Seeed shield v1 on: August 24, 2014, 02:41:04 pm
You need to check how the library expects the coordinates to provided. Some libraries/drivers use function(x,y) whereas others use function(y,x).

Pete
12  Using Arduino / Programming Questions / Re: Questions about Serial for continuous data project on: August 23, 2014, 11:34:14 am
You aren't reading the serial data properly.
Try this to display the CSV lines.

Code:
#define C_STX 0x02
#define C_ETX 0x03
void loop()
{
  while(Serial.available()) {
    char c = Serial.read();
    // ignore the STX
    if(c == C_STX)continue;
    // print a new line for ETX
    if(c == C_ETX) {
      Serial.println("");
      continue;
    }
    // print anything else
    Serial.print(c);
  }
}

[edit] The reason the buffer filled up on you was because you keep delaying for 50ms. During each delay of 50ms the device can send about 50 characters. You have 3 delay(50) so it's no wonder that the buffer fills up.

Pete
13  Using Arduino / Programming Questions / Re: saving changes to sketches on: August 22, 2014, 02:02:18 pm
The Arduino IDE seems to treat "example" sketches within a library as read-only but I've never had a problem overwriting one of my own sketches in the Arduino directory. I also add version numbers on the end of the filename and increment them when I get a new piece of a sketch working.

Pete
14  Using Arduino / Audio / Re: midi note-off with note-on and velocity 0 (sis-one arduino synth) on: August 22, 2014, 09:35:24 am
Try handling the note on 0 without dropping through to the next case.

Code:
    if( midi->data2 ) {
        // note on, add to "playlist"
        p_add( midi->data1, midi->data2 );
    } else {
        p_release( midi->data1 );
    }
    break;

Pete
15  Using Arduino / Programming Questions / Re: Error \404 on: August 20, 2014, 09:12:17 pm
Replace each occurrence of "\" in the strings with "\\".
The backslash has a special meaning in a C string. It is used as an "escape" character - for example, you already use the escape sequence "\n" in your strings. To get one backslash to appear when printed, you have to "escape" it with another one.

Pete
Pages: [1] 2 3 ... 111