Show Posts
Pages: 1 ... 45 46 [47] 48 49 ... 228
691  Using Arduino / Programming Questions / Re: [SOLVED]Need help referencing two classes in one constructor. on: March 05, 2014, 09:03:36 pm
I absolutely do, Thank you for all of your help. I learned a great deal, and I'm actually using what you taught me for my other libraries.

Again Thank you very much.
692  Using Arduino / Programming Questions / Re: Transfer data to arduino via bluetooth on: March 05, 2014, 08:10:16 pm
Did you make the android code yourself, if so, let me take a look at it. I'm wondering if its the UUID that is the issue,or if you even coded it correctly in the first place.
693  Using Arduino / Programming Questions / Re: Transfer data to arduino via bluetooth on: March 05, 2014, 07:28:56 pm
Does you module have a connection indicator? Try a terminal program like RealTerm or Putty.
694  Using Arduino / Programming Questions / [SOLVED] Need help referencing two classes in one constructor. on: March 05, 2014, 07:23:29 pm
Final version of OneWireKeypad.
695  Using Arduino / Programming Questions / Re: Transfer data to arduino via bluetooth on: March 05, 2014, 04:35:32 pm
Try the example I gave you.

SoftwareSerial bluetooth(bluetoothTx, bluetoothRx); //It should be Rx, Tx.
How is it wired and what voltage are you supplying the BT module?
696  Using Arduino / Programming Questions / Re: Transfer data to arduino via bluetooth on: March 05, 2014, 04:14:58 pm
It would help if you posted the full code.

Software Serial Example:
Code:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() 
{
  // Open serial communications and wait for port to open:
  Serial.begin(57600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(4800);
  mySerial.println("Hello, world?");
}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}
697  Using Arduino / Project Guidance / Re: UNO,4x3 keypad and a 8 channel relay on: March 05, 2014, 03:16:38 pm
You only have the one pinMode for the first relay, where are the other 3? "pinMode(ledPin, OUTPUT);"
698  Using Arduino / Programming Questions / Re: Simulate Capacitor charge-discharge cycle, without any external Capacitor on: March 05, 2014, 01:12:09 pm
To simulate a capacitor charging, you need 3 things. Supply voltage, a resistor, and of course a capacitor.
With the resistor and capacitor you can calculate Tau, the time it takes to charge and discharge, which is R*C.
Then you can plug every thing into this formula.

Vc = E*(1 - e^( -Time / Tau) ).

Vc = capacitor Voltage @ time.
E = supply Voltage.
Time is usually in milliseconds, but for better results, use microseconds.

Discharge:

Vc = E*e^(-Time / Tau) .

You will need to convert the formula to C language.
699  Using Arduino / Programming Questions / Re: Bluetooth(HC-05) communication with two arduino uno on: March 04, 2014, 12:51:55 am
Quote
but i have searched some information in the internet.
What have you searched, and what did you learn from it?

Quote
i want to ask how to match these two Bluetooth
They should auto pair when they are within a 30 ft distance of each other.

Quote
and can Bluetooth transmit and receive in the same time?
It may look like they can send and receive data at the same time, but that's because the arduino can process the data faster then we can see it. in actuality, they don't, the arduino can only do one thing at a time.
700  Using Arduino / Programming Questions / Re: Multiple buttons/inputs how to? on: March 03, 2014, 04:57:36 pm
Sloppiness aside, what should the break, left and right sequences look like?
701  Using Arduino / Project Guidance / Re: Back Space and Enter operation on: March 03, 2014, 12:50:00 pm
This here is a function I made for my password library that allows the person to clear what they entered, one entry at a time.

The parts that are lined out are not important for you to know what they are at this point.
Quote
char * NewPasswordV2::EnterData(char data)
{
   if(data > 0 && data != _CLR && data != _ENT)  //look at incoming char, see what it is. _CLR = 'C' on my keypad, _ENT = 'E'.
   {
     nt[cnt] = data; // If incoming char is not 'C' or 'E', store it.
     cnt++; // increment counter (index) for next char
   }

   if(data == _CLR) // if incoming char is 'C'
   {
     nt[cnt] = NULL; // clear the entry at the current index
     cnt > 0? cnt-- : cnt = 0; // if cnt > 0, meaning there still is something in the array, decrement the index for the next new char.
   }

   if( (_MODE? data == _ENT : cnt ==Lenght_of_Passwords - 1) )
   {
     checkFlag = true;
     cnt = 0;
     return nt;
   }

}

What you can do is pass in your arrays, UL and LL as pointers or the whole array and basically do what  I did here.
702  Using Arduino / Installation & Troubleshooting / Re: When I Try To Upload Something There Is No Upload Button. on: March 03, 2014, 11:41:08 am
Did you remember to choose the board your using and the com port its on? Post a screen shot please.
703  Using Arduino / Programming Questions / Re: RGB LED, random colour generator not working on: March 02, 2014, 11:36:13 pm
I think you would need to attach the legs of the LED to the PWM pins and use the analogWrite() function because the digitalWrite() function only turns pins on and off. I may be wrong.

No, your correct, I didn't' see what pins he was using, my error.
704  Using Arduino / Installation & Troubleshooting / Re: When I Try To Upload Something There Is No Upload Button. on: March 02, 2014, 09:07:27 pm
That's very strange, have you tried to re-install the software? What version are you using? CTRL+U is the keyboard shortcut, see if that works, if not the re-install the software.
705  Using Arduino / Programming Questions / Re: RGB LED, random colour generator not working on: March 02, 2014, 07:50:51 pm
Make sure your button is wired normally LOW with a resistor to ground (not floating), and your button will need to be debounced, or able to prevent from being held down.

You can fill in the rest and make currState, lastState boolean at the top of the sketch.
Code:
currState = digitalRead( 2 );
if( currState != lastState)
{
  lastState = currState;
  if(currState == HIGH)
  {
    // get colors here
  }
}

Tip, if you know certain variables are not going to exceed  (-32,768 to 32,767) = int or (0 to 65,535) = unsigned int, you can make them a byte to save memory. Oh and analogWrite, not digital.
Pages: 1 ... 45 46 [47] 48 49 ... 228