Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Re: Need more code space? Running low with 32kb on: December 04, 2012, 11:25:03 pm
Have any personal opinions with the Freetronics Ethermega?  I like the all-in-one aspect.

http://www.freetronics.com/products/ethermega-arduino-mega-2560-compatible-with-onboard-ethernet#.UL7Ma4PAeSo

2  Using Arduino / Project Guidance / Re: Need more code space? Running low with 32kb on: December 04, 2012, 08:32:40 pm
I don't really have the skill to modify that many libraries because I'm just short on time these days. I would have loved to but it's nice to work with something already made.

Maybe a Mega is worth the money vs. my lack of time to dive into modifying libraries.
3  Using Arduino / Project Guidance / Re: Need more code space? Running low with 32kb on: December 04, 2012, 08:24:06 pm
One person saying its long, and another saying not that bad. lol

I have the Arduino Ethernet.

Flash Memory 32 KB (ATmega328) of which 0.5 KB used by bootloader
SRAM   2 KB (ATmega328)
EEPROM 1 KB (ATmega328)


I am curious on how much space the other SD library, Fat16lib, will save me:
http://code.google.com/p/fat16lib/
4  Using Arduino / Project Guidance / Re: Need more code space? Running low with 32kb on: December 04, 2012, 08:08:52 pm
Here the beast is! (Too big to post on the forum in a code space, funny).

http://pastebin.com/k0M47Ym4
5  Using Arduino / Project Guidance / Re: Need more code space? Running low with 32kb on: December 04, 2012, 10:23:44 am
Will post when I'm home from work. Cheers
6  Using Arduino / Project Guidance / Re: Need more code space? Running low with 32kb on: December 04, 2012, 09:48:15 am
Thanks for the replies.

I am running the following libraries, full-fledged, and am definitely not aware that smaller ones exist. That gives me more hope. =)

#include <SPI.h>
#include <SD.h>
#include <EEPROM.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#include <Time.h>


MarkT - I have some constant strings, but mostly every string is being generated within a subroutine, used, and then thrown away. At least that's what I am hoping it does. =)

7  Using Arduino / Project Guidance / Need more code space? Running low with 32kb on: December 04, 2012, 01:53:08 am
I have a project that I'm working on that uses several libraries and I'm starting to think that I just need more code space to do what I need to do. I'm trying to use the 32kB on an Arduino Ethernet but I don't think it's cutting it. The Arduino Ethernet is cheap compared to a Mega with Ethernet shield, and I will be producing more than just one of these, so it's important to minimize cost as much as possible.  Let me explain in a nutshell what I need the Arduino to do:

-Always keep track of time, syncing with NTP server
-Datalog onto SD card
-Process Data from SD card (area under the curve of particular data points)
-Upload data to COSM
-Utilize one byte of eeprom incase of shutdown event.


I have looked at other sketches that utilize SD and web (SDWebServer) and the sketches are quite small (20kB) for what they do. There may be something I'm overlooking in my code that is making it so high, around 31kB, so let me know if I should post away.

Thank you much.
8  Topics / Science and Measurement / Re: Finding area under the curve on: May 13, 2012, 07:35:02 pm
Here is my feed:

https://cosm.com/feeds/30326?pachube_redirect=true

I take a measurement once every 2 minutes or so and then upload the 4 data points you see to pachube. Basically I want to take the area under the curve of "dirty" and "clean".

Suppose I wanted to do this calculation all server-side instead of how we are discussing on the Arduino. I was thinking that I could just PULL data from Pachube, do the calculation, then PUSH data back onto Pachube on a completely new graph. If that was the case I suppose I could just write some script to do that for me. What programming language to do it in? Perhaps PERL or something that handles the data set well.
9  Topics / Science and Measurement / Re: Finding area under the curve on: May 13, 2012, 02:45:14 pm
Many thanks Rob. So you are saying this calculation can probably all be done inside the Arduino. No need to start a database or anything. I would just upload the calculated area over to Pachube/Cosm once a day.

Just thinking of some problems that might occur with that. If I lose power to the device then the on-the-fly calculation would be lost? I guess I would have to write the value to EEProm and if the device turned off then load in the old value and continue on. I am guessing the calculation will still be fine given that you lost the x-value (time)?

10  Topics / Science and Measurement / Finding area under the curve on: May 13, 2012, 12:24:19 pm
So I have this big set of data on Cosm/Pachube that I want to automatically take the area under the curve during specific time frames. This calculation should be performed once a day, at the end of the day. Now, I am perfectly aware of how to do this with Excel using the area of trapezoid formula, but it takes manual effort. Automatic would be key for my application. I want to do this every day and store the timestamp it was performed and area under the curve value.

I am trying to brainstorm different ways to do this. The two things I could come up with are:

-GET a single day's worth of data from cosm and store it in a server side database. Then some how do the area under the curve calculation and store it's value in the same database.

-Do an "on the fly" type calculation inside some type of programming language. GET each single data point from Cosm, store it temporarily in a variable while doing a calculation then load in a new variable and keep going until the last datapoint is calculated. Then store that number in an array that has the date created and the value.

I don't know much at all about databases and would like to start with a very basic database that would be easy to learn (if that is needed). I just want something that I can calculate the area under the curve and look at the data on a website everyday.

If there is an easy way to dissect the Cosm data that I don't know about. Or if someone could make some very general/basic suggestions on how to start with this, that is what I'm looking for. Many thanks in advance and please forgive me if I haven't done enough homework before posting here.
11  Using Arduino / Sensors / Re: Analog input not allowing full 1024 bits on: March 13, 2012, 09:23:54 pm
Indeed it does, thanks so much for your help RC.  smiley
12  Using Arduino / Sensors / Re: Analog input not allowing full 1024 bits on: March 13, 2012, 08:35:57 pm
Ah I see!  Yes that makes sense. I am not sure I understand the reason for adding 50 though? 
13  Using Arduino / Sensors / Analog input not allowing full 1024 bits on: March 13, 2012, 08:09:58 pm
Hi, I am using an Arduino Ethernet and never payed attention to the number of bits that come from the ADC until today when my Pachube graph started flat-lining.  So I started looking into it and found that my Arduino is only reading a maximum of 1012 bits from the ADC. Not like I need the extra 50mV of detection, but I am just curious as to why this might be happening with my Arduino.  I am wondering if anyone else has ever run into this. 

It's important to note that I am doing an averaging equation from a collection of 100 ADC readings as well. Here is the code for that:

Code:
void avg_sample(int pv_type) {
  int i, j, analog_value[100];
  AVGvalue = 0;
 
  while(i < 100) {
    analog_value[i] = analogRead(pv_type); //Store value into array of 100 (this seems to be close to the maximum)
    i++;
  }
   
  for(j = 0; j < 99; j++) { //Add the 100 numbers in the array up
    AVGvalue = (AVGvalue + analog_value[j]);
  }
 
  AVGvalue = (AVGvalue / 100); //Average by dividing, store in AVGvalue
}
Pages: [1]