Show Posts
Pages: [1] 2
1  Forum 2005-2010 (read only) / Syntax & Programs / Re: controlling multiple output pins on: October 16, 2010, 10:32:15 am
Hi...did you get this to work. I am trying to control multiple outputs for a miniature theater and I need to control indipendent outputs...

thanks
2  Forum 2005-2010 (read only) / Workshops / Re: Seeking Chicago Arduino Group on: June 02, 2008, 02:05:18 pm
I would like to begin an arduino group. I have several friends who i could get to have a decent group. Is any one interested in meeting some time in July ? If you are intertested, contact me.

thanx
3  Forum 2005-2010 (read only) / Workshops / Re: Seeking Chicago Arduino Group on: May 06, 2008, 09:29:10 am
I would like to propose that we begin one...I live in the Humbodlt Park area, and could host a geek meeting...
contact me if interested, and then I can figure out a date...
4  Forum 2005-2010 (read only) / Exhibition / Re: MIT OpenCourseWare - online video lessons on: February 15, 2008, 10:30:23 am
The second link is broken.
5  Forum 2005-2010 (read only) / News / Any one using Arduino in Chicago ? on: January 17, 2008, 11:26:44 am
I am trying  to learn the Arduino, and am having problems understanding the code/language structure. I could really use some one on one tutorial help, for I have so many questions. I have a "simple" project I am working on, and the parts to get things going, so what I need now is HELP !! I find that I can down load code and tweek it...but I want to understand, not just copy and paste.

Can any one help...in Chicago ?

Thanks
6  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: control pins independently without delay() on: October 30, 2010, 06:30:51 pm
Thanks for the examples bld. I tested them and they didn't do what I am looking to get done. Unfortunately, if( time ==money) it is just easier and cheaper to get the ez-8 from efx-tek. I appreciate all the help, and I was hoping that it would have been easier, but I have to step away from this for awhile. I am also looking at cubloc to tackle this.

I reviewed the pages that you suggested, and I see the issues I was tripping up on...but I still am having problems "seeing" how the milli() function is called and used.

I'll stick to the single pin delay stuff for awhile and leave the multiple pin control to other products.
7  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: control pins independently without delay() on: October 30, 2010, 04:19:40 pm
Well, I know it is not doing what I want, obviously, what I was attempting was to delay the turning on of a pin .5 seconds after the mill() was called. I am not clear on how to implement the milli() command, and my thinking was that I was adding 500 milliseconds on to the time that the milli() command was first called.

I will look at bld's helpful response and see if that will clear things up.
8  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: control pins independently without delay() on: October 30, 2010, 03:24:54 pm
Hey Mike, thanks for the code. I loaded it up and it seems to only pull the pin HIGH when the button is HIGH.

here is a very simple thing I tried, but it did not work:

Code:
const int buttonPin = 2;//button attached to pin 2
int buttonState = 0;//variable to store the state of button

                      
int event1 = 13;//ssr to be connected to pin 9 for lights
long eventtime1 = 0;//clock value to be stored at the time milli() is called


void setup() {

pinMode(buttonPin, INPUT);

pinMode(event1, OUTPUT);


}

void loop(){
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);

// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
   if (buttonState == HIGH) {  //when button is pushed...
    
      eventtime1 + 500 == millis(); //wait 1/2 a second...

digitalWrite(event1, HIGH);//turn on pin 13
if(eventtime1 > 3000){  //after 2 1/2 seconds...
  digitalWrite(event1, LOW);//turn off pin 13

}
   }
      }


here is an awkward "drawing" of what I am attempting to achieve:

this taking place over a 5 minute period, and when a button is pushed...

Pin      
1      ---------||||||||||||---------

2      -----||||||||||||||-----------

3      ---||||||||||||||||||||||||---

4      ------------------||||||||----

5      --------------|||||||||||||---


---- = off(LOW)
|||| = on(HIGH)



