Show Posts
Pages: 1 ... 18 19 [20] 21 22 ... 197
286  Development / Other Software Development / Re: New TFT Extension Library on: February 25, 2014, 05:55:36 pm
Update: I added a new function, TextButton, and for right now, it will display text in the center of the button (the outline of the button still needs to be drawn separately) and you can still use it as a normal button. I am still working on the library and if I can get the TextButton function to work properly, I will do the same to the rest of the buttons.

I also added a wall ball game.
287  Using Arduino / Programming Questions / Re: The difference is returning a value which is very large on: February 25, 2014, 03:22:20 pm
There is a function that will convert your values to a char array (string), this useful function is sprintf(). Look it up and see how it works, then adapt it in your code.
288  Using Arduino / Project Guidance / Re: Need help with button combinations on: February 25, 2014, 03:18:53 pm
The code is doing something, the question is what? The code is using the serial monitor, which is set at a certain baud rate, to display a certain variable. You need to set up your Leds to react to that variable, but first you need to see that variable.

Your serial monitor might not be set to the baud rate in the code, but you can change it to do so, either the monitor itself or the code.
289  Using Arduino / Project Guidance / Re: Need help with button combinations on: February 25, 2014, 01:43:44 pm
I told you it is very easy. Wire the Leds and the rest of your buttons
Code:
#define Num_of_Buttons 3

boolean buttons[Num_of_Buttons] = {2,3,4};

byte LED_byte = 0;
void setup()
{
Serial.begin(115200);
for(byte i = 0; i < Num_of_Buttons; i++)
  pinMode(2+i, INPUT);
}

void loop() {
  for(byte i = 0; i < Num_of_Buttons; i++) // cycle through button array.
  {
    bitWrite(LED_byte, i, digitalRead(2+i)); // 2 = first button, 2 + i = cycle through all the buttons.
  }
  Serial.println(LED_byte);
}
290  Using Arduino / Programming Questions / Re: Random command appearing on: February 25, 2014, 02:18:22 am
Hello again.

Ok what happens if you hold the left Dpad button and release, do you still get the same message? By any chance the right Dpad button feel looser then the rest? It is possibly the right Dpad touch pad (the rubber part inside) is stuck, in which case you would need to open up the controller to find out.
291  Using Arduino / Programming Questions / Re: Using Serial to implement a password using other than numbers on: February 24, 2014, 10:35:13 pm
The strings are only equal when the result is 0, not 1 or true.
292  Using Arduino / Project Guidance / Re: Help with 6 button, 6 led code on: February 24, 2014, 04:36:14 pm
Assign a button a binary value and use the bitWrite function to turn on the led.
293  Using Arduino / Project Guidance / Re: Help with 6 button, 6 led code on: February 24, 2014, 01:26:31 pm
You are over thinking your code. It is as simple as using arrays.

USE CODE TAGS, like so. See nice and neat.
Code:
byte Buttons[6]= { 2,3,4,5,6,7 }; // at top of code "Global array"
byte LEDs[6]  = {8,9,10,11,12,13}; // at top of code "Global array"

//Inside setup(), this is all you need unless you want to use the serial monitor too
for(byte i = 2; i <= 7; i++)
{
  pinMode(Buttons[ i ], INPUT); // i = 2
  pinMode(LEDs[ i + 6 ], OUTPUT); i  + 6 = 8, and so on to i + 6 = 13.
}

// In the loop(), use another FOR loop to cycle through the arrays to read the buttons and output the corresponding LED.

One more thing, the digital pins, unless they have the ~ next to them, ONLY output a 1 or 0.
If you want to control the brightness of the LED, then you need to use analogWrite and one of pin with the ~ next to it.
294  Using Arduino / Project Guidance / Re: Controls for a project on: February 24, 2014, 01:16:23 pm
How did you finally get it to work?
295  Using Arduino / Project Guidance / Re: College project; Smart home using wifi arduino on: February 24, 2014, 02:55:11 am
I find it really hard to believe that you didn't learn "Arduino" programming. Electrical/Electronic Engineering requires that you learn at least C programming. So if you don't recognize C programming or have absolutely no knowledge of C programming, then you are going to have a rough time doing this project. Your professor obviously taught you some C programming, otherwise why give a project if you never covered the material?

Another thing, you want to use an Android app to control everything, ok, but what app? Making your own app requires you to know Java. Do you know Java?

If you are completely new to Arduino, then the best thing you can do is buy a C/C++ programming book, and start from page one. You also have example sketches provided with the Arduino software, try them all and take notes.

At the moment, this project is completely out of your reach. But if you have the time and are willing to learn, you will eventually be able to do it.
296  Using Arduino / Project Guidance / Re: Controls for a project on: February 23, 2014, 09:25:29 pm
This might not help but it's worth a try.

I found out that my module does not like it when 5 volts is supplied, it too gives the same error. However I noticed that my module does not even need 3.3V to work. I could have the V+ wire off and it will still function correctly. If you can and dont break your current one, but if you can, make your own adapter the exact same way I made mine. Buy a PS2 extension cable and make your own. Or try different controllers. Mine is an INTEC and it took me a long while to figure out what my issue was, and it was only when I started to take apart the adapter (remove the V+ wire) did it finally work.
297  Using Arduino / Project Guidance / Re: Controls for a project on: February 23, 2014, 02:28:40 pm
Green wire is pin 13. Red = pin 10
298  Using Arduino / Project Guidance / Re: Arduino Mega2560 to Android via Bluetooth on: February 23, 2014, 01:39:49 pm
Reset button on what? What program are you using to talk to the arduino?
299  Using Arduino / Project Guidance / Re: Controls for a project on: February 22, 2014, 10:59:12 pm
What voltage are you supplying to it, 3.3 or 5? My wireless based only works at 3.3 so maybe yours does too.
300  Using Arduino / Project Guidance / Re: Controls for a project on: February 22, 2014, 08:36:20 pm
How is everything wired, can you provide pictures?
Pages: 1 ... 18 19 [20] 21 22 ... 197