Pages: 1 [2]   Go Down
Author Topic: Help??  (Read 1677 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

(That's just to get them to light up, I know that that code won't blink them smiley-wink)
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31410
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When you post code select it and hit the # icon third from the right over the reply box.

You need to define all the LEDs you use:-
Code:
#define LED1 13
#define LED2 12
#define LED3 11
#define LED4 10

void setup()
{
  pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);
 pinMode(LED3, OUTPUT);
  pinMode(LED4, OUTPUT);

}

void loop()
{
  digitalWrite(LED1, HIGH);
 digitalWrite(LED2, HIGH);
  digitalWrite(LED3, HIGH);
 digitalWrite(LED4, HIGH);
delay(400);
 digitalWrite(LED1, LOW);
 digitalWrite(LED2, LOW);
  digitalWrite(LED3, LOW);
 digitalWrite(LED4, LOW);
delay(200);

}

will flash them.

What resistor value are you using. Maybe it is time to post a photo of your wiring.
Logged

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

I believe it's a 10 Kohm
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16513
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I believe it's a 10 Kohm

That's over ten times too large. Again 200-1,000 ohms will let you see the light. One needed for each led.

Lefty
Logged

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

Sorry, I was just using the smallest resistor I had in an Arduino pack I had.
I found a 1 ohm and a 1 kohm... so I hope the latter will work.
Logged

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

Okay, the lights aren't dimmed. Success! smiley Thank you!
However, I'm really still confused about the grounding wires. A complete electrical newbie like myself has really no idea how to wire wires together on a Breadboard... Or I thought I did, but it's not working. I'm kinda just shoving all the grounding wires from the LEDs to a place on the board with another wire nearby attaching to a ground pin. I'm assuming this is not right. Please help? I'm sorry I know I'm asking really easy questions... :/
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31410
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That is right, assuming of course that the wire nearby is actually making electrical connection with all the LEDs.
Post a photo if you want us to spot your mistakes.
Logged

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

I figured it out. I just attached a wire from the ground to the negative side of the Bread Board, then plugged all the other "ground" wires from the LED into it.


Thanks to everyone who helped! smiley
Logged

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Iwa223
I just read this tread...Help??   If you need more help in electronics and how-to I recoment you purchase the book title : "Make : Electronics" by Charles Platt. My copy cost me $43.99 and I bought mine at Chapters. Or look-up on the Net and Google "Breadboard" or "How to Breadboard". Doing Ardiuno projects , A Breadboard is a MUST-HAVE.

Every time you do a circuit with the Ardiuno, the GND is connect with the Common side of the circuit you build. Example: pin 12 to resistor 470 ohms 5 % - green-purple-brown - gold -( Resistor have color codes !!! ) to anode of the LED and cathode  ( the flat side of the LED ) connect to the GND or Common. ( I use color codes for my wires - it less confusing - ex : red for positive, black or green for GND-common )

I am also new at the Arduino ( ATmega358 or into Microcontroller - PICAXE ), but I am not new in electronics ( being a Electronics Bench Technician for 4  years - going at DeVry Institue of Technology in Toronto in the early and mid 90's and hobby in electronics since 1980's and having books and magazines - like "Electronics Today international -Popular Electronics - Radio-Electronics" ) Heh, I am not like some the engineers on this board. Right now I even not working in my field !!!. But I still do my electronics hobbies and others - Models Kits.   
Logged

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here a picture of the wiring of 4 LED connect to the Ardiuno  - Disregard the resistors in the pictures, they should be 470 ohms - green-purple-brown and the GND connection.


* fourLED_bb.jpg (115.85 KB, 750x650 - viewed 12 times.)
Logged

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

Thank you for the information. I think the hardware and wiring's fine now. Any issues are coming from code, which I can deal with smiley-grin
Logged

Pages: 1 [2]   Go Up
Jump to: