Recent Posts

Pages: 1 ... 7 8 [9] 10
81
Hardware / Re: Arduino non parte
Last post by astrobeed - Today at 11:42 am
Visto l'impegno di flash e ram è proprio il blink. :D

Code: [Select]
Lo sketch usa 1.006 byte (3%) dello spazio disponibile per i programmi. Il massimo è 30.720 byte.
Le variabili globali usano 15 byte (0%) di memoria dinamica,
82
Generale / Re: Libro su Arduino in Italia...
Last post by PaoloP - Today at 11:42 am
Arrivato stamattina.... sono a pagina 36....  :)
83
Deutsch / Re: Noch eine Terrariensteueru...
Last post by ChrisBoy - Today at 11:41 am
Mit der Masse ist mir auch eingefallen.
Später am Uno, läuft ja eh alles über ein Netzteil, dann sind alle gnds verbunden.
Da benötige ich ja die serielle Ausgabe nicht, also kann ich RX/TX benutzen?
Jetzt im Testaufbau bei USB Strom am Nano und 5V extern für DhT und ESP, einfach gnd Arduino mit Netzteil verbinden und statt RX/TX zwei digitalPins benutzen?
Hier noch der Testaufbau, der Poti dient als 1,5k Widerstand, hatte gerade keinen zur Hand:
84
Software / Termostato Dimmer temperatura ...
Last post by David81 - Today at 11:41 am
Buongiorno a tutti, da qualche giorno sto lavorando sul mio nuovo progetto, un termostato per lampade alogene 230v per terrari. tre giorni fa ho aggiunto i tasti e tutto funzionava. Ieri sera ho provato a saldare i componenti su una millefori, per avere intanto qualcosa di più stabile, provo il tutto e non mi viene più indicata la temperatura dei due sensori DS18B20, ma segnano entrambi 85.00 gradi.
Collegamenti ricontrollati. provo a rimetterli su breadboard e fa la stessa storia, con un esempio della libreria indicano la temperatura giusta, col mio sketch non più.
Non sono un esperto e nel mio codice ci saranno mille difetti, ma pian piano migliorerò, per ora vi chiedo perfavore di aiutarmi a capire come poter risolvere questo problema.
Grazie a tutti. Qui sotto il mio codice:
Code: [Select]
// include the library code:
#include <LiquidCrystal.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Wire.h>
#include "RTClib.h"
#if defined(ARDUINO_ARCH_SAMD)
// for Zero, output on USB Serial console, remove line below if using programming port to program the Zero!
   #define Serial SerialUSB
#endif
RTC_DS1307 rtc;
char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
/*-----( Declare Constants )-----*/
#define ONE_WIRE_BUS 2 /*-(Connect to Pin 2 )-*/

/*-----( Declare objects )-----*/
/* Set up a oneWire instance to communicate with any OneWire device*/
OneWire ourWire(ONE_WIRE_BUS);

/* Tell Dallas Temperature Library to use oneWire Library */
DallasTemperature sensors(&ourWire);



/*-----( Declare Variables )-----*/

int uscita1 = 9;
int uscita2 = 10;
float tempset0 =26;
float tempset1 =26;

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 8);

void setup() {
  lcd.clear();
  #ifndef ESP8266
  while (!Serial); // for Leonardo/Micro/Zero
#endif
  Serial.begin(9600);
  if (! rtc.begin()) {
    Serial.println("Couldn't find RTC");
    while (1);
  }
  //rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
  //delay(1000);
//Serial.println("YourDuino.com: Electronic Brick Test Program");
//Serial.println("Temperature Sensor DS18B20");

/*-( Start up the DallasTemperature library )-*/
sensors.begin();
  // set up the LCD's number of columns and rows:
  lcd.begin(20, 4);
}

