First B4r project

Star-Dust

Expert
Licensed User
Longtime User
Yesterday I received an ESP32 microcontroller and I started testing it.
My wish is to port my 3D graphics library to the microcontroller with a display. But at the moment it seems like too daring a goal for my very little knowledge of B4R.

So I started with a simple project, creating an http server. Well after a few hours of banging my head to understand how to configure B4r and have the device recognized and that the debugging is very poor, I understand that there are no classes, lists, maps, that the functions only return basic data, the strings do not they are concatenated with neither with -& nor with +, that there are no services and that the types cannot contain objects, or at least if they contain them they do not work correctly....

I produced my first server... still in its infancy

1708860871164.png


1708860947274.png
1708862917843.png
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
I hope the http server library will be available for the community soon.
I don't know, it's very complicated with few tools available and also little time... but something will emerge sooner or later
 

hatzisn

Well-Known Member
Licensed User
Longtime User
Yesterday I received an ESP32 microcontroller and I started testing it.
My wish is to port my 3D graphics library to the microcontroller with a display. But at the moment it seems like too daring a goal for my very little knowledge of B4R.

So I started with a simple project, creating an http server. Well after a few hours of banging my head to understand how to configure B4r and have the device recognized and that the debugging is very poor, I understand that there are no classes, lists, maps, that the functions only return basic data, the strings do not they are concatenated with neither with -& nor with +, that there are no services and that the types cannot contain objects, or at least if they contain them they do not work correctly....

I produced my first server... still in its infancy

View attachment 151164

View attachment 151165 View attachment 151168

Deep dive directly. I would prefer step by step. Congratulations.
 

Star-Dust

Expert
Licensed User
Longtime User
I did a new experiment.

I used esp32 as the license key for my software. The software checks if there is an esp32 connected to the USB port and queries it, if the codes it receives are validated it starts the software.

It seems to work
 

Daestrum

Expert
Licensed User
Longtime User
I used esp32 as the license key for my software.
Something like this would be ideal for that
ATTINY85 Digispark - plugs straight into a usb port
 

Star-Dust

Expert
Licensed User
Longtime User
It looks excellent for the small size. I have to find a box case
 

hatzisn

Well-Known Member
Licensed User
Longtime User
Yesterday I received an ESP32 microcontroller and I started testing it.
My wish is to port my 3D graphics library to the microcontroller with a display. But at the moment it seems like too daring a goal for my very little knowledge of B4R.

So I started with a simple project, creating an http server. Well after a few hours of banging my head to understand how to configure B4r and have the device recognized and that the debugging is very poor, I understand that there are no classes, lists, maps, that the functions only return basic data, the strings do not they are concatenated with neither with -& nor with +, that there are no services and that the types cannot contain objects, or at least if they contain them they do not work correctly....

I produced my first server... still in its infancy

View attachment 151164

View attachment 151165 View attachment 151168

Basic debugging for all microprocessors (with breakpoints and variables viewing) can be achieved with the rDebug library (check B4R libraries in my contributions in my signature).
 

Cableguy

Expert
Licensed User
Longtime User
I did a new experiment.

I used esp32 as the license key for my software. The software checks if there is an esp32 connected to the USB port and queries it, if the codes it receives are validated it starts the software.

It seems to work
Are you using the ESP32 wired to the host USB port?
Why not use the USB wireless (wifi or bluetooth) in AP mode, and the host app would try to first scan it to see if the correct "dongle" was in range...
It's a cool idea!
 

Cableguy

Expert
Licensed User
Longtime User
As for the HTTP server... the greatest advantage of B4X is that you can tailor any solution to your needs....
The remote configuration example makes use of HTTP SET/POST, so you can create a code module and create your own http "server"
 

Star-Dust

Expert
Licensed User
Longtime User
Are you using the ESP32 wired to the host USB port?
Why not use the USB wireless (wifi or bluetooth) in AP mode, and the host app would try to first scan it to see if the correct "dongle" was in range...
It's a cool idea!
Yes, I preferred USB because with WIFI I don't know which network it is on and I would have to configure the SSID and Pass each time
 

Cableguy

Expert
Licensed User
Longtime User
Yes, I preferred USB because with WIFI I don't know which network it is on and I would have to configure the SSID and Pass each time
you could use wifi-direct and start the ESP32 in AP mode, so i'ts SSID and Password are always known (since you are setting them in your code)
You would need to power it somehow, though
 
Top