Show Posts
Pages: [1] 2 3 ... 6
1  Using Arduino / Programming Questions / Re: using IR Receiver, code error.... on: July 23, 2011, 09:41:34 pm
are all IR Recievers set up the same if so how should it be done correctly?
2  Using Arduino / Programming Questions / Re: using IR Receiver, code error.... on: July 23, 2011, 08:15:37 pm
yes it compiled fine for me to but when attaching the IR Receiver it came up...
3  Using Arduino / LEDs and Multiplexing / Re: Multiplexing code.... on: July 23, 2011, 08:13:04 pm
okay thanks for the info and arrays??? ill look in to that smiley yes i will learn more about code before tackling this project
4  Using Arduino / LEDs and Multiplexing / Re: Multiplexing code.... on: July 23, 2011, 06:12:44 am
i dont really understand this do you suggest i try a more simple project or shall i push my self to try this???
is it as hard as people say?
5  Using Arduino / Programming Questions / Re: using IR Receiver, code error.... on: July 23, 2011, 06:10:03 am
it came up in the box on the arduino program where it sas compiling,
This Code...
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");
  }
}
6  Using Arduino / Programming Questions / using IR Receiver, code error.... on: July 22, 2011, 08:19:28 pm
could some body tell me why this came up?


Code:
at gnu.io.RXTXPort.eventLoop(Native Method)
at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575)
7  Using Arduino / LEDs and Multiplexing / Re: Multiplexing code.... on: July 22, 2011, 01:22:34 pm
can u look from the web site please because it wouldnt let me post it because it exceeded the character limit
8  Using Arduino / LEDs and Multiplexing / Multiplexing code.... on: July 22, 2011, 10:24:08 am
On this Web address it gives a tutorial on how to make a LED cube,

http://www.instructables.com/id/The-Arduino-LED-Cube/step5/Programming-Time/

with the code supplied i would like help understanding some part of it should i post this in the code section of the forum??

this is the part i need help with....
i understand this is for each LED but i dont understand how.....

Code:
B111, B111, B111, B111, B111, B111, B111, B111, B111, 5,
B000, B000, B000, B000, B000, B000, B000, B000, B000, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 5,
B000, B000, B000, B000, B000, B000, B000, B000, B000, 1,
// flash each LED in sequence:
// Left->Right column, then Top->Bottom row, then Upper->Lower plane
B100, B000, B000, B000, B000, B000, B000, B000, B000, 1,
B010, B000, B000, B000, B000, B000, B000, B000, B000, 1,
B001, B000, B000, B000, B000, B000, B000, B000, B000, 1,
B000, B100, B000, B000, B000, B000, B000, B000, B000, 1,
B000, B010, B000, B000, B000, B000, B000, B000, B000, 1,
B000, B001, B000, B000, B000, B000, B000, B000, B000, 1,
B000, B000, B100, B000, B000, B000, B000, B000, B000, 1,
B000, B000, B010, B000, B000, B000, B000, B000, B000, 1,
B000, B000, B001, B000, B000, B000, B000, B000, B000, 1,
B000, B000, B000, B100, B000, B000, B000, B000, B000, 1,
B000, B000, B000, B010, B000, B000, B000, B000, B000, 1,
B000, B000, B000, B001, B000, B000, B000, B000, B000, 1,
B000, B000, B000, B000, B100, B000, B000, B000, B000, 1,
B000, B000, B000, B000, B010, B000, B000, B000, B000, 1,
B000, B000, B000, B000, B001, B000, B000, B000, B000, 1,
B000, B000, B000, B000, B000, B100, B000, B000, B000, 1,
B000, B000, B000, B000, B000, B010, B000, B000, B000, 1,
B000, B000, B000, B000, B000, B001, B000, B000, B000, 1,
B000, B000, B000, B000, B000, B000, B100, B000, B000, 1,
B000, B000, B000, B000, B000, B000, B010, B000, B000, 1,
B000, B000, B000, B000, B000, B000, B001, B000, B000, 1,
B000, B000, B000, B000, B000, B000, B000, B100, B000, 1,
B000, B000, B000, B000, B000, B000, B000, B010, B000, 1,
B000, B000, B000, B000, B000, B000, B000, B001, B000, 1,
B000, B000, B000, B000, B000, B000, B000, B000, B100, 1,
B000, B000, B000, B000, B000, B000, B000, B000, B010, 1,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 10,

