Pages: [1]   Go Down
Author Topic: new project,any help great  (Read 972 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i own a sweepstakes internet cafe software company,i have purchased a number of uno boards with intentions of using them in a small project we are building.the short story, we are trying to use this board to control a relay that will open and close a contactor that will supply power to a 110 volt outlet(will have rope lights and such plugged into the outlet).my trouble is that once the board is plugged into the usb the board sees power at pin 13 which i am using for the 5 volt out put to the relay.can you help me with a program for this?i would like for pin 13 to be hot all the time and we are setting up a url that will be contacted by are software,when we contact this url i would like pin 13 to blink on and off in 3 second intervals,and stay blinking for a total of 4 mins. when the 4 mins. are up i need pin 13 to go back to constist hot.i have spent some time lookin for something like this,with no luck.i would greatly appreciate any help..thanx stang0182
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25773
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you post your code?
Your description doesn't make much sense.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Edison Member
*
Karma: 32
Posts: 1286
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Once your application is running,  your application ahould have full control over pin 13.   If there is a conflict, you can use a different I/O pin.

Quote
?i would like for pin 13 to be hot all the time and we are setting up a url that will be contacted by are software,when we contact this url i would like pin 13 to blink
Very confusing...   You can't have pin 15 hot all the time, and blinking too...
« Last Edit: February 23, 2012, 05:36:03 pm by DVDdoug » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

dont yet have any code,was hoping on just altering there basic blink code supplied with the board.would like a code to arm arduino pin 13 hot all the time when the board is plugged into usb,when we contact the url would like that "contact" to trigger arduino pin 13 to blink on/off in 3min intervals for 4mins.after the 4mins go back to just on position until the next contact from are software.hope this helps kinda hard to explain
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok i have thought about this alittle more,maybe i should tell everybody that i have never messed with anything like this before but i am sure i can figure it out.i am sorry if my previous posts dont make any sense,but to make things simpler here we go,(1st code)i need one set of code that will take any pin on the board and make it blink(put out 5 volts) in 3 second intervals(know its simple,and very close to the code provided with the board,no matter what i change the delay(????); to i cant get 3 second intervals).  (2nd code)another set of code that would take whatever pin you choose to blink and just turn that pin off(no 5 volts coming out). i know it simple and im prob doing something dump but any guidance will be great! postive we could get threw the rest of this project if we figure out those codes
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 help ????
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


As you are new to the Arduino programming language I advise you to spend 2 or 3 days on the tutorial section and try some of the examples there. Time spent there is worth its weight in gold smiley-wink You will learn a lot. You can adapt those programs to see what happens and I think there will be programs there that look like what you need.

Hope this helps.
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here some code for you,  hopefully you can make it work for your situation


Code:

Unsigned long delaytimer = 0;
Int status = 0;
Void setup(){
pinMode(5,input);
}

Void loop(){
if(digitalRead(5) == high){
Blink(13,3000);
}
}

Void blink(int pin, int delaytime){
pinMode(pin,output);
if(millis() - delaytimer > delaytime){
delaytimer = millis();
status = !status;
digitalWrite(pin,status);
}
}
I didn't compile this and just wrote it quickly but maybe you can try it and make it work for you(once you fix the improper capitalized letters my phone autocorrects lol)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i am new to this language for sure.thank you guys for the help, i really appreciate it.i have def spent hours trying different things with no luck.just changing and adding to sample codes that were provided with the board.i will see what the code does supplyed by winner( thank you very much smiley-lol).but some of my main issues are that,like the blink code supplied using pin 13.i wired in a led to pin 13 and ground and run the blink code no issues the led blinks and the led on the board blinks perfect.i alter the code to make pin 13 stay on all the time,and the led on the board stays on like its supposed to but the led i wired in to ground and pin 13 still blinks??? and i was under the impression that the therminals on the side that says ground, 5+,etc. was an external power source you could use if needed?it also pulses on/off all the time.is all this normal???
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's odd since the onboard led is connected to pin 13, unless your talking about the power led indicator
Double check your connections are post a pic
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i got it figured out,thanx for the help everyone.sorry if your not allowed to post links,but here is a small video of it


Logged

Pages: [1]   Go Up
Jump to: