At the end of the article you can dowload source code too.
On the display we are going to show:
- Date and time as displayed by computer
- Free Available space on a selected drive (percent and dimension in Mb or Gb ecc)
- Free Available RAM (percent and dimension)
- Temperature in °C
The display will look like this:
In order to display temperature you'll need an LM35 temperature sensor. LM35 will be connected on port RA0 of MuIN LCD using a 1KOhm resistor and a 100nF polyester capacitor. Follow this schematic:
Note
For further informations please refer to LM35 datasheet and MuIN LCD datasheet and user manual. Remeber to close Jumper Logic/USB!
For further informations please refer to LM35 datasheet and MuIN LCD datasheet and user manual. Remeber to close Jumper Logic/USB!
Refresh of display informations is obtained using the timers "tick" event: one for every single display line.
Note
The code is optimized for use a 4x20 display.
Refresh times for lines are different: e.g. Hard disk space is refreshed every 20 seconds.The code is optimized for use a 4x20 display.
Time is obtained using string.format function:
Code: [View]
Dim DaS As String = String.Format("{0:ddd dd MMM \'yy HH\:mm}", Now)
Code: [View]
' Selected drive properties Dim Drive As New DriveInfo(cmbDrive.Text.Substring(0, 2)) ' Total available free space (to all users) SpaceA = Drive.TotalFreeSpace ' Total space SpaceT = Drive.TotalSize
Code: [View]
' Available physical memory Dim RamA As Long = My.Computer.Info.AvailablePhysicalMemory ' Total physical memory Dim RamT As Long = My.Computer.Info.TotalPhysicalMemory
Reading on port RA0 is obtained from first and second byte of serial received data as specified in MuIN LCD User Manual:
Code: [View]
rx = SerialPort1.ReadExisting
Code: [View]
Dim ADVal As Integer Dim t1, t2 As Byte t1 = Asc(Mid(rx, 1, 1)) t2 = Asc(Mid(rx, 2, 1)) ADVal = (256 * t1) + t2
Code: [View]
Dim St As String = String.Format("{0:0.0}" & Chr(223) & "C", (TempMean * 0.5))
Since we must wait some seconds before first temperature reading is ready, a [wait] string will shown on display:
We must respect a minimum delay of 10mS every time a command is sent to display:
Code: [View]
System.Threading.Thread.Sleep(10)
You must select the COM port where MuIN LCD is attached and the Drive to monitor, then press "GO" button.

Note
You must connect MuIN LCD to computer before launch the application or COMport will not be displayed.
If you select an empty drive (empty floppy drive or cd-rom) a warning message will be shown:You must connect MuIN LCD to computer before launch the application or COMport will not be displayed.
Once application is running, "Go" button become "Stop" and COMport selection is disabled but you can change drive to monitor in real time.
Feel free to edit and customize this software and share your experience in our forum.
Code is distributed "as is" without any warranty. Do not use it for commercial purpose.
Download "BIN" if you want use the executable or "SOURCE" if you want the source code.
.NET Framework 3.5 required.
If you want to edit source code, you need Visual Basic 2008 Express Edition (or 2010). Express version are freeware!
Feel free to edit and customize this software and share your experience in our forum.
Code is distributed "as is" without any warranty. Do not use it for commercial purpose.
Download "BIN" if you want use the executable or "SOURCE" if you want the source code.
.NET Framework 3.5 required.
If you want to edit source code, you need Visual Basic 2008 Express Edition (or 2010). Express version are freeware!