B4RLibraryB4R sensor
rVL53L0X library
This wraps the VL53L0X library by Pololu. The library makes it simple to configure the sensor and read range data from it via I²C.
@janderkan · 2020-06-14
B4RSnippetDate/time
Day of week calculation
Day of week calculation, based on Zeller''s algorithm
@NoNickName · 2020-06-07
B4RSnippetB4R
Using the second core on an ESP32
Get the most out of the ESP32 by running code in Core 0 as well as the default Core 1. Arduino runs all code in Core 1 and Core 0 is left idle. Use this code to utilize Core 0. Not sure how stable this is but its hasn''t given me any trouble yet!
@Tron71 · 2020-06-03
B4RToolSerial comm/USB
External Serial Connector
External Serial Connector [tool]
@Erel · 2020-05-19
B4RTutorialB4R
Using Inline C Function Pointers to call back to B4R subs
I use inline C in my B4R projects quite a bit in my projects. Mostly I have some C/C++ code I want to call from B4R subs - that''s well documented on the forum (the Inline C intro here). From time to time though I need to call a B4R sub from C/C++ - this post does a decent job of explaining how to do that. What I wanted to do is expand on the second concept and take it a step further and use function pointers to create a call back mechanicism from your C/C++ code into B4R.
@miker2069 · 2020-05-02
B4RTutorialGame
Example of use of the joystick module
Looking in the tutorial section of B4R I noticed that there was no example of how to connect and use the joystick module. So here is an example
@Lowegaterecords · 2020-04-13
B4RLibraryB4R
ESP32extras Library
This rESP32extras library supported functions are: Restart FlashChipSpeed CpuCycleCount FreeHeapSpace CpuFreqMHz GetMacAddress ConfigNetwork ConfigAP GetAPIP IP2str str2IP Host2IP IsBadIP GetInternetIP ConnectWPS ConnectWPS2 SSID GetLocalIP GetSubnetMask GetGatewayIP
@Starchild · 2020-04-03
B4RTutorialB4R other hardware
Burn bootloader to ATMega328P-PU with an Arduino Uno
The file in the link contains some notes for me I devised from a lot of tutorials on how to burn a bootloader to a ATMEGA328P-PU wired on a breadboard. See also the tutorial "Shrink your Arduino project to the minimum".
@hatzisn · 2020-03-23
B4RSnippetB4R other hardware
ModBus RTU
ModBus RTU
@OGmac · 2020-03-18
B4RSnippetB4R
Tip: Getting rid of the excessive compiler logs - Arduino 1.8.10
There is a bug in Arduino v1.8.10 which causes debug output to be produced during compilation. You can disable it by editing: C:\Program Files (x86)\Arduino\arduino_debug.l4j.ini This requires administrative access.
@Erel · 2020-03-17
B4RTutorialSerial comm/USB [SERIAL IN PARALLEL OUT - PARALLEL IN SERIAL OUT]
Shift Registers [Serial In Parallel Out - Parallel In Serial Out]
This is a very useful tutorial by the guy in dronebotworkshop which opened new horizons for me since I didn''t know there were two kinds of shift registers (actually four).
@hatzisn · 2020-03-13
B4RLibraryB4R LED
Add UpdateLength to rAdafruitNeoPixel Library
I added the UpdateLength to rAdadruitNeoPixel library. The AdafruitNeoPixel Library supports changing the length of the string on the fly.
@Robert Valentino · 2020-03-12
B4RToolB4R LCD/TFT
LCD Char maker
A simple LCD char maker written in B4J (open source, source included).
@rwblinn · 2020-03-10
B4RTutorialB4R LCD/TFT
Custom character creation for LCD
Custom character creation for LCD
@hatzisn · 2020-03-05
B4RClassOther
Dusk2Dawn
Minimal Arduino library for sunrise and sunset time: made a B4R class to call the sunset routine using native C
@Robert Valentino · 2020-03-03
B4RTutorialB4R sensor
Visualizing MPU6050 Accelerometer and Gyroscope - Pitch, Roll and Yaw with inline C and Processing
Visualizing MPU6050 Accelerometer and Gyroscope - Pitch, Roll and Yaw with inline C and Processing
@Johan Schoeman · 2020-02-29
B4RLibraryB4R LED
Update to library 4 new functions for rAdafruitNeoPixel
I modified the AdafruitNeoPixel library in this posting: https://www.b4x.com/android/forum/threads/radafruitneopixel-based-on-neopixel-lib-v1-3-1.111313/#post-708734 Added 4 new functions: MovePixelColorDirect (To, From) - Move the pixel data from location to another directly SetPixelColorDirect3(Pixel, ULong) - Set pixel to value directly SetPixelColorDirect(Pixel, R, G, B) - Set pixel to value directly GetPixelColorDirect(Pixel) - Get the pixel value at location directly
@Robert Valentino · 2020-02-23
B4RTutorialB4R sensor
Visualizing ADXL345 3-axis Accelerometer Pitch and Roll with inline C and Processing
Visualizing ADXL345 3-axis Accelerometer Pitch and Roll with inline C and Processing
@Johan Schoeman · 2020-02-23
B4RTutorialB4R
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.
@Erel · 2020-02-04
B4RLibraryB4R sensor
ADXL345 Triple Axis Accelerometer Library
Sparkfun''s I2C/SPI Arduino Library for ADXL345. Using this Arduino Library, you have the option of using either SPI or I2C to communicate with the ADXL345. It is fairly reasonable to use and straight forward. You will also be able to calibrate the ADXL345 whenever necessary as shown in the example.
@Johan Schoeman · 2020-02-01
B4RTutorialB4R clock [I2C]
Reading Date, Time, and Temperature from a DS3231 RTC module [I2C] using any 2 digital configured pins from and Arduino
Cracked it - can connect the DS3231 to any 2 digital pins of my Nano and read the date, time, and temperature by making use of the B4A core library only. All control of the SDA (data) and SCL (clock) lines are hard coded. So, don''t have to connect it to the traditional I2C pins and don''t have to use a SD3231 or the Wire library.
@Johan Schoeman · 2020-01-23
B4RTutorialB4R clock [I2C]
Setting Date and Time of a DS3231 RTC module [I2C] using any 2 digital configured pins from and Arduino
The attached project implements the I2C communication protocol to set the Date and Time of a DS3231 RTC module. The protocol is hard coded (i.e no library) and you can therefore use any 2 digital pins of an Arduino Uno/Nano/etc to connect to the SDA and SCL pins of the DS3231.
@Johan Schoeman · 2020-01-18
B4RTutorialTheme
LEDStrip - different themes for different holidays
LEDStrip - different themes for different holidays
@Robert Valentino · 2020-01-01
B4RTutorialB4R clock [RTC]
Reading from a DS1302 [RTC] without a library
I have one of the "MH-REAL-TIME CLOCK MODULES - 2" with a DS1302 chip. I thought it would be interesting to see if I could read the seconds, minutes, hours, year, month, day of month, and day of week from the module without making use of a library i.e hard coding the data extraction as a learning exercise.
@Johan Schoeman · 2019-12-26
B4RTutorialOther
EasyEDA - PCB Design CAD
Looking for free PCB design software I came accross the EasyEDA. It is one of the best I have seen since you get to design multilayered PCBs and see the designed PCB in 3d view.
@hatzisn · 2019-12-14
B4RTutorialRandomise [BYTE]
Random Numbers from 0 to 255 [byte]
Creates random numbers (byte) from 0 to 255. Have added it via inline C code. Below table is a summary of the number of times (right column) that 0 to 255 (left column) were generated out of 1605 randomly generated numbers. Only numbers 9 and 44 never appeared (from 0 to 255) in the 1605 long random number list.
@Johan Schoeman · 2019-11-24
B4RTutorialB4R LED
Charlieplexing Arduino - Controlling 12 LEDs with 4 GPIO Pins
I am using an Arduino Nano to control the 12 LEDs using pins 8, 9, 10, and 11 of the Nano. Just thought it would be interesting to give Charlieplexing a go.
@Johan Schoeman · 2019-11-22
B4RLibraryB4R LED [BASED ON NEOPIXEL LIB V1.3.1]
rAdafruitNeoPixel [based on neopixel lib V1.3.1]
I have modified the rAdafruit Neopixel Library and added some new features
@Siam · 2019-11-12
B4RTutorialB4R LCD/TFT
Use and change font in rAdafruitGFX for TFT screen
Use and change font in rAdafruitGFX for TFT screen
@derez · 2019-11-09
B4RSnippetFirebase
Firebase Push Messages (FCM)
This code uses rHttpUtils2 to send push messages. It is equivalent to the B4J/A/i code posted here: https://www.b4x.com/android/forum/t...s-firebase-cloud-messaging-fcm.67716/#content Notes: - #StackBufferSize should be set to 500+. - The title and body messages are not escaped. You will need to manually escape the messages if they include quotes.
@Erel · 2019-10-28