Loading...
Pages: 1 [2] 3 4 ... 10
 11 
 on: Today at 10:43:38 pm 
Started by Pedro147 - Last post by Pedro147
Tongue in check comment -

How much support do you think I might get if I start a campaign on the forum to ban all Fritzing circuit images? I think that they belong on the kindergarten wall.

 smiley-cool

 12 
 on: Today at 10:40:49 pm 
Started by Pedro147 - Last post by CrossRoads
I as a databit in makes the output go low to sink cathode current, same as if driving ULN2803.
SRCLR is typically tied to 5, and OE/ tied to Gnd.
Output will appear erratic if these 2 pins are left floating.

Delete these - SPI library takes care of them
#define dataPin 11  // MOSI
#define clockPin 13 // SPI SCLK
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);

All GNDs must be connected.
Put a 0.1uF cap from Vcc to Gnd.

 13 
 on: Today at 10:39:33 pm 
Started by eagleflydotnet - Last post by eagleflydotnet

if i use IRremote,and press remote control button,system halted.

remove IRremote code(delete irrecv.enableIRIn();....) ,will work fine.

why?

Code:


#include <IRremote.h>

//IRremote Define
int RECV_PIN = 2;
IRrecv irrecv(RECV_PIN);
decode_results results;

//Mode
int Current_Mode = 0;

//LED Pin
const int LED1 =  9;
const int LED2 = 10;
const int LED3 = 11;

//Time
const long LongTime = 1000;
const long ShortTime = 300;

//Led Change data.
unsigned long lastChangeMillis = 0;
unsigned long lastBreathingLightChangeMillis = 0;
int lastLED = -1;


void setup() {

Serial.begin(9600);

irrecv.enableIRIn();

pinMode(LED1,OUTPUT);
pinMode(LED2,OUTPUT);
pinMode(LED3,OUTPUT);

}


void loop() {

//Receive Data...
if (irrecv.decode(&results)) {

lastChangeMillis = millis();
lastBreathingLightChangeMillis = millis();
lastLED = -1;

Current_Mode = 1;

digitalWrite(LED1,LOW);
digitalWrite(LED2,LOW);
digitalWrite(LED3,LOW);

irrecv.resume();
}

Serial.println(millis());

ProcessLED();
}


void ProcessLED()
{
if (Current_Mode == 1)
{
BreathingLight2();
}
}

void BreathingLight2()
{
unsigned long v = (millis() - lastChangeMillis) / 8160;

if (lastLED != v)
{
lastBreathingLightChangeMillis = millis();
}

unsigned long lv = millis() - lastBreathingLightChangeMillis;


if (v == 0)
{
int m = lv / 16;

if (m <= 255)
{
analogWrite(LED1,m);
analogWrite(LED2,m);
analogWrite(LED3,m);
}

if (m > 255)
{
int s = constrain(511-m,0,255);
analogWrite(LED1,s);
analogWrite(LED2,s);
analogWrite(LED3,s);
}

Serial.print("M:");
Serial.println(m);
}
else
{
lastChangeMillis = millis();
}

lastLED = v;
}




 14 
 on: Today at 10:38:08 pm 
Started by themuteoneS - Last post by themuteoneS
My light on my arduino nano atmega 328 has this issue where when i connect it to a 9V battery with a switch in between the light on pin 13 starts blinking and none of the code I have on there is supposed to do that. Is this some sort of warning?

 15 
 on: Today at 10:35:20 pm 
Started by Pedro147 - Last post by Pedro147
After using 74HC595 Shift registers and ULN2803’s for a while (though not always correctly  smiley-lol ) I am now trying to now use the TPIC6B595 Shift registers with SPI. I have attached an image of my circuit and here is the basic code that I am starting with. I have kept the code simple until I understand how to drive the chip correctly, Can someone please tell me what I might be doing wrong because it is not working correctly. Also, I assume that the zero’s in my “digit” byte are the ones that are controlling the grounds that will light the appropriate LED’s,
Thanks Pedro.

Code:
// use SPI to control eight LED's with TPIC6B595 Shift Register

#include <SPI.h>
#define dataPin 11  // MOSI
#define clockPin 13 // SPI SCLK
#define latchPin 10 // SPI SS

byte digit = B10101010;
byte timer = 100;

void setup()
{
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  SPI.begin(); 
}

void loop()

{
  digitalWrite (latchPin, LOW);
  SPI.transfer(digit);
  digitalWrite (latchPin, HIGH);
  delay (timer);
}

 16 
 on: Today at 10:34:06 pm 
Started by syphex - Last post by CrossRoads
No, you can only get 5V - but at real low current flow.
5/10,000,000 = .5uA.

 17 
 on: Today at 10:31:11 pm 
Started by bwoogie - Last post by Henry_Best

Also, I've seen people but resistors on the anode side (which makes sense to me, if that's the way current flows) and then I've seen them put them on the cathode side - whats going on here?

Using the water and pipe analogy, a resistor is equivalent to a constriction in the pipe. It doesn't matter which side of a flow meter the constriction is (before or after), the flow meter will still give the same result (assuming that the pressure doesn't change).

 18 
 on: Today at 10:28:54 pm 
Started by kernicc - Last post by kernicc
I know that.but the The official arduino is much more expensive.My budget is limited.I have one official arduino mega2560 R3. Now I need one more.

 19 
 on: Today at 10:26:07 pm 
Started by alexval1323 - Last post by alexval1323
The project that I am doing is like a human "doggy door".  As i walk towards/away from the door, an arduino inside/on the door will pick up the bluetooth doggle on my key chain. When it does pick up my "existence" it will activate one or two (not sure yet) pistons that will unlock/lock the door for me.  I am very proficient at programming so that wont be a problem, but what is a problem is i have no flippen idea what hardware to use! what bluetooth shield/module should i use? all the one ive found communicate directly with your computer. What pistons should i use? it even goes to what arduino should i use? i am planing to use a mini, but if that doesnt work i have full access to any of the other CPUs.  What should i do because im completely lost as of right now...PLEASE HELP

thank you,
Alex Valente
Dos Pueblos Engineering Academy
Class of 2015

 20 
 on: Today at 10:24:14 pm 
Started by ebird97 - Last post by manufwi
Software pins are RX,TX.
I have no idea for the SD shield compatibility, this sketch is not mine. You should check the SD library page on the arduino website.
The serial feed is a binary file, the raw jpeg file so it looks garbled. Choose a serial terminal application on your PC that can output the raw feed to a file and just open this file with an image viewer!
HTH

Pages: 1 [2] 3 4 ... 10