B4R Tutorials

ESP8266 - WiFi Remote Configuration

Attachments

  • ESP8266WiFiRemote.zip
    2.6 KB · Views: 5,119
Last edited:

ESP32 Camera Picture Capture and Video Streaming! (Updated with code!)

Hello!

Last December I made a request for support for the ESP32 Camera support. Well, I finally found the time to work on it myself and here's my initial attempt at implementing this with...
 
Last edited:

ESP8266 - Getting Started

B4R v1.20 added support for ESP8266 modules. ESP8266 is a great module for IoT solutions. For a few dollars you get a powerful microcontroller with built-in support for wifi.

I recommend to...
 

Attachments

  • B4J_ConnectToESP8266.zip
    3.7 KB · Views: 2,546
Last edited:

HC 05 Classic Bluetooth

SS-2016-05-08_17.39.25.jpg


SS-2016-05-08_17.39.57.png


In this example we will connect an Android...
 

Attachments

  • Adruino_Bluetooth_B4A.zip
    9.7 KB · Views: 2,642
Last edited:

GSM / GPRS - Control the Arduino with SMS messages

SS-2016-05-11_13.27.00.jpg


The GSM shield allows the Arduino to connect to cellular networks. This opens the door for many interesting outdoor...
 

Attachments

  • GSM_Example.zip
    2.3 KB · Views: 1,470
Last edited:

How to Implement STM32 into B4R

If you want more FLASH memory space (say 128K flash), need more RAM (how about 20K), would like your program to run a little faster, or simply want to play around with a different micro-controller...
 

Attachments

  • How to Implement STM32 to B4R.pdf
    207.7 KB · Views: 490
Last edited:

Show-Off your IoT boards ( uControler/shields )!!

There seem to be quite a few variants of the Arduino's Boards, So I thought, let's Show-Off our Boards and create a Listing, similar to the B4A devices Listing, so that when problems arises, we...
 

[tool] External Serial Connector

SS-2016-04-12_15.23.57.png


This is a small B4J program that uses jSerial library to connect to an Arduino board.

To see it working start with this...
 

Attachments

  • B4R_Serial_Connector.zip
    7.2 KB · Views: 1,329
Last edited:

[B4X] B4RSerializator - Send and receive objects instead of bytes

B4R v1.50 includes a new type named B4RSerializator (in rRandomAccessFile library).
B4RSerializator solves a difficult and common task. Sending messages with multiple fields to other platforms...
 

Attachments

  • B4RSerializator.bas
    4.9 KB · Views: 3,129
  • B4R_Server.zip
    1.1 KB · Views: 3,113
  • B4A_Client.zip
    10 KB · Views: 3,166
Last edited:

MQTT

Inline C / C++

As in the other B4X tools you can embed C or C++ code in the project.

Example:
B4X:
Sub Process_Globals
   Public Serial1 As Serial
   Private Result, N1, N2 As Int 'ignore
End Sub

Private Sub...
 

ESP Configurator based on B4RSerializator

SS-2017-07-09_16.48.51.png


This tool replaces the browser based solution...
 

Attachments

  • B4R_ESPConfigurator.zip
    2 KB · Views: 2,562
  • B4J_ESPConfigurator.zip
    46.1 KB · Views: 2,299
Last edited:

RTC DS1302 Example

Hi,

this is an example of using the Real Time Clock DS1302 (from sunfounder).
There are two versions:
1. Manual: Set the time manual befor uploading. After uploading the time is...
 

Attachments

  • B4RHowToRTCDS1302.zip
    347.2 KB · Views: 1,143
Last edited:

Connecting two Arduinos with rSoftwareSerial library

SS-2016-04-13_15.50.49.png


With the rSoftwareSerial library you can turn regular pins to serial ports. This is useful as the hardware serial is used...
 

Attachments

  • rSoftwareSerial.zip
    1.7 KB · Views: 1,425

Servo motor and Arduino

Thanks to @Erel and the new rservo library (Beta#7), we've access to servo motors.

Servos are a motor type that allows for precise control of angular or linear position, velocity and...
 
Last edited:

Connecting to Arduino with BLE (Bluetooth Low Energy)

Attachments

  • B4i_BLE.zip
    3.1 KB · Views: 1,189
  • B4A_BLE.zip
    8.5 KB · Views: 2,013
Last edited:

DHT11 & DHT22 temperature and humidity sensors ARDUINO UNO Code

This B4R example/library works with DHT11 and DHT22 temperature and humidity sensors:

This inexpensive device (DHT11) allows for measure temperature and humidity:
  • Very Low cost
  • 3...
 

Attachments

  • upload_2016-4-22_12-12-25.png
    upload_2016-4-22_12-12-25.png
    11.7 KB · Views: 1,304
  • DHTlib.zip
    10.1 KB · Views: 1,298
  • rDHTv2.zip
    1.2 KB · Views: 1,107
Last edited:

Button Example

SS-2016-04-11_11.44.41.png


B4X:
Sub Process_Globals
   Public Serial1 As Serial
   Private btn As Pin
   Private led As Pin
End Sub

Private Sub...
 

Ethernet / Network Tutorial

This example uses an Ethernet shield to connect to a server. In this case the server is implemented with B4J, though you can easily implement a similar server with B4A or B4i.

Whenever the user...
 

Attachments

  • EthernetExample.zip
    1.2 KB · Views: 1,187
Last edited:

MQTT controlling 8 relays, WeMos D1 mini WiFi, Android 4G

Here is a short tutorial on how to control an 8 channel relay module via MQTT. Below you will find both the WeMos and Android source codes needed to get started. The relay module is connected to a...
 
Last edited:
Top