B4J Question Reading ESP32 Camera Webserver

stevewidget

Member
Licensed User
Hi,
I have an M5stack camera I want to use remotely. I can see images in a web browser, but I want to be able to get the data and manipulate and display in B4X apps (starting with B4J) . I think I need to use HTTPUtils2 to get the jpeg stream, put it in BitMapCreator, modify then display. Sorry but I have searched and cant find how to setup HTTPutils2 in B4J. The tutorial is for B4A. I also looked in esp8266 to see if there was example of reading from server thert in B4J and couldnt find anything.
Can someone please point me in right direction, or help me onto the path if I have right idea.
Thanks
Steve
 

Molchyn

Member
Licensed User
Longtime User
Hi,
I have an M5stack camera I want to use remotely.
With [B4X] SD_ImageView
you can grab picture
B4X:
#Region Project Attributes
    #MainFormWidth: 800
    #MainFormHeight: 600
#End Region

Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
 
    Private SD_ImageView1 As SD_ImageView
End Sub

Sub AppStart (Form1 As Form, Args() As String)
    MainForm = Form1
    MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
    MainForm.Show
 
'    Sleep(1000)
'    SD_ImageView1.UrlBitmap="https://b4x-4c17.kxcdn.com/android/forum/data/avatars/l/0/1.jpg?1469350209"
    SD_ImageView1.UrlBitmap="http://10.169.145.54/jpg"
End Sub

'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
    Return True
End Sub

Sub SD_ImageView1_OneClick
 
End Sub

Sub SD_ImageView1_LongClick
 
End Sub
don't forget change IP
(in default version http:/192.168.4.1/jpg and connect by WIFI to M5Stack cam NETWORK)
 
Upvote 0
Top