SparkFun Electronics will be closed on July 3rd, 2015 in observance of Independence Day. Any orders placed after 2:00pm MT on July 2nd will be shipped out after the weekend. Thanks!


Member Since: October 16, 2008

Country: United States

  • I learned electronics in college, but I think I’ve learned a lot more by simply doing things first hand.

    If you’ve just started out with an Arduino, I would encourage most people to then take it a step further by reading the entire AtMega328 datasheet and trying to utilize each of the peripherals on the mcu without relying on the Arduino libraries. Think of the Arduino libraries as training wheels - wheels that should be removed at some point to get at the bare bones hardware. The nice thing about this approach is that the IDE is simply using the AVR gcc cross compiler under the hood, so nothing new is required to go forth and play with the hardware directly. Use the same IDE and copy the example code right out of the data sheet! There might be some minor changes you’ll have to do, but it mostly just works.

    Beyond that, it’s essential to spend some time working with analog electronics. There are a lot of projects out there where the need for a complicated micro isn’t really necessary. I can’t count the number of IR repeater projects I’ve seen that (incorrectly) implement a 38KHz oscillator when none is required. If you use a non-demodulating sensor (from Vishay), the circuit becomes much simpler and IR crosstalk between the different sources is eliminated. This circuit can be done with only about 6 components and none of them oscillate or take programming instructions. That’s just one example, though.

  • The way I explain state machines is in terms of parsing HTML. If you need to parse something that’s human written and has no formal definition of what order the tags will appear, the only way to parse it in software is with a state machine.

    void parse_html(char input)
      static int state = 0;
      switch (input)
        case 'i':
          if (state == 0)  state = 1;
        case 'm':
          if (state == 1) state = 2;
        case 'g':
          if (state == 2) state = 3;
        case ' ':
          if ((state == 3) state = 4;
        [other cases]
          state = 0;

    As each character is evaluated, we check to see what the next state should be. From there, you can implement logic which saves the data in each tag as it’s processed and then later does something with the information collected. I wrote this one afternoon to solve a problem I was having and I keep going back to it to solve these kinds of problems. It runs relatively quickly even if it is a bit hard to follow due to the massive switch statements that you may wind up creating. In my opinion, you could also abstract this and write software which writes your switch statement for you based on a set of rules.

    btw - this comment box is very code unfriendly :-( ….can’t use the tab key….

  • Just an fyi - On Microsoft Windows platforms, an application that is both a command line app and a GUI app is an impossibility. The software development tools require that you define your application as one or the other. If you decide it’s a GUI app, the application init code will open up a window on the desktop before any of your own code is executed. If you decide it’s a command line app, trying to put up a dialog becomes extra difficult.

    The best anyone can hope for is that you’ll be able to hide that window quickly enough so no one really notices or complains about it.

  • I started making my own enclosures when I realized that most off-the-shelf project boxes waste a lot of space in the corners. Instead of providing a mount that’s strictly sufficient to hold the lid on, most manufacturers have an entire column of unnecessary plastic running from the bottom of the box to the lid. That’s space taken that I can’t use for anything else which ends up leading to buying a box that’s far larger than necessary.

    A quick trip to the lumber yard for some 4/4 cherry, a little resaw work, and a planing operation will yield a fair bit of ¼" material. Take that to the table saw, dimension the sides top & bottom, and spend some time cutting ¼" box joints on the sides. Glue it together and add supports where you actually need them. If you take the time to put a finish on it, it will really pop - much more so than a bulky off the shelf plastic box. Well - maybe it’s just me….

    BTW, Sparkfun, a small request. The serlcd product has a lot of board realestate to the left of the display that holds the PIC processor. This ends up dictating the size of an enclosure I needed for a project. Would it be possible to change that product so the PIC is behind the LCD, making the whole display quite a bit larger than the display itself? That was one of the things that led to the above story.

    edit: er … make the serlcd product a smaller device rather than the large size it is now.

  • I asked the question because I can’t depend on the manufacturer to keep their documentation online. When they release an update to their module, their documentation will disappear. On the other hand, if SFE hosts the documentation, then it’s available for everyone in the community.

    Yes I could have gone to the manufacturer website, but this is, in my opinion, better for everyone.

  • No command reference? How do I talk to this module?

    Also, the datasheet does not indicate if this module can communicate with another BLE slave device or if it’s only intended to act as a sensor node communicating back to a host computer. I’m thinking the missing command reference might clear that up.

  • To me, a fitbit is not a ‘wearable’ technology and neither is the Apple watch. They are accessories of a sort that are not integrated into one’s clothing. These kinds of technology I’ll gladly buy and use because they aren’t integrated into a particular article of clothing.

    Historically, when Sparkfun refers to wearables, it usually means that the electronics are part of the clothing itself. These things I will not buy and I have no care in the world for even experimenting with them. The core problem to me is that I have to have one particular item to receive the benefit of the technology or I have to buy that same technology multiple times for it to be feasible. I’m also not convinced that such things are terribly durable given that most things must at least be washed at some point in their usage lifecycle.

  • I have to admit, AMD does graceful failure unexpectedly well. I had the misfortune of using a computer where the CPU fan was disconnected from the header on the motherboard. Either the wire wandered it’s way too close to the fan and it got yanked -or- a certain person forgot to plug it in.

    I used the computer for months that way - even playing games on it - and it worked fine. The only thing that indicated something was wrong is the system would unexpectedly slow down when the processor got near it’s thermal threshold. Once I corrected the problem, it was fine. Apparently someone at AMD knows all too well how good those ‘ball bearing’ cpu fans work.

  • I learned programming at the ripe age of about 12. Back then, the standard computer in my school was an Apple ][e and all anyone did with them is write in basic. It turns out that I probably didn’t appreciate that skill as much as I should have until many years later.

    My job in college was to repair VCR’s and televisions for a media department in the library. I worked there anytime I wasn’t in class during the day and most of the equipment back then was designed to be repaired. We even had service manuals for everything.

    You might be thinking that job was easy, right? Well, no. Even though you have the manual, you still run into situations where you have to work out how a circuit works and then figure out what it is that’s making it malfunction. It didn’t really matter that you had the full schematic and the values of a few test points. The design of the circuit was not documented anywhere so you had to figure out a lot on your own.

    I initially found this frustrating. I was several years into my degree in electrical design and still had some projects that I couldn’t really figure out. I asked one of my co-workers to take a look at a problem I was having (he was a photography major) and he very methodically worked out the absolute logic that had to be followed to determine how it worked and where it had malfunctioned. In short, he used the one skill I hadn’t thought to use and solved the problem in no time.

    I do a lot of sysadmin support and I’m still finding that education in logic to be very useful. People come to me with issues and I do my best to figure out logically why something isn’t working. The people I work for can be fairly irrational. “The mouse only works when I press on this corner of the computer’s case” is one example. “It just doesn’t want to work today” is another. In reality, the day of the week has nothing to do with why something isn’t working. Usually the problem is something entirely unrelated like not allowing their favorite pet to chew on the cords in back of the computer.

    I don’t think an education in programming will solve that last bit, but I don’t think it would hurt either.

  • I know everyone dislikes doing mortise & tenon joints, but seriously, you’ll use a lot less material, the desk will be lighter, and it won’t have all that bulky triangulation. To do them, all you need is a mallet, a mortise chisel, handsaw, and a sharpening stone. It doesn’t have to be overly complicated or expensive.

    Pocket screws might speed things up but I’ve never liked having metal potentially hidden inside of a project. At some point you may decide to repurpose the lumber after you build Desk 3.0 and there’s nothing more frustrating than chipping a carbide blade on hidden fasteners.

    Also, you might be able to get away with using bed hardware instead, but I’ve never tried that. On the other hand, most beds are fairly stable and they don’t have mortise & tenon joints.

No public wish lists :(