Shop OBEX P1 Docs P2 Docs Learn Events
Go ahead, you can laugh at my "Duh" moment — Parallax Forums

Go ahead, you can laugh at my "Duh" moment

TCTC Posts: 1,019
edited 2014-05-04 07:22 in General Discussion
Hello all,

This is not a post about a question, a concern, or where I am in need of help. This is a post to add a "duh" moment in the record book.

I am currently working on my reflow oven. And I decided to clean up my breadboard, and start over again with my code. So I took everything off the breadboard, and started to put things back on, but this time more organized. Since I had everything apart, I also decided to change all my wires that go from my DIY Propeller board, the oven's SSR's, the encoder, and the display. I decided to make the wires longer so everything is not so cramped. I spent a couple hours adding new wire, terminals to the wires, adding braided wire covering, and heat shrink just to keep things organized. Then I went on to the breadboard, putting things in sections based on there job. I spent a good 1-2 hours doing that. And as I am putting the wires from the oven, to the breadboard, I am inputting what I/O pin I will be using. I finaly get everything together, and start testing things one by one. I start with the SSR control,can I turn them on and off. Then to the RTC (DS1307), can I make the square wave output flash an LED at 1Hz. Then I go to my display, A Noritake 24x6 VFD display. I had my last program controlling the display using serial at 38,400 baud. I never had any problems with the display, so I was prepared to see "Hello" on the screen and move on to the next thing to check. But to my shock, all I seen was random characters.

First I thought the problem was noise, so I added a few caps, moved the wires around, moved the display, and even put the display on its own power supply. Nothing worked, I still had junk on the screen. So then I figured it was because I replaced the wires I had on it before with longer wire. So I started cutting my hard work up. Removing all the heat shrink, cutting off the terminals, removing the pretty braid from around the bundle of wire. And also cutting the ribbon cable that I just got done replacing for my DIY propeller board. After I got done with that, I powered everything back up hoping that my display say "Hello" to me. But it didn't. It still was only showing junk. By this time my anger was about to its limit, almost to the point where I would TARE everything off the breadboard, and not touch the project for a few weeks.

Im sitting at my desk, my elbows on the desk, and my hands holding my head up while I try to calm down and thinking of what could be the problem. The computer screen is in front of me, still showing my test code. Then I notice something does not look right. I grab the mouse, spin the scroll wheel to the top of the code, and that is when the "Duh" moment hits. With my concentration being on what the I/O pins on the Prop will be doing, I completely forgot to add 2 very important things.

By this time, I bet some of you are laughing because you know what I forgot. All that stress because I forgot 2 lines of code. And if you don't know what I forgot, then here you go
CON
        _clkmode = xtal1 + pll16x                                         
        _xinfreq = 5_000_000

If I could offer anyone advice from my "Duh" moment it would be, "If something is not working, don't get upset. Just sit back, take a breath, and check your code."

