Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: RTC DS1307 issue on: January 25, 2013, 07:27:15 am
I tested the battery and found it was completely exhausted. I tried again using a new CR 2032 but it seems not to work, maybe because it's a 3V battery instead of 3.6V. Could that be the reason?

2  Using Arduino / Sensors / Re: DHT11 too high values on: January 25, 2013, 07:22:25 am
Riva, you are right! It was declared as DHT22.... Sorry, I'm still a beginner..
thank you
A
3  International / Hardware / Re: DHT11 valori troppo alti on: January 25, 2013, 07:20:13 am
Ho risolto. Nello script veniva definito il device DHT22 e non DHT11.
Adesso va.
grazie cmq.
4  International / Hardware / Re: DHT11 valori troppo alti on: January 24, 2013, 06:25:40 am
ho messo la resistenza (10k ohm?). I valori sono tutti uguali, a condizioni uguali: se tocco, cioè il sensore, variano di conseguenza.
Sembra che siano su una scala differente..
5  Using Arduino / Sensors / Re: DHT11 too high values on: January 24, 2013, 06:22:24 am
I just followed the scheme in the URL. Maybe is there some difference with the Leonardo board?
6  Using Arduino / Sensors / DHT11 too high values on: January 24, 2013, 03:02:52 am
Hello, I am a newbie on Arduino matters.
I connected a DHT11 hum/temp sensor to my Arduino Leonardo as shown here:

http://www.ladyada.net/wiki/tutorials/learn/sensors/dht.html

using the suggested code, and it seems to work fine.
But, the data I received in the log are quite strange: values are too high (about 600° C temp / 1200% humidity).
How could it be possible?
thanks
A
7  International / Hardware / DHT11 valori troppo alti on: January 24, 2013, 02:56:47 am
Ciao, sono un principiante del mondo Arduino.
Ho provato a connettere un sensore di umidità/temperatura DHT11 al mio Arduino Leonardo, secondo quanto indicato qui:

http://www.ladyada.net/wiki/tutorials/learn/sensors/dht.html

e utilizzando il codice suggerito nell'esempio, e sembra funzionare.
La cosa strana è che nel log ricevo dati un po' strani, ovvero valori troppo alti (circa 600 gradi di temperatura e 1200% di umidità).
Quale può essere il motivo?
grazie
A
8  Using Arduino / Project Guidance / Re: RTC DS1307 issue on: January 23, 2013, 05:09:10 pm
thank you smiley
9  Using Arduino / Project Guidance / Re: RTC DS1307 issue on: January 23, 2013, 04:56:34 pm
Ok. But now it stores date/time correctly and I can read it (i.e. 01/23/2013 10.23), ok?
But when I disconnect the RTC from the Arduino board and reconnect it after 2-3 minutes, the date/time is reset again.
That's why I believed the battery was low.
was I right?
A
10  Using Arduino / Project Guidance / Re: RTC DS1307 issue on: January 23, 2013, 04:31:21 pm
Sorry again, but after few minutes the RTC module lost all the data stored, showing "2000/1/1 0:00:00".
Maybe the battery is exhausted... What do you think about?
11  Using Arduino / Project Guidance / Re: RTC DS1307 issue on: January 23, 2013, 04:33:22 am
Now it works!!!
Thank you sooo much smiley
A
12  Using Arduino / Project Guidance / Re: RTC DS1307 issue on: January 22, 2013, 04:18:39 pm
Hello again. After some months I've tried again with the RTC library.
The code I'm using is:
Code:
// Date and time functions using a DS1307 RTC connected via I2C and Wire lib

#include <Wire.h>
#include "RTClib.h"

RTC_DS1307 RTC;

void setup () {
    Serial.begin(9600);
    Wire.begin();
    RTC.begin();

  if (! RTC.isrunning()) {
    Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
    RTC.adjust(DateTime(__DATE__, __TIME__));
  }
}