// Some little cube - big cube fun
B000, B000, B000, B000, B011, B011, B000, B011, B011, 10,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 10,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 5,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 2,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 2,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 2,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 2,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 2,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 2,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 1,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 1,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B110, B110, B000, B110, B110, B000, B000, B000, B000, 1,
B100, B000, B000, B000, B000, B000, B000, B000, B000, 1,
B110, B110, B000, B110, B110, B000, B000, B000, B000, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 1,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 1,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B110, B110, B000, B110, B110, B000, B000, B000, B000, 1,
B100, B000, B000, B000, B000, B000, B000, B000, B000, 1,
B110, B110, B000, B110, B110, B000, B000, B000, B000, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B000, B011, B011, B000, B011, B011, B000, B000, B000, 1,
B000, B000, B001, B000, B000, B000, B000, B000, B000, 1,
B000, B011, B011, B000, B011, B011, B000, B000, B000, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B000, B000, B000, B110, B110, B000, B110, B110, B000, 1,
B000, B000, B000, B000, B000, B000, B100, B000, B000, 1,
B000, B000, B000, B110, B110, B000, B110, B110, B000, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B000, B011, B011, B000, B011, B011, B000, B000, B000, 1,
B000, B000, B001, B000, B000, B000, B000, B000, B000, 1,
B000, B011, B011, B000, B011, B011, B000, B000, B000, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B000, B000, B000, B110, B110, B000, B110, B110, B000, 1,
B000, B000, B000, B000, B000, B000, B100, B000, B000, 1,
B000, B000, B000, B110, B110, B000, B110, B110, B000, 1,

// Diagonal wipe, starting in the center
B111, B111, B111, B111, B111, B111, B111, B111, B111, 5,
B111, B111, B111, B111, B111, B111, B111, B101, B111, 1,
B111, B111, B111, B111, B101, B111, B111, B101, B111, 1,
B111, B111, B111, B111, B101, B111, B111, B100, B111, 1,
B111, B101, B111, B111, B100, B111, B111, B100, B110, 1,
B111, B101, B111, B111, B100, B111, B111, B100, B110, 1,
B111, B011, B111, B111, B100, B110, B111, B100, B100, 1,
B111, B100, B110, B111, B100, B100, B111, B100, B000, 1,
B111, B100, B100, B111, B100, B000, B111, B000, B000, 1,
B111, B100, B000, B111, B000, B000, B011, B000, B000, 1,
B111, B000, B000, B011, B000, B000, B001, B001, B000, 1,

// 2-LED wide diaginal stripe that orbits the cube
B011, B000, B000, B001, B001, B000, B000, B001, B001, 1,
B001, B001, B000, B000, B001, B001, B000, B000, B011, 1,
B000, B001, B001, B000, B000, B011, B000, B000, B110, 1,
B000, B000, B011, B000, B000, B110, B000, B100, B100, 1,
B000, B000, B110, B000, B100, B100, B100, B100, B000, 1,
B000, B100, B100, B100, B100, B000, B110, B000, B000, 1,
B100, B100, B000, B110, B000, B000, B011, B000, B000, 1,
B110, B000, B000, B011, B000, B000, B001, B001, B000, 1,

