Example: /Linux/wiringPi/WiringPi

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

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.


💬 Ask a question or report a problem