B4J Tutorial [IoT] Welcome to the Internet of Things

Erel

Administrator
Staff member
Licensed User
This example demonstrates how the B4X tools can be used to create a solution with multiple types of components and communication channels.

See the following video (make sure to watch it in HD resolution):


The components in this example:
- Intel Edison (B4J - jMRAA library)
- Raspberry Pi (B4J - jPi4J library)
- B4A app
- B4i app
- B4J desktop app
- Browser

All the applications, except of the web app that runs in the browser, use MQTT for the communication.
A lightweight web server runs on the Intel Edison to support the browsers.

The data is serialized with B4XSerializator (RandomAccessFile).

The various apps monitor the hardware buttons and control the LEDs. Note that all the connected devices always show the updated state.

The five projects are attached.
 

Attachments

Erel

Administrator
Staff member
Licensed User
MQTT is simpler when you want to send a message to multiple clients. You don't even need to know which clients are connected.

For example when you change the state of a LED all the connected devices update the UI switch to the new state.
 

Rick Harris

Well-Known Member
Licensed User
This example demonstrates how the B4X tools can be used to create a solution with multiple types of components and communication channels.

See the following video (make sure to watch it in HD resolution):


The components in this example:
- Intel Edison (B4J - jMRAA library)
- Raspberry Pi (B4J - jPi4J library)
- B4A app
- B4i app
- B4J desktop app
- Browser

All the applications, except of the web app that runs in the browser, use MQTT for the communication.
A lightweight web server runs on the Intel Edison to support the browsers.

The data is serialized with B4XSerializator (RandomAccessFile).

The various apps monitor the hardware buttons and control the LEDs. Note that all the connected devices always show the updated state.

The five projects are attached.
Nice development. Why is this done in B4J? You recently wrote that B4A is still your most important development language...
 

Erel

Administrator
Staff member
Licensed User
Why is this done in B4J?
As I see it, this question is not important. There is no competition between B4A, B4i and B4J. They complete each other.

It is also not true that it is done in B4J.
The Android app is written with B4A, the iPhone app is written with B4i and the apps that run on the Linux boards and the desktops are written in B4J.
The choice of the tool depends on the operating system.
There is no good reason to avoid using B4i and especially B4J.

This solution is a great example of the power of B4X tools combined. I'm not sure that there is any other tool that would have allowed you to create such a solution...

BTW, I'm not sure what I wrote in the past, but B4A is exactly important as the other tools. Not more, not less.

Please start a new thread if you like to further discuss the choice of tools.
 
Top