// Now, with center flashies, for flavor
B011, B000, B000, B001, B001, B000, B000, B011, B001, 1,
B001, B001, B000, B000, B001, B001, B000, B000, B011, 1,
B000, B001, B001, B000, B000, B011, B000, B010, B110, 1,
B000, B000, B011, B000, B000, B110, B000, B100, B100, 1,
B000, B000, B110, B000, B100, B100, B100, B110, B000, 1,
B000, B100, B100, B100, B100, B000, B110, B000, B000, 1,
B100, B100, B000, B110, B000, B000, B011, B010, B000, 1,
B110, B000, B000, B011, B000, B000, B001, B001, B000, 1,
B011, B000, B000, B001, B011, B000, B000, B001, B001, 1,
B001, B001, B000, B000, B001, B001, B000, B000, B011, 1,
B000, B001, B001, B000, B010, B011, B000, B000, B110, 1,
B000, B000, B011, B000, B000, B110, B000, B100, B100, 1,
B000, B000, B110, B000, B110, B100, B100, B100, B000, 1,
B000, B100, B100, B100, B100, B000, B110, B000, B000, 1,
B100, B100, B000, B110, B010, B000, B011, B000, B000, 1,
B110, B000, B000, B011, B000, B000, B001, B001, B000, 1,
B011, B010, B000, B001, B001, B000, B000, B001, B001, 1,
B001, B001, B000, B000, B001, B001, B000, B000, B011, 1,
B000, B011, B001, B000, B000, B011, B000, B000, B110, 1,
B000, B000, B011, B000, B000, B110, B000, B100, B100, 1,
B000, B010, B110, B000, B100, B100, B100, B100, B000, 1,
B000, B100, B100, B100, B100, B000, B110, B000, B000, 1,
B100, B110, B000, B110, B000, B000, B011, B000, B000, 1,
B110, B000, B000, B011, B000, B000, B001, B001, B000, 1,

// Wrapping up
B001, B001, B000, B000, B001, B001, B000, B000, B001, 1,
B001, B001, B000, B000, B001, B001, B000, B000, B001, 1,
B000, B001, B001, B000, B000, B001, B000, B000, B001, 1,
B000, B000, B001, B000, B000, B001, B000, B000, B001, 1,
B000, B000, B000, B000, B000, B001, B000, B000, B001, 1,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 5,
B000, B000, B000, B000, B000, B000, B000, B000, B000, 3,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 5,
B000, B000, B000, B000, B000, B000, B000, B000, B000, 3,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 5,
B000, B000, B000, B000, B000, B000, B000, B000, B000, 3,
9  Using Arduino / General Electronics / using a different type of resistor for rotary encoder..... on: July 21, 2011, 06:42:10 pm
in the playground there is a link to using a dc motor as a rotary encoder...
LINK
http://christian.liljedahl.dk/guides/simple-rotary-encoder

... it talks about using a 15K resistor, could i use a different resistor or will it be a big difference??
10  Using Arduino / General Electronics / Difference Between transistors.. Noob Question on: July 18, 2011, 09:14:04 am
Is a "2N3904" Transistor the same as a "N3904"
what effect is the 2?
11  Using Arduino / Project Guidance / Re: Setting time for starting the motor on: July 04, 2011, 06:50:39 pm
okay thanks for the info and help.

Damian  smiley
12  Using Arduino / Project Guidance / Re: Setting time for starting the motor on: July 04, 2011, 05:55:11 am
is that your picture the one of the keypad inside the clear box???

if so where did you get your pin header cable?

Damian
13  Using Arduino / Project Guidance / Re: Setting time for starting the motor on: July 04, 2011, 05:18:58 am
thanks and i ment make a diagram if you didnt have one but i shall now look at it in the old forum

Damian.
14  Using Arduino / Project Guidance / Re: Setting time for starting the motor on: July 03, 2011, 07:33:58 pm
CrossRoads do you have a wiring diagram online that you copied?? i am interested in this project or could you make one? sorry for invading your thread eddiea6987
15  Using Arduino / Project Guidance / Re: Arduinio Bot Project on: June 26, 2011, 06:26:27 pm
i really like the idea of your project, i am fairly new and would like it if you get this in the exhibition section when finished. good luck!
and i would draw it all out on paper and see if there is anythink else you need smiley
Pages: [1] 2 3 ... 6