Show Posts
Pages: [1] 2
1  Using Arduino / Programming Questions / Re: Running median on: August 02, 2012, 08:27:14 am
I am using a SHARP distance sensor to measure the distance from the bottom of a foot to the ground. I was using Running Median to ignore random spikes created by the noise.
2  Using Arduino / Displays / Stacking Shields on: July 30, 2012, 11:59:10 am
Hello,

This is the second time I have posted about this problem, I am trying to be as clear as possible and I appreciate any help. I am using two shields

Wireless SD shield
http://arduino.cc/en/Main/ArduinoWirelessShield

 LCD Keypad Shield
http://www.dfrobot.com/index.php?route=product/product&product_id=51#.UBLPu1FK4_s

with an Arduino mega 2560. I have already discovered the problem with digital pin 4, being used as the chip select for the SD card and as one of the data pins for the LCD pin. I changed the pin on the LCD shield to another digital pin and changed the the code to
LiquidCrystal lcd(8, 9, 52, 5, 6, 7);
I have looked and have not found anymore interferences, but I could have missed it.

I am unable to write to the sd card at the same time as displaying a message on the LCD. I don't think the problem lies with the XBee, as I am able to receive data from the XBee and display it to the LCD if I do not use the SD card.

When I do have the SD/LCD shields both plugged into the mega the characters on the LCD are incorrect. Instead of "SELECT" it displays "BDLDBD". When I made a custom character, just a plain box, it worked fine. Also, lcd.clear(); does not work. I am really at a loss and would appreciate any help.

If I am missing something or am unclear in a description just tell me.
3  Using Arduino / Project Guidance / Re: LCD Keypad Shield and the Wireless SD Shield on: July 30, 2012, 09:35:22 am
I don't think it is the XBee, I was able to receive data from the XBee and display it on the LCD at the same time. It seems to mess up with this:

if (!SD.begin(4)) {
    //initialization failed!"
    return;
  }

I moved the digital pin 4 from the LCD to another digital pin, and it works fine to display the information without the sd card.

Instead of hello it does hdlln so some of the letters work while others don't. A simple box,

 byte block[8] =
{
  B11111,
  B11111,
  B11111,
  B11111,
  B11111,
  B11111,
  B11111,
  B11111
};

only works some of the time. I really have no idea what is going on...
4  Using Arduino / Project Guidance / Re: LCD Keypad Shield and the Wireless SD Shield on: July 27, 2012, 12:36:58 pm
Wireless SD shield
http://arduino.cc/en/Main/ArduinoWirelessShield

 LCD Keypad Shield
http://www.dfrobot.com/index.php?route=product/product&product_id=51#.UBLPu1FK4_s
5  Using Arduino / Project Guidance / Re: LCD Keypad Shield and the Wireless SD Shield on: July 27, 2012, 12:28:57 pm
Sorry I should have been more specific. That was the digital pin (4) that I was already aware of and fixed. There is another problem.

6  Using Arduino / Project Guidance / LCD Keypad Shield and the Wireless SD Shield on: July 27, 2012, 10:50:40 am
Hey,

So I am trying to use both the LCD Keypad Shield and the Wireless SD Shield with an Arduino Mega. I am sending data with the XBees and I want it to display to the LCD and write it to the SD card. Unfortunately, it does not allow me to do both at the same time. The LCD will mess up the letters, replacing a 'e' with a 'd' of a 'y' with a 'h'. I had to switch one of the digital pins from the LCD shield because it was used as the chipselct for the SD shield.

Thanks.
7  Using Arduino / Programming Questions / Re: Running median on: July 26, 2012, 10:04:17 am
Now I am getting the error

