Jump to content
43oh

Electricity monitor - need some help


Recommended Posts

Recursion must be used with caution... Ten recursives consume minimally 60 bytes from stack space...

Yes, I am aware of the risks. However, an int has, at most, five digits. There will only be one call and, at most, four recursive calls on the stack at any time. This change reduced my code size (so far) from 1900 bytes to 680 bytes; even with the recursion, I count it a net gain. :D

 

I may make a small change to allow for negative integers but, for now, it's working fine in the context of my program. ;)

Link to post
Share on other sites
  • 3 months later...
  • Replies 78
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

@GeekDoc It does work on my board, I am using CCS. Must be debugger.

In IAR Embedded Workbench this code working too without any problems...

Copy Your code into an old, fully functioning project. You may have accidentally overwritten something in the default settings ...

Posted Images

I saw that one and posted on his site. My plan was scrapped when I was asked to move out (by wife :cry: ).

 

I did find a Black & Decker "Power Monitor" which does the same basic thing wirelessly. I bought one from a clearance site for about $25. I have the receiving unit mounted on a wall on the opposite end of the 6-unit apartment building, and it receives just fine. Shows current usage (about 400W ATM), total usage, and temperature at meter sensor. Now I just need to hack it so I can log usage to my computer! :twisted:

Link to post
Share on other sites
  • 9 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...