Thanks
TC

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2014-04-29 20:09
    Great advice.
  • xanaduxanadu Posts: 3,347
    edited 2014-04-29 21:08
    It's hard to laugh when I've done it so many times myself. In fact I can't even go into the plethora of random and multiplexed issues that arise when I'm building. That is the fun part for me. You can't fake your way through building something. The more it grows the less tolerant it becomes. As unforgiving as electronics are, my Prop Protoboards have been very resilient, a few fried pins here and there but nothing compared to the garbage I deal with on a daily basis at my job. I'm still working on my 5 pack I purchased around 2009 I think. 3.5 of them still work!
  • msrobotsmsrobots Posts: 3,709
    edited 2014-04-30 01:34
    TC,

    you are not alone. Been there and done that...

    Deeep breath. Peach in, Green out...

    Enjoy!

    Mike
  • TCTC Posts: 1,019
    edited 2014-04-30 03:20
    Mike Green wrote: »
    Great advice.

    Thank you
    xanadu wrote: »
    It's hard to laugh when I've done it so many times myself. In fact I can't even go into the plethora of random and multiplexed issues that arise when I'm building. That is the fun part for me. You can't fake your way through building something. The more it grows the less tolerant it becomes. As unforgiving as electronics are, my Prop Protoboards have been very resilient, a few fried pins here and there but nothing compared to the garbage I deal with on a daily basis at my job. I'm still working on my 5 pack I purchased around 2009 I think. 3.5 of them still work!

    I do agree with you, that is the fun part. And this is just ONE of the many, and the most recent "duh" moments i have had. Exploding caps, burnt PCBs, smoked chips(one was a Prop :frown:). It is a passage of life. And I have always been told, "If you don't screw something up, at least once, you are doing it wrong". This was also the same person that had a saying while working on a car "If you are not bleeding, you are doing it wrong".

    I posted this because I knew I was not the only one. And since I am able to laugh at my own screw ups, why shouldn't others.
    msrobots wrote: »
    TC,

    you are not alone. Been there and done that...

    Deeep breath. Peach in, Green out...

    Enjoy!

    Mike

    Exactly!! Your avatar is a great example.
  • JonnyMacJonnyMac Posts: 9,107
    edited 2014-04-30 07:43
    We've all had those moments -- you're in good company.

    Tip: If you're using the Propeller Tool, go to the Preferences dialog and on the Files & Folders tab you can specify a template -- this is a huge time-saver and helps ensure one gets the basics in place (without resorting to copy-and-paste).

    I'm hoping the Steve and the team will add this feature to the Propeller IDE before the call if "done."

    I've attached my standard template as it may be useful to others. I use the double-underscore prefix so that it sorts to the top of the file list window. I've built similar templates for specific boards.

    "If something is not working, don't get upset. Just sit back, take a breath, and check your code."


    Yep. Last week I was chasing an error for an embarrassingly long time -- the "error" was actually a piece of debug code buried deep in the works....
  • TCTC Posts: 1,019
    edited 2014-04-30 16:49
    JonnyMac wrote: »
    We've all had those moments -- you're in good company.

    I could not agree with you more. Everyone on here has been amazing to through the years.
    Tip: If you're using the Propeller Tool, go to the Preferences dialog and on the Files & Folders tab you can specify a template -- this is a huge time-saver and helps ensure one gets the basics in place (without resorting to copy-and-paste).

    Ok, I just learned something new. Thanks
    I've attached my standard template as it may be useful to others. I use the double-underscore prefix so that it sorts to the top of the file list window. I've built similar templates for specific boards.

    Thank you so much Jon. There is a few things I will be using.
    Yep. Last week I was chasing an error for an embarrassingly long time -- the "error" was actually a piece of debug code buried deep in the works....

    Thank you for sharing Jon. This proves that even the best programers can have a "Duh" moment.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-04-30 18:45
    Thanks for sharing TC, but you've got along way to go before you can catch up with us Kings of Duh. They say that debugging is the art of finding bugs in a program so therefore programming must be the art of creating bugs in the first place, so those with more experience are more experienced in creating bugs. How do you think we know the answers? Huh?. Experience! But don't fret, I'm sure that with a bit more experience you will have opportunities for more Duh moments :)

    BTW, if we had a thread that we all shared Duh moments on then I'm sure it would be helpful not just to newbies but to all. In fact anytime someone has a problem we could say "have you RTDM thread?"
  • TCTC Posts: 1,019
    edited 2014-05-01 04:51
    Thanks for sharing TC, but you've got along way to go before you can catch up with us Kings of Duh. They say that debugging is the art of finding bugs in a program so therefore programming must be the art of creating bugs in the first place, so those with more experience are more experienced in creating bugs. How do you think we know the answers? Huh?. Experience! But don't fret, I'm sure that with a bit more experience you will have opportunities for more Duh moments :)

    You are so welcome. If I don't have Duh moments, I'm not learning anything :lol:

    Thank you for the encouragement.

    BTW, if we had a thread that we all shared Duh moments on then I'm sure it would be helpful not just to newbies but to all. In fact anytime someone has a problem we could say "have you RTDM thread?"

    That is a really great idea. It could be a great way for newbies and veterans to share a common problem with programing and electronics. Where a newbie could see, that even though someone have spent a good portion of there life programing, electronic designing, etc.. That they also can screw up, and have a Duh moment. I feel it could give a boost of confidence to others. And what makes your idea so much better, is the people on the forum. No one on here will point and laugh at a mistake(unless it is allowed by the poster, like mine is), everyone will give great advice to do it better next time.

    I think I will put in a suggestion to have a Duh moment section or index added to the forum.
  • TCTC Posts: 1,019
    edited 2014-05-04 07:06
    Figure I would just continue with on this post.

    I finally got my breadboard done. Now to finish programing.

    Breadboard.jpg
    1024 x 577 - 100K
  • idbruceidbruce Posts: 6,197
    edited 2014-05-04 07:10
    Definitely looks like you have been experimenting :)

    Nice breadboard setup.
  • TCTC Posts: 1,019
    edited 2014-05-04 07:22
    idbruce wrote: »
    Definitely looks like you have been experimenting :)

    Nice breadboard setup.

    You have no idea :lol: This is the 4th time I have torn and rebuilt the breadboard.

    Thank you.
Sign In or Register to comment.