Become a leader in the IoT community!
New DevHeads get a 320-point leaderboard boost when joining the DevHeads IoT Integration Community. In addition to learning and advising, active community leaders are rewarded with community recognition and free tech stuff. Start your Legendary Collaboration now!
you can make a system with esp32 which can talk with the Pc via uart then you can send the degrees of angle for the arm and you can interface with pyserial and flask
i already did the streaming and controling , i used pi 3 , but am looking for way to do both in the same time ,
what was the unusual behaviour if you can be a bit more specific?
i don’t want the streaming to stop when i control the robot , i mean i want to do both at the same time , also am controling weels not arm
i will share my code
do you have any idea about `ajax`?
with ajax you can make http requests without loading the website
maybe your issue is when you try to control your url changes?
something like that happens and your stream got interrupted if i’m not wrong?
no i didn’t try it before
mm no , so it’s like if i run the streaming i can’t control the robot and if i control the robot i can’t run the streaming , am looking to add maybe a library or a code ollow me to do both
my code is a bit long to share it here , i will lookfor a way to share it
can I see your code also how you were sending the data to the wheel
you can use github gist
the vedio over HTTP using Flask and control over HTTP POST requests
yes , give me a minute
raspberry-pi-camera-control.py
i think I figured out your issue
so when we make a http request our webpage reloads
to avoid that please look about ajax
https://www.w3schools.com/xml/ajax_intro.asp
it is
ajax just work with html
so that you can make post requests without reloading the page
so you just have to add it into your html
ow okay i got it
it’s a Jquery library
i was looking for it and i underdtand your idea , i will try it
let me know if it fixes your problem or we have to look for any other solutions
yes , i will thanx
experimenting with adding first class support for the `esp32-cam` https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2020/03/ESP32-CAM-AI-Thinker-schematic-diagram.png?quality=100&strip=all&ssl=1 to zephyr still early stages but you can check it out here. So far so good.
https://github.com/DevHeadsCommunity/zephyr/tree/origin/esp32-cam-board-support/boards/espressif/esp32s2_cam
I found a library call ‘schedule’, for running tasks at specific intervals without blocking other parts of the program , so that means they can run in parallel, what do you think
That’s just time slicing, to run two things in parallel you would need more than once processor
Read about parallelism vs concurrency
https://www.geeksforgeeks.org/difference-between-concurrency-and-parallelism/
Yes i understand the difference but I’m trying to run both tasks (control and streaming) in a way that feels as simultaneous as possible.
Ah well then you would run them concurrently not parallel. If you know what your deadlines are you can basically do everything in time and that should satisfy the simultaneous nature of your need.
this is the my code after the edit .
raspberry-pi-camera-control-.py
CONTRIBUTE TO THIS THREAD