Seven Segment Display Module
#21
Posted 22 August 2012 - 11:30 PM
- Yourhit likes this
#22
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
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
Posted 01 May 2015 - 10:57 PM
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:
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
#25
Posted 01 May 2015 - 11:06 PM
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
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
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users