ESP32 - use real time clock library rESP8266rtc
I have updated the B4R library rESP8266rtc (v1.05) so it can also be used with the ESP-32 modules.
@Starchild · 2018-07-07
rESP8266rtc .. a Real Time Clock
A software based Real Time Clock.
@Starchild · 2018-07-07
List module
It may be nice to have a List in B4R, so here is one, quite primitive. The module is a code module so it enables use of one list. If you need more - copy the module and change its name. The array defined in the module has a fixed size which must be set prior to compilation by literals. Sorting will be done only for values of numbers or numerical strings.
@derez · 2018-06-28
Map module
It may be nice to have a map in B4R, so here is one, quite primitive. The module is a code module so it enables use of one map. If you need more - copy the module and change its name. The arrays defined in the module have a fixed size which must be set prior to compilation by literals.
@derez · 2018-06-28
Getting local date & time (easy and free)
I saw a post or two about how to get the local date & time with no easy answers. I need this myself for my first Arduino project so I had a look around and found a free API that does just this! Although they also have a premium API, their free one is generous, allowing 1 request per second. I intend to only check it once or twice a day, myself. I should add that I found this through a 2-year-old post online where one person said it isn''t reliable. I''ve only tested it a few times but so far, so good. Info and how to sign up: https://timezonedb.com/
@Kevin · 2018-06-02
rESP32SimpleBLE - ESP32 BLE
This library makes it very simple to advertise data through BLE. You just need to call ble.Advertise with the string that you want to advertise as the device name. Note that it doesn''t support making connections.
@Erel · 2018-05-22
rESP32Bluetooth - Esp32 Classic Bluetooth
Very simple to use Bluetooth library for ESP32 modules. Note that you need to have a recent version of ESP32 SDK. If you encounter any error then download the complete SDK: https://github.com/espressif/arduino-esp32 and copy it to ESP32 SDK folder: C:\Users\\Documents\Arduino\hardware\espressif\esp32
@Erel · 2018-05-21
EEPROM Utility
one of the main problems is to save information, one of this is in the EEPROM memory, I made this little code that simplifies the way to save or read the information in the native data of B4R Since the EEPROM memory has a lifetime of writings (100,000 times, I''m not sure), so this code validates if the stored data is the same, and avoids writing, otherwise write the new data. this works like arrays accesed by index, This needs rEEPROM and rRandomAccess libraries.
@Bangdido · 2018-04-25
rAdafruit_MCP3008
Adruino Library for MCP3008 8-Channel 10-Bit ADC with SPI interface. http://www.adafruit.com/products/856
@Erel · 2018-04-22
rAdafruitSH1106 - SH1106 lcd
Adafruit graphic library for SH1106 driver lcds.
@Erel · 2018-04-22
Measure Analog Sensor on Digital Pin
Explanation is in the code. "Resistive Sensors" examples include Photocells (light sensor), Flex sensors, Thermistors (temperature reading).
@AHilton · 2018-04-18
Using a Wemos D1 R2 and stepper motor - control over wifi
This may be of interest to someone. I am using a Wemos D1 R2 in AP mode to serve a webpage to a client. The Wemos creates a server called "Wemos_Server" using the IP 192.168.4.1. When the browser opens this IP, a page is generated with three button: Start, Stop and Reverse. This controls a stepper motor. The speed can be controlled using the timer.
@Mark Read · 2018-04-11
BluePill on B4R
I have a bunch of bluepills and this weekend started to look into using them with B4R. I don''t tend to use these units with arduino projects as I prefer them with MBED. I have discovered a couple of things. 1: Don''t waste your time on a boot block. It barely works. You have to do some electrical mods that are questionable. And the gain is not much. Use SWLINK instead. A module costs under $5 on ebay and is completely integrated into the Arduino IDE and thus works in B4R. No pins to move. 2: Pin mapping doesn''t happen with B4R. I don''t know why as it is a thing in Arduino. Here is a sub that translates.
@mrred128 · 2018-03-11
Connecting two ESP8266 boards
In this example one of the boards acts as an access point and a server and the other board connects to the server wifi network and to the server socket. Note that for the client to be able to connect to the server socket it, its own access point must be disabled.
@Erel · 2018-02-19
Arduino + Raspberry Pi
Arduino + Raspberry Pi
@Erel · 2018-02-12
Programming an ESP8266 (ESP-12x) via a USB to Serial adaptor
Programming an ESP-12x module directly is not too difficult. If you purchase an ESP8266 with a built-in USB port like a WeMos D1 Mini or a NodeMCU etc, then you do not need to do this as the aforementioned boards already has USB to Serial port built into them. If like me you enjoy making projects as small as possible, then this solution is perfect for you as the ESP-12x boards DO NOT include an CH340G chip which supports serial interfacing communications via USB, but connecting to and programming an ESP-12x is simple to do via a USB to Serial module.
@Peter Simpson · 2018-01-31
Various table operation and lookup in PROGMEM
Various table operation and lookup in PROGMEM
@tigrot · 2018-01-22
Using an incremental rotary encoder
This is a quick tutorial on what an incremental rotary encoder (or rotary encoder for short) is and what it can be used for.
@Peter Simpson · 2018-01-18
Connecting to Arduino with BLE
Connecting to Arduino with BLE (Bluetooth Low Energy)
@Erel · 2018-01-17
Downloading a Web page with ESP8266
As a general rule, I recommend to use Raspberry Pi with B4J to interact with web servers or http clients. It is much more powerful and simpler to develop. The Arduino and ESP8266 strengths are in other domains. This small example sends a http request with WiFiSocket and reads the response with AsyncStreams.
@Erel · 2017-12-21
rRadioHead - RF95 / Dragino Lora shield
This is a wrapper for RadioHead library. Currently only RF95 is exposed. RadioHead documentation: http://www.airspayce.com/mikem/arduino/RadioHead/classRH__RF95.html#details : "Driver to send and receive unaddressed, unreliable datagrams via a LoRa capable radio transceiver."
@Erel · 2017-12-03
Define LCD custom characters for HD44780 controllers and compatible.
Here is a code snippet to define custom chars in HD44780 controllers
@tigrot · 2017-11-30
Strings and Bytes
Strings and Bytes
@Erel · 2017-11-26
A small sketch to read and write DS1307 RTC
This is a small sample to read and write date and time to DS1307. The single fields for time and date are defined in the B4R part. For this you need to download new libraries called Time and DS1307rtc in Arduino environment. The ones downloaded with Arduino are old. I have put integer constants to initialize the time and date fields. You can chose to get a string via serial interface and extract the values to init the device.
@tigrot · 2017-10-25
rRF24xt ... an extended library for nRF24L01+ radio modules
rRF24xt ... an extended library for nRF24L01+ radio modules
@Starchild · 2017-10-17
STM32 - Bluetooth
Following the tutorial here https://www.b4x.com/android/forum/threads/hc-05-classic-bluetooth.66677/ for connecting bluetooth to android I managed to connect android to stm32 with bluetooth (HC-06 in this case). The connection pins are as explained here https://www.b4x.com/android/forum/threads/stm32-and-softwareserial.84936/#post-538283 . The HC-06 requires 5v as vcc but the rx -tx pins use 3.3v so they connect directly to the stm32 rx-tx pins. The led pin number has to change, I used 32 for the on-board green led.
@derez · 2017-10-14
STM32 - With int/ext RTC and LCD
The attached two applications display real time on LCD 1602 (or similar - just find the address).
@derez · 2017-10-12
GSM - GPRS - Control the Arduino with SMS messages
GSM / GPRS - Control the Arduino with SMS messages
@Erel · 2017-10-08
MAX30100 interfacing with WEMOS using inline C...
Code to interface MAX30100 (Heart Rate and SPO2 sensor) breakout with WEMOS D1 mini using inline C.
@rbghongade · 2017-10-03
Simple example of how to have a TCP Server and make HTTP Client calls in same project
Simple example of how to have a TCP Server and make HTTP Client calls in same project
@miker2069 · 2017-09-24