RunningMedian.cpp:16: error: 'template<class T, int N> class RunningMedian' used without template parameters
RunningMedian.cpp:16: error: ISO C++ forbids declaration of 'RunningMedian' with no type
RunningMedian.cpp: In function 'int RunningMedian(uint8_t)':
RunningMedian.cpp:16: error: 'int RunningMedian(uint8_t)' redeclared as different kind of symbol
RunningMedian.h:16: error: previous declaration of 'template<class T, int N> class RunningMedian'
RunningMedian.cpp:18: error: '_size' was not declared in this scope
RunningMedian.cpp:18: error: 'MEDIAN_MIN' was not declared in this scope
RunningMedian.cpp:18: error: 'MEDIAN_MAX' was not declared in this scope
RunningMedian.cpp:18: error: 'constrain' was not declared in this scope

I have the .cpp/.h files from

http://arduino.cc/playground/Main/RunningMedian

in two separate tabs with the sample code from the same place.

Thanks.
8  Using Arduino / Programming Questions / Re: Running median on: July 25, 2012, 03:29:43 pm
So I added the .cpp/.h files to the Arduino libraries. Now I am getting this error when I try and compile ..


Applications/Arduino.app/Contents/Resources/Java/libraries/RunningMedian/RunningMedian.cpp:109: error: expected unqualified-id before '[' token
9  Using Arduino / Programming Questions / Re: Running median on: July 25, 2012, 02:58:07 pm
Quote
They have the .h and .cpp files right there on that page, you need to put that data into new tabs in your Arduino IDE.

What do you mean by tab? And I don't know what you mean by IDE...

Thanks again.
10  Using Arduino / Programming Questions / Re: Running median on: July 25, 2012, 02:50:12 pm
I got it from here:

http://arduino.cc/playground/Main/RunningMedian

I have googled RunningMedian Library with no luck.
11  Using Arduino / Programming Questions / Running median on: July 25, 2012, 02:35:51 pm
Hello,

I am having problems using the Running Median code.

Code:
#include <RunningMedian.h>

// RunningMedian samples = RunningMedian(9);
RunningMedian samples = RunningMedian(5);

void setup()
{
  Serial.begin(9600);
  Serial.print("Running Median Version: ");  
  Serial.println(RUNNINGMEDIANVERSION);
}

void loop()
{
  test1();
}

void test1()
{
  int x = analogRead(A0);
  samples.add(x);
  long l = samples.getLowest();
  long m = samples.getMedian();
  long a = samples.getAverage();
  long h = samples.getHighest();
  Serial.print(millis());
  Serial.print(" ");  
  Serial.print(x);
  Serial.print(" ");
  Serial.print(l);
  Serial.print(" ");
  Serial.print(a);
  Serial.print(" ");
  Serial.print(m);
  Serial.print(" ");
  Serial.println(h);
  delay(100);
}

error: 'RunningMedian' does not name a type
cpp: In function 'void setup()':

I thought that I might have to import the library but I can't seem to find it anywhere. The solution might be really simple but I am at a loss.

Thanks for your help!


Moderator edit: [code] [/code] tags added.
12  General Category / General Discussion / Wireless SD Shield Power/Current Consumption on: July 05, 2012, 02:17:36 pm
Hey,

Does anyone know the power/current consumption of the Arduino Wireless SD Shield?

Thanks!
13  Using Arduino / General Electronics / Wireless SD Shield Power/Current Consumption on: July 05, 2012, 02:16:06 pm
Hey,

I am not sure if this is the right category, but I am just wondering if anyone knew the power/current consumption of the Arduino Wireless SD Shield?

Thanks!
14  Using Arduino / Motors, Mechanics, and Power / Wireless SD Shield Power/Current Consumption on: July 05, 2012, 09:33:20 am
Hey,

I am not sure if this is the right category, but I am just wondering if anyone knew the power/current consumption of the Arduino Wireless SD Shield?

Thanks!
15  Using Arduino / Storage / Re: 1 GB microSD on MAC on: June 05, 2012, 09:16:09 am
Would something like the link below work?

http://www.sparkfun.com/tutorials/65
Pages: [1] 2