Loading...
  Show Posts
Pages: 1 ... 7 8 [9] 10 11
121  Using Arduino / Programming Questions / How convert integer to low and high byte? on: January 26, 2012, 04:00:12 am
Hello!How convert integer to low and high byte?Example int temp=20 convert low byte=0 and high byte=2....
122  Using Arduino / General Electronics / Re: How on/off device with relay with pulses from Arduino? on: January 25, 2012, 09:37:46 am
I want control my ac or dc device permanently for long time on or off the digitalWrite(pin,HIGH)with delay after is for little time seconds,minutes...no permanently.So i think i must use mosfet,ic 555 like touch button on/off for this...the Arduino is good for pulses...outputs...
123  Using Arduino / General Electronics / How on/off device with relay with pulses from Arduino? on: January 25, 2012, 04:25:21 am
Hello.How on/off device with relay with  pulses from Arduino?I want use timer 555 and mosfet...external...any simple circuit?
124  Using Arduino / Programming Questions / Re: Help with shift bits... on: January 24, 2012, 02:59:17 pm
 I try decode the remote control for united a/c but when decrease the resolution delay time the pulse increase.Why?
125  Using Arduino / Programming Questions / Re: Help with shift bits... on: January 24, 2012, 01:13:23 pm
the looop start and stop again or still countdown ?
126  Using Arduino / Programming Questions / Re: Help with shift bits... on: January 24, 2012, 01:10:32 pm
When send a pulse IR is a pulse 13usec High,13usecs Low,13usec High,13usecs Low,13usec High,13usecs Low,13usec High,13usecs Low....for 700usecs the loop work counter when pulse is high only for 13usecs or for total time 700usecs?
127  Using Arduino / Programming Questions / Re: Help with shift bits... on: January 24, 2012, 01:01:45 pm
My basic question is why pin 2 still high?The Pulse Ir is high ,low every 13usec when fall to zero what happen ?How read this?The pin arduino or ir receiver has internal small capacitor?
128  Using Arduino / Programming Questions / Re: Help with shift bits... on: January 24, 2012, 11:53:42 am
toyotomi a/c on pulse with resolution 20usec

Ready to decode IR!



Received:

OFF    ON
45204 usec, 8940 usec
4420 usec, 760 usec
400 usec, 680 usec
420 usec, 680 usec
1500 usec, 680 usec
1520 usec, 700 usec
1500 usec, 680 usec
400 usec, 700 usec
400 usec, 680 usec
420 usec, 680 usec
400 usec, 700 usec
400 usec, 680 usec
1500 usec, 700 usec
1500 usec, 680 usec
1500 usec, 680 usec
420 usec, 680 usec
400 usec, 700 usec
400 usec, 680 usec
1500 usec, 700 usec
420 usec, 660 usec
440 usec, 680 usec
1500 usec, 680 usec
1500 usec, 700 usec
400 usec, 680 usec
1500 usec, 700 usec
400 usec, 680 usec
420 usec, 680 usec
400 usec, 700 usec
1500 usec, 680 usec
400 usec, 700 usec
400 usec, 680 usec
420 usec, 680 usec
400 usec, 700 usec
400 usec, 680 usec
420 usec, 680 usec
400 usec, 700 usec
1500 usec, 680 usec
1520 usec, 660 usec
1500 usec, 720 usec
1500 usec, 680 usec
1500 usec, 680 usec
1500 usec, 700 usec
400 usec, 680 usec
440 usec, 660 usec
400 usec, 700 usec
400 usec, 680 usec
420 usec, 680 usec
400 usec, 700 usec
1500 usec, 680 usec
1520 usec, 660 usec
1520 usec, 700 usec
1500 usec, 680 usec
1500 usec, 680 usec
1500 usec, 700 usec
400 usec, 680 usec
440 usec, 660 usec
400 usec, 700 usec
400 usec, 680 usec
440 usec, 660 usec
400 usec, 700 usec
420 usec, 660 usec
420 usec, 680 usec
400 usec, 700 usec
1520 usec, 660 usec
400 usec, 700 usec
1520 usec, 660 usec
1520 usec, 680 usec
420 usec, 680 usec
1500 usec, 680 usec
420 usec, 500 usec

when i decrease resolution to 1 usec the time 400usec became 250usecs...

