Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: It's here!

  1. #1
    Resident 100HP water-cannon operator SXRguyinMA's Avatar
    Join Date
    Jun 2008
    Location
    MA
    Posts
    5,865

    Default It's here!

    Yea buddy! an ATMega328 Arduino, Arduino sensor shield and "Getting Started With Arduino" book!

    gonna have some fun with this puppy!


  2. #2
    Resident 100HP water-cannon operator SXRguyinMA's Avatar
    Join Date
    Jun 2008
    Location
    MA
    Posts
    5,865

    Default Re: It's here!

    ok I've gone through the book (well as far as I can go with the components I have) and I've learned a lot. Made an LED blink, played with PWM, make an LED turn on/off with a momentary switch

    I'd say it was a good first step toward my goal of having a servo controlled based on a temp sensor

  3. #3
    Modders block rendermandan's Avatar
    Join Date
    Mar 2007
    Location
    Nowhere near the beach :(
    Posts
    1,510

    Default Re: It's here!

    Excellent! Glad to see you got the Arduino.

    Keep us posted on your work.

  4. #4
    If you can't hack it, you don't own it! Oneslowz28's Avatar
    Join Date
    Mar 2007
    Location
    Aiken, Sc
    Posts
    5,084

    Default Re: It's here!

    Sweet, Another member joins the dark side!

  5. #5
    Resident 100HP water-cannon operator SXRguyinMA's Avatar
    Join Date
    Jun 2008
    Location
    MA
    Posts
    5,865

    Default Re: It's here!

    lol yep. I just ordered a few things from adafruit for the project I want to do. till then I'll keep messin with this thing!

  6. #6
    If you can't hack it, you don't own it! Oneslowz28's Avatar
    Join Date
    Mar 2007
    Location
    Aiken, Sc
    Posts
    5,084

    Default Re: It's here!

    I have a pretty cool Random color RGB LED fader code you should have fun messing around with. Just change the delays for faster or slower fade time. It works with common anode RGB leds.

    It uses pins 9, 10 and 11 and remember to use resistors on each anode. Cathode to Ground.


    Code:
    float RGB1[3];
    float RGB2[3];
    float INC[3];
    
    int red, green, blue;
    
    int RedPin = 10;
    int GreenPin = 11;
    int BluePin = 9;
    
    
    void setup()
    {
        Serial.begin(9600);
      randomSeed(analogRead(0));
      
    for (int x=0; x<3; x++) {
      RGB1[x] = random(256);
      RGB2[x] = random(256); }
    
    }
    
    void loop()
    {
      randomSeed(analogRead(0));
      
      for (int x=0; x<3; x++) {
        INC[x] = (RGB1[x] - RGB2[x]) / 256; }
      
      for (int x=0; x<256; x++) {
        
        red = int(RGB1[0]);
        green = int(RGB1[1]);
        blue = int(RGB1[2]);
    
        analogWrite (RedPin, red);  
        analogWrite (GreenPin, green);  
        analogWrite (BluePin, blue);    
        delay(25);  
    
        for (int x=0; x<3; x++) {
    	   RGB1[x] -= INC[x];}
     
      }
      
      for (int x=0; x<3; x++) {
      RGB2[x] = random(956)-700;
      RGB2[x] = constrain(RGB2[x], 0, 255);
      
      delay(10);
     }
    }

  7. #7
    Resident 100HP water-cannon operator SXRguyinMA's Avatar
    Join Date
    Jun 2008
    Location
    MA
    Posts
    5,865

    Default Re: It's here!

    thanks I"ll play around with that!

    now does the arduino always put out 5v? or if I hook a 12v power supply will it output 12v on a different pin?

  8. #8
    If you can't hack it, you don't own it! Oneslowz28's Avatar
    Join Date
    Mar 2007
    Location
    Aiken, Sc
    Posts
    5,084

    Default Re: It's here!

    Arduino will only output 5v unless you have a model like my seeeduino that also does 3.3v.

  9. #9
    Resident 100HP water-cannon operator SXRguyinMA's Avatar
    Join Date
    Jun 2008
    Location
    MA
    Posts
    5,865

    Default Re: It's here!

    ahhh ok. so how would I go about powering a 12v fan then?

  10. #10
    If you can't hack it, you don't own it! Oneslowz28's Avatar
    Join Date
    Mar 2007
    Location
    Aiken, Sc
    Posts
    5,084

    Default Re: It's here!

    I think (not even 50% sure) that you can power the fan with 12v and use a PWM pin on the duino to control the PWM line on the fan.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •