B4J Library [IoT] jMRAA - Intel Edison

Erel

Administrator
Staff member
Licensed User
This library is based on Intel mraa library: http://iotdk.intel.com/docs/master/mraa/

It supports devices such as Intel Edison. Note that the attached library will not work on ARM devices such as Raspberry Pi or BeagleBone.

Currently it supports GPIO. Support for more features can be added if needed.

Example:
B4X:
Sub Process_Globals
   Private mraa As MraaController
   Private pinOut As MraaPinDigitalOutput
   Private pinIn As MraaPinDigitalInput
End Sub

Sub AppStart (Args() As String)
   mraa.Initialize
   pinOut.Initialize(13, False)
   pinIn.Initialize("PinIn", 41)
   StartMessageLoop
End Sub

Private Sub PinIN_StateChange(State As Boolean)
   Log("New state: " & State)
   pinOut.State = State
End Sub
The pins map: http://iotdk.intel.com/docs/master/mraa/edison.html
 

Attachments

Tron71

Member
Licensed User
Hi Erel,

Will you also be adding the UART API?

Users might also like to know that the example code above does not work with the Edison board when attached to the Intel Arduino expansion board. Works great with the Intel Breakout board.

Thanks
M.
 
Last edited:

Tron71

Member
Licensed User
I will be interfacing a with a GSM module and also a GPS module both of which use UART.

I have both boards but when I run the sample code on the Arduino board I get an error on line "pinIn.Initialize("PinIn", 41)". I don't think the pin is exposed on the Arduino.
 

Erel

Administrator
Staff member
Licensed User
Support for UART will be added in the near future.
 
Top