thanks
9  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: control pins independently without delay() on: October 26, 2010, 11:42:48 pm
Hello Korman,

Here is some code I cobbled together. Eventually I would like to have as many pins being controlled as the arduino will allow (duemillanove, mega...). Currently the code seems to just toggle 2 pins, where as I would like to be able to pick a time when the pin is "on" and then turns "off". I created a function called "sequence" that is called when the switch goes HIGH. This is probably bad code, but it is a begining. Any help and insight would be appreciated.

int buttonPin = 2;
int buttonState = 0;

int value = 0;                        
int event1 = 9;                        
int event2 = 10;
int value1=0, value2=0;
long time1, time2;

void setup() {

pinMode(buttonPin, INPUT);

pinMode(event1, OUTPUT);
pinMode(event2, OUTPUT);

time1=millis();   // set time as now
time2=millis();

}
void sequence(){
  if(time1 > millis()) {
    digitalWrite(event1, value1);     // sets the LED on
    if(value1 ==0) value1 =1; else value1 = 0;  // toggle led value
   event1= millis() +1000;  // set next time you want to do anything
 }

if(event2>millis()) {
    digitalWrite(event2, value2);     // sets the LED on
    if(value2 ==0) value2=1; else value2=0;  // toggle led value
   event2= millis() +700;  // set next time you want to do anything this is faster
 }
}

void loop(){
 // read the state of the pushbutton value:
 buttonState = digitalRead(buttonPin);

 // check if the pushbutton is pressed.
 // if it is, the buttonState is HIGH:
 if (buttonState == HIGH) {
//run the milli() multipe pin function
   void sequence();
 }}
10  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: control pins independently without delay() on: October 25, 2010, 07:37:20 pm
Thanks Korman. I guess I am mis understanding the milli() function. The actual series of events will only last no more that 5 minutes. Sort of like: button is pushed and then various LED's ( actually there are motors and lights and sound) will turn on and off at different times. I will post some code when I get it written and if you could, let me know if I am heading in the right direction.
11  Forum 2005-2010 (read only) / Frequently-Asked Questions / control pins independently without delay() on: October 25, 2010, 09:24:04 am
I am trying to make a control board that can turn on an doff multiple pins at different times. I can't use the delay(), and the milli() will clock out after a period of time (50 days?). I want to essentially make this :

http://www.efx-tek.com/topics/ez-8.html

Eventually, I want use the arduino mega...I can do basic coding, but this seems pretty advanced.

thanks for any help.
12  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: using SSR's to control multiple outputs on: February 17, 2010, 10:30:22 am
Is the millis() function the "best" way to go in order to control multiple pins simultaneous at various intervals ? Are there other tricks to achieve this ?
13  Forum 2005-2010 (read only) / Frequently-Asked Questions / using SSR's to control multiple outputs on: February 17, 2010, 10:05:36 am
I need to have timed on/offs for multiple kinetic sculptures, and can't use the DELAY(). I was looking a the millis() function, but not really clear on it. I was looking at some of the blinking LED examples, and had a difficult time figuring out what would work. The timed events need to occur over a 5 minutes, with 6 pins turning HIGH and LOW at different and various times. Any help would be met with gratitude..  thanks
14  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: switch with a delay on: December 02, 2008, 04:41:07 pm
This is great, thanks.
Question: Does the delay cause the whole program to pause ? I will need to be able to have a 10 second delay...while watching the state of another pin, and digitalWrite if that state changes....
15  Forum 2005-2010 (read only) / Frequently-Asked Questions / switch with a delay on: December 01, 2008, 03:01:41 pm
I am trying to do something that would seem simple...

button with a delay. press button, delays "x", digitalWrite(high)  and when button is released, no delay. digitalWrite(low).

When I do the button code and add a delay, the delay occures before and after the button pushing.

How do I create code that has a local delay, and not a global delay.

this is a tiny part of a larger problem...but small steps...

thanks
Pages: [1] 2