loading
2CommentsJoined February 12th, 2016
Industrial Design Student
  • RensMD completed the lesson Wrapping Up in the class Laser Cutting Class5 months ago
  • RensMD completed the lesson EL Wire in the class LEDs and Lighting Class5 months ago
  • RensMD commented on TimLin9527's instructable [TfCD] Beer Scale5 months ago
    [TfCD] Beer Scale

    Hi Tim!Great work on your project for TfCD. Seen the fact I happen to know it's a University course; I want to help you learn a little. I've got some tips for you to improve your coding. 1. Be consistent. Follow a set of rules for writing variables, comments and functions. It will make it easier for you to find small errors, because you'll be able to identify typos by their deviation from your own rules! For example: all variables by the format of: "firstSecond" or "first_second" or "firstSECCOND or really anyway you'd like as long as you don't mix.2. Use comments, but don't drown your code in comments. Keep your commenting short and to the point. When using code from a source check the existing comments and determine if they should be in your code. Your example...see more »Hi Tim!Great work on your project for TfCD. Seen the fact I happen to know it's a University course; I want to help you learn a little. I've got some tips for you to improve your coding. 1. Be consistent. Follow a set of rules for writing variables, comments and functions. It will make it easier for you to find small errors, because you'll be able to identify typos by their deviation from your own rules! For example: all variables by the format of: "firstSecond" or "first_second" or "firstSECCOND or really anyway you'd like as long as you don't mix.2. Use comments, but don't drown your code in comments. Keep your commenting short and to the point. When using code from a source check the existing comments and determine if they should be in your code. Your example has borrowed a lot of the example library of the SparkFun ESP module, which was written with explanatory purposes and therefore a lot of descriptive comments. Is the explanation of a library really necessary in your final product??3. Keep your code short but functional and try to eliminate as much duplicate functionality as possible.The Arduino has limited available memory, as soon as your programs will start to become more complex and bigger you might run into memory problems. That's why you should always consider if your functions could be simpler, shorter and less similar with other functions. For example: beerStatus() and beerEmpty() seem very similar, maybe there's a way to combine both into one slightly more complex but shorter function? This is were some of the real challenges start to show up!4. Arduino specific: Serial print is great for supplying feedback to the user. Also it's a great tool for debugging (not sure if a certain variable has the value you would expect? Print it!). As soon as you are certain your code works properly, get rid of all the unnecessary prints. Serial.print actually is a slow function which uses more time than you might expect. If you'll start to work with systems which require high responsiveness, the first thing you want to do is eliminate as many serial.print as possible! Additionally, make sure you understand the used functions as much as possible. You sometimes use the F() function in your serialPrint(). Which can be a nice tool in some specific cases. However, seen the usage in this example I start to wonder what you would think the F() function actually does. Finally, some IDE specific commentary, just like designing products, keep your target users in mind. If you decide to publish something make sure your code and comments are tailored to their needs! Why do i have to scroll and search for the variables I need to adapt following your instructions? Why not clearly visible almost at the top?Anyway, plenty of feedback. But I can see you put effort in your project and I got the idea you're interested in learning more. Which makes me hope my time replying was worthwhile!

    Hi Tim!Great work on your project for TfCD. Seen the fact I happen to know it's a University course; I want to help you learn a little. I've got some tips for you to improve your coding.1. Be consistent. Follow a set of rules for writing variables, comments and functions. It will make it easier for you to find small errors, because you'll be able to identify typos by their deviation from your own rules! For example: all variables by the format of: "firstSecond" or "first_second" or "firstSECCOND or really anyway you'd like as long as you don't mix.2. Use comments, but don't drown your code in comments. Keep your commenting short and to the point. When using code from a source check the existing comments and determine if they should be in your code. Your example ...see more »Hi Tim!Great work on your project for TfCD. Seen the fact I happen to know it's a University course; I want to help you learn a little. I've got some tips for you to improve your coding.1. Be consistent. Follow a set of rules for writing variables, comments and functions. It will make it easier for you to find small errors, because you'll be able to identify typos by their deviation from your own rules! For example: all variables by the format of: "firstSecond" or "first_second" or "firstSECCOND or really anyway you'd like as long as you don't mix.2. Use comments, but don't drown your code in comments. Keep your commenting short and to the point. When using code from a source check the existing comments and determine if they should be in your code. Your example has borrowed a lot of the example library of the SparkFun ESP module, which was written with explanatory purposes and therefore a lot of descriptive comments. Is the explanation of a library really necessary in your final product??3. Keep your code short but functional. Try to eliminate as much duplicate functionality as possible.The Arduino has limited available memory, as soon as your programs will start to become more complex and bigger you might run into memory problems. That's why you should always consider if your functions could be simpler, shorter and less similar with other functions. For example: beerStatus() and beerEmpty() seem very similar, maybe there's a way to combine both into one slightly more complex but shorter function? This is were some of the real challenges start to show up!4. Arduino specific: Serial print is great for supplying feedback to the user. Also it's a great tool for debugging (not sure if a certain variable has the value you would expect? Print it!). As soon as you are certain your code works properly, get rid of all the unnecessary prints. Serial.print actually is a slow function which uses more time than you might expect. If you'll start to work with systems which require high responsiveness, the first thing you want to do is eliminate as many serial.print as possible!Additionally, make sure you understand the used functions as much as possible. You sometimes use the F() function in your serialPrint(). Which can be a nice tool in some specific cases. However, seen the usage in this example I start to wonder what you would think the F() function actually does.Finally, some IDE specific commentary, just like designing products, keep your target users in mind. If you decide to publish something make sure your code and comments are tailored to their needs! Why do i have to scroll and search for the variables I need to adapt following your instructions? Why not clearly visible almost at the top?Anyway, plenty of feedback. But I can see you put effort in your project and I got the idea you're interested in learning more. Which makes me hope my time replying was worthwhile!

    View Instructable »
  • RensMD commented on chrismelba's instructable The Light Clock (IoT)1 year ago
    The Light Clock (IoT)

    Experienced problems with compiling the code in newer versions of arduino and libraries. Needed to uncomment the #include <Adafruit_Neopixel.h> to get the code to compile.Still experiencing a major problem:I keep getting a wdt reset (which I believe has to do with watchdog). This happens when trying to connect the lightclock in AP mode with my phone/laptop.In other cases i get a random error and a reset with "rst cause:4, boot mode:(3,7)".

    View Instructable »