B4R Tutorials

Mini Weather Station with LCD

Hi,

a Mini Weather Station experiment displaying on a 16x2 LCD the Temperature + Humidity (Line1) and Pressure + Altitude (Line2).
In addition, a trendindicator (=,+,-) is shown for each...
 

Attachments

  • B4RHowToLiquidCrystalWeather.zip
    114.6 KB · Views: 630
Last edited:

Memory, Variables and Objects

Memory is a big issue in Arduino.

1. The available RAM is very small compared to other platforms. For example the Uno has 2k of RAM.
2. There is no sophisticated heap management which means that...
 
Last edited:

MCUs comparison 2023

One popular MCU programmer made an YouTube stream with online testing and comparing the MCUs.
1. pin out high
2. make a test operation: a + b, a - b, a * b, a / b, sin(a), power(a, b), power(b...
 
Last edited:

MAX7219 7-Segment Driver

this is a very simple example shows how to drive 4-digits 7-segment display with MAX7219 and rLedControl library, this code example displays 'HoLA' word, you can add more digits and MAX7219...
 

LEDStrip - different themes for different holidays

Here is this RGB Led Strip light project I have been playing around with.

I am including the Android program I use to play with colors.

NOTE when using the Android program you can select a theme...
 

Attachments

  • LEDStrip_B4A.zip
    496 KB · Views: 405
  • LEDStrip_B4R.zip
    11.3 KB · Views: 397
  • LEDStrip - Metamucil Jar.jpg
    LEDStrip - Metamucil Jar.jpg
    358.5 KB · Views: 475
  • LEDStrip - Breadboard.jpg
    LEDStrip - Breadboard.jpg
    272.8 KB · Views: 454
Last edited:

LCD Clock example

Arduino Uno with LCD shield:

SS-2016-04-12_15.47.51.jpg


Working with a LCD monitor:
1. Initialize the LiquidCrystal object and set the connected...
 

Attachments

  • B4J_SerialConnector.zip
    4.1 KB · Views: 863
  • B4R_LCD.zip
    987 bytes · Views: 1,044

LCD Bar Graph

The attached project mimics this posting. Have added the basic functionality with inline C. It uses the rCore and rLiquidCrystal libraries.

Wiring diagram:
lcdbargraph_bb.png


Result...
 

Attachments

  • b4rLiquidCrystalDisplay.zip
    1.5 KB · Views: 413

Large strings joinstring & astream

I need to create a large string for http call. Using joinStrings if string variable is more than ~ 100 characters it crashes. I saw that an alternative is to use astream but how am i going to...
 
Last edited:

IR Control for DSTV Explora Model 2A

This is a sample project for the IR control of the DSTV Explora Model 2A decoder (Digital Satellite TV). The hex codes comes from the B4A project that I have posted here. The B4A...
 

Attachments

  • b4rDSTVexplora.zip
    1.9 KB · Views: 364
Last edited:

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: 507
  • Temperature.zip
    977 bytes · Views: 499

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: 642
  • B4R_Serial_Connector_Arduino101.zip
    4.9 KB · Views: 612
Last edited:

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

Inertial Measurements (MPU 6050) and Magnetometer (HMC5883L)

With big help from Erel here are two examples of connecting two boards by the I2C/TWI (A4 and A5 pins), using the rWire library.
Inertial Measurements (mpu6050) :
B4X:
' MPU 6050 board - Inertial...
 
Last edited:

HX711 code module

Hello;
this code module is for using HX711 load cell amplifier board with Arduino, I used it with UNO and MEGA without any problems, only 4 pins are required for voltage supply and communication...
 

Attachments

  • HX711.bas
    2.2 KB · Views: 574
Last edited:

Http requests with GSM shield

This example shows how to send http requests with a GSM shield. I've tested it on a shield with SIM900 module. This can be very interesting for outdoor IoT solutions where there is no local...
 

Attachments

  • GSMPushMessages.zip
    3.3 KB · Views: 1,223
Last edited:

How to write a Tutorial/Snippets/ShareYourCreations

Hi guys,

I know I am not the most prolific B4R user, but I'm proud to have been the first to post on the "Share Your Creations" of this sub-Forum.
The mentioned sub-Forums have become more and...
 
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:

How to get and parse Json from an Http server, inline C code

Hello,

Since a while i searched to do the same thing i did on an ESP01, but with B4R.
I did it 1st time in Arduino IDE o_O, see the video at bottom, that works well :)

I searched long time to...
 

Attachments

  • parseJson_InlineC_Domoticz.zip
    4.8 KB · Views: 422

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