Show Posts
Pages: [1] 2 3 ... 17
1  Using Arduino / Sensors / Re: angle sensor on: February 15, 2014, 06:18:58 pm
I don't believe steppers provide any feed back. If it stalls then you would not detect it.
2  Using Arduino / Storage / Re: Seeed Studio SD Card Sheild 3.0 + Mega 2560 Rev 3 on: February 09, 2014, 09:55:29 pm
The seeed studio card info?

Adafruit uses the SDfat lib which has it's own Card info example if that would work.
3  Topics / Home Automation and Networked Objects / Re: How to build a wireless camera system with Arduino? on: February 09, 2014, 08:18:09 pm
http://www.hobbyking.com/hobbyking/store/__13440__2_4GHZ_100mW_Tx_Rx_1_3_inch_CCD_Camera_NTSC.html

Why reinvent the wheel???
4  Using Arduino / Storage / Re: Seeed Studio SD Card Sheild 3.0 + Mega 2560 Rev 3 on: February 09, 2014, 07:24:15 pm
You may want to take a look here and see if you can apply any of the changes Adafruit makes to make it work...

http://learn.adafruit.com/adafruit-data-logger-shield/using-the-real-time-clock-1
5  Topics / Science and Measurement / Re: Water flow gauges & Limited Interrupts on: February 08, 2014, 01:29:45 pm