void loop() {
  int sensorValue = analogRead(A0);
  // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
  float voltage = sensorValue * (5.0 / 1023.0);
  // print out the value you read:
  Serial.println(voltage);
  float newts0;
  float newts1;
 if(voltage<0.50)
 {
  tempset0 = tempset0+0.1;
 delay(10);
 }
if((voltage>0.80) and (voltage<1.40))
 {
  tempset0 = tempset0-0.1;
 delay(10);
 }
 if((voltage>1.30)and(voltage<1.80))
 {
  tempset1 = tempset1+0.1;
 delay(10);
 }
if((voltage>1.80)and(voltage<2.50))
 {
  tempset1 = tempset1-0.1;
 delay(10);
 }



//*  Serial.println();
//Serial.print("Requesting temperature...");
//sensors.requestTemperatures(); // Send the command to get temperatures
//Serial.println("DONE")//;

//Serial.print("Device 1 (index 0) = ");
//Serial.print(sensors.getTempCByIndex(0));
//Serial.println(" Degrees C");
//Serial.print("Device 1 (index 0) = ");
//Serial.print(sensors.getTempFByIndex(0));
//Serial.println(" Degrees F");
//delay(1000);


lcd.setCursor(0,0);
lcd.print("Temp set 1:  ");
lcd.print(tempset0);
lcd.setCursor(0,1);
lcd.print("Temp set 2:  ");
lcd.print(tempset1);

if(sensors.getTempCByIndex(0) <= tempset0-2)
{
  analogWrite(uscita1, 255);
  Serial.print("ON");
  delay(500);
}
if((sensors.getTempCByIndex(0) > tempset0-2) and (sensors.getTempCByIndex(0))  < tempset1)
{
  analogWrite(uscita1, 122);
  Serial.print("ON");
  delay(500);
}
if(sensors.getTempCByIndex(0) >= tempset0)
{
  analogWrite(uscita1, 0);
  Serial.print("OFF");
  delay(500);
}
if(sensors.getTempCByIndex(1) <= tempset1-2)
{
  analogWrite(uscita2, 255);
  Serial.print("ON");
  delay(500);
}
if((sensors.getTempCByIndex(1) > tempset1-2) and (sensors.getTempCByIndex(0))  < tempset1)
{
  analogWrite(uscita2, 122);
  Serial.print("ON");
  delay(500);
}
if(sensors.getTempCByIndex(1) >= tempset1)
{
  analogWrite(uscita2, 0);
  Serial.print("OFF");
  delay(500);
}
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
 
  lcd.setCursor(0, 2);
  lcd.print("T1:");
  lcd.setCursor(3,2);
  lcd.print(sensors.getTempCByIndex(0));
  lcd.setCursor(11,2);
  lcd.print("T2:");
  lcd.setCursor(14,2);
  lcd.print(sensors.getTempCByIndex(1));
  DateTime now = rtc.now();
  // set the cursor to column 0, line 2
   //(note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 3);
  lcd.print("Ora");
  lcd.setCursor(5,3);
  if(now.hour()<=9){
    lcd.print("0");
    lcd.setCursor(6,3);
    lcd.print(now.hour(), DEC);
  }
  else{
    lcd.print(now.hour(), DEC);
  }
  lcd.setCursor(7,3);
    lcd.print(':');
    lcd.setCursor(8,3);
  if(now.minute() <=9){
    lcd.print("0");
    lcd.setCursor(9,3);
    lcd.print(now.minute(), DEC);
    }
    else{
    lcd.setCursor(8,3); 
    lcd.print(now.minute(), DEC);
    }
}
85
Quote
Could you please help me with this problem?
Get one of these: https://www.sparkfun.com/products/11812. Problem solved.
86
General Electronics / Re: Solar Project
Last post by TomGeorge - Today at 11:38 am
Hi
Welcome to the forum.

Open circuit voltage is just that, no output current.
The voltage will drop when you connect your pump because it will be drawing current.


I  think you need to google   PV  how they work


A 12V panel will give its best output at around 12V depending on the solar radiation conditions.
Running a pump directly from a set of panels will not work reliably.
You can get special controllers to do the job, but most of the time you use some batteries to help with some storage.

How often do you want the pump to run, 100W solar panel will only give you about 80W in real life, a MPP Controller will help.

Tom... :)
87
What happens when you don't include the RTC read in the time measurement?
The time from the RTC is used to calculate the current position of a star! The time for execution decreases slightly, but the problem of the execution time jumping up still exists even if I don't include the read time function in the time measurement.
88
Programming Questions / Re: State machine with complex...
Last post by AWOL - Today at 11:36 am
The RTC will probably have a square wave output. You could read the RTC only when the time changes.
90
Generale / Re: Presentazioni nuovi iscrit...
Last post by rufi28 - Today at 11:34 am
Salve a tutti, mi sono appena iscritto a questo sito. Per quanto riguarda le mie conoscenze su Arduino non sono molte poichè ho iniziato quest'anno a studiarlo. In questo momento sto realizzando un progetto per la maturità che spero di terminare al più presto. Ciao a tutti! :)
Pages: 1 ... 7 8 [9] 10

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy