Show Posts
Pages: [1] 2 3 ... 34
1  Using Arduino / Project Guidance / Re: double IF statement? Double Conditional? on: July 30, 2014, 04:54:06 pm
Use IF statement
Code:
if ((led13State == LOW) && (analogValue > threshold))
2  Using Arduino / Programming Questions / Re: programming for LCD Module 1602, I see this error. on: July 29, 2014, 11:52:14 am
Code:
LiquidCrystal_I2C lcd (0x27, 16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display

3  Using Arduino / Programming Questions / Re: programming for LCD Module 1602, I see this error. on: July 29, 2014, 06:15:47 am
I can't figure what this is for
Code:
line display
so I'm not surprised the compiler is also having trouble.

...R

line display was part of the comment.
4  Using Arduino / Project Guidance / Re: Using intel Galileo for auto alarm clock on: July 28, 2014, 04:00:28 am
Look at this Clock


http://thekemley.blogspot.be/2012/09/arduino-led-display-clock-project-this.html

Arduino Mega will do.
5  Using Arduino / Project Guidance / Re: Controlling TRIAC using DIGITAL pot for a 220v 500w dimmer on: July 18, 2014, 07:33:34 pm


T1 conducts when the optocoupler sends a pulse to its base. C1 discharges through the collector-emitter line.
The trigger current is limited by R2 to around 40 mA.
The discharge current time of C1 is less than 1 ms.

http://www.electroschematics.com/6561/universal-triac-control-with-optocoupler/
6  Using Arduino / Project Guidance / Re: Controlling TRIAC using DIGITAL pot for a 220v 500w dimmer on: July 18, 2014, 07:43:26 am


http://forum.arduino.cc/index.php?topic%3D132141.0

http://www.instructables.com/id/Arduino-controlled-light-dimmer-The-circuit/?ALLSTEPS
7  Using Arduino / Project Guidance / Re: Flash and Fade on: July 18, 2014, 04:43:29 am
Read this
http://gammon.com.au/blink
8  Using Arduino / Project Guidance / Re: arduino and peltier on: July 16, 2014, 07:38:34 am

http://softsolder.com/2012/02/28/peltier-pwm-temperature-control-mosfet-rc-snubber/
9  Community / Gigs and Collaborations / Re: Arduino Timer/Clock on: July 16, 2014, 06:37:09 am
The code had two part, you need to copy both parts into one file.
10  Using Arduino / Project Guidance / Re: odd or "shorted" pin transistor? on: July 14, 2014, 07:26:39 pm
This how PNP transistor connect.


Edit:
I have attach your image, where is the collector and emitter of your diagram? where is your load connect?
11  Using Arduino / Project Guidance / Re: how to combinig this two coding (newbie) on: July 12, 2014, 06:35:30 pm
Take a look on this
http://forum.arduino.cc/index.php?topic=223286.0




Code:
/* This will combining two coding using Blink without Delay
*/

int E1 = 5;
int M1 = 4;

int inRelay = 8 ;
int inRelay1 = 9 ;
int inPin = 11 ;
int inLimit = 6 ;
int inLimit1 = 7 ;


int val1 ;
int val2 ;
int val3 ;

int inRelay2 = 12 ;


// Generally, you shuould use "unsigned long" for variables that hold time
// The value will quickly become too large for an int to store
unsigned long previousMillis = 0;        // will store last time LED was updated

// constants won't change :
const long interval = 3000;           // interval at which to toggle (milliseconds)

// Variables will change :
int relayState = HIGH;             // relayState used to set the Relay


void setup()
{
  pinMode(inRelay, OUTPUT);  // set the digital pin as output:
  pinMode(inRelay1, OUTPUT);  // set the digital pin as output:
  pinMode(inPin, INPUT);  // set the digital pin as input:
  pinMode(inLimit, INPUT);   // set the digital pin as input:
  pinMode(inLimit1, INPUT);  // set the digital pin as input:

  pinMode(inRelay2, OUTPUT);   // set the digital pin as output:

  digitalWrite(inRelay2, HIGH);
}

void loop()
{
  // check to see if it's time to toggle the Relay;
  unsigned long currentMillis = millis();


  if (currentMillis - previousMillis >= interval) {
    // save the last time you toggle the Relay
    previousMillis = currentMillis;

    // if the Relay is off turn it on and vice-versa:
    if (relayState == LOW)
      relayState = HIGH;
    else
      relayState = LOW;

    // set the Relay with the relayState of the variable:
    digitalWrite(inRelay2, relayState);
  }


  val1 = digitalRead(inPin);
  val2 = digitalRead(inLimit);
  val3 = digitalRead(inLimit1);


  if (val1 == HIGH)
  {
    digitalWrite(inRelay, HIGH);
    digitalWrite(inRelay1, LOW);
  }
  else if (val2 == HIGH)
  {
    forward();

  }
  else if (val2 == LOW)
  {
    forwardstop();

  }
  if (val1 == LOW)
  {
    digitalWrite(inRelay, LOW);
    digitalWrite(inRelay1, HIGH);
  }
  else if (val3 == HIGH)
  {
    backward();

  }
  else if (val3 == LOW)
  {
    backwardstop();

  }

}

void forward()
{
  digitalWrite(M1, LOW);
  analogWrite (E1, 255);
}

void backward()
{
  digitalWrite(M1, HIGH);
  analogWrite (E1, 255);
}

void forwardstop()
{
  digitalWrite(M1, LOW);
  analogWrite (E1, 0);
}

void backwardstop()
{
  digitalWrite(M1, LOW);
  analogWrite (E1, 0);
}

12  Using Arduino / Sensors / Re: Aruino for IMAGE PROCESSING on: July 12, 2014, 12:55:34 am
http://blog.oscarliang.net/raspberry-pi-face-recognition-opencv/
13  Using Arduino / Project Guidance / Re: Slowing Servo While reading data from a photo resistor (light sensor) on: July 11, 2014, 05:29:31 am

     for(pos; pos < 180; pos += 1)
 


variable pos was not assign with any value, so it start with random numbers, your result is unpredictable.

check this out c-tutorial-for-loop

Code:
else if (val <= 7)
    {
      for(pos; pos > 5; pos -= 1)
      myservo.write(pos);
      delay(30);
    }
but then ratchets back down to 0 at full speed.

Because you for loop need to be Compound statement form else only the myservo.write(pos); is run therefore it at full speed.

Quote
Compound statement
A compound statement or block is a brace-enclosed sequence of statements.
{ statement...(optional) }    (1)   
When one statement is expected, but multiple statements need to be executed in sequence (for example, in an if statement or a loop), a compound statement may be used:
14  Using Arduino / Sensors / Re: Aruino for IMAGE PROCESSING on: July 08, 2014, 04:40:21 pm
No, Arduino had no processing power for image processing on both resource and speed.
15  Using Arduino / General Electronics / Re: Protection from cheap power supplies. on: June 28, 2014, 07:47:33 am
DO NOT USE SWITCHING power supplies. There is no transformer in them. That is very dangerous.
That is not true, most SWITCHING power supplies used transformer in them.

Apple iPhone charger teardown: quality in a tiny expensive package
http://www.righto.com/2012/05/apple-iphone-charger-teardown-quality.html

Only some of the cheap power supplies rely on a capacitor to limit current from mains voltage, if you buy one of these cheap power supplies then it will be dangerous.
You can always open up these cheap power supplies to find out yourself, how it wire up.
http://www.righto.com/2012/03/inside-cheap-phone-charger-and-why-you.html
Quote
Conclusions
Stay away from super-cheap AC adapters built by mystery manufacturers. Spend the extra few dollars to get a brand-name AC adapter. It will be safer, produce less interference, and your device's touchscreen will perform better.
Pages: [1] 2 3 ... 34