B4R Library rMultiFuncShield - Arduino Multi Function Shield

This library supports the Arduino Multi Function Shield - a good device to get started learning sensoring & B4R.
Based on this open source project: http://www.cohesivecomputing.co.uk/hackatronics/arduino-multi-function-shield/ (Library version 1.2 has been wrapped)


Multi Function Shield Features (Pin)[Board Info]
  • 4 digit 7-segment LED display module (3641BH) driven by two serial 74HC595’s (Pin Latch 4, Clock 7, Data 8)
  • 4 Red LEDs (Pin 10,11,12,13) [D1-13, D2-12, D3-11,D4-10]
  • 10K potentiometer (Pin A0) [Vr-A0]
  • 3 x push buttons (Pin A1, A2, A3) [S1-A1, S2-A2, S3-A3]
  • Piezo buzzer (Pin 3 digital ON/OFF) [LS1-3]
  • DS18B20 temperature sensor interface (not included) (Pin A4) [U5-18b20-LM35-A4]
  • Infrared receiver interface (Pin 2) [U4-IR-2] Compatible to a 1838B Infrared IR receiver
  • Bluetooth interface (GND, +5v, 0 = tx, 1 = rx) [APC220]
  • Free pins pwm (5, 6, 9, A5) with GND, +5V
  • Serial interface header for connection to serial modules (Bluetooth, wireless interface, voice module, a voice recognition module)
Functionality & Samples
  • The library has functions to support the LED Display, LEDs, Buzzer, Buttons, Temperature Sensor LM35.
  • B4R example programs developed showing usage for the LED Display, LEDs, Buzzer, Buttons, LM35 (Temperature), DS18b20 (Temperature), PotMeter, PulseIn, Sonar HC-SR04. The examples are well documented and cover most functions from the library.

Library Dependencies
rMultiFuncShield depends upon the library TimerOne.

  • Test: I2C (requires SoftI2C Library), InfraRed, Bluetooth APC220, Voice Recognition, MPU6050 motion sensor

20160212 v0.9 - (Post #3) Library documentation updated, Samples reworked.
20160208 v0.8 - (Post #1) Initial version


  • rMultiFuncShield.zip
    104 KB · Views: 2,230
  • b4rhowtomultifuncshield.zip
    22.3 KB · Views: 1,853
Last edited:


Well-Known Member
Licensed User
Longtime User
Update 20160212 v0.9 (Post #1 updated)
  • Library documentation updated.
  • B4R samples reworked - makes so much fun exploring this great device with B4R.
List of B4R Samples

:cool: My Favorite = Nr 12 SetClock showing to set the LED display hours & minutes from a B4J application using the B4RSerializer.

01-LED Display
Write text, int and double to the 4 digit LED display.
Turn the onboard LEDs (4) on / off or blink.
Button listener for the 3 onboard buttons.
Show beep and repeating beep.
Count down number using looper.
Turn the onboard potmeter and log its value.
Press button 1 multiple times and show the pulse on the LED display.
Log the temperature for the LM35 sensor.
Log the temperature for the DS18B20 sensor.
10-Sonar HC-SR04
Log the distance for the HC-SR04 distance sensor.
Set the hours (button 1), minutes (button 2) and start (or stop) the clock with button 3.
Long press button 1 or 2 increases the number faster.
Set the clock via B4J application using the B4R Serializer.
An example for direct usage of the MultiFuncShield Library. Requires the library to be installed in the Arduino IDE.