void loop () {
    DateTime now = RTC.now();
   
    Serial.print(now.year(), DEC);
    Serial.print('/');
    Serial.print(now.month(), DEC);
    Serial.print('/');
    Serial.print(now.day(), DEC);
    Serial.print(' ');
    Serial.print(now.hour(), DEC);
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();

    delay(3000);

but the result is not good.
The log I'm receiving is:

2165/165/165 165:165:85
2165/165/165 165:165:85
2165/165/165 165:165:85

Why? I really don't understand what are my mistake.
Could you help me, please?
13  Using Arduino / Project Guidance / RTC DS1307 issue on: October 10, 2012, 03:44:56 pm
Hi, I'm an Arduino beginner. I'm trying to use a RTC DS1307 circuit with an Arduino Leonardo.
I'm experiencing some trouble. because it doesn't behave correctly.
The code I'm using is:

Code:
//Function: This procedure applies to the Arduino MEGA 2560 to read and write the DS1307.Using the serial port to display the current time.
//Time: August 16, 2012
#include <Wire.h>
  uint8_t seconds = 30;//Initialization time
  uint8_t minutes = 43;
  uint8_t hours = 14;
  uint8_t week = 4;
  uint8_t days = 16;
  uint8_t months = 8;
  uint16_t Year = 12;
int bcd2bin(int temp)//BCD  to decimal
{
int a,b,c;
a=temp;
b=0;
if(a>=16)
{
while(a>=16)
{
a=a-16;
b=b+10;
c=a+b;
temp=c;
}
}
return temp;
}

int bin_to_bcd(int temp)//decimal to BCD
{
int a,b,c;
a=temp;
b=0;
if(a>=10)
{
while(a>=10)
{
a=a-10;
b=b+16;
c=a+b;
temp=c;
}
}
return temp;
}
void setup () {
    Serial.begin(9600);
    Wire.begin();
    //begin(void) {return 1;}
}
 
void loop () {
  /*Wire.beginTransmission(0x68);//DS1307 write the initial time
  Wire.write(0);
  Wire.requestFrom(0x68, 7);
  Wire.write(bin_to_bcd(seconds));
  Wire.write(bin_to_bcd(minutes));
  Wire.write(bin_to_bcd(hours));
  Wire.write(bin_to_bcd(week));
  Wire.write(bin_to_bcd(days));
  Wire.write(bin_to_bcd(months));
  Wire.write(bin_to_bcd(Year));
  Wire.endTransmission();*/
  
  while(1){
  Wire.beginTransmission(0x68);//Send the address of DS1307
  Wire.write(0);//Sending address
  Wire.endTransmission();//The end of the IIC communication
  
  Wire.requestFrom(0x68, 7);//IIC communication is started, you can continue to access another address (address auto increase) and the number of visits
    seconds = bcd2bin(Wire.read());//read time
    minutes = bcd2bin(Wire.read());
    hours = bcd2bin(Wire.read());
    week = Wire.read();
    days = bcd2bin(Wire.read());
    months = bcd2bin(Wire.read());
    Year = bcd2bin(Wire.read()) + 2000;
  
      Serial.print(Year, DEC);//Serial display time
      Serial.print('/');
      Serial.print(months, DEC);
      Serial.print('/');
      Serial.print(days, DEC);
      Serial.print(' ');
      Serial.print(hours, DEC);
      Serial.print(':');
      Serial.print(minutes, DEC);
      Serial.print(':');
      Serial.print(seconds, DEC);
      Serial.println();
      Serial.print(" week: ");
      Serial.print(week, DEC);
      Serial.println();
      delay(5000);
  }
}
and I connect the RTC DS1307 to the Leonardo card in the way described in the attached file.
Now, the problem is when I compile the code and transfer it to the arduino, the serial monitor does not print the right values, but just a series of 255 values.
What can be the reason? Could anyone help me?
thanks
Antonio
14  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield with Arduino Leonardo on: September 03, 2012, 10:20:50 am
thank you
15  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield with Arduino Leonardo on: September 03, 2012, 09:47:02 am
Yes, it has.
So, maybe this one should work with Leonardo, shouldn't it?
http://arduino.cc/en/Main/ArduinoEthernetShield

thanks again
A
Pages: [1] 2