Show Posts
Pages: 1 ... 89 90 [91] 92 93 ... 225
1351  Using Arduino / Project Guidance / Re: RFM12b working with arduino uno v3 on: June 05, 2013, 03:27:28 pm
ok. i've made the connections . now how i can program this 2 modules ,to test if it works ?

Download a library and follow the examples.
1352  Using Arduino / Programming Questions / Re: Help changing delay() to millis() on: June 05, 2013, 03:26:02 pm
You need to separate the "turn off" portion of the function and put it in the main loop. To connect the two, you should set a flag variable in the function, and in the "turn off logic", check if the flag variable is set. Simple example:

Code:
int flag = 0;
unsigned long turnOnTime;
unsigned long interval;
void loop()
{
  if (someButtonIsPressed())
  {
    digitalWrite(ledPin, HIGH);
    turnOnTime = millis();
    interval = 1000;
    flag = 1;
  }

 if ( flag && millis() - turnOnTime > interval)
 {
    digitalWrite(ledPin, LOW);
    flag = 0;
  }
}

In this example, when someButtonIsPressed() returns true (presumably on the signal edge of some switch), the led is turned on, an interval is set and a flag is set. Then, outside the someButtonIsPressed() condition, a separate if statement turns it off when its been long enough.
1353  Using Arduino / Programming Questions / Re: What is wrong with this code and how do I fix it on: June 04, 2013, 10:50:14 pm
You can't #include the same library twice.

You most certainly can. It will just be redundant and will only cause issues if the library is written poorly.

@xmodrocker
You can't have more than one loop, nor can you have two objects/variables with the same name. Perhaps it would be best to explain what you're trying to accomplish with this code. You should also fix your indentation (Ctrl+T in the Arduino IDE) and post code in between CODE tags.
1354  Using Arduino / Project Guidance / Re: GUI student attendance system on: June 04, 2013, 01:49:19 pm
No i dont mean that at all, i told you i need a little help, or any specific websites i could look up to.

I don't think www.arduinoStudentRFIDGUI.com has been setup yet.

 
Quote
but is it possible to interface it with the arduino?

Yes, via Serial communications. There should be plenty of examples for doing that with processing. Probably some for C# and .NET too
1355  Using Arduino / Project Guidance / Re: GUI student attendance system on: June 04, 2013, 01:29:33 pm
i've heard of processing, and ive even downloaded it with G4P+Gui Builder, but the problem is, nothing in the site matches my problem, so i just need a little help if anyone how to use it, or any alternative methods, do share and tq

So you're looking for a complete solution that you don't have to make any modifications for? Good luck, that's going to be a tall task.
1356  Using Arduino / Project Guidance / Re: GUI student attendance system on: June 04, 2013, 01:28:15 pm
considering i have never done GUI before, what do you mean by 'you could create something in C#, .NET or even a web based application' , where can i find this? and what is it?

C# and .NET are programming languages. You would need to install Microsoft Visual Studios and create a program that displays and updates the GUI. Since it's clear you don't have experience doing that, I would look into writing a Processing program as it is closely related to Arduino. You should also learn how to use Google. When you see a term you don't recognize. Google it. There is no point in me wasting time posting that information when there is already a plethora of information out there.
1357  Using Arduino / Programming Questions / Re: Single button Multiple functions on: June 04, 2013, 01:18:29 pm
yes, i did. One wire now goes to pin 9, the other to vcc

So no, you didn't. The internal pullup that you enabled will pull the input HIGH. Pressing the button will also pull the input HIGH. The other pin should be connected to GND.
1358  Using Arduino / Project Guidance / Re: Chosing a Arduino to build an automated watering system on: June 04, 2013, 01:17:22 pm
I'm sorry, but did you have a question/issue?
1359  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?
1360  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.
1361  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.
1362  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?
1363  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.
1364  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.
1365  Using Arduino / Programming Questions / Re: Single button Multiple functions on: June 04, 2013, 11:52:54 am
Code:
delay(1000);


Why?
Pages: 1 ... 89 90 [91] 92 93 ... 225