Platforms to show: All Mac Windows Linux Cross-Platform

Next items

WiringPiMBS.analogRead(pin as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This returns the value read on the supplied analog input pin.
Notes: You will need to register additional analog modules to enable this function for devices such as the Gertboard, quick2Wire analog board, etc.

Feedback, Comments & Corrections

WiringPiMBS.analogWrite(pin as Integer, value as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This writes the given value to the supplied analog pin.
Notes: You will need to register additional analog modules to enable this function for devices such as the Gertboard.

Feedback, Comments & Corrections

WiringPiMBS.delay(HowLong as UInt32)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This causes program execution to pause for at least howLong milliseconds.
Notes: Due to the multi-tasking nature of Linux it could be longer. Note that the maximum delay is an unsigned 32-bit integer or approximately 49 days.

Feedback, Comments & Corrections

WiringPiMBS.delayMicroseconds(HowLong as UInt32)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This causes program execution to pause for at least howLong microseconds.
Notes:
Due to the multi-tasking nature of Linux it could be longer. Note that the maximum delay is an unsigned 32-bit integer microseconds or approximately 71 minutes.

Delays under 100 microseconds are timed using a hard-coded loop continually polling the system time, Delays over 100 microseconds are done using the system nanosleep() function – You may need to consider the implications of very short delays on the overall performance of the system, especially if using threads.

Feedback, Comments & Corrections

WiringPiMBS.digitalRead(pin as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This function returns the value read at the given pin.
Notes: It will be kHIGH or kLOW (1 or 0) depending on the logic level at the pin.

Feedback, Comments & Corrections

WiringPiMBS.digitalWrite(pin as Integer, value as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Writes the value kHIGH or kLOW (1 or 0) to the given pin which must have been previously set as an output.
Notes: WiringPi treats any non-zero number as kHIGH, however 0 is the only representation of kLOW.

Feedback, Comments & Corrections

WiringPiMBS.digitalWriteByte(value as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This writes the 8-bit byte supplied to the first 8 GPIO pins.
Notes: It’s the fastest way to set all 8 bits at once to a particular value, although it still takes two write operations to the Pi’s GPIO hardware.

Feedback, Comments & Corrections

WiringPiMBS.gpioClockSet(pin as Integer, value as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Sets the clock.

Feedback, Comments & Corrections

WiringPiMBS.I2CRead(fd as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Simple device read.
Notes:
Some devices present data when you read them without having to do any register transactions.
If the return value is negative then an error has happened and you should consult errno.

Feedback, Comments & Corrections

WiringPiMBS.I2CReadReg16(fd as Integer, reg as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Simple device read.
Notes:
Some devices present data when you read them without having to do any register transactions.
Read a 16-bit value from the device register indicated.

If the return value is negative then an error has happened and you should consult errno.

Feedback, Comments & Corrections

WiringPiMBS.I2CReadReg8(fd as Integer, reg as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Simple device read.
Notes:
Some devices present data when you read them without having to do any register transactions.
Read an 8-bit value from the device register indicated.

If the return value is negative then an error has happened and you should consult errno.

Feedback, Comments & Corrections

WiringPiMBS.I2CSetup(devId as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This initialises the I2C system with your given device identifier.
Notes:
The ID is the I2C number of the device and you can use the i2cdetect program to find this out. I2CSetup() will work out which revision Raspberry Pi you have and open the appropriate device in /dev.

The return value is the standard Linux filehandle, or -1 if any error – in which case, you can consult errno as usual.

E.g. the popular MCP23017 GPIO expander is usually device Id 0x20, so this is the number you would pass into wiringPiI2CSetup().

Feedback, Comments & Corrections

WiringPiMBS.I2CSetupInterface(device as string, devId as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This initialises the I2C system with your given device identifier and name.

Feedback, Comments & Corrections

WiringPiMBS.I2CWrite(fd as Integer, Data as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Simple device write.
Notes:
Some devices accept data this way without needing to access any internal registers.
If the return value is negative then an error has happened and you should consult errno.

Feedback, Comments & Corrections

WiringPiMBS.I2CWriteReg16(fd as Integer, reg as Integer, Data as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Simple device write.
Notes:
Some devices accept data this way without needing to access any internal registers.
Write a 16-bit data value into the device register indicated.

If the return value is negative then an error has happened and you should consult errno.

Feedback, Comments & Corrections

WiringPiMBS.I2CWriteReg8(fd as Integer, reg as Integer, Data as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Simple device write.
Notes:
Some devices accept data this way without needing to access any internal registers.
Write a 8-bit data value into the device register indicated.

If the return value is negative then an error has happened and you should consult errno.

Feedback, Comments & Corrections

WiringPiMBS.LoadLibrary(File as FolderItem) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Loads the library.
Notes:
Returns true on success or false on failure.
LoadError is set in case of failure.

See also:

Feedback, Comments & Corrections

WiringPiMBS.LoadLibrary(Path as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Loads the library.
Notes:
Returns true on success or false on failure.
LoadError is set in case of failure.

See also:

Feedback, Comments & Corrections

WiringPiMBS.micros as UInt32
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This returns a number representing the number of microseconds since your program called one of the wiringPiSetup functions.
Notes: It returns an unsigned 32-bit number which wraps after approximately 71 minutes.

Feedback, Comments & Corrections

WiringPiMBS.millis as UInt32
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This returns a number representing the number of milliseconds since your program called one of the wiringPiSetup functions.
Notes: It returns an unsigned 32-bit number which wraps after 49 days.

Feedback, Comments & Corrections

WiringPiMBS.physPinToGpio(physPin as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This returns the BCM_GPIO pin number of the supplied physical pin on the P1 connector.

Feedback, Comments & Corrections

WiringPiMBS.piBoardId(byref model as Integer, byref Rev as Integer, byref Mem as Integer, byref Maker as Integer, byref OverVolted as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Queries board identifiers.
Notes:
Mem is memory in Megabytes.
Maker, Model and Rev are value which match the constants in this module.

Feedback, Comments & Corrections

WiringPiMBS.piBoardRev as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This returns the board revision of the Raspberry Pi.
Notes: It will be either 1 or 2. Some of the BCM_GPIO pins changed number and function when moving from board revision 1 to 2, so if you are using BCM_GPIO pin numbers, then you need to be aware of the differences.

Feedback, Comments & Corrections

WiringPiMBS.piHiPri(pri as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This attempts to shift your program (or thread in a multi-threaded program) to a higher priority and enables a real-time scheduling.
Notes:
The priority parameter should be from 0 (the default) to 99 (the maximum). This won’t make your program go any faster, but it will give it a bigger slice of time when other programs are running. The priority parameter works relative to others – so you can make one program priority 1 and another priority 2 and it will have the same effect as setting one to 10 and the other to 90 (as long as no other programs are running with elevated priorities)

The return value is 0 for success and -1 for error. If an error is returned, the program should then consult the errno global variable, as per the usual conventions.

Note: Only programs running as root can change their priority. If called from a non-root program then nothing happens.

Feedback, Comments & Corrections

WiringPiMBS.piLock(Key as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Locks a synchronization lock.
Notes:
These allow you to synchronise variable updates from your main program to any threads running in your program. keyNum is a number from 0 to 3 and represents a “key”. When another process tries to lock the same key, it will be stalled until the first process has unlocked the same key.

You may need to use these functions to ensure that you get valid data when exchanging data between your main program and a thread – otherwise it’s possible that the thread could wake-up halfway during your data copy and change the data – so the data you end up copying is incomplete, or invalid.

Feedback, Comments & Corrections

WiringPiMBS.piMakerNames(index as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Maps maker numbers to names.

Feedback, Comments & Corrections

WiringPiMBS.piModelNames(index as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Maps model numbers to names.

Feedback, Comments & Corrections

WiringPiMBS.pinMode(pin as Integer, mode as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: This sets the mode of a pin to either INPUT, OUTPUT, PWM_OUTPUT or GPIO_CLOCK.
Notes:
Note that only wiringPi pin 1 (BCM_GPIO 18) supports PWM output and only wiringPi pin 7 (BCM_GPIO 4) supports CLOCK output modes.

This function has no effect when in Sys mode. If you need to change the pin mode, then you can do it with the gpio program in a script before you start your program.

Feedback, Comments & Corrections

WiringPiMBS.piRevisionNames(index as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method WiringPi MBS Linux Plugin 15.3 No No Yes Yes, Linux only No
Function: Maps revision numbers to names.

Feedback, Comments & Corrections

Next items

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

The biggest plugin in space...




Links
MBS Xojo Plugins