B4R Tutorials

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)...
 
Last edited:

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
Wiki:
Joystick Module MH / pin

 green : GND
   Red ...
 

Burn bootloader to ATMega328P-PU with an Arduino Uno

This is by 99% a tutorial and by 1% a question. 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...
 
Last edited:

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). Enjoy:

 
Last edited:

Custom character creation for LCD

I just found this and it looks very promissing:

 

Visualizing MPU6050 Accelerometer and Gyroscope - Pitch, Roll and Yaw with inline C and Processing

It is based on this tutorial. Nano programmed via B4R and visualizing the data from the MPU6050 with Processing -
See this posting for basic setup

B4R code:...
 

Attachments

  • mpu6050.zip
    983 bytes · Views: 530
  • b4rMPU6050InlineC.b4r.zip
    2.8 KB · Views: 516

Visualizing ADXL345 3-axis Accelerometer Pitch and Roll with inline C and Processing

The attached project is based on this posting:

Have downloaded and installed...
 

Attachments

  • b4rADXL345InlineC.zip
    1.8 KB · Views: 478
  • sketch_200215a.zip
    970 bytes · Views: 486
Last edited:

Reading Date, Time, and Temperature from a DS3231 RTC module (I2C) using any 2 digital configured pins from an 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...
 

Attachments

  • b4rReadDS3231manually.zip
    3.2 KB · Views: 503
  • datasheet.pdf
    297.8 KB · Views: 531
Last edited:

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

Attachments

  • b4rWriteDS3231manually.zip
    3.5 KB · Views: 450
  • datasheet.pdf
    297.8 KB · Views: 450

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:

Setting and Reading date and time of 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...
 

Attachments

  • b4rReadDS1302manually.zip
    2.2 KB · Views: 515
  • DS1302 Real Time Clock.pdf
    354.3 KB · Views: 575

EasyEDA - PCB Design CAD

Hi everybody,

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

Random Numbers from 0 to 255 (byte)

Attachments

  • b4rRandomNumber.zip
    1.3 KB · Views: 411

Charlieplexing - controlling N*(N-1) LED's with N GPIO pins

It is based on this posting. 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...
 

Attachments

  • b4rCharliePlexing.zip
    1.1 KB · Views: 365

Use and change font in rAdafruitGFX for TFT screen

The library rAdafruitGFX is used to draw on TFT screens. It has a default font and does not give a way to change the font for drawing text.
This is what I got when drawing very large characters...
 
Last edited:

B4R Vibration Sensor (shake switch)

So long that I haven't played with B4R ! Today I want to test a vibration sensor (it's on a closed case yet)
The sensor signals when a sensor shake happens. It's a simple sensor (detected/not...
 

Attachments

  • upload_2019-10-25_11-37-52.png
    upload_2019-10-25_11-37-52.png
    162.9 KB · Views: 344
  • upload_2019-10-25_11-38-27.png
    upload_2019-10-25_11-38-27.png
    162.9 KB · Views: 327

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:

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

Correct this misconseption - "Call B4R subs from InLine c code" - see post #2

Having had my work flow cut down in the middle by vicious "circumstances" I decided to let it all go and "go fishing" as mr. Miyaghi (Karate kid) would say. So I did some things I couldn't do...
 
Last edited:

Check blue tooth communication of your creations

Hi everyone,

Watching tutorials on YouTube I came across this application which allows you to check blue tooth communications. I suppose it will be handy to all of you...
 
Top