Show Posts
|
|
Pages: 1 [2]
|
|
17
|
Using Arduino / Programming Questions / help with 74HC595 controlling induvial leds
|
on: December 26, 2012, 11:51:27 pm
|
|
hi im tinkering around with a 74HC595 chip and i was trying to figure out how to controll induvial leds. all the guides about these chips are just about understanding how it works and not how to program it. I understand how it shifts in data, but I am unable to creat a correct code to turn induvial leds on.
with the code below i was able to turn on led #1 , but when i was unable to turn any single one on..
//Pin connected to ST_CP of 74HC595 int latchPin = 8; //Pin connected to SH_CP of 74HC595 int clockPin = 12; ////Pin connected to DS of 74HC595 int dataPin = 11;
void setup() { //set pins to output so you can control the shift register pinMode(latchPin, OUTPUT); pinMode(clockPin, OUTPUT); pinMode(dataPin, OUTPUT); }
void loop() { // count from 0 to 255 and display the number // on the LEDs for (int i = 0;i < 2; i++) { // take the latchPin low so // the LEDs don't change while you're sending in bits: digitalWrite(latchPin, LOW); // shift out the bits: shiftOut(dataPin, clockPin,00000001, i);
//take the latch pin high so the LEDs will light up: digitalWrite(latchPin, HIGH); // pause before next value: delay(1); digitalWrite(latchPin, LOW); }}
|
|
|
|
|
22
|
Using Arduino / Project Guidance / Re: brand new, pin 13 not blinking when uploading blink code
|
on: December 25, 2012, 08:02:39 pm
|
|
/* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13;
// the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); }
// the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }
|
|
|
|
|
23
|
Using Arduino / Project Guidance / brand new, pin 13 not blinking when uploading blink code
|
on: December 25, 2012, 07:55:45 pm
|
|
im messing around with my new arduino uno and im unable to get my 10mm led to blink. it is wired to the arudino correctly and the led is on. Im connected to serial port 3 and im using the uno board on the programmer. When i send the correct blink code to arudino the TX and RX flash, but pin 13 led doesnt flash and the 10 mm led doesnt flash. im lost? is it the board? am i just culeless? any help would be great.
|
|
|
|
|
25
|
Using Arduino / Project Guidance / beginner LED cube build, need help
|
on: August 13, 2012, 01:55:20 pm
|
|
hey everyone, ive been intrested in arduino for a long time. Recently i discovered the hundrends of videos of custom built led cubes and it has inspired me to try and build my own. My project will be a little different then most of the other cubes though,it will be a 6x6 blue led cube and i want to incoporate an alarm clock, lcd screen, on/of button, alarm setting buttons, potentiomter, and possibly a sd card with different animatons loaded on it. I am very new at programming and arduino, but i can solder and i love to learn. I do know that for the cube, ill need 42 IO ports. most of the instructbles are kinda confusing when or dont even include an arduino, if anyone can help walk me through this, that would be awesome.
|
|
|
|
|