Show Posts
Pages: 1 ... 90 91 [92] 93 94 ... 226
1366  Using Arduino / Programming Questions / Re: Single button Multiple functions on: June 04, 2013, 01:15:28 pm
I've tried 4 different pushbuttons

Did you fix the wiring, though?
1367  Using Arduino / Project Guidance / Re: GUI student attendance system on: June 04, 2013, 01:13:41 pm
Is there a programme i could use to display the GUI?

You can write a program using Processing, which runs on a computer and goes hand and hand with the Arduino IDE development. Alternatively, depending on your level of expertise, you could create something in C#, .NET or even a web based application.
1368  Using Arduino / Programming Questions / Re: Single button Multiple functions on: June 04, 2013, 01:03:11 pm
Why is your momentary switch connected to two digital pins? It should be connected to a single digital pin (the pin you read) and ground. You also need a pullup resistor. You can simply enable to the pullup resistor using
Code:
digitalWrite(inbutton, HIGH);
after the pinMode() call.
1369  Using Arduino / Project Guidance / Re: GUI student attendance system on: June 04, 2013, 12:56:02 pm
My question is, is it possible to create this kind of GUI while extracting their input using only arduino?

The depends. What is going to be displaying this "GUI interface"? A touch screen attached to the Arduino? A computer the Arduino is plugged into? A computer the Arduino is NOT plugged into? A series of complicated mirrors and lasers?
1370  Using Arduino / Programming Questions / Re: Single button Multiple functions on: June 04, 2013, 12:53:24 pm
Even with your corrections it doesn't work  smiley-cry

How about giving a better description of what it is doing right now? Instead of saying "it is stuck", be more explicit: It keeps running the ohm function over and over again or When I press the button multiple times, it will only run the ohm function on each button press; it doesn't run the other functions at all.
1371  Using Arduino / Programming Questions / Re: Single button Multiple functions on: June 04, 2013, 12:36:00 pm
It starts in ohm() because the first buttonstate reading is HIGH (assuming the button is not pressed when the code starts), while lastbuttonstate is initialized to LOW. Those two are different and the current state is HIGH, so actual gets incremented to 1 in the first iteration of loop(). If you don't want that to happen, initialize lastbuttonstate to HIGH.
1372  Using Arduino / Programming Questions / Re: Single button Multiple functions on: June 04, 2013, 11:52:54 am
Code:
delay(1000);


Why?
1373  Using Arduino / Programming Questions / Re: Single button Multiple functions on: June 04, 2013, 11:43:37 am
Post the whole sketch, not just the part you think is relevant.
1374  Using Arduino / Project Guidance / Re: Help with timing function on: June 03, 2013, 12:00:08 am
When the button is pressed again, you'll probably want to set the LastWarningTime so that it is in sync with the main timer. Its hard to say how exactly, without seeing the full code.
1375  Using Arduino / Programming Questions / Re: Consistent flash on button press (Button + FlashWithoutDelay) on: June 02, 2013, 11:41:45 pm
I don't understand what you mean by seperating the logic though

Different if/else if/else blocks

Quote
or how to relate the boolean to the buttons.

One way would be to assume something is pressed and if you don't fine one pressed, set the boolean to false.
1376  Using Arduino / Programming Questions / Re: Noob - For Loop with Arrays on: June 02, 2013, 07:35:24 pm
You can't reference variables dynamically by there name without some sort of hash table. The compiler turns TankTempArray into a memory address by the time it finishes, so the String "TankTempArray" has no meaning to it. You can instead, use a multidimensional array (array of arrays) and pass the index of which one you wish to refer to.
1377  Using Arduino / Programming Questions / Re: Consistent flash on button press (Button + FlashWithoutDelay) on: June 02, 2013, 06:25:09 pm
I would like to learn how to accomplish this without using delays, and I'm still trying to work out the logic of what I want, but I'm stumped for now.

To get multiple switches working, separate the logic. The switch logic should only update the interval variable (and maybe a boolean that is set when at least one button is pressed).

Then, independent of the switch logic, you should have the BlinkWithoutDelay logic, almost exactly as it is in the example. Perhaps the only minor difference would be a check for the aforementioned boolean.
1378  Using Arduino / Programming Questions / Re: Arduino Uno .. Temperature Sensor with Led Display.. on: June 02, 2013, 09:57:52 am
Edit your post to surround your code with CODE tags.
1379  Using Arduino / Programming Questions / Re: Arduino Uno .. Temperature Sensor with Led Display.. on: June 02, 2013, 09:50:35 am
So what have you tried so far?
1380  Using Arduino / Project Guidance / Re: Additional Analog input via an external source on: June 01, 2013, 11:50:35 am
My question is how can I go about reading the said chip above on the arduino?

Quote
Interface Type:   Serial, SPI
Pages: 1 ... 90 91 [92] 93 94 ... 226