Show Posts
Pages: 1 ... 64 65 [66] 67 68 ... 111
976  Topics / Science and Measurement / Re: Floating Point Co-Processor on: January 15, 2013, 06:12:50 pm
I have the 32-bit one. IMHO it isn't really useful for a 16MHz Arduino. IIRC the FPU is based on a processor whose clock is only twice as fast as the Arduino and it doesn't have floating point hardware. The thing that kills it is the amount of time required to send your data to the FPU and then get the results back. If you want to offload some computations while the Arduino does something else it might be useful.
Before you buy one read the instruction timings in the data sheet, figure out how much data you have to shovel in and out and decided whether it will save you any time.
[addendum]
I should mention that it has several features that I haven't used. For example the NMEA sentence parser and 2 12-bit A/D converters
Pete
977  Using Arduino / Project Guidance / Re: Excel sheet With arduino UNO on: January 15, 2013, 12:32:15 pm
You have to print a comma between each pair of values.
Code:
    myFile.print(variable1);
    myFile.print(",");
    myFile.println(variable2);

Pete
978  Using Arduino / Audio / Re: DTMF decoder library on: January 15, 2013, 11:03:41 am
The code could be modified to handle six inputs but it would slow down the sampling rate quite substantially which would change the characteristics of the detection.
A better way to handle the audio sampling is to use a timer interrupt and do the detection on-the-fly but in either case you would probably need a faster processor to handle six channels.

Pete
979  Using Arduino / Project Guidance / Re: Excel sheet With arduino UNO on: January 14, 2013, 04:40:46 pm
That one is not directly compatible with UNO because the UNO uses 5V and micro-SD cards use 3.3V. You would have to do a level conversion to make them compatible.
I use the Adafruit board which is a bit more expensive but handles the conversion.
https://www.adafruit.com/products/254

They are easy to wire up. They will use pins 10,11,12 and 13 on the UNO. And note that the SPI hardware requires Pin 13 which means it can't be used for the LED indicator.

Pete
980  Using Arduino / Audio / Re: DTMF decoder library on: January 14, 2013, 11:24:01 am
I've put it on my website here
http://members.shaw.ca/el.supremo/DTMF.zip

Pete
981  Using Arduino / Project Guidance / Re: Excel sheet With arduino UNO on: January 13, 2013, 06:06:50 pm
I haven't been able to test this code but it does at least compile. It should create the file test.csv on an SD card, write three lines of data to the file and then close it. If it works, you can then just put the SD card in a PC and double-click on the file which should open the file in Excel.

Pete

Code:
#include <SD.h>
File myFile;
void setup()
{
  Serial.begin(9600);
  myFile = SD.open("test.csv", O_APPEND | O_WRITE);
  if(myFile) {
    myFile.println("1,2,3");
    myFile.println("101,322,8293");
    myFile.println("7012,3964,281");
    myFile.close();
  } else {
    Serial.println("Can't open test.csv on the SD card");
  }
}

void loop(void){}
982  Using Arduino / Audio / Re: MIDI Note Player Help Needed on: January 13, 2013, 05:32:40 pm
Your code is definitely sending the note on and note off messages so I'd suggest that you check your connections again.

Pete
983  Using Arduino / Project Guidance / Re: Excel sheet With arduino UNO on: January 13, 2013, 04:47:01 pm
You can write the data to a file on the SD as a Comma-Separated Values file. A CSV file can be read directly by Excel.

Pete
984  Using Arduino / Networking, Protocols, and Devices / Re: I2C locking with any mor than 3 bytes sent on: January 12, 2013, 04:55:16 pm
The receiver code is reading bytes even if there are none available.
If Wire.available() is non-zero it only means that there is at least one byte available - not that there are however many you need.
Try this (and note how it is been reformatted):
Code:
void receiveEvent(int howMany) {
  for(readit=0;readit<howMany;readit++) {
      // Wait for an available byte
      while(!Wire.available());
      // read it
      data[readit]= Wire.read();
      Serial.print("received ");
      Serial.print(readit+1,DEC);
      Serial.print(" value=");
      Serial.print(data[readit],DEC);
  }
}

Pete
P.S. this is a programming problem. Nothing to do with installation.
985  Using Arduino / Programming Questions / Re: CCITT-16 initialized to 0 any ideo how to compute that on: January 11, 2013, 07:19:48 pm
Quote
• CRC1 is calculated using only the first 6 bytes of the packet.
• CRC2 is calculated using all previous bytes in the packet (i.e. bytes 0 through N).
The result is the same.
If your data are the six bytes $6E,$00,$00,$10,$00,$02
and you tack the CRC on the end to give $6E,$00,$00,$10,$00,$02,$BC,$9A
then the CRC of these eight bytes is zero - this is a property of any CRC.
So, the CRC of either the ten bytes
$6E,$00,$00,$10,$00,$02,$BC,$9A,$00,$0B
or of the two bytes
$00,$0B
is the same - $B1,$6B.

Try it.

Pete
986  Using Arduino / Programming Questions / Re: CCITT-16 initialized to 0 any ideo how to compute that on: January 11, 2013, 07:06:45 pm
P.S. your problem is remarkably similar to this thread:
http://arduino.cc/forum/index.php/topic,96539.0.html

Pete
987  Using Arduino / Programming Questions / Re: CCITT-16 initialized to 0 any ideo how to compute that on: January 11, 2013, 07:00:49 pm
The data are not structured the way you described.
The first block of data is the six bytes $6E,$00,$00,$10,$00,$02 and their CCITT CRC-16 is $BC,$9A
The second block of data is just the two bytes $00,$0B and their CRC is $B1,$6B
Which gives the whole data block,
$6E,$00,$00,$10,$00,$02, $BC,$9A, $00,$0B, $B1,$6B

Pete
988  Using Arduino / Programming Questions / Re: if structure takes too much time on: January 10, 2013, 04:18:23 pm
It's probably because of this:
Code:
//Cas phares de détresse
 else if (digitalRead(PharesDetresse) == HIGH)
 {
  analogWrite(LEDpin, 255);
  delay (100);
  analogWrite(LEDpin, 25);
  delay (800);
 }
If the pin is HIGH, the statement delays 900ms which is "(almost a second approx)".

Pete
989  Using Arduino / Programming Questions / Re: Serial.print not printing... on: January 10, 2013, 11:15:07 am
Ninja'd by a few hours. Sprintf was going to be my lesson for this morning but I slept in smiley

Pete
990  Using Arduino / Programming Questions / Re: Serial.print not printing... on: January 09, 2013, 10:41:17 pm
:-)
Pages: 1 ... 64 65 [66] 67 68 ... 111