B4R Question B4R to add the library

xkz

Member
Hello, everyone,
Where did you all find the various library files, I can't find AsyncStreams, Network and so on right now, I need them but I don't know I have no other channel to get them except from the forum, can you provide other channels
thank you
 

xkz

Member
B4R creates an Arduino project and compiles it with Arduino compiler. You will need to wrap libraries or access them with inline C code.
Creating libraries for B4R
I have tried many methods and asked AI, but it seems that it can only convert a single file. The library I downloaded from Arduino IDE has many nested dependencies, so conversion will have problems, please provide other methods
 
Upvote 0

xkz

Member
B4R creates an Arduino project and compiles it with Arduino compiler. You will need to wrap libraries or access them with inline C code.
Creating libraries for B4R
Because there are multiple.h header files in this library, your method can only convert one file

C:\Users\admin\Documents\Arduino>java -jar "D:\Java\jdk-17\bin\B4Rh2xml.jar" "C:\Users\admin\Documents\Arduino\libraries\Blinker" "D:\B4R\Libraries\Blinker.xml"
parser._parseh (java line: 418)
java.io.FileNotFoundException: C:\Users\admin\Documents\Arduino\libraries\Blinker (????????)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:225)
at anywheresoftware.b4a.objects.streams.File.ReadList(File.java:241)
at b4j.example.parser._parseh(parser.java:418)
at b4j.example.parser._parse(parser.java:267)
at b4j.example.main._appstart(main.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
在 b4j.example.main.main(main.java:2
This is my error, can not convert the whole folder, can only convert a single header file, this is not what I need, please provide other methods
 
Upvote 0

xkz

Member
this one ?
I'm not sure if this is it, this is the package I downloaded, there are a lot of nested files, can not convert separately will get an error, forget the details, I can not upload the compressed Blinker
 

Attachments

  • linker.png
    85 KB · Views: 33
Upvote 0

candide

Active Member
Licensed User
i found your library : https://github.com/blinker-iot/blinker-library
this library don't have wrapper for B4R and it will be very difficult to use it in inline C, it is too big...

I don't know what you want to do but you have to find an other way.

why to start with this library in B4R ? it should be better to start with what is available in B4R and to ask if something more is needed.
in this forum, in "B4R Share Your Creations" you can find complete examples , in "B4R Libraries" you can find libraries available and ,in "B4R Code Snippets" + "B4R Tutorials" you can find examples of code for specific functions.

good luck!
 
Reactions: xkz
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…