Public projects 1

Arduino Controlled Artificial Candle Lights

Project tutorial by Mattias Larsson

  • 25,807 views
  • 14 comments
  • 47 respects

Toolbox 3


A Game That Learns How to Play Itself

Project showcase by Little_french_kev

  • 9,078 views
  • 10 comments
  • 97 respects

Arduino Mega Chess II

Project showcase by Sergey_Urusov

  • 8,734 views
  • 24 comments
  • 47 respects

I Let Everyone on the Internet Control My X-Mas Decoration 2

Project showcase by Tobi_Lxtr and Tobi_Lxtr

  • 2,506 views
  • 2 comments
  • 11 respects

  • Roman Numeral Converter for Arduino over 2 years ago

    Hello! Please note that the isValidNumber method is wrong. It actually only checks the first character of the string -- and if that one is a digit, the method returns true immediately (ignoring the following characters).
    You should invert the if-statement, and in the loop return false if it is not a digit.
    In the end, if the whole loop was passed without encountering a non-digit, the method should return true.
    However, now, you might want to check the length of the string before the loop. If it is an empty string you might want to return false.
    So, something like:

    boolean isValidNumber(String str) {
       if (str.length() == 0) return false;
       for (byte i = 0; i < str.length(); i++)
       {
           if (!isDigit(str.charAt(i))) return false;
       }
       return true;
    }
    
  • Arduino Controlled Artificial Candle Lights over 2 years ago

    Thanks Ed! I spent a considerable amount of time to get it right; comparing it to a real candle light next to it. (At least as right it can be, giving the limited color range of the LED lights)
    I also have a critical judge at home... I'm very happy to hear that you were able to re-use the code! ;-) Cheers!

  • Arduino Controlled Artificial Candle Lights over 3 years ago

    Yes, adding the features I wanted made it rather complicated. (That's why I marked the project as "Intermediate". :-)
    But if you take your time and look into the different parts and how they interact I'm sure that you will understand how it works.

Add projectSign up / Login