B4R Tutorials

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...
 

Internal Thermometer and Hall Effect Sensor of ESP32

Here I share some examples of how to use the thermometer and the Hall effect sensor in an ESP32. I hope and it will be useful
 

Attachments

  • ESP32internalHall.zip
    868 bytes · Views: 502
  • Temperature.zip
    977 bytes · Views: 491

B4R Experiments

Hi,

whilst exploring B4R (as a hobbyist), build experiments in several categories. The experiments also show B4X integration examples.
A few experiments to mention:

Change Log...
 
Last edited:

Getting local date & time (easy and free)

I saw a post or two about how to get the local date & time with no easy answers. I need this myself for my first Arduino project so I had a look around and found a free API that does just this...
 

Solder ESP8266 ESP-12F to an adapter plate

So you have an ESP-12F and want to use it in a project, well I find that the best way for my home projects is to use an 12x adaptor plate. I have a number of ESP-12F projects running throughout my...
 

Using an incremental rotary encoder

This is a quick tutorial on what an incremental rotary encoder (or rotary encoder for short) is and what it can be used for.

A rotary encoder is an electromechanical device that generates an...
 
Last edited:

Connecting two ESP8266 boards

In this example one of the boards acts as an access point and a server and the other board connects to the server wifi network and to the server socket.

Note that for the client to be able to...
 

EEPROM Utility

Excuse my English, it's not my native language
I am not an arduino expert, I want to contribute with this code.

one of the main problems is to save information, one of this is in the EEPROM...
 

Attachments

  • uEEPROM_v1.2.zip
    3.5 KB · Views: 509
Last edited:

Using a Wemos D1 R2 and stepper motor - control over wifi

This may be of interest to someone. I am using a Wemos D1 R2 in AP mode to serve a webpage to a client. The Wemos creates a server called "Wemos_Server" using the IP 192.168.4.1.

When the browser...
 

Using Firebase to send notifications to iOS and Android devices

Attachments

  • ESP8266_Push.zip
    1.5 KB · Views: 2,315

How to connect a 7 pin OLED display, (NOT 4 pin)...

Here is how to connect a 7 pin OLED display to an Arduino.

If you are anything like me, you previously owned a Raspberry Pi and did absolutely nothing with it. Well before I ever owned any...
 
Last edited:

Connecting to Arduino with BLE (Bluetooth Low Energy)

Attachments

  • B4i_BLE.zip
    3.1 KB · Views: 1,177
  • B4A_BLE.zip
    8.5 KB · Views: 2,001
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,463
Last edited:

Arduino - PC File Transfer

In this example the Arduino board acts as a server. Clients can list the available files and can download files stored on the SD card, which is part of the Ethernet shield...
 

Attachments

  • B4J_FileTransfer.zip
    3.2 KB · Views: 1,096
  • B4R_FileTransfer.zip
    1.6 KB · Views: 1,169
Last edited:

Downloading a Web page with ESP8266

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,134
Last edited:

Traffic Light Example

Example of implementing a "traffic light" with 3 leds. There are four states: red, red + yellow, green and yellow.

It uses CallSubPlus to switch to the next state after the current state...
 

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: 477
Last edited:

ESP8266 + UDP + BMP180 = Simple weather station

This is an example of how UDP can be used to broadcast the current temperature and pressure to one or more clients.

The nice thing about it is that there is no server involved. The ESP8266 just...
 

Attachments

  • B4A_Weather.zip
    7.8 KB · Views: 1,932
  • B4J_Weather.zip
    981 bytes · Views: 1,298
  • B4R_Weather.zip
    1.1 KB · Views: 1,990
  • B4i_Weather.zip
    2.3 KB · Views: 1,039

Simple example of how to have a TCP Server and make HTTP Client calls in same project

I thought I'd share this super simple example of creating a TCP Server and making very simple HTTP Client calls in same project. Typically most projects do one or the other and not both. Here...
 
Top