My issue is as follows:
While I am easily able to get the flow sensors working/reading as per the well known tutorial (http://forum.arduino.cc/index.php?PHPSESSID=spqs36mmetm3fjfaiusfs3k9b6&/topic,8548.0.html) I am having issues using them at the same time as any of the networking functionality.

Not that it helps with your question but, that water flow example is pretty much garbage. The interrupts have a delay() call in them and will almost certainly make your code really choppy.

Have a look here because I ran into the same thing a few years back. Before progressing with any more code I would make the corrections that Coding Badly helps with.

http://forum.arduino.cc/index.php?topic=73782.msg555003#msg555003
6  Using Arduino / Storage / Re: How to delete a line in a CSV file with SDFat? on: February 06, 2014, 08:54:48 pm
After some thinking I have settled on reading new data every 15 seconds over 5 minutes rather than every second, which cuts down my data pool from 300 to 20. Because now I only have 20 reads over 12 sensor, I can make use of a set of arrays instead of storing everything on the SD (the array will most likely be written to an I2C EEPROM).

Here is what I came up with for rolling the new readings in and the old ones out.

Code:
byte swapArray[20];
byte tempArray[20];

  for(int index = 0; index < 19; index++)
  {
    swapArray[index] = tempArray[index + 1];
  }

  memcpy (tempArray, swapArray, 20);
  tempArray[19] = 30; //The "new" data

I was fighting a bit of boredom and and wanted to practice for() loops so... the proof is in the puddling.

Code:
/*
A little program to roll new elements into
an existing array and to delete the oldest ones

I wrote this so that I can use it to create
a scrolling graph on an LCD screen keeping the
"x" scale of the screen fixed.
*/

byte swapArray[20];
byte Array[20];

void setup()
{
  Serial.begin(9600);
  Serial.println("Start!!! Delay 2 seconds");

  delay(2000);

  Serial.print("Populating tempArray ");
  for(int index = 0; index < 20; index++)
  {
    tempArray[index] = index;
  }

  Serial.print("swapArray = ");
  for(int index = 0; index < 20; index++)
  {
    Serial.print(swapArray[index]);
    Serial.print(",");
    delay(250);
  }

  Serial.print("Array = ");
  for(int index = 0; index < 20; index++)
  {
    Serial.print(tempArray[index]);
    Serial.print(",");
    delay(250);
  }

  for(int index = 0; index < 19; index++)
  {
    swapArray[index] = tempArray[index + 1];
  }

  Serial.print("New swapArray = ");
  for(int index = 0; index < 20; index++)
  {
    Serial.print(swapArray[index]);
    Serial.print(",");
    delay(250);
  }

  memcpy (tempArray, swapArray, 20);

  Serial.print("New Array = ");
  for(int index = 0; index < 20; index++)
  {
    Serial.print(tempArray[index]);
    Serial.print(",");
    delay(250);
  }

  tempArray[19] = 30; //Writing in the "new" data

  Serial.print("Final Array = ");

  for(int index = 0; index < 20; index++)
  {
    Serial.print(tempArray[index]);
    Serial.print(",");
    delay(250);
  }
  Serial.println("Done!");
}

void loop()
{
}
7  Using Arduino / Storage / Re: How to delete a line in a CSV file with SDFat? on: February 02, 2014, 02:24:13 pm
Quote
because I don't think it will be readable on the graph.
You aren't going to graph anything on the Arduino, are you? Let the system that is doing the graphing, and that has boatloads of memory, deal with the stuff that takes a lot of memory.

Yeah I was... I didn't think a function that would write 300 pixels would be that demanding. The graphing function is something that I would like to do on the fly without having to use a computer. The sensors are install in the field where we typically don't have access to a computer.

If I got anSPI memory IC and then just wrote each of the sensors data as a 300 element array to it, would that work?
8  Using Arduino / Storage / Re: How to delete a line in a CSV file with SDFat? on: February 02, 2014, 09:24:05 am
If I start a new file then there is a very good chance that I will not get the 300 readings I want.

The 300 readings are 5 minutes worth of 1 second interval readings. So I want to be able to review and graph trends with the data in the CSV file on small lcd. I can't just let the CSV just gather the whole days worth of data because I don't think it will be readable on the graph.

The easiest thing I could think of the create a rolling set of data, is to delete the first making all of the others index down and add a new 300th readings.

Not being able to do this really puts the brakes on my project. Is there another method of storing close to 3600 pieces of data that can be easily recalled, rewritten or erased?
9  Using Arduino / Storage / How to delete a line in a CSV file with SDFat? on: February 01, 2014, 10:48:50 pm
Just like to title says, I want to keep a keep a log of readings that is only 300 readings long for 12+ sensors. I would like to delete the first line after 300 readings so to keep a rolling log, meaning the log will always be of the last 300 readings.

Is there a way to delete the first line of a CSV file?
10  Using Arduino / Sensors / Re: Any harm in using 5v on Aref on a 3v3 board? on: January 20, 2014, 08:57:02 pm
analog signal ranging from .5v to 4.5v.

Thanks, Glad I asked before doing it!
11  Using Arduino / Sensors / Any harm in using 5v on Aref on a 3v3 board? on: January 20, 2014, 08:31:40 pm
I need to use a 5v sensor with a atmega328 running 3v3. The sensor's output is 0.5v to 4.5v so I'll need to use an analog pin. I'm also using an xbee and would like to keep the board 3v3 to make things easier.

My question is, If the atmega can run at 5v, is the any harm in putting more than vcc into the analog pin / ARef pin?

Thanks guys for your help.
12  Using Arduino / Networking, Protocols, and Devices / Re: RF24 Library: Driver for nRF24L01(+) 2.4GHz Wireless Transceiver on: January 01, 2014, 12:29:17 pm
great information.

I do have both devices patched through a breadboard and was wondering if the signal was being distorted because of it. My next diagnostic step was to solder connect everything to eliminate that, so it's nice to know that I won't waste my time.

The speed comment is also a really good idea. My only concern is that I know very little about SPI communication so it will have to take some digging to find out where to look and how to change it.

Thank you.
13  Using Arduino / Networking, Protocols, and Devices / Re: RF24 Library: Driver for nRF24L01(+) 2.4GHz Wireless Transceiver on: January 01, 2014, 10:46:26 am
I have an issue where my NRF 2.4 radio has a conflict with another device on the SPI bus. The radio will not properly initialize if the other device is connected (does even have to be powered!) I have the cs, csn on the radio on pins 8,9 and the cs on the other device on 4. Each device was test individually and working.

When the code runs, I get a serial output of all zeros on the radio details and then get repeating:

******WARNING******** Address 177000 not valid    (or maybe is not found, I can't remember)

Has anyone else run into similar conflicts???

The other SPI device is Adafruit's tft screen driver RA8875.

I was using most recent RF24 and RF24network libraries from Maniacbug.

Any help would be greatly appreciated!!!
14  Using Arduino / Networking, Protocols, and Devices / Re: RF24 Library: Driver for nRF24L01(+) 2.4GHz Wireless Transceiver on: January 01, 2014, 10:36:14 am
One other question:  do I need to do anything special to get RF24 running on atmega328 8MHz as opposed to 16MHz? (pro mini)

Nothing special needed... I run NRF24 on 8MHz atmega 328 all the time.
15  Using Arduino / Networking, Protocols, and Devices / Re: SPI conflict with NRF2.4 radios on: December 30, 2013, 06:29:55 pm
Thanks... but I'm still stuck. The RA8875 tft driver board interferes with the NRF2.4 SPI communication bad enough that the radio does not init. The interference happens even if the tft is not powered.
Pages: [1] 2 3 ... 17