Page 1 of 1

App developer How to rotate a 3D cube?

Posted: Mon Jan 11, 2021 5:15 pm
by stefan.erni
Hi Ben

Flowcode has a nice 3D windows.

It's simple to import 3D object.
How can I move and rotate the object in runtime?

I have an electronic in a box ready to work with an ESP32, Akku and 6-Axis IMU (*) and my goal is with the App developer fetch movement data from the cube via wifi and rotate the cube in the App developer.

(*) 6-Axis IMU Unit is a 6-axis attitude sensor with 3-axis gravity accelerometer and 3-axis gyroscope, which can calculate tilt angle and acceleration in real time.

This can also be a demo App if if a few people are interested.

regards

Stefan

Re: App developer How to rotate a 3D cube?

Posted: Mon Jan 11, 2021 5:28 pm
by Steve-Matrix
Hi Stefan,

You can rotate objects in simulation and in App Developer projects using the various "Rotate" simulation macros. Add a simulation macro and look at "Built in functions...Panel...Position".

Re: App developer How to rotate a 3D cube?

Posted: Mon Jan 11, 2021 6:30 pm
by BenR
Hi Stefan

This blog post from a few years back might be useful for you.

https://www.matrixtsl.com/blog/quadroco ... -and-gyro/

Re: App developer How to rotate a 3D cube?

Posted: Tue Jan 12, 2021 10:15 am
by stefan.erni
Hi Steve, Hi Ben

The 3D functions are fantastic. Perfect!

My computer is on my network with a network cable.
The cube is also on my network with WiFi. PING from the computer to the cube works.

For the ESP32 Cube looks there is a socket connection ready to use in Flowcode9.

How can I create a socket connection with the App developer ?

regards

Stefan

cube_rotate_2021-01-12_10-41-09.png
cube_rotate_2021-01-12_10-41-09.png (119.34 KiB) Viewed 5239 times

Re: App developer How to rotate a 3D cube?

Posted: Tue Jan 12, 2021 10:32 am
by BenR
Hi Stefan,

Using App Developer use the Network Comms component and that should do everything you need.

Let us know how you're getting on.

Re: App developer How to rotate a 3D cube?

Posted: Tue Jan 12, 2021 4:17 pm
by stefan.erni
Hi Ben

Ok for the App developer I have to use Network Comms.

In the forum I saw wardelder is using Network Comms on the ESP32
https://flowcode.co.uk/forums/viewtopic.php?f=5&t=115
But for the ESP32 program is not clear if Network Comms or just the Wlan_ESP32?

Both shows socket..

regards

Stefan
Wlan_ESP32_2021-01-12_16-53-45.png
Wlan_ESP32_2021-01-12_16-53-45.png (19.91 KiB) Viewed 5224 times
net_com_2021-01-12_16-51-59.png
net_com_2021-01-12_16-51-59.png (11.2 KiB) Viewed 5224 times

Re: App developer How to rotate a 3D cube?

Posted: Tue Jan 12, 2021 8:08 pm
by BenR
Hello,

The way it goes is the network comms component provides a general purpose interface for networking which includes simulation for Flowcode and App Developer.

This then can be linked to specific hardware interfaces e.g. the ESP32 WLAN or the ESP8266 WLAN to provide an embedded solution with a common socket interface.

You can drive the network comms component yourself or you can use it with library components such as the Modbus TCP, Webserver or other components designed for use with it.

I hope this makes sense.

Re: App developer How to rotate a 3D cube?

Posted: Wed Jan 13, 2021 9:51 am
by stefan.erni
Hi Ben

Ok the network comms component is very good.

What about a new component "Data socket server".

Something similar like the webserver but it's serve instead of HTML Code one or various data-buffer with 512byte (or much more).
This data buffers can be updated (changed) at runtime.

I suspect the socket client in the app developer can download this data very quickly and easily. Of course, many socket programs can download this data regardless of whether it is C #, C ++ or Python

regards

Stefan
Data_socket_server_2021-01-13_10-15-54.png
Data_socket_server_2021-01-13_10-15-54.png (27.63 KiB) Viewed 5201 times

Re: App developer How to rotate a 3D cube?

Posted: Wed Jan 13, 2021 12:32 pm
by BenR
Hi Stefan,

I like it it's a great idea. Would the data socket be able to act as both a server and client or would we have two seperate components do you think?

The DSP components have a Multiplex and Demultiplex ability which can pack up seperate streams into a single data array and visa versa. Could be useful or maybe we can find a way of doing this in a more static form so we don't need DSP streams.

I think before I dive in I'd lke to sniff around the possibilites and hopefully make something very useful :D

Modbus TCP is a similar thing but the data is pre-arranged into addresses. Might be worth you having a look at this while we work out the details.

Re: App developer How to rotate a 3D cube?

Posted: Wed Jan 13, 2021 1:29 pm
by stefan.erni
Hi Ben

Two seperate components seem easier to use and easier to understand.

Static is ok for me.
DSP component are very good and nice to use.
The output of DSP components can easily be written into a buffer. But definitely a great opportunity for the future.
When I think of a FLAC DSP component ...

https://www.matrixtsl.com/mmforums/view ... ac#p103930

regards


Stefan