Interfacing PIC16F877A with VB to display ADC Readings

Status
Not open for further replies.
' This subroutine saves the content of the Received TextBox

Private Sub SaveText(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim SaveFileDialog1 As New SaveFileDialog()
SaveFileDialog1.Filter = "Text Files (*.txt)|*.txt"
SaveFileDialog1.Title = "Save Received As"
If SaveFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK _
And SaveFileDialog1.FileName.Length > 0 Then
My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName, Temperature.Text, False) ' Overwrite file
End If
End Sub


--------------------------------------

This Subroutine saves the content of the textbox as it is mentioned. May i know, how i can find the contents? i don't think there is a file already built & named in my computer(H.D.D) as temperature.txt.
Likewise, during running the program never ask me to save any file or something like this. Please let me know your comment about this as well.
 
The current is only being sent as 2 as it is divided by 10 before its sent... Remember I have written a quick fix.. you need to receive the text and cast to a double so you can display

If you send this "....C00225.." in your string. you can the divide by 100 to display 2.25.
 
I have never used the FSO in this way.. I always include the Common Dialog control... I found it much easier...It is available under tools-dialogs
 
I really don't know what is FSO and i could not find any dialogs under tools in VB2010. I am totally new with this software.The time i needed for my project and as per the solution you provided to me,i just installed it and get used to it. But i will try to find it out and see how i can store these data by anyways. Thanks Ian for your time and patience.
 
FSO.... You're using it!!! File system object The "open" and "save as" Dialog objects in the Dialog section of the tools toolbar.... You can open a file and save a file using these objects
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…