Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Seven Segment Display Module


  • Please log in to reply
25 replies to this topic

#21 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 22 August 2012 - 11:30 PM

Hi Matt In the past i have always used an led to indicate overflow, but i guess thats not an option with the current display design, that said could you illuminate one of the decimal points to indicate overflow? Nak.

#22 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 23 August 2012 - 05:54 AM

I also wanted to get some feedback regarding out of range exceptions. Currently, if you try to call SetValue with a value that cannot fit on the display (e.g., 12345), an ArgumentOutOfRangeException will be thrown. I've gotten some feedback from users that would prefer some other way of handing out of range values.


Personally I like the exception as the default behaviour. If my code is asking a display to show 6 digits when it can only display 4 then I have a code problem and I need to know about that as it's my responsibility to make sure my code is behaving sensibly. If you added other features like the ability to set error messages then it's highly unlikely that I would use them.

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#23 bolts

bolts

    New Member

  • Members
  • Pip
  • 1 posts
  • LocationPortland, OR

Posted 23 August 2012 - 08:02 AM

I also wanted to get some feedback regarding out of range exceptions. Currently, if you try to call SetValue with a value that cannot fit on the display (e.g., 12345), an ArgumentOutOfRangeException will be thrown. I've gotten some feedback from users that would prefer some other way of handing out of range values.

I'm considering implementing an optional default "error" display value. To enable that, you could use something like:

display.SetErrorValue(Digit.Dash, Digit.Dash, Digit.Dash, Digit.Dash);
This would cause the specified value (in this case, four dashes or "----") to be displayed whenever an out of range value is sent to SetValue rather than throwing an exception.

Any thoughts? Would this be better than other options, such as displaying partial values?


I'm a fan of throwing exceptions when I'm developing/debugging so I can stop and figure out what I did wrong. That said, I'm a big fan of a SetErrorValue() feature. This feature would let me push the error handling code down a layer if/when I don't care (deploying something vs debugging). I can also decide how to deal with failure in an initialization routine (choosing to call SetErrorValue or not).

I realize I can also do this myself by catching the exception -- but this would be a nice convenience for my usages.

Thanks,
-Josh

#24 Matt Isenhower

Matt Isenhower

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationSan Diego, CA

Posted 01 May 2015 - 10:57 PM

Hey everyone,

I've just posted an update to the seven segment display driver that targets NETMF v4.3. This update brings support for the Netduino 3 Wi-Fi and fixes a bug with DateTime values. You can download the installer and source code here.

You might also notice that each public member of the driver now includes XML documentation, which means you'll see documentation like this when writing code for the display:
7segxmldocumentation.png

This documentation doesn't increase the size of the driver assembly -- all text is stored in a separate XML file on your computer.

This driver is built for use with the NETMF v4.3 version of the GoBus driver. The Netduino SDK hasn't been updated to include the new GoBus driver yet, but Chris tells me anyone who needs a copy of it should contact him and he'll send the files over.

As always, please let me know if you have any questions or issues! Thanks,

Matt
Komodex Labs
Follow me on Twitter: @mattisenhower

#25 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 May 2015 - 11:06 PM

Very cool, Matt.

BTW, you can use the exact same code to work with Komodex's 7segment module on both Netduino Go and Netduino 3 Wi-Fi. Pretty cool stuff.

Matt--are there any demos of the 7seg module running on Netduino 3 that you can share photos of here? You have an awesome weather demo, IIRC?

Chris

#26 Matt Isenhower

Matt Isenhower

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationSan Diego, CA

Posted 01 May 2015 - 11:11 PM

Matt--are there any demos of the 7seg module running on Netduino 3 that you can share photos of here? You have an awesome weather demo, IIRC?


Oh, thanks for the reminder -- near the bottom of my Netduino 3 Wi-Fi review I have a sample app that pulls weather data from wunderground.com's API and displays it on the seven segment display.

I also show the display in a few examples on my other post, GoBus: An Alternate Approach. These examples use a different version of the driver, however, that is based on an alternative/experimental GoBus library.

Matt
Komodex Labs
Follow me on Twitter: @mattisenhower




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.