Recent Posts

Pages: [1] 2 3 ... 10
1
Français / Re: Gestion aquarium aquascapi...
Last post by tonytech0 - Today at 09:13 pm
coucou les gens trop forts

Ceci est un APPEL AU SECOURS, je me met a genoux les amis. Je suis grave dans le caca et ça urge un peu pour être honnête, c'est pour mon aquarium.
je vous explique je viens de passer mon mois d'aout limite cloitré dans mon appart a passer 4 heures par jours, au détriment de sorties a la plage avec mes filles, a bosser sur mon arduino. je me suis plongé dans ma bible arduino, site internet multilingue et sur youtube bref j'ai tous essayé enfin je pense.
Bref je vous explique, j'ai un arduino mega, un DS1307 et  DS3231, un afficheur 20X4, une carte relais.
j'ai passé mes vacance a essaye de brancher mon horloge sur mon arduino=ok, essayé de mettre l'horloge a l'heure=fiasco, faire déclencher des sorties de ma carte relais=ok, mais faire déclencher les relais a certaines heures= ça me parait irréaliste je ne vois pas comment faire??? sachant que je n'arrive même pas a afficher l'heure sur mon liquid cristal
je recherche juste un sketch tous simple avec un affichage de l'heure sur l'afficheur, les horaires ne seront programmable que par le PC ????
Au secours SVP car mes deux programmateurs ont claqués et je doit gérer l'heure d'éclairage et l'apport d'engrais tout les jours et c'est super contraignant pour tout le monde maintenant que nous avons repris le boulot.
Fr
2
I get a lot of compile errors
Code: [Select]
sketch_sep03a.ino:5:9: error: no matching function for call to 'PCF8574::PCF8574()'
sketch_sep03a.ino:5:9: note: candidates are:
In file included from sketch_sep03a.ino:3:0:
C:\Users\Rob\Desktop\WORK\Arduino\libraries\PCF8574/PCF8574.h:27:14: note: PCF8574::PCF8574(uint8_t)
     explicit PCF8574(const uint8_t deviceAddress);
              ^
C:\Users\Rob\Desktop\WORK\Arduino\libraries\PCF8574/PCF8574.h:27:14: note:   candidate expects 1 argument, 0 provided
C:\Users\Rob\Desktop\WORK\Arduino\libraries\PCF8574/PCF8574.h:24:7: note: PCF8574::PCF8574(const PCF8574&)
 class PCF8574
       ^
C:\Users\Rob\Desktop\WORK\Arduino\libraries\PCF8574/PCF8574.h:24:7: note:   candidate expects 1 argument, 0 provided
sketch_sep03a.ino:6:9: error: no matching function for call to 'PCF8574::PCF8574()'
sketch_sep03a.ino:6:9: note: candidates are:
In file included from sketch_sep03a.ino:3:0:
C:\Users\Rob\Desktop\WORK\Arduino\libraries\PCF8574/PCF8574.h:27:14: note: PCF8574::PCF8574(uint8_t)
     explicit PCF8574(const uint8_t deviceAddress);
              ^
C:\Users\Rob\Desktop\WORK\Arduino\libraries\PCF8574/PCF8574.h:27:14: note:   candidate expects 1 argument, 0 provided
C:\Users\Rob\Desktop\WORK\Arduino\libraries\PCF8574/PCF8574.h:24:7: note: PCF8574::PCF8574(const PCF8574&)
 class PCF8574
       ^
C:\Users\Rob\Desktop\WORK\Arduino\libraries\PCF8574/PCF8574.h:24:7: note:   candidate expects 1 argument, 0 provided
sketch_sep03a.ino: In function 'void loop()':
sketch_sep03a.ino:26:13: error: 'class PCF8574' has no member named 'begin'
sketch_sep03a.ino:27:13: error: 'class PCF8574' has no member named 'begin'
sketch_sep03a.ino:31:17: error: 'class PCF8574' has no member named 'pinMode'
sketch_sep03a.ino:32:17: error: 'class PCF8574' has no member named 'digitalWrite'
sketch_sep03a.ino:34:17: error: 'class PCF8574' has no member named 'pinMode'
sketch_sep03a.ino:35:17: error: 'class PCF8574' has no member named 'digitalWrite'
sketch_sep03a.ino:42:26: error: 'class PCF8574' has no member named 'digitalRead'
sketch_sep03a.ino:43:26: error: 'class PCF8574' has no member named 'digitalRead'


