B4RSnippetB4R
Useful defines
Useful #defines
@Daestrum · 2024-02-29
B4RSnippetB4R other hardware
External I2C 4-channel 16-bit ADC ADS1115
External I2C 4-channel 16-bit ADC ADS1115
@peacemaker · 2024-01-29
B4RSnippetArduino/ESP
ESP32_Dev_Module_Pins Code Module
ESP32_Dev_Module_Pins Code Module
@Cableguy · 2024-01-14
B4RSnippetB4R sensor
BME280 - well known sensor: thermometer, barometer, hygrometer, altimeter
BME280 - well known sensor: thermometer, barometer, hygrometer, altimeter
@peacemaker · 2023-11-27
B4RSnippetB4R sensor
Compass - magnet sensor group xxx5883
Compass - magnet sensor group xxx5883
@peacemaker · 2023-11-25
B4RSnippetB4R sensor
XGZP6897D pressure sensors family
Modern pressure sensors where combined the piezoresistive pressure sensor and the ADC chipset with 24-bit resolution and I2C digital interface (and for temperature 16-bit one).
@peacemaker · 2023-11-17
B4RSnippetB4R sensor
ENS160 Multi-Gas Sensor
Sensor ENS160 can measure: Air quality index, Concentration of total volatile organic compounds (ppb), Carbon dioxide equivalent concentration (ppm). Default I2C address: 0x53 (can also work via SPI interface, not used here).
@peacemaker · 2023-11-16
B4RSnippetB4R sensor [HC-SR04+ OR HC-SR04P MODULES]
RCWL-96xx ultrasonic distance sensors [HC-SR04+ or HC-SR04P modules]
Old sensors HC-SR04 are analog, with measuring the distance as the impulse width. Latest models are with i2c interface based on some RCWL chips, like RCWL-9600, 9610, 9620 or so…
@peacemaker · 2023-11-16
B4RSnippetB4R [ESP32]
.bin merging and flashing [ESP32]
.bin merging and flashing [ESP32]
@peacemaker · 2023-11-08
B4RSnippetB4R sensor [ESP32]
BH1750 - Digital Ambient Light Sensor [ESP32]
BH1750 - Digital Ambient Light Sensor [ESP32]
@peacemaker · 2023-08-15
B4RSnippetB4R [ESP32]
Sleep until re-power up [ESP32]
Sleep until re-power up [ESP32]
@peacemaker · 2023-08-11
B4RSnippetB4R sensor [MAGNETIC][ESP32]
Internal Hall sensor [magnetic] [ESP32]
Internal Hall sensor [magnetic] [ESP32]
@peacemaker · 2023-08-10
B4RSnippetB4R [ESP32]
WatchDog [ESP32]
WatchDog [ESP32]
@peacemaker · 2023-08-05
B4RSnippetBluetooth [ESP32]
enable BT or BLE and get MAC-address [ESP32]
enable BT or BLE and get MAC-address [ESP32]
@peacemaker · 2023-07-29
B4RSnippetB4R
flash partitions [ESP32]
Maybe can be useful to work with the partition, result of NVS partition is correct - corresponding to partitions.csv":
@peacemaker · 2023-07-28
B4RSnippetB4R [ESP32]
NVS storage [ESP32]
Arduino NVS is a port for a non-volatile storage (NVS, flash) library for ESP32 to the Arduino Platform.
@peacemaker · 2023-07-28
B4RSnippetComms & Network [ESP32]
OTA update from server via WiFi only [ESP32]
OTA update from server via WiFi only [ESP32]
@peacemaker · 2023-07-25
B4RSnippetB4R
Analog Input Pin values mapping
In many cases when reading analog input pin, we got a values not what we expect, but in real they are true values, so we need to map them to understandable values.
@Hamied Abou Hulaikah · 2023-07-02
B4RSnippetB4R
Benchmark of Microcontrollers
Counts 200 cycles and logs the mean time between two cycles (in Millis)
@hatzisn · 2022-12-05
B4RSnippetAudio/Video
MCP3204 12bit ADC with ESP32
MCP3204 12bit ADC with ESP32
@embedded · 2022-11-19
B4RSnippetMQTT
ESP32CAM - Print Logs Workaround - b4xlib included
All of you that have bought the ESP32CAM you know that it does not print logs in B4R. So if you cannot go through a problem, just go around it. The around way is to post in MQTT server the logs and display them in B4J app. And it works.
@hatzisn · 2022-10-24
B4RSnippetComms & Network
Ethernet ENC28J60 solution
Ethernet ENC28J60 solution
@Nator · 2022-10-10
B4RSnippetB4R other hardware [96 PINS]
Reading 6 CJMCU [96 Pins] for keyboard
Reading 6 CJMCU [96 Pins] for keyboard
@Hans- Joachim Krahe · 2022-03-29
B4RSnippetEncryption [OTHER MD''S WILL DO, TOO]
ESP32: HMAC with SHA256 [other md''s will do, too] via inline c
Here''s a short example how to generate a HMAC SHA256 hash (via passphrase). It''s good to sign" messages as a passphrase is used to hash a message."
@KMatle · 2022-02-01
B4RSnippetDate/time [THE EASY WAY]
Get the time from a timeserver [the easy way]
Get the time from a timeserver [the easy way]
@KMatle · 2022-02-01
B4RSnippetStrings
Base64 en-/decode via inline C
Base64 en-/decode via inline C
@KMatle · 2022-01-31
B4RSnippetB4R
ESP8266 yield[] function
ESP8266 yield() function
@hatzisn · 2021-07-14
B4RSnippetTimer
Oscillator 1-1,000,000 Hz
Using 16b TIMER 1 and inline C to get oscillating output at PIN 9 (Arduino Uno). the frequency can be set to 1Hz up to 1MHz, the output is set by division of the 16MHz crystal. When the frequency is power of 2 the output is accurate, otherwise the error can be up to 0.04%.
@moty22 · 2021-06-21
B4RSnippetTimer
PWM with selection of frequency
Using inline C allows controlling TIMER 2 PWM output (analog output) to oscillate at selected frequencies of 61 Hz to 62,500 Hz.freq=1 to 7 select frequency, ana_out set the duty cycle and output at pin 11 (OSC2A) of Arduino Uno.
@moty22 · 2021-06-20
B4RSnippetB4R sensor [EMULATING PIR OPENING/CLOSING POWERED DOORS]
Using a PIR to rotate a servo [Emulating PIR opening/closing powered doors]
Using a PIR to rotate a servo [Emulating PIR opening/closing powered doors]
@Peter Simpson · 2021-05-23