B4R Tutorials

Adafruit MPR121 capacitive Keypad

Hi All,

The attached zip files have the Arduino libraries and the B4R libraries together with a small B4R app showing how to use the Adafruit MPR121 capacitive touch 12 key keypad.

Big thanks to...
 

Attachments

  • rMPR121.zip
    1.2 KB · Views: 449
  • rMPR121-Libraries.zip
    4.6 KB · Views: 389
  • MPR121keypad.jpg
    MPR121keypad.jpg
    71.1 KB · Views: 600

How to connect an Arduino Pro Mini to a PC via a USB to Serial module

So you are interested in using an Arduino Pro Mini or compatible board instead of one of the other larger boards to interact with your hardware devices. The Pro Mini does have some advantages over...
 
Last edited:

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:

Relays, don't get caught out

Not really a tutorial as I'm no good at writing tutorials, but important to know nevertheless.

WARNING: Relays can be used to switch very high voltages. Here in the UK 240VAC can easily...
 
Last edited:

AsyncStreams Prefix Mode

rRandomAccessFile v1.80 adds support for AsyncStreams in prefix mode.
All B4X development tools use AsyncStreams for network communication and now all of them support prefix mode...
 

Arduino to WeMos pin mapping

Hello,
Not exactly a tutorial, but informative nevertheless.

This is how to map your Arduino projects to your WeMos. So for example in the blink demo, you just choose pin 2 for a WeMos instead of...
 
Last edited:

Pull up resistors and buttons

Understanding why you might need a pull up resistor...

Not exactly a tutorial from directly within this forum, but nevertheless I'm more than sure that this will help a few new B4R users...
 
Last edited:

ESP8266 FTP Client

Attachments

  • FTPClient.zip
    3.7 KB · Views: 1,771

Reed Switch Monitor Example

B4R & B4J experiment to monitor the state of a Reed switch connected to an ESP8266 - a NodeMCU is used. If the Reed switch state changes (triggered by a magnetic contact), data is send to a B4J...
 
Last edited by a moderator:

[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:

TIME to Uint / Unit to TIME Converter

I using this code, Because Board has a problem for records size capacity of epprom.

Sample
B4X:
Log("17:45:36 False >>",DateTime.TimeToUint(17,45,36,False)) '>>> 1065
    Log("1065 // 17:45:36...
 
Last edited:

DATE to Uint / Unit to Date Converter

I using this code, Because Board has a problem for records size capacity of epprom.
B4X:
'For date >> 2015/ 08 / 04 (y/m/d)
Log("Date number:",DateTime.DateToUint(15,8,4)))
'returned >>
'Date...
 
Last edited:

ESP8266 + Relay = Let there be light

Relays are electronic switches that allow low power (voltage) devices to control high power circuits.

In this example the ESP8266 board controls a regular 220v light bulb.

*** High power...
 

Attachments

  • B4A_Relay.zip
    7.8 KB · Views: 1,340
Last edited:

Using Firebase to send notifications to iOS and Android devices

Attachments

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

Using PROGMEM to save memory

The smaller Arduinos like the Arduino Uno have 2k of RAM. The subs stack and the global variables use this memory.

If your program includes constant data then you can use PROGMEM to store the...
 

Intel Arduino 101

ABX00005_featured_grande.jpg


The Arduino 101 is an Arduino board developed by Intel. It is mostly compatible with standard...
 

Attachments

  • boards.zip
    2.5 KB · Views: 646
  • B4R_Serial_Connector_Arduino101.zip
    4.9 KB · Views: 613
Last edited:

sub for Date Time adding

Hello;
I needed date time functions; And some write codes.
it is first sharing with B4R

use this variables for date &time
Public Time_HH As Int
Public Time_MM As Int
...
 
Last edited:

Downloading a Web page with ESP8266

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

  • B4J_Weather.zip
    981 bytes · Views: 1,309
  • B4A_Weather.zip
    7.8 KB · Views: 1,949
  • B4R_Weather.zip
    1.1 KB · Views: 1,999
  • B4i_Weather.zip
    2.3 KB · Views: 1,053

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:
Top