Platforms to show: All Mac Windows Linux Cross-Platform

/USB/Phidget/PhidgetAccelerometer Test
Function:
Required plugins for this example: MBS USB Plugin, MBS Util Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /USB/Phidget/PhidgetAccelerometer Test
This example is the version from Sun, 22th Jan 2022.
Project "PhidgetAccelerometer Test.xojo_binary_project"
FileTypes
Filetype text
End FileTypes
Class Window1 Inherits Window
Control Timer1 Inherits Timer
ControlInstance Timer1 Inherits Timer
EventHandler Sub Action() StaticText11.text=p.GetDeviceLabel StaticText10.text=p.GetDeviceName StaticText13.text=hex(p.GetDeviceStatus) StaticText12.text=p.GetDeviceType StaticText14.text=hex(p.GetDeviceVersion) StaticText15.text=hex(p.GetSerialNumber) StaticText16.text=str(p.getAcceleration(0)) StaticText17.text=str(p.getAcceleration(1)) StaticText18.text=str(p.getAcceleration(2)) End EventHandler
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
Control StaticText3 Inherits Label
ControlInstance StaticText3 Inherits Label
End Control
Control StaticText4 Inherits Label
ControlInstance StaticText4 Inherits Label
End Control
Control StaticText5 Inherits Label
ControlInstance StaticText5 Inherits Label
End Control
Control StaticText6 Inherits Label
ControlInstance StaticText6 Inherits Label
End Control
Control StaticText7 Inherits Label
ControlInstance StaticText7 Inherits Label
End Control
Control StaticText8 Inherits Label
ControlInstance StaticText8 Inherits Label
End Control
Control StaticText9 Inherits Label
ControlInstance StaticText9 Inherits Label
End Control
Control StaticText10 Inherits Label
ControlInstance StaticText10 Inherits Label
End Control
Control StaticText11 Inherits Label
ControlInstance StaticText11 Inherits Label
End Control
Control StaticText12 Inherits Label
ControlInstance StaticText12 Inherits Label
End Control
Control StaticText13 Inherits Label
ControlInstance StaticText13 Inherits Label
End Control
Control StaticText14 Inherits Label
ControlInstance StaticText14 Inherits Label
End Control
Control StaticText15 Inherits Label
ControlInstance StaticText15 Inherits Label
End Control
Control StaticText16 Inherits Label
ControlInstance StaticText16 Inherits Label
End Control
Control StaticText17 Inherits Label
ControlInstance StaticText17 Inherits Label
End Control
Control StaticText18 Inherits Label
ControlInstance StaticText18 Inherits Label
End Control
EventHandler Sub Close() p.Close End EventHandler
EventHandler Sub Open() ' call loadPhidgetFrameworkMBS, LoadPhidgetWindowsDLLMBS or LoadPhidgetLinuxLibraryMBS p=new PhidgetAccelerometerMBS // -1 for first device p.Open -1 End EventHandler
Property Protected p As PhidgetAccelerometerMBS
End Class
MenuBar MenuBar1
MenuItem UntitledMenu1 = ""
MenuItem FileMenu = "&File"
MenuItem FileQuit = "Quit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu0 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
EventHandler Sub Open() dim f as FolderItem f=FrameworksFolderMBS(-32765).Child("Phidget21.framework") if LoadPhidgetFrameworkMBS(f) then MsgBox "Framework loaded" else MsgBox "Failed to load framework" end if // use LoadPhidgetWindowsDLLMBS on Windows // use LoadPhidgetLinuxLibraryMBS on Linux End EventHandler
End Class
End Project

See also:

The items on this page are in the following plugins: MBS USB Plugin.

Feedback: Report problem or ask question.

The biggest plugin in space...