Show Posts
Pages: [1]
1  Using Arduino / General Electronics / DIY recharging a battery on: March 29, 2013, 08:45:11 pm
I am using this circuit without the diode. My resistor is 50 ohms, Can it charge a four cell, 4.8 volt, 300mAH, Ni-MH battery? My input voltage is about 18 volts. Any help? I am not sure how long to leave the battery charging or anything about this. Thank you

2  Using Arduino / General Electronics / Re: Ni-MH on: March 29, 2013, 07:14:45 pm
So if I am not mistaken putting two 500mah and 300mah NiMH cells in series will result in a 4.8 volt 400mah battery? Sorry for the nooby questions
3  Using Arduino / General Electronics / Re: Ni-MH on: March 29, 2013, 05:29:13 pm
Yah but I am wondering if I use just one battery will each have 500 mAH or 250?
4  Using Arduino / General Electronics / Ni-MH on: March 29, 2013, 02:53:15 pm
I have two Ni-Mh batteries enclosed in plastic... they say they are 2.4 volts 500mAH. Does this mean that each one has 500mAH or 250mAH? They are in series by the way.
THank You smiley-razz
5  Using Arduino / Programming Questions / momentary switch help on: January 04, 2013, 02:42:01 am
I have a momentary switch and what I want to do is press it and release it, then it cycles through some code which I already have written... and after that it waits for me to press the button again. I am having a ton amount of trouble and after working on it for a long time I have decided to just ask you guys. I am too frustrated.
    Sorry for my English  smiley-fat
6  Using Arduino / Programming Questions / Re: need a longer rgb fade on: December 24, 2012, 04:06:26 pm
yah its for an attiny85.. also about the delay(0) I left it there because I did have a delay before but I took it away. And If i wanted it back then I would like to add it quickly instead of right the couple of lines of code again lol
7  Using Arduino / Programming Questions / need a longer rgb fade on: December 22, 2012, 01:56:49 am
here is my code:
i cannot figure out for the life of me make it fade over all the colors slowly over an hour. than repeat and so on.
Code:
// attiny85 RGB led rainbow fade

const int redPin = 1; 
const int grnPin = 2; 
const int bluPin = 0;


void setup()
{
  pinMode(redPin, OUTPUT);     
  pinMode(grnPin, OUTPUT);     
  pinMode(bluPin, OUTPUT);     
}

void loop()
{
redtoyellow();
yellowtogreen();
delay(0);
greentocyan();
cyantoblue();
delay(0);
bluetomajenta();
majenatored();
delay(0);
}


void redtoyellow()
{
   digitalWrite(redPin, HIGH);
   digitalWrite(bluPin, LOW);

  // fade up green
  for(byte i=1; i<100; i++) {
    byte on  = i;
    byte off = 100-on;
    for( byte a=0; a<100; a++ ) {
      digitalWrite(grnPin, HIGH);
      delayMicroseconds(on);
      digitalWrite(grnPin, LOW);
      delayMicroseconds(off);
    }
  }
}



void yellowtogreen()
{
   digitalWrite(grnPin, HIGH);
   digitalWrite(bluPin, LOW);

  // fade down red
  for(byte i=1; i<100; i++) {
    byte on  = 100-i;
    byte off = i;
    for( byte a=0; a<100; a++ ) {
      digitalWrite(redPin, HIGH);
      delayMicroseconds(on);
      digitalWrite(redPin, LOW);
      delayMicroseconds(off);
    }
  }
}


void greentocyan()
{
   digitalWrite(grnPin, HIGH);
   digitalWrite(redPin, LOW);

  // fade up blue
  for(byte i=1; i<100; i++) {
    byte on  = i;
    byte off = 100-on;
    for( byte a=0; a<100; a++ ) {
      digitalWrite(bluPin, HIGH);
      delayMicroseconds(on);
      digitalWrite(bluPin, LOW);
      delayMicroseconds(off);
    }
  }
}



void cyantoblue()
{
   digitalWrite(bluPin, HIGH);
   digitalWrite(redPin, LOW);

  // fade down green
  for(byte i=1; i<100; i++) {
    byte on  = 100-i;
    byte off = i;
    for( byte a=0; a<100; a++ ) {
      digitalWrite(grnPin, HIGH);
      delayMicroseconds(on);
      digitalWrite(grnPin, LOW);
      delayMicroseconds(off);
    }
  }
}


void bluetomajenta()
{
   digitalWrite(bluPin, HIGH);
   digitalWrite(grnPin, LOW);

  // fade up red
  for(byte i=1; i<100; i++) {
    byte on  = i;
    byte off = 100-on;
    for( byte a=0; a<100; a++ ) {
      digitalWrite(redPin, HIGH);
      delayMicroseconds(on);
      digitalWrite(redPin, LOW);
      delayMicroseconds(off);
    }
  }
}



void majenatored()
{
   digitalWrite(redPin, HIGH);
   digitalWrite(grnPin, LOW);

  // fade down blue
  for(byte i=1; i<100; i++) {
    byte on  = 100-i;
    byte off = i;
    for( byte a=0; a<100; a++ ) {
      digitalWrite(bluPin, HIGH);
      delayMicroseconds(on);
      digitalWrite(bluPin, LOW);
      delayMicroseconds(off);
    }
  }
}
8  Using Arduino / General Electronics / Re: 30VAC help on: December 12, 2012, 11:00:35 pm
Thank you
9  Using Arduino / General Electronics / 30VAC help on: December 12, 2012, 10:52:58 pm
I have a 30 volt power supply that has a total of 650 mA. I also have Christmas lights that pull a total of 40 mA but require 120VAC. Is there a way I can power these lights without stepping up the voltage to 120.
Thanks I feel Kind of stupid asking this but I am not very far into my degree and haven't learned anything like this yet.
Pages: [1]