You can only use the functions as defined in the PCF8574.h file !

Latest version of the library - https://github.com/RobTillaart/Arduino/tree/master/libraries/PCF8574 -


3
Deutsch / Re: ESP8266 mit der Arduino ID...
Last post by Home38 - Today at 09:10 pm
Hallo,

gehört vielleicht nicht hier herein, aber ich wollte keinen neuen Beitrag erstellen.

Hat jemand einen Tip, wie ich mit dem ESP8266 UDP-empfangen kann ? Senden geht wohl, aber das
Empfangen habe ich noch nicht hinbekommen, weil ich nicht weiß wie es geht .

4
Generale / Scatole e box per contenere pr...
Last post by DarioM - Today at 09:09 pm
Sto facendo dei progetti che una volta finiti avranno bisogno di un'alloggiamento adeguato.

Mi sapreste indicare in generale dove poter acquistare delle scatole/box gradevoli a vedere, funzionali e a prezzi non esorbitanti?
5
According to the NRF24L01+ datasheet:

(p. 20):
This radio has 4 operating modes:

Power Down
Standby
RX
TX

(p. 21):
Current consumption should be:

0.9 uA (0.0009 mA) in Power Down
26 uA (0.026 mA) in Standby


My goal:
  • uber low-power consumption while sleeping.


My Setup:


My Experience thus far:

  • I'm having no problem putting the MCU into a super-deep sleep:

 Thanks largely to Gammon's Power Saving examples I am able to pull as little as 0.1 uA (0.0001 mA) w/ just the MCU in sleep. (measured w/ a decent DMM)

But once I add the NRF24L01+ radio, I've hit a wall...

  • I'm not able to put the radio into power-down mode.



I've flashed a variety of different example code that claims to put these radios into power-down mode, including maniacbug's and gammon's.

neither of these examples are getting me anywhere near the claimed power-down consumption of the NRF24L01+. I'm seeing ~ 2.02 mA in sleep w/ maniacbug's and ~1.6 mA in sleep w/ Gammon's.

My Questions:
  • Can anyone show me example code that actually puts the NRF24L01+ radio into Power-Down mode, consuming only 0.9 uA ?
6
Well, I am basically trying to learn about interrupts so made a basic circuit with an ATTiny85 with a Red LED on digital 3 (PB2) and a green LED on digital pin 4 (PB3).

I have a 100ohm resisted wire from the 5v rail supply being used to "flip" PB5 (digital 0) pins logic. I was expecting the LEDs to alternate depending on wether I have bothered to change the logic in the last second...
The red LED stays on no matter what!


I have annotated my code with some references I have gotten in the datasheet...

Code: [Select]

volatile unsigned long some_variable;


ISR(PCINT0_vect) {
  some_variable=1;
}

void setup()
{
  SREG =  0b10000000; //Set bit I to 1 in SREG byte (AVR Status Register). 4.4.1 in datasheet. -> Enables interrupts.
  MCUCR = 0b00000001; // A change in pin logic will cause the ISR to be initiated (9.3.1 in datasheet).
  GIMSK = 0b01000000;   // Enable pin change interrupt Table 9.3.2
 
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, INPUT);
 

}

void loop ()   {
 
if (some_variable=1){

    digitalWrite(3, HIGH);
    digitalWrite(4,LOW);
  }

else
{
digitalWrite(3,LOW);
digitalWrite(4,HIGH);
}

delay(1000);
 
  some_variable=0;
} //loop
7
Hi,

I tried today, but the effect is the same.
It does not solve the problem

I tried this code:

Code: [Select]

#include <Wire.h>
#include <PCF8574.h>

PCF8574 expander1;
PCF8574 expander2;

// the setup routine runs once when you press reset:
void setup()
{
  // initialize the digital pin as an output.
 
 
  for (int x=0; x <= 7; x++)
    {
     
      int k = 30+x;
      pinMode(k, OUTPUT);
     
    }
}

// the loop routine runs over and over again forever:
void loop()
{
  expander1.begin(0x38);
  expander2.begin(0x39);
 
  for (int x=0; x <= 7; x++)
    {     
      expander1.pinMode(x, INPUT);
      expander1.digitalWrite(x, HIGH);
     
      expander2.pinMode(x, INPUT);
      expander2.digitalWrite(x, HIGH);
     
    }
 
 
  for (int i=0; i <= 7; i++)
  {
      int P1 = expander1.digitalRead(i);
      int P2 = expander2.digitalRead(i);
      int a = 30+i;
     
      if (P1 == 0 || P2 == 0)
      {
        digitalWrite(a, HIGH);
      }
 
      if (P1 == 1 && P2 == 1)
      {
        digitalWrite(a, LOW);
      }
   }
 
}

Did this compile ?
8
Generale / Re: Aiuto per impianto audio
Last post by DarioM - Today at 09:05 pm
Be', per alimentare Arduino dal 24V, non fai altro che metterci un regolatore che te la abbassi a 8 o 9 V (anche se l'idea dell'alimentatore separato e' la migliore ;)) ... i rele' prendili da 12V, ma se proprio devi usare quelli da 5V, puoi usare un convertitore DC-DC che ti abbassi la 24V a 5V (potresti usarne uno anche per Arduino, ma filtrandolo piu che bene) ... su ebay se ne trovano una marea di convertitori "buck" o "stepdown" a prezzi minimi ...

Per quanto riguarda i rele' per connettere le casse, intendevo dire che non e' mai bene usare semplicemente dei rele' per collegare e scollegare ... secondo la combinazione che usi, potresti passare, per un finale, da 4 casse collegate (2 ohm) a nessuna cassa collegata (niente carico) o viceversa ... prova ad immaginare che fine farebbe il finale in quei casi ? ... di solito quando si fanno quei box di commutazione, si usano resistenze di potenza per evitare di "aprire" l'uscita del finale, oppure sistemi che distribuiscono il carico in modo attivo (molto piu complessi e costosi) ...

Inoltre i prodotti professionali  che ancora usano i rele' (ormai molti sono passati ai mosfet), per le commutazioni delle uscite, usano rele' di tipo "telefonico" (anche se ormai le centraline telefoniche non usano piu rele' da un pezzo, li chiamano ancora cosi perche' furono studiati e prodotti specificamente per la telefonia), non rele' standard, e c'e' un'enorme differenza fra i due tipi, anche se ormai quasi nessuno la conosce piu ... detto in parole povere, un contatto deviatore di un rele' standard, quando commuta, apre il contatto NC prima di chiudere il contatto NO, e viceversa ... un rele' telefonico, al contrario, apre il contatto NC solo DOPO che il contatto NO si e' chiuso, e viceversa (altrimenti, durante le commutazioni, sarebbe sempre caduta la linea), consentendo di creare sistemi in cui non c'e' mai una totale assenza di connessione, e quindi il finale non passa mai di colpo da "circuito aperto" a "carico presente" durante una commutazione ...
Grazie per le delucidazioni sui relays... Purtroppo non conosco i mosfet ma magari faccio una ricerca per capire se l'utilizzo sarebbe alla mia portata evitando i relays.

Per quanto riguarda il carico non ho problemi in quanto avrò in totale 4 uscite a 4 ohm x 8 casse a 4-8 ohm, quindi collegherei direttamente in parallelo a 2 a 2 le casse, magari scegliendo di mettere sulla stessa uscita 2 casse che difficilmente staranno accese assieme.

Se hai/avete altre dritte son sempre ben accette!
9
Deutsch / Re: RGB`s bei Dunkelheit dimm...
Last post by agmue - Today at 09:04 pm
das einbinden des sketch im Forum bekomm ich nicht hin., dehalb so:
Klicke mal auf den Button </>, dann bekommst Du code-Tags, da dann mitten rein.
10
Français / Re: Librairie qui disparait
Last post by Ninnin - Today at 09:00 pm
Je sais cela, c'est pour ça que j'ai ecrit sur la première ligne "enfin .... presque...."
 :)
Pages: [1] 2 3 ... 10