Recent Posts

Pages: [1] 2 3 ... 10
1
what I'm thinking is that since the PIR sensor can only detect movement but can't detect the direction of movement ( in this case moving in or out of the room ), I'm making it so that the sound sensor would be the one to tell if a person is moving in or out by listening to any sound  that person made when entering, like their  footstep sound.

After the PIR sensor detect a person moving, arduino will turn on a pin for a duration of time and let the sound sensor try to listen to any sound that person make.

If the sound sensor fail to detect any sound in that duration of time then the arduino will turn off the pin like it supposed to since it's only stay on for a certain duration. But if the sound sensor able to detect any sound in that duration of time, instead of turning the pin off, it will give arduino a new command to keep the pin on.

Basically, the sound sensor doesn't wait for the pir to complete it's entire on/off sequence. If the sound sensor can detect any sound, it will interrupt the off sequence from the PIR sensor, and change it to on, or make a new on sequence

2
Software / Re: Comando deciso da Arduino
Last post by Silente - Today at 06:44 pm
Dipende da su che base deve scegliere che comando dare. Può essere una scelta casuale, che potrebbe prendere la forma di una switch case in cui la variabioe é presa random (usando la funzione random() e amiche o altre apposite). Oppure la scelta può dipendere da altri fattori (ora, timer, sensori, presenza di altre uscite...) nel caso va scritto un programma che lebtenga in considerazione
3
Deutsch / Re: Digitalpotentiometer in ei...
Last post by DrDiettrich - Today at 06:43 pm
Funktioniert das Poti denn mit 1,2k?
4
Usual is to put the class declaration into the header file (which can be made available to other compilation units) and the definition into the cpp file then it is clear.

I think by 'inline' here, you mean combining the declaration and the definition in one file.

There are lots of discussions about this eg: https://stackoverflow.com/questions/9579930/separating-class-code-into-a-header-and-cpp-file
5
Project Guidance / Re: get crank angle
Last post by Robin2 - Today at 06:41 pm
I think this is how I would do it
Code: [Select]
void myPulseIsr() {
    timeOfPulse = micros();
    prevPulseInterval = pulseInterval; // save the preceding value
    pulseInterval = timeOfPulse - timeOfPrevPulse;
    if (pulseInterval > (prevPulseInterval + prevPulseInterval >> 1) { // compare to prev * 1.5
        longPulse = true;
        longPulseTime = timeOfPulse;
    }
    newPulse = true;
    timeOfPrevPulse = timeOfPulse;
}


NEVER use division where speed matters as it is very slow >>1 is the same as /2 but very much faste

...R
6
@mikb55,

Sorry if it seemed like I was buying cable. I want to plug 2 arduinos into existing CATx and talk to each other. 8 DI/O on each end.

It is just to test the cable itself (installed or on spool), so low data rate/slow comms are fine. I'm also old enough to admit not remembering differential signaling, though doubtlesslydoubtlessly taught it in school. Great call, and perfect for TP. Thanks!


I'll now look up DC resistance of CATx, and ponder what else I've forgotten... :)


7
Quote
This seems to have fixed the problem, but do you know if this is just an unreliable fix?
That depends on how often and defined the values on the radio side arrive. If you can ensure that no radio communication happens while the Arduino is sending values to the FONA it might work reliably. If you can't ensure that it might fail any time.
8
Storage / Re: Please help! How turn wav ...
Last post by el_supremo - Today at 06:38 pm
Quote from: MorganS
That will read bytes from the file. But they are meaningless without decompression
Nonsense. It is a standard WAV file, 16-bit PCM sampled at 16kHz. NO compression.
All that is required to read it, is to read two bytes at a time and that will give the 16-bit samples.
Or read the whole thing into a suitably sized buffer of signed 16-bit integers.

Pete
9
Generale / Re: Problema sketch servo cont...
Last post by Goblin72it - Today at 06:38 pm
Yeeee grazie, funziona perfettamente, ho eliminato un servo e un led e va da dio, grazie ancora.
Se qualcuno ha comunque indicazioni sul perchè non fungeva il mio sono superbene accette.
grazie davvero, anche se mi sa che durante il mio percorso da superpippa a pippa ci vedremo spesso
10
Hello forum,

The basis is that I calculate a score in the Arduino. I want this one
then cache them in a text file and then paste them into the
Access database can be read. The text file has to be constantly updated
become.


Are there solutions or experiences of how best to do this? :smiley-red:
Pages: [1] 2 3 ... 10