Platforms to show: All Mac Windows Linux Cross-Platform

/Linux/wiringPi/WiringPi


Required plugins for this example: MBS Linux Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Linux/wiringPi/WiringPi

This example is the version from Thu, 6th Apr 2016.

Project "WiringPi.xojo_binary_project"
Class App Inherits ConsoleApplication
EventHandler Function Run(args() as String) As Integer #if not TargetLinux then // this is for Linux ARM break #endif dim f as FolderItem = FindFile("libwiringPi.so.2.25") if WiringPiMBS.LoadLibrary(f) then print "Library loaded" else print "Failed to load library: "+WiringPiMBS.LoadError return 1 end if print "micros: "+str(WiringPiMBS.micros) print "millis: "+str(WiringPiMBS.millis) print "BoardRev: "+str(WiringPiMBS.piBoardRev) dim model as Integer dim Rev as Integer dim Mem as Integer dim Maker as Integer dim OverVolted as Integer WiringPiMBS.piBoardId(model, rev, mem, maker, OverVolted) print "Model: "+str(model) print "Rev: "+str(Rev) print "Mem: "+str(Mem) print "Maker: "+str(Maker) print "OverVolted: "+str(OverVolted) print "Model name: "+WiringPiMBS.piModelNames(model) print "Rev name: "+WiringPiMBS.piRevisionNames(rev) print "Maker name: "+WiringPiMBS.piMakerNames(Maker) End EventHandler
Function FindFile(name as string) As FolderItem // Look for file in parent folders from executable on dim parent as FolderItem = app.ExecutableFile.Parent while parent<>Nil dim file as FolderItem = parent.Child(name) if file<>Nil and file.Exists then Return file end if parent = parent.Parent wend End Function
End Class
End Project

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


The biggest plugin in space...