1. Post #121
    Gold Member
    Cathbadh's Avatar
    March 2006
    1,071 Posts
    Isn't it C ? I can't imagine it having OOP
    Why's that?
    It's not like OOP requires anything other than memory and a CPU.
    Reply With Quote Edit / Delete United States Show Events Optimistic Optimistic x 1 (list)

  2. Post #122
    Gold Member
    TheBoff's Avatar
    September 2006
    660 Posts
    Playing with Fritzing.
    It's awesome.


    ?
    Reply With Quote Edit / Delete Russian Federation Show Events Funny Funny x 7Dumb Dumb x 6 (list)

  3. Post #123
    quincy18's Avatar
    September 2007
    1,018 Posts
    Why's that?
    It's not like OOP requires anything other than memory and a CPU.
    So it has oop ?
    Reply With Quote Edit / Delete Netherlands Show Events Bad Reading Bad Reading x 1Dumb Dumb x 1 (list)

  4. Post #124
    Gold Member
    ddrl46's Avatar
    October 2007
    3,685 Posts
    I mean the basic of the language isn't that hard, you just need to know some basic C/C++. Even some C# will do.

    Edited:

    I'm working on some arduino RC car project at the moment too. I wish i had a dremel these days.
    Reply With Quote Edit / Delete Netherlands Show Events

  5. Post #125
    Gold Member
    Cathbadh's Avatar
    March 2006
    1,071 Posts
    So it has oop ?
    Well, it uses an Atmel AVR chip, and there are plenty of C++ compilers for that, so yeah. It "has" oop, even though oop is a purely code-level and abstract concept that has no distinct manifestation on the hardware level.
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 1 (list)

  6. Post #126
    Gold Member
    Zero-Point's Avatar
    March 2006
    7,687 Posts
    The arduino language isn't that hard, it's pretty easy. Just take a look at the examples and you'll understand it.
    I couldn't even learn Python or BASIC. :/
    Reply With Quote Edit / Delete United States Show Events

  7. Post #127
    Gold Member
    ddrl46's Avatar
    October 2007
    3,685 Posts
    You can, just take some time.
    Reply With Quote Edit / Delete Netherlands Show Events

  8. Post #128
    Gold Member
    Zero-Point's Avatar
    March 2006
    7,687 Posts
    You can, just take some time.
    Time is something I don't have I'm afraid, between looking for work, up-coming classes, doing shit around the house, moving, and my other hobbies I ain't got time for shit. :saddowns:
    Reply With Quote Edit / Delete United States Show Events

  9. Post #129
    Kyle Orton's Avatar
    December 2009
    121 Posts
    then you aint got time for an arduino
    Reply With Quote Edit / Delete Anonymous Proxy Show Events

  10. Post #130
    Gold Member
    Zero-Point's Avatar
    March 2006
    7,687 Posts
    then you aint got time for an arduino
    One of my other hobbies is electronics/robotics, and I know how to do that shit to a degree. So I could build robots powered by Arduinos all I wanted, but I couldn't make them do anything useful. :<
    Reply With Quote Edit / Delete United States Show Events

  11. Post #131
    Gold Member
    ddrl46's Avatar
    October 2007
    3,685 Posts
    Trying to get holes in front of my RC car for front lights :P.
    They are 1MM too small...
    Reply With Quote Edit / Delete Netherlands Show Events

  12. Post #132
    Gold Member
    MrShark's Avatar
    March 2008
    456 Posts
    Hey, add me

    Binge le mag - Arduino Duemilanove 328

    Edit:

    Look it has an Italian sticker on it

    :iia:
    Reply With Quote Edit / Delete United States Show Events

  13. Post #133
    Gold Member
    benjgvps's Avatar
    June 2008
    6,670 Posts

    Trying to get that missile launcher turning right and left. My circuit is probably bad as it will only turn one way at the moment. I'm just using transistors.
    Reply With Quote Edit / Delete Canada Show Events

  14. Post #134
    Gold Member
    Zero-Point's Avatar
    March 2006
    7,687 Posts
    Trying to get holes in front of my RC car for front lights :P.
    They are 1MM too small...
    You won't regret doing that, I put some ultra-bright white LEDs in my little brother's Clodbuster once and those damn things let you see for half a mile!

    Trying to get that missile launcher turning right and left. My circuit is probably bad as it will only turn one way at the moment. I'm just using transistors.
    Using an H-Bridge?
    Reply With Quote Edit / Delete United States Show Events

  15. Post #135
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    This is the first real thing I built with my Arduino.



    Edited:

    Hump dee dump:

    http://filesmelt.com/dl/Flashingbar.pde
    Reply With Quote Edit / Delete Germany Show Events

  16. Post #136
    Gold Member
    benjgvps's Avatar
    June 2008
    6,670 Posts
    Using an H-Bridge?
    I was looking at that then I remembered that I don't have any of those diodes that limit the power to going one way. I'll give up on that for now, I found I have two photo resistors so I'm going to mess with those.
    Reply With Quote Edit / Delete Canada Show Events

  17. Post #137

    April 2009
    708 Posts
    I was looking at that then I remembered that I don't have any of those diodes that limit the power to going one way.
    Just use an LED?
    Reply With Quote Edit / Delete Australia Show Events Informative Informative x 2 (list)

  18. Post #138
    Gold Member
    Elspin's Avatar
    December 2006
    5,508 Posts
    I was looking at that then I remembered that I don't have any of those diodes that limit the power to going one way. I'll give up on that for now, I found I have two photo resistors so I'm going to mess with those.
    L298N will run straight out of the box with no extra components and very simply control 4 bidirectional outputs. Not really bread-boardable but can be bent into shape for it, it's the only chip I'm using in the video I posted earlier to run my car :)
    Reply With Quote Edit / Delete Canada Show Events

  19. Post #139
    Gold Member
    benjgvps's Avatar
    June 2008
    6,670 Posts
    L298N will run straight out of the box with no extra components and very simply control 4 bidirectional outputs. Not really bread-boardable but can be bent into shape for it, it's the only chip I'm using in the video I posted earlier to run my car :)
    I was just about to ask!
    I may have to pick one or two up the next time I make a digikey order.

    Edited:

    If anyone's interested, it compares two photo resistors and lights one of two LEDs.
    Code:
    int LeftValue = 0;
    int RightValue = 0;
    
    void setup()
    {
      pinMode(13, OUTPUT);
      pinMode(12, OUTPUT);
      Serial.begin(9600);
    }
    
    void loop()
    {
      LeftValue = analogRead(0);
      RightValue = analogRead(1);
      if (RightValue > LeftValue)
      {
        digitalWrite(13, HIGH);
        delay(1000);
        digitalWrite(13, LOW);
        Serial.print("RIGHT:");
        Serial.println(RightValue);
      }
      else
      {
        digitalWrite(12, HIGH);
        delay(1000);
        digitalWrite(12, LOW);
        Serial.print("LEFT:");
        Serial.println(LeftValue);
        
      }
    }
    I used this method to hook them up, though instead of 10 K resistors I used 4.7 as it was what I had on hand.
    EDIT: Forgot the link: http://www.arduino.cc/playground/Learning/PhotoResistor
    Reply With Quote Edit / Delete Canada Show Events

  20. Post #140
    Gold Member
    ddrl46's Avatar
    October 2007
    3,685 Posts
    Added to the list, going to post some projects here when i get on my computer.
    Reply With Quote Edit / Delete Netherlands Show Events

  21. Post #141
    Gold Member
    ddrl46's Avatar
    October 2007
    3,685 Posts
    Adding projects to the OP.

    Edited:

    Automerge ftw?

    Edited:

    Added benjgvps's project.

    Edited:

    [release]
    Ddrl46


    Description: A light sensor that uses a bargraph to show the intensity
    [/release]

    int barLeds[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
    
    int checkDelay = 100;
    
    int cdsPin = 0;
    
    void setup(){
      Serial.begin(9600);
      
      pinMode(barLeds[0], OUTPUT);
      pinMode(barLeds[1], OUTPUT);
      pinMode(barLeds[2], OUTPUT);
      pinMode(barLeds[3], OUTPUT);
      pinMode(barLeds[4], OUTPUT);
      pinMode(barLeds[5], OUTPUT);
      pinMode(barLeds[6], OUTPUT);
      pinMode(barLeds[7], OUTPUT);
      pinMode(barLeds[8], OUTPUT);
      pinMode(barLeds[9], OUTPUT);
    }
    
    void loop(){
      Serial.println(analogRead(cdsPin));
      
      if (analogRead(cdsPin) == 0){
        setBar(0); 
      }else if (analogRead(cdsPin) <= 5){
        setBar(1); 
      }else if (analogRead(cdsPin) <= 10){
        setBar(2); 
      }else if (analogRead(cdsPin) <= 15){
        setBar(3); 
      }else if (analogRead(cdsPin) <= 20){
        setBar(4); 
      }else if (analogRead(cdsPin) <= 30){
        setBar(5); 
      }else if (analogRead(cdsPin) <= 40){
        setBar(6); 
      }else if (analogRead(cdsPin) <= 50){
        setBar(7); 
      }else if (analogRead(cdsPin) <= 60){
        setBar(8); 
      }else if (analogRead(cdsPin) <= 70){
        setBar(9); 
      }else if (analogRead(cdsPin) <= 80){
        setBar(10); 
      }
      
      delay(checkDelay);
    }
    
    void setBar(int ledAmount){
      for (int i = 0; i <= 9; i++){
        if (i < ledAmount){
          digitalWrite(barLeds[i], HIGH);
        }else{
          digitalWrite(barLeds[i], LOW);
        }
      } 
    }
    

    [release]
    Use 10 100/330 Ohm resistors for the bargraph, use one 100 Ohm resistor for the light sensor.

    Wire one side of the light sensor to the 5V and connect the other side to a 100 Ohm resistor. Connect the first pin of the resistor to Analog 0, the second one to Ground.
    Connect the bargraph to pins 3 - 12 using the 100 Ohms resistors.

    I've also included a usefull bargraph function, use it :3:.
    [/release]
    Reply With Quote Edit / Delete Netherlands Show Events

  22. Post #142
    Gold Member
    Elspin's Avatar
    December 2006
    5,508 Posts
    I was just about to ask!
    I may have to pick one or two up the next time I make a digikey order.
    I would suggest them heavily, very easy to use. They had a bit of random weirdness but most of it can be solved by just noting that "Current Sense (A/B)" have to be connected to GND/-V. Not just GND like in some tutorials.
    Reply With Quote Edit / Delete Canada Show Events

  23. Post #143
    open.gl
    Overv's Avatar
    February 2007
    7,431 Posts
    Added benjgvps's project.
    That mess needs to be replaced with a loop and a formula.
    Reply With Quote Edit / Delete Netherlands Show Events Agree Agree x 2 (list)

  24. Post #144
    Gold Member
    ddrl46's Avatar
    October 2007
    3,685 Posts
    It's good enough, no need to make it too complicated. It's just a simple project.
    Reply With Quote Edit / Delete Netherlands Show Events

  25. Post #145
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    http://filesmelt.com/dl/LightSensor.pde



    Also, I've written a small sketch to determine the minimum and maximum values a sensor outputs:
    http://filesmelt.com/dl/SensorReadMaxMin.pde

    Just hook up whatever you want to analog pin 0 and then it prints the maximum and minimum values.
    Don't be fooled by the speed it prints, it reads the value in every loop. I just slowed down the print so you can actually still see what's going on.
    Reply With Quote Edit / Delete Germany Show Events Artistic Artistic x 1Winner Winner x 1 (list)

  26. Post #146
    Gold Member
    Jonathan1321's Avatar
    November 2005
    517 Posts
    I really want to start learning this but i am a bit worried about if i am capable of doing it or not, Can anyone recommend me a good site to learn some basics. Do you write the code in visual studio? I am doing some small console applications in VS08 atm in college but i find it hard as shit to understand and the code looks quite different.
    Reply With Quote Edit / Delete United Kingdom Show Events

  27. Post #147
    Gold Member
    ddrl46's Avatar
    October 2007
    3,685 Posts
    Learn some basic c++ at cplusplus.com, you write the code in the Arduino IDE, not in VS.
    Reply With Quote Edit / Delete Netherlands Show Events

  28. Post #148
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    I really want to start learning this but i am a bit worried about if i am capable of doing it or not, Can anyone recommend me a good site to learn some basics. Do you write the code in visual studio? I am doing some small console applications in VS08 atm in college but i find it hard as shit to understand and the code looks quite different.
    http://arduino.cc/en/Tutorial/HomePage

    There are some basic scripts. It's really straightforward to learn it.
    Reply With Quote Edit / Delete Germany Show Events

  29. Post #149
    Gold Member
    Elspin's Avatar
    December 2006
    5,508 Posts
    I really want to start learning this but i am a bit worried about if i am capable of doing it or not, Can anyone recommend me a good site to learn some basics. Do you write the code in visual studio? I am doing some small console applications in VS08 atm in college but i find it hard as shit to understand and the code looks quite different.
    http://www.ladyada.net/learn/arduino/

    This is where I learned. Extremely detailed step by step tutorial from how to set things up to how to do some basic things.
    Reply With Quote Edit / Delete Canada Show Events

  30. Post #150

    April 2009
    708 Posts
    I really want to get an Arduino, but I'm not too good (I'm alright, but I only know the basics) at electronics. The embedded programming part really interests me though.

    Should I?
    Reply With Quote Edit / Delete Australia Show Events

  31. Post #151
    Gold Member
    Zero-Point's Avatar
    March 2006
    7,687 Posts
    I really want to get an Arduino, but I'm not too good (I'm alright, but I only know the basics) at electronics. The embedded programming part really interests me though.

    Should I?
    For most projects, the Arduino should take care of the more difficult stuff (unless your circuit requires supporting logic circuits), and require just a few discrete components for support. (and to make sure you don't burn-out your Arduino)
    Reply With Quote Edit / Delete United States Show Events

  32. Post #152
    Gold Member
    ddrl46's Avatar
    October 2007
    3,685 Posts
    The only basic functions you need to know are digitalRead, digitalWrite and pinMode. You also need to remember the void setup and void loop. Pretty basic.
    Reply With Quote Edit / Delete Netherlands Show Events

  33. Post #153
    Gold Member
    kobilica's Avatar
    March 2006
    1,674 Posts
    I use AVR micros too, but I code them in C. I made software PWM already in C, and so on. Some basic stuff anyway.
    Reply With Quote Edit / Delete Slovenia Show Events

  34. Post #154
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    I use AVR micros too, but I code them in C. I made software PWM already in C, and so on. Some basic stuff anyway.
    You have my respect. I tried it, but it's way more complicated than Arduino :(
    Reply With Quote Edit / Delete Germany Show Events Disagree Disagree x 1 (list)

  35. Post #155
    Gold Member
    ddrl46's Avatar
    October 2007
    3,685 Posts
    Thinking of some parts to buy for my arduino.
    Reply With Quote Edit / Delete Netherlands Show Events

  36. Post #156
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    I opened some old camera to extract the flash, and I found the motherload: 330V 160 uF cap. Enough to die from. Also I found out how to trigger the flash, so it'll be most definately be built in into my friend's any mine model-rocket for night-operations, used as a flashin beacon.
    Reply With Quote Edit / Delete Germany Show Events

  37. Post #157
    Gold Member
    ddrl46's Avatar
    October 2007
    3,685 Posts
    Don't touch the leads of the cap, it's maybe still charged.
    Reply With Quote Edit / Delete Netherlands Show Events

  38. Post #158
    Gold Member
    TrueNash's Avatar
    March 2006
    386 Posts
    And DrLuke was never heard from again.
    Reply With Quote Edit / Delete United Kingdom Show Events Funny Funny x 13 (list)

  39. Post #159
    Gold Member
    TheBoff's Avatar
    September 2006
    660 Posts
    I opened some old camera to extract the flash, and I found the motherload: 330V 160 uF cap. Enough to die from. Also I found out how to trigger the flash, so it'll be most definately be built in into my friend's any mine model-rocket for night-operations, used as a flashin beacon.
    I doubt there's enough current to kill you, but It's fun short circuiting those with a thin bit of wire, and watching the wire pop.
    Reply With Quote Edit / Delete Russian Federation Show Events Agree Agree x 2 (list)

  40. Post #160
    Gold Member
    ddrl46's Avatar
    October 2007
    3,685 Posts
    Nooooooo DrLuke whyyy!!!
    [/sarcasm]

    Found some cool parts in a old electronic box. Going to make some cool stuff with it :D.
    Reply With Quote Edit / Delete Netherlands Show Events Friendly Friendly x 1 (list)