Read data of acceleration from the accelerometer vb 2008

Supporting Visual Studio on Windows
golddigger
Fresh meat
Posts: 2
Joined: Fri Apr 05, 2013 7:16 am
Contact:

Read data of acceleration from the accelerometer vb 2008

Postby golddigger » Fri Apr 05, 2013 7:27 am

I want to read data of acceleration from the accelerometer on only one axis with a frequency of sixty hertz and put them in a file so you can dispose of freely in VB 2008. I only displays casiment all the time the same or two different. I started with a structure "for" but nothing works. What I did not work. Anyone have a solution please ? I'm a newbie :? Thank you :D That what i did :

Code: Select all

Public Class Form1
        Dim tableau(10000, 1) As Double

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim i As Int32
            FileOpen(1, "X:\ETS4\SI\Projet interdisciplinaire\Projet Martinage,Falbière,Torres,LASSERREValeursaccelreationsurX.txt", OpenMode.Output)
            For i = 0 To 10000
                tableau(i, 1) = 0
            Next
            For i = 0 To 10000
                tableau(i, 1) = phidgetAccel.axes(0).Acceleration
                WriteLine(1, tableau(i, 1))
            Next
            FileClose(1)
        End Sub
    End Class

User avatar
mparadis
Site Admin
Posts: 624
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Read data of acceleration from the accelerometer vb 2008

Postby mparadis » Fri Apr 05, 2013 8:39 am

Is this the entire code? Did you call open on phidgetAccel?

golddigger
Fresh meat
Posts: 2
Joined: Fri Apr 05, 2013 7:16 am
Contact:

Re: Read data of acceleration from the accelerometer vb 2008

Postby golddigger » Fri Apr 05, 2013 8:43 am

no it is not the integer part . This is what I have done to try to display the values ​​in a file


Return to “VB .NET”

Who is online

Users browsing this forum: No registered users and 1 guest