the toyotomi ok on
but i have another a/c united no work...
129  Using Arduino / Programming Questions / Re: Help with shift bits... on: January 24, 2012, 11:18:35 am
Arduino work with 16MHz....every cycle is 62.5 nanoseconds....i could use this for more precision?
130  Using Arduino / Programming Questions / Re: Help with shift bits... on: January 24, 2012, 11:14:17 am
If i remove delay from the code....i measurement the high pulse general or only the total time when the bit is 1 high for 13usecs (38KHz)?
131  Using Arduino / Programming Questions / Re: Help with shift bits... on: January 24, 2012, 11:11:05 am
Arduino Duemilanove Mega328
132  Using Arduino / Programming Questions / Re: Help with shift bits... on: January 24, 2012, 11:04:29 am
Code:
/* Raw IR decoder sketch!
 
 This sketch/program uses the Arduno and a PNA4602 to
 decode IR received. This can be used to make a IR receiver
 (by looking for a particular code)
 or transmitter (by pulsing an IR LED at ~38KHz for the
 durations detected
 
 Code is public domain, check out www.ladyada.net and adafruit.com
 for more tutorials!
 */
 
// We need to use the 'raw' pin reading methods
// because timing is very important here and the digitalRead()
// procedure is slower!
//uint8_t IRpin = 2;
// Digital pin #2 is the same as Pin D2 see
// http://arduino.cc/en/Hacking/PinMapping168 for the 'raw' pin mapping
#define IRpin_PIN      PIND
#define IRpin          2
 
// the maximum pulse we'll listen for - 65 milliseconds is a long time
#define MAXPULSE 65000
 
// what our timing resolution should be, larger is better
// as its more 'precise' - but too large and you wont get
// accurate timing
#define RESOLUTION 20
 
// we will store up to 100 pulse pairs (this is -a lot-)
uint16_t pulses[100][2];  // pair is high and low pulse
uint8_t currentpulse = 0; // index for pulses we're storing
 
void setup(void) {
  Serial.begin(9600);
  Serial.println("Ready to decode IR!");
}
 
void loop(void) {
  uint16_t highpulse, lowpulse;  // temporary storage timing
  highpulse = lowpulse = 0; // start out with no pulse length
 
 
//  while (digitalRead(IRpin)) { // this is too slow!
    while (IRpin_PIN & (1 << IRpin)) {
     // pin is still HIGH
 
     // count off another few microseconds
     highpulse++;
     delayMicroseconds(RESOLUTION);
 
     // If the pulse is too long, we 'timed out' - either nothing
     // was received or the code is finished, so print what
     // we've grabbed so far, and then reset
     if ((highpulse >= MAXPULSE) && (currentpulse != 0)) {
       printpulses();
       currentpulse=0;
       return;
     }
  }
  // we didn't time out so lets stash the reading
  pulses[currentpulse][0] = highpulse;
 
  // same as above
  while (! (IRpin_PIN & _BV(IRpin))) {
     // pin is still LOW
     lowpulse++;
     delayMicroseconds(RESOLUTION);
     if ((lowpulse >= MAXPULSE)  && (currentpulse != 0)) {
       printpulses();
       currentpulse=0;
       return;
     }
  }
  pulses[currentpulse][1] = lowpulse;
 
  // we read one high-low pulse successfully, continue!
  currentpulse++;
}
 
void printpulses(void) {
  Serial.println("\n\r\n\rReceived: \n\rOFF \tON");
  for (uint8_t i = 0; i < currentpulse; i++) {
    Serial.print(pulses[i][0] * RESOLUTION, DEC);
    Serial.print(" usec, ");
    Serial.print(pulses[i][1] * RESOLUTION, DEC);
    Serial.println(" usec");
  }
}
133  Using Arduino / Programming Questions / Re: Help with shift bits... on: January 24, 2012, 10:52:35 am
The counter work when pin2 something there is ....the pulse?
134  Using Arduino / Programming Questions / How work Raw Ir decoder? on: January 24, 2012, 08:31:00 am
Hello.I need help to understand how work Raw Ir decoder sketch?Why pin 2 is still high?http://www.ladyada.net/learn/sensors/ir.html
The Ir pulse is 01010101....with frequency 38KHz when pulse Ir is high....how counter work when fall to zero for 13usec?

135  Using Arduino / Programming Questions / Re: Help with shift bits... on: January 24, 2012, 07:48:23 am
I can't understand how pin is still high ....the pulse is 01010101....38 KHz....?
Pages: 1 ... 7 8 [9] 10 11