Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: DHT11 temperature and humidity sensor due library on: May 23, 2013, 06:34:53 pm
Thanks gharryh - my problem was I had the dht.cpp open in the sketch I was compiling  smiley-red
I opened a new sketch and imported the dht library and compiled fine...Sorry for the noobness  smiley-lol
2  Using Arduino / Programming Questions / DHT11 temperature and humidity sensor due library on: May 23, 2013, 03:08:47 pm
I was wondering if anybody knows of a Due friendly library for the DHT11 temperature and humidity sensor or if someone might be able to help me figure out how to modify a uno library to work on the due.

where I found a uno tutorial:

I can import the

but when I try to compile the program it complains about dht.cpp:
DHT\dht.cpp.o: In function `dht::read(unsigned char)':
C:\Users\Organix\Code\Arduino\Due\Test\libraries\DHT/dht.cpp:82: multiple definition of `dht::read(unsigned char)'
dht.cpp.o:C:\Users\Organix\AppData\Local\Temp\build9168811753292924831.tmp/dht.cpp:82: first defined here
DHT\dht.cpp.o: In function `dht::read11(unsigned char)':
C:\Users\Organix\Code\Arduino\Due\Test\libraries\DHT/dht.cpp:28: multiple definition of `dht::read11(unsigned char)'
dht.cpp.o:C:\Users\Organix\AppData\Local\Temp\build9168811753292924831.tmp/dht.cpp:28: first defined here
DHT\dht.cpp.o: In function `dht::read22(unsigned char)':
C:\Users\Organix\Code\Arduino\Due\Test\libraries\DHT/dht.cpp:49: multiple definition of `dht::read22(unsigned char)'
dht.cpp.o:C:\Users\Organix\AppData\Local\Temp\build9168811753292924831.tmp/dht.cpp:49: first defined here
collect2: ld returned 1 exit status
3  Using Arduino / Programming Questions / Re: Help With TCS3200 Color Sensor (Understanding Output) on: May 05, 2013, 05:15:34 pm
Although timers/interrupts are cool they are in no way needed to read the frequency of the light sensor all that is needed is the digitalRead [make sure to set the pinMode to output].  I'm now finding that its great to know that there are 5768 highs in a 10 ms time frame but I still need to figure out some sort of meaningful output... the quest continues.  Here is the code to at least read the input:

#define OUT  10
#define S2   8
#define S3   9
#define S0   6
#define S1   7
#define OE   23
#define LED  22

#define  Filters_R  0
#define  Filters_G  1
#define  Filters_B  2

int Count[3] = {0};
long count = 0;
int counter = 0;
long start_time = 0;
int G_flag = 1;
int RGB = 0;
long freq = 0;

void setup()
  pinMode(OUT, INPUT);
  pinMode(S2, OUTPUT);
  pinMode(S3, OUTPUT);
  pinMode(S0, OUTPUT);
  pinMode(S1, OUTPUT);
  pinMode(OE, OUTPUT);
  digitalWrite(S2, HIGH);
  digitalWrite(S3, LOW);
  digitalWrite(S0, HIGH);    // 100% of Output Frequence
  digitalWrite(S1, HIGH);
  digitalWrite(OE, LOW);


void loop()
  for(int i=0; i<3; i++)
    start_time = millis();
    for(int i=start_time; i<start_time+10000; i++)
      if(digitalRead(10) == HIGH)
    freq = count / 7200;
    Serial.print("value: ");
    Serial.println(count % 255);
    Serial.print("count: ");
    Serial.print("counter ");

void Select_Filters(int RGB)
    case Filters_R:          //Red
    digitalWrite(S2, LOW);   
    digitalWrite(S3, LOW);
    Serial.println("-----select Red color");
    case Filters_G:          //Green
    digitalWrite(S2, HIGH);   
    digitalWrite(S3, HIGH);
    Serial.println("-----select Green color");
    case Filters_B:          //Blue
    digitalWrite(S2, LOW);   
    digitalWrite(S3, HIGH);
    Serial.println("-----select Blue color");
    default:                  //Clear(no filter)
    digitalWrite(S2, HIGH);   
    digitalWrite(S3, LOW);
    Serial.println("-----no filter");

void callback()
4  Products / Arduino Due / Re: How many inputs can the Due handle? on: May 04, 2013, 10:23:26 am
Thanks guys your information has been very informative especially:
All of them smiley
Reference of interrupts:
The Arduino Due board has powerful interrupt capabilities that allows you to attach an interrupt function on all available pins. You can directly specify the pin number in attachInterrupt().
I've been struggling with getting the color sensor to work on my due because the "arduino code" that comes with the sensor is written for the uno and has a timer library that doesnt compile on the due but your information pointed me to which should allow me to rewrite the code to work on the due.  Thanks again smiley-grin
5  Products / Arduino Due / How many inputs can the Due handle? on: May 04, 2013, 12:40:31 am
I've been thinking about an automation project but it what I'm thinking would require quite a few inputs I have an arduino due and the following parts:
multiple relays
20x4 LED (liquid crystal library)
SD card (SPI)
temperature sensor
humidity sensor
light sensor
could the due handle all these inputs?
6  Using Arduino / Programming Questions / Re: Help With TCS3200 Color Sensor (Understanding Output) on: April 26, 2013, 10:47:06 pm
I've been trying to get a TCS3200 sensor working with an arduino due too.  I think your code might be missing a timer - I found this sensor
The way I understand it is that the output of the light sensor is a digital frequency that varies with the intensity of the light so you need the timer to measure the frequency.
This post might help also:
If I make any progress I will post it here just be sure to post your code once you have it working.
7  Using Arduino / Installation & Troubleshooting / Clearing Arduino 1.5.2 imported library list? on: April 01, 2013, 09:52:30 pm
Is there a way to clear or edit the imported libraries list in 1.5.2?
Pages: [1]