Loading...
  Show Posts
Pages: 1 ... 49 50 [51] 52 53 ... 105
751  Using Arduino / General Electronics / Re: 4 pin ultrasonic range finder, 3 pin ping sensor on: February 07, 2013, 08:41:54 am
No, with the 4 pin, they have split the data lines to Echo and Trigger, instead of a single line. The 3 pin code will work, you just need to tweak it to work with trigger and echo. HINT: one is input and the other is output.
752  Using Arduino / Programming Questions / Re: programming help on: February 07, 2013, 08:29:29 am
There are PLENTY of RTC code in either here or project guidence, that do something after a certain time has passed. Most, if not ALL have examples. Find them, read them, learn from them, and write your own. Come back when you have an actual code that compiles or at least has some errors that make sense based on what you wrote.

No code, no help.
753  Using Arduino / Programming Questions / Re: Switch/Case not responding as expected on: February 07, 2013, 08:05:24 am
Quote
Sorry but i am not so experience as all the others here
It doesn't take experience to see what is on the LCD screen. Does anything at all go on the screen? Have you tried just sending the data to the serial monitor?
754  Using Arduino / Programming Questions / Re: Button change on: February 06, 2013, 08:32:39 pm
I forgot to add a closing ) in the if statement.

Quote
Works with the exception mills()
???

Post your full code
755  Using Arduino / Project Guidance / Re: IR emitter / receiver from scrollwheel mouse question on: February 06, 2013, 08:05:53 pm
Follow the trace on the circuit board back to GND or V-.
756  Using Arduino / Programming Questions / Re: Button change on: February 06, 2013, 08:03:42 pm
Code:

boolean latch = false;
unsigned long timer = 0;
byte LED_pin = 13;

void setup() {
.
.
.
}

void loop() {

//debounce code here

if(button == HIGH) {
latch = !latch;
timer = millis();

  if(latch == true && (millis() - timer < 3000) {
  digitalWrite(LED_pin, HIGH);
  }

  else {
  digitalWrite(LED_pin, LOW);
  }
 }
}

untested but if you fill in the rest, it should work.
757  Using Arduino / Programming Questions / Re: Need help with programing please? on: February 06, 2013, 01:54:03 pm
Start with the examples and maybe even a forum search, there is plenty of codes in here to help you get started.
758  Using Arduino / Programming Questions / Re: Switch/Case not responding as expected on: February 06, 2013, 01:47:06 pm
What made you put 255 in here as RX?
Quote
SoftwareSerial serLCD = SoftwareSerial(255, TxPin);
759  Using Arduino / Programming Questions / Re: Need help with programing please? on: February 06, 2013, 01:38:39 pm
Yes, an actual chip. Or if you have a few transistors lying around, you can make your own H bridge. Look up H-Bridge IC
760  Using Arduino / Programming Questions / Re: Need help with programing please? on: February 06, 2013, 01:01:21 pm
Have you tried a regular H-Bridge? Also you cannot have both USB and battery plugged into the arduino together.
761  Using Arduino / Project Guidance / Re: IR emitter / receiver from scrollwheel mouse question on: February 06, 2013, 12:46:09 pm
I would assume the middle IS ground, but of all my years dealing with electronics and other situations, I've learned to NEVER assume.
Follow the traces on the circuit board, and see what pin goes to ground. It may or may not be the middle pin, you have to check.
762  Using Arduino / Project Guidance / Re: IR emitter / receiver from scrollwheel mouse question on: February 06, 2013, 12:23:38 pm
The IR has two in one. The mouse detects which of the two gets blocked first, then decides on which direction it is going.
763  Using Arduino / Programming Questions / Re: TFT keypad need help on coding on: February 06, 2013, 12:20:25 pm
myInts[0] = '0' single quotes.

The first zero will drop out, leaving you with just 1, not 01.
764  Using Arduino / Programming Questions / Re: TFT keypad need help on coding on: February 06, 2013, 11:49:44 am
You said you already made a map of the buttons.

Code:
if (page == 70 && p.y > 211 && p.y < 231 &&  p.x > 84 && p.x <104  ){ // im guessing button ZERO
      tft.setTextSize(3);
      tft.fillRect(82, 201, 25, 25, BLUE);
      tft.setCursor(82, 201);
      tft.println ("0");
      myInts[counter++] = '0'; // *** this is the setup needed *** the numbers must go between single quotes '  '
                               // Everytime you press a button, counter updates and the char is stored
                               // If special button is pressed, convert data in array.
    }
    else if  (page == 70 && p.y > 290 && p.y < 310 &&  p.x > 190 && p.x <215 && q==1){ // Button ONE
      tft.setTextSize(3);
      tft.fillRect(110, 201, 25, 25, BLUE);
      tft.setCursor(110, 201);
      tft.println ("1");
      myInts[counter++] = '1';
    }
    .  TWO
    .  THREE
    .  FOUR
  And so on

Added: You also need to make sure you set the counter back to zero after you convert the array to an int.
765  Using Arduino / Programming Questions / Re: TFT keypad need help on coding on: February 06, 2013, 11:32:10 am
If he researched the atoi function, then he should know that it needs to be char null terminated. What I gave him was just an example to build on.

OP, your numbers must be chars, not actual ints. '1','2','3'... and so on.
Pages: 1 ... 49 50 [51] 